![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
NXP Semiconductors
|
Functions | |
status_t | CAAM_HMAC_NonBlocking (CAAM_Type *base, caam_handle_t *handle, caam_desc_hash_t descriptor, caam_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 Message Authentication Code (MAC) on given data. More... | |
status_t CAAM_HMAC_NonBlocking | ( | CAAM_Type * | base, |
caam_handle_t * | handle, | ||
caam_desc_hash_t | descriptor, | ||
caam_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 XCBC-MAC/CMAC, or HMAC-SHA in one function call.
Key shall be supplied if the underlaying algoritm is AES XCBC-MAC, CMAC, or SHA HMAC.
For XCBC-MAC, the key length must be 16. For CMAC, the key length can be the AES key lengths supported by AES engine. For HMAC, the key can have any size, however the function will block if the supplied key is bigger than the block size of the underlying hashing algorithm (e.g. >64 bytes for SHA256).
The function is not blocking with the exception of supplying large key sizes. In that case the function will block until the large key is hashed down with the supplied hashing algorithm (as per FIPS 198-1), after which operation is resumed to calling non-blocking HMAC.
base | CAAM peripheral base address | |
handle | Handle used for this request. | |
[out] | descriptor | Memory for the CAAM descriptor. |
algo | Underlaying algorithm to use for MAC computation. | |
input | Input data | |
inputSize | Size of input data in bytes | |
key | Input key | |
keySize | Size of input key in bytes | |
[out] | output | Output MAC data |
[out] | outputSize | Output parameter storing the size of the output MAC in bytes |