MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClEls_Cmac_Functions

Defines all functions of mcuxClEls_Cmac. More...

Functions

MCUXCLELS_API MCUX_CSSL_FP_PROTECTED_TYPE (mcuxClEls_Status_t) mcuxClEls_Cmac_Async(mcuxClEls_CmacOption_t options
 Performs CMAC with AES-128 or AES-256. More...
 

Variables

MCUXCLELS_API mcuxClEls_KeyIndex_t keyIdx
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const * pKey
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const size_t keyLength
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const size_t uint8_t const * pInput
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const size_t uint8_t const size_t inputLength
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const size_t uint8_t const size_t uint8_t * pMac
 

Detailed Description

Defines all functions of mcuxClEls_Cmac.

Function Documentation

◆ MCUX_CSSL_FP_PROTECTED_TYPE()

MCUXCLELS_API MCUX_CSSL_FP_PROTECTED_TYPE ( mcuxClEls_Status_t  )

Performs CMAC with AES-128 or AES-256.

Deprecated type for mcuxClSession protected status codes.

Deprecated type for RSA protected status codes.

Deprecated type for error codes used by code-flow protected PKC component functions.

Deprecated type for error codes used by code-flow protected mcuxClMemory component functions.

Deprecated type for error codes used by code-flow protected Math component functions.

Deprecated type for Key component error codes, returned by functions with code-flow protection.

Deprecated type for ELS driver protected status codes.

Deprecated type for mcuxClEcc component return codes.

Call #mcuxClEls_WaitForOperation to complete the operation.

Parameters
[in]optionsThe command options. For more information, see mcuxClEls_CmacOption_t.
[in]keyIdxThe CMAC key index
[in]pKeyPointer to the padded CMAC key
[in]keyLengthSize of pKey in bytes. Must be a valid CMAC key size. See the parameter properties section in the function description.
[in]pInputPointer to a memory location which contains the data, padded via SP 800-38b standard, to be authenticated
[in]inputLengthSize of pInput in bytes before padding
[in,out]pMacPointer 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.

Parameter properties
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.

Returns
An error code that can be any error code in MCUXCLELS_STATUS_, see individual documentation for more information
Return values
MCUXCLELS_STATUS_SW_INVALID_PARAMif an invalid parameter was specified
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPTif a running operation prevented the request
MCUXCLELS_STATUS_OK_WAITon successful request