Implementation of the AES CMAC hashing function.
More...
Implementation of the AES CMAC hashing function.
|
file | cmac.h |
| AES_CMAC interface definition.
|
|
◆ cmac_final()
Finalizes the CMAC message digest.
- Parameters
-
[in] | ctx | Pointer to the CMAC context |
[out] | digest | Result location |
◆ cmac_init()
int cmac_init |
( |
cmac_context_t * |
ctx, |
|
|
const uint8_t * |
key, |
|
|
uint8_t |
key_size |
|
) |
| |
Initialize CMAC message digest context.
- Parameters
-
[in] | ctx | Pointer to the CMAC context to initialize |
[in] | key | Key to be set |
[in] | key_size | Size of the key |
- Returns
- CIPHER_INIT_SUCCESS if the initialization was successful. CIPHER_ERR_INVALID_KEY_SIZE if the key size is not valid.
◆ cmac_update()
void cmac_update |
( |
cmac_context_t * |
ctx, |
|
|
const void * |
data, |
|
|
size_t |
len |
|
) |
| |
Update the CMAC context with a portion of the message being hashed.
- Parameters
-
[in] | ctx | Pointer to the CMAC context to update |
[in] | data | Input data |
[in] | len | Length of data |