Loading...
Searching...
No Matches

Implementation of the AES128 CMAC hashing function. More...

Detailed Description

Implementation of the AES128 CMAC hashing function.

Files

file  aes128_cmac.h
 AES128_CMAC interface definition.
 

Data Structures

struct  aes128_cmac_context_t
 AES128_CMAC calculation context. More...
 

Macros

#define AES128_CMAC_BLOCK_SIZE   16
 Length of AES128_CMAC block in bytes.
 

Functions

int aes128_cmac_init (aes128_cmac_context_t *ctx, const uint8_t *key, uint8_t key_size)
 Initialize AES128 CMAC message digest context.
 
void aes128_cmac_update (aes128_cmac_context_t *ctx, const void *data, size_t len)
 Update the AES128 CMAC context with a portion of the message being hashed.
 
void aes128_cmac_final (aes128_cmac_context_t *ctx, void *digest)
 Finalizes the CMAC message digest.
 

Macro Definition Documentation

◆ AES128_CMAC_BLOCK_SIZE

#define AES128_CMAC_BLOCK_SIZE   16

Length of AES128_CMAC block in bytes.

Definition at line 35 of file aes128_cmac.h.

Function Documentation

◆ aes128_cmac_final()

void aes128_cmac_final ( aes128_cmac_context_t ctx,
void *  digest 
)

Finalizes the CMAC message digest.

Parameters
[in]ctxPointer to the AES128 CMAC context
[out]digestResult location

◆ aes128_cmac_init()

int aes128_cmac_init ( aes128_cmac_context_t ctx,
const uint8_t *  key,
uint8_t  key_size 
)

Initialize AES128 CMAC message digest context.

Parameters
[in]ctxPointer to the AES128 CMAC context to initialize
[in]keyKey to be set
[in]key_sizeSize of the key
Returns
CIPHER_INIT_SUCCESS if the initialization was successful. CIPHER_ERR_INVALID_KEY_SIZE if the key size is not valid.

◆ aes128_cmac_update()

void aes128_cmac_update ( aes128_cmac_context_t ctx,
const void *  data,
size_t  len 
)

Update the AES128 CMAC context with a portion of the message being hashed.

Parameters
[in]ctxPointer to the AES128 CMAC context to update
[in]dataInput data
[in]lenLength of data