Defines all functions of mcuxClEls_Cmac. More...
Functions | |
MCUXCLELS_API mcuxClEls_Status_t | mcuxClEls_Cmac_Async (mcuxClEls_CmacOption_t options, mcuxClEls_KeyIndex_t keyIdx, uint8_t const *pKey, size_t keyLength, uint8_t const *pInput, size_t inputLength, uint8_t *pMac) |
Performs CMAC with AES-128 or AES-256. | |
Defines all functions of mcuxClEls_Cmac.
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_Cmac_Async | ( | mcuxClEls_CmacOption_t | options, |
mcuxClEls_KeyIndex_t | keyIdx, | ||
uint8_t const * | pKey, | ||
size_t | keyLength, | ||
uint8_t const * | pInput, | ||
size_t | inputLength, | ||
uint8_t * | pMac | ||
) |
Performs CMAC with AES-128 or AES-256.
Call mcuxClEls_WaitForOperation to complete the operation.
[in] | options | The command options. For more information, see mcuxClEls_CmacOption_t. |
[in] | keyIdx | The CMAC key index |
[in] | pKey | Pointer to the padded CMAC key |
[in] | keyLength | Size of pKey in bytes. Must be a valid CMAC key size. See the parameter properties section in the function description. |
[in] | pInput | Pointer to a memory location which contains the data, padded via SP 800-38b standard, to be authenticated |
[in] | inputLength | Size of pInput in bytes before padding |
[in,out] | pMac | Pointer to the CMAC command state input/output. See the parameter properties section in the function description. |
The properties of some parameters change with respect to selected options.
options.extkey
== MCUXCLELS_CMAC_EXTERNAL_KEY_ENABLE keyIdx
is ignored.
options.extkey
== MCUXCLELS_CMAC_EXTERNAL_KEY_DISABLE pKey
is ignored.
keyLength
is ignored.
options.finalize
== MCUXCLELS_CMAC_FINALIZE_DISABLE) The intermediate state is written to pMac
.
options.finalize
== MCUXCLELS_CMAC_FINALIZE_ENABLE The resulting MAC is written to pMac
.
options.soe
is ignored.
MCUXCLELS_STATUS_SW_INVALID_PARAM | if an invalid parameter was specified |
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPT | if a running operation prevented the request |
MCUXCLELS_STATUS_OK_WAIT | on successful request |