![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Functions | |
| status_t | LTC_CMAC_InitDPA (LTC_Type *base, ltc_dpa_handle_t *handle, ltc_dpa_hash_algo_t algo, const uint8_t *key, size_t keySize) |
| Initialize CMAC context. More... | |
| status_t | LTC_CMAC_UpdateDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *message, size_t messageSize) |
| Add data to current CMAC. More... | |
| status_t | LTC_CMAC_FinishDPA (LTC_Type *base, ltc_dpa_handle_t *handle, uint8_t *output, size_t *outputSize) |
| Finalize hashing. More... | |
| status_t | LTC_CMAC_DPA (LTC_Type *base, ltc_dpa_handle_t *handle, ltc_dpa_hash_algo_t algo, const uint8_t *input, size_t inputSize, const uint8_t *key, size_t keySize, uint8_t *output, size_t *outputSize) |
| Create CMAC on given data. More... | |
| status_t LTC_CMAC_InitDPA | ( | LTC_Type * | base, |
| ltc_dpa_handle_t * | handle, | ||
| ltc_dpa_hash_algo_t | algo, | ||
| const uint8_t * | key, | ||
| size_t | keySize | ||
| ) |
This function initialize the CMAC. Key shall be supplied because the underlaying algoritm is AES XCBC-MAC or AES CMAC.
For XCBC-MAC, the key length must be 16. For CMAC, the key length can be the AES key lengths supported by AES engine.
| base | LTC peripheral base address |
| handle | pointer to ltc_dpa_handle_t structure which stores the transaction state. |
| algo | Underlaying algorithm to use for hash computation. |
| key | Input key (NULL if underlaying algorithm is SHA) |
| keySize | Size of input key in bytes |
| status_t LTC_CMAC_UpdateDPA | ( | LTC_Type * | base, |
| ltc_dpa_handle_t * | handle, | ||
| const uint8_t * | message, | ||
| size_t | messageSize | ||
| ) |
Add data to current CMAC. This can be called repeatedly with an arbitrary amount of data to be hashed.
| handle | pointer to ltc_dpa_handle_t structure which stores the transaction state. |
| message | Input data |
| messageSize | Size of input data in bytes |
| status_t LTC_CMAC_FinishDPA | ( | LTC_Type * | base, |
| ltc_dpa_handle_t * | handle, | ||
| uint8_t * | output, | ||
| size_t * | outputSize | ||
| ) |
Outputs the final hash and erases the context.
| handle | pointer to ltc_dpa_handle_t structure which stores the transaction state. | |
| [out] | output | Output hash data |
| [out] | outputSize | Output parameter storing the size of the output hash in bytes |
| status_t LTC_CMAC_DPA | ( | LTC_Type * | base, |
| ltc_dpa_handle_t * | handle, | ||
| ltc_dpa_hash_algo_t | algo, | ||
| const uint8_t * | input, | ||
| size_t | inputSize, | ||
| const uint8_t * | key, | ||
| size_t | keySize, | ||
| uint8_t * | output, | ||
| size_t * | outputSize | ||
| ) |
Perform the full keyed CMAC in one function call.
| base | LTC peripheral base address | |
| handle | pointer to ltc_dpa_handle_t structure which stores the transaction state. | |
| algo | Block cipher algorithm to use for CMAC creation | |
| input | Input data | |
| inputSize | Size of input data in bytes | |
| key | Input key | |
| keySize | Size of input key in bytes | |
| [out] | output | Output hash data |
| [out] | outputSize | Output parameter storing the size of the output hash in bytes |