Interfaces to perform MAC operations in one shot. More...
Functions | |
MCUX_CSSL_FP_PROTECTED_TYPE (mcuxClMac_Status_t) mcuxClMac_compute(mcuxClSession_Handle_t session | |
One-shot message authentication code (MAC) computation function. More... | |
Variables | |
mcuxClKey_Handle_t | key |
mcuxClKey_Handle_t mcuxClMac_Mode_t | mode |
mcuxClKey_Handle_t mcuxClMac_Mode_t mcuxCl_InputBuffer_t | pIn |
mcuxClKey_Handle_t mcuxClMac_Mode_t mcuxCl_InputBuffer_t uint32_t | inLength |
mcuxClKey_Handle_t mcuxClMac_Mode_t mcuxCl_InputBuffer_t uint32_t mcuxCl_Buffer_t | pMac |
mcuxClKey_Handle_t mcuxClMac_Mode_t mcuxCl_InputBuffer_t uint32_t mcuxCl_Buffer_t uint32_t *const | pMacLength |
Interfaces to perform MAC operations in one shot.
MCUX_CSSL_FP_PROTECTED_TYPE | ( | mcuxClMac_Status_t | ) |
One-shot message authentication code (MAC) computation function.
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.
Finalize a MAC generation for a multipart MAC computation.
Data processing for a multipart MAC computation.
Initialization for a multipart MAC computation.
This function performs a MAC computation in one shot. The algorithm to be used will be determined based on the key that is provided.
For example, to perform an AES MAC computation with a 128-bit key in CMAC mode on padded data, the following needs to be provided:
[in] | session | Handle for the current CL session. |
[in] | key | Key to be used to authenticate the data. |
[in] | mode | Mode that should be used during the MAC operation. |
[in] | pIn | Pointer to the input buffer that contains the data that needs to be authenticated. |
[in] | inLength | Number of bytes of data in the pIn buffer. |
[out] | pMac | Pointer to the output buffer where the MAC needs to be written. |
[out] | pMacLength | Will be incremented by the number of bytes of data that have been written to the pMac buffer. |
MCUXCLMAC_STATUS_OK | Mac operation successful |
MCUXCLMAC_STATUS_ERROR | Error occurred during Mac operation |
MCUXCLMAC_STATUS_INVALID_PARAM | An invalid parameter was given to the function |
MCUXCLMAC_STATUS_FAULT_ATTACK | Fault attack detected |
This function performs the initialization of a context for a multipart MAC computation. The algorithm to be used will be determined based on the key that is provided.
This function should only be called once, as the first step for a multipart computation.
For example, to perform a multipart AES MAC computation with a 128-bit key in CMAC mode on padded data, the following needs to be provided in this step:
The size of the context depends on the mode used (see mcuxClMac_MemoryConsumption).
[in] | session | Handle for the current CL session. |
[in] | pContext | MAC context which is used to maintain the state and store other relevant information about the operation. |
[in] | key | Key to be used to MAC the data. |
[in] | mode | Mode that should be used during the MAC operation. |
MCUXCLMAC_STATUS_OK | Mac operation successful |
MCUXCLMAC_STATUS_ERROR | Error occurred during Mac operation |
MCUXCLMAC_STATUS_INVALID_PARAM | An invalid parameter was given to the function |
MCUXCLMAC_STATUS_FAULT_ATTACK | Fault attack detected |
This function performs the data processing for a multipart MAC computation. The algorithm and key to be used will be determined based on the context that is provided.
This function can be called multiple times, after the multipart context initialization.
For example, to perform a multipart AES MAC computation with a 128-bit key in CMAC mode on padded data, the following needs to be provided in this step:
The size of the context depends on the mode used (see mcuxClMac_MemoryConsumption).
session | Handle for the current CL session. | |
[in] | pContext | MAC context which is used to maintain the state and store other relevant information about the operation. |
[in] | pIn | Pointer to the input buffer that contains the data that need to be processed. |
[in] | inLength | Number of bytes of data in the in buffer. |
MCUXCLMAC_STATUS_OK | Mac operation successful |
MCUXCLMAC_STATUS_ERROR | Error occurred during Mac operation |
MCUXCLMAC_STATUS_INVALID_PARAM | An invalid parameter was given to the function |
MCUXCLMAC_STATUS_FAULT_ATTACK | Fault attack detected |
This function performs the final MAC generation step for a multipart MAC computation. The algorithm and key to be used will be determined based on the context that is provided.
This function should only be called once, as the last step for a multipart computation.
For example, to perform a multipart AES MAC computation with a 128-bit key in CMAC mode on padded data, the following needs to be provided in this step:
The size of the context depends on the mode used (see mcuxClMac_MemoryConsumption).
[in] | session | Handle for the current CL session. |
[in] | pContext | MAC context which is used to maintain the state and store other relevant information about the operation. |
[out] | pMac | Pointer to the output buffer where the MAC needs to be written. |
[out] | pMacLength | Will be incremented by the number of bytes of data that have been written to the pMac buffer. |
MCUXCLMAC_STATUS_OK | Mac operation successful |
MCUXCLMAC_STATUS_ERROR | Error occurred during Mac operation |
MCUXCLMAC_STATUS_INVALID_PARAM | An invalid parameter was given to the function |
MCUXCLMAC_STATUS_FAULT_ATTACK | Fault attack detected |