3. CMOX_MD

3.1. MD public types

group CMOX_MD_PUBLIC_TYPES

Typedefs

typedef const struct cmox_md_vtableStruct_st * cmox_md_vtable_t

MD Virtual Table.

This type specifies a pointer to the virtual table containing the methods for the particular MD algorithm

struct cmox_md_engineCommon_t
#include <cmox_md.h>

MD engine common structure definition.

Public Members

cmox_md_vtable_t table

MD virtual table

uint32_t flags

32 bit flags, used to perform keyschedule

size_t tagLen

Size of the required Digest

size_t blockLen

Internal: Size of processed blocks

size_t labelLen

Internal: Size of the final label of the MD padding scheme

uint32_t bitCount [ 2 ]

Internal: Keeps the count of processed bits

struct cmox_mdSmall_engine_t
#include <cmox_md.h>

MD small engine structure definition (Used by SHA1, SHA224, SHA256, SM3).

Public Members

cmox_md_engineCommon_t engine

Engine of the MD function

uint8_t internalBuffer [ 64 ]

Internal: It’s a buffer with the data to be hashed

uint32_t internalState [ 8 ]

Internal: Keeps the internal state

struct cmox_mdLarge_engine_t
#include <cmox_md.h>

MD large engine structure definition (Used by SHA384, SHA512).

Public Members

cmox_md_engineCommon_t engine

Engine of the MD function

uint8_t internalBuffer [ 128 ]

Internal: It’s a buffer with the data to be hashed

uint64_t internalState [ 8 ]

Internal: Keeps the internal state

struct cmox_mdSmall_handle_t
#include <cmox_md.h>

Generic MD small handle structure.

Public Members

cmox_hash_handle_t super

General hash module

cmox_mdSmall_engine_t md

MD small engine

struct cmox_mdLarge_handle_t
#include <cmox_md.h>

Generic MD large handle structure.

Public Members

cmox_hash_handle_t super

General hash module

cmox_mdLarge_engine_t md

MD large engine