MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClEls_Aead_Functions

Defines all functions of mcuxClEls_Aead. More...

Functions

MCUXCLELS_API MCUX_CSSL_FP_PROTECTED_TYPE (mcuxClEls_Status_t) mcuxClEls_Aead_Init_Async(mcuxClEls_AeadOption_t options
 AES-GCM initialization. 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 * pIV
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const size_t uint8_t const size_t ivLength
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const size_t uint8_t const size_t uint8_t * pAeadCtx
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const size_t uint8_t const * pAad
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const size_t uint8_t const size_t aadLength
 
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 * pOutput
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const size_t size_t size_t dataLength
 
MCUXCLELS_API mcuxClEls_KeyIndex_t uint8_t const size_t size_t size_t uint8_t * pTag
 
mcuxClKey_Handle_t mcuxClCipher_Mode_t mcuxCl_InputBuffer_t uint32_t ivLength
 

Detailed Description

Defines all functions of mcuxClEls_Aead.

Function Documentation

◆ MCUX_CSSL_FP_PROTECTED_TYPE()

MCUXCLELS_API MCUX_CSSL_FP_PROTECTED_TYPE ( mcuxClEls_Status_t  )

AES-GCM initialization.

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.

AES-GCM final encryption/decryption.

AES-GCM update of the encrypted data.

AES-GCM update of the Additional Authenticated Data (AAD)

AES-GCM partial initialization.

This is the first stage of AEAD encryption/decryption. This generates the initial context out of the IV pIV and the key (pKey or keyIdx).

Call #mcuxClEls_WaitForOperation to complete the operation.

Parameters
[in]optionsThe AEAD command options. For more information, see mcuxClEls_AeadOption_t.
[in]keyIdxIndex of the key inside the ELS keystore
[in]pKeyPointer to the key
[in]keyLengthSize of pKey in bytes
[in]pIVPointer to memory area that contains the IV
[in]ivLengthSize of pIV in bytes, with padding
[out]pAeadCtxPointer to the memory area that receives the AEAD context structure. Must be at least MCUXCLELS_AEAD_CONTEXT_SIZE bytes long.

The properties of some parameters change with respect to selected options.

Parameter properties
options.extkey == MCUXCLELS_AEAD_EXTERN_KEY

keyIdx is ignored.

pKey must be a valid AES key and keyLength a valid AES key size (see MCUXCLELS_CIPHER_KEY_SIZE_AES_).

options.extkey == MCUXCLELS_AEAD_INTERN_KEY

keyIdx must be a valid key index with the correct usage rights.

pKey and keyLength are 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 invalid parameters were specified
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPTif a running operation prevented the request
MCUXCLELS_STATUS_OK_WAITon successful request

This is the first stage of AEAD encryption/decryption. This generates the initial context out of the IV pIV and the key (pKey or keyIdx).

Call #mcuxClEls_WaitForOperation to complete the operation.

Parameters
[in]optionsThe AEAD command options. For more information, see mcuxClEls_AeadOption_t.
[in]keyIdxIndex of the key inside the ELS keystore
[in]pKeyPointer to the key
[in]keyLengthSize of pKey in bytes
[in]pIVPointer to memory area that contains the IV
[in]ivLengthSize of pIV in bytes, with padding
[out]pAeadCtxPointer to the memory area that receives the AEAD context structure. Must be at least MCUXCLELS_AEAD_CONTEXT_SIZE bytes long.

The properties of some parameters change with respect to selected options.

Parameter properties
options.extkey == MCUXCLELS_AEAD_EXTERN_KEY

keyIdx is ignored.

pKey must be a valid AES key and keyLength a valid AES key size (see MCUXCLELS_CIPHER_KEY_SIZE_AES_).

options.extkey == MCUXCLELS_AEAD_INTERN_KEY

keyIdx must be a valid key index with the correct usage rights.

pKey and keyLength are ignored.

options.msgendw
This field 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 invalid parameters were specified
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPTif a running operation prevented the request
MCUXCLELS_STATUS_OK_WAITon successful request

This is the second stage of AEAD encryption/decryption. This updates the internal authentication tag with the AAD.

#mcuxClEls_Aead_Init_Async must have been called before calling this function.

Call #mcuxClEls_WaitForOperation to complete the operation.

Parameters
[in]optionsThe AEAD command options. For more information, see mcuxClEls_AeadOption_t.
[in]keyIdxIndex of the key inside the ELS keystore
[in]pKeyPointer to the key
[in]keyLengthSize of pKey in bytes
[in]pAadMemory area that contains the AAD
[in]aadLengthLength of the pAad in bytes with padding
[in,out]pAeadCtxPointer to the AEAD context structure. Must be at least MCUXCLELS_AEAD_CONTEXT_SIZE bytes long.

The properties of some parameters change with respect to selected options.

Parameter properties
options.extkey == MCUXCLELS_AEAD_EXTERN_KEY

keyIdx is ignored.

pKey must be a valid AES key and keyLength a valid AES key size (see MCUXCLELS_CIPHER_KEY_SIZE_AES_).

options.extkey == MCUXCLELS_AEAD_INTERN_KEY

keyIdx must be a valid key index with the correct usage rights.

pKey and keyLength are ignored.

options.msgendw
This field 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 invalid parameters were specified
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPTif a running operation prevented the request
MCUXCLELS_STATUS_OK_WAITon successful request

This is the third stage of AEAD encryption/decryption. This processes the given plaintext (in case of encryption) or ciphertext (in case of decryption) and outputs the ciphertext (in case of encryption) or plaintext (in case of decryption).

#mcuxClEls_Aead_Init_Async, #mcuxClEls_Aead_UpdateAad_Async must have been called before calling this function.

Call #mcuxClEls_WaitForOperation to complete the operation.

Parameters
[in]optionsThe AEAD command options. For more information, see mcuxClEls_AeadOption_t.
[in]keyIdxIndex of the key inside the ELS keystore
[in]pKeyPointer to the key
[in]keyLengthSize of pKey in bytes
[in]pInputPointer to the memory location of the data to be processed
[in]inputLengthSize of pInput in bytes with padding
[out]pOutputPointer to the processed data memory location
[in,out]pAeadCtxPointer to the AEAD context structure. Must be at least MCUXCLELS_AEAD_CONTEXT_SIZE bytes long.

The properties of some parameters change with respect to selected options.

Parameter properties
options.extkey == MCUXCLELS_AEAD_EXTERN_KEY

keyIdx is ignored.

pKey must be a valid AES key and keyLength a valid AES key size (see MCUXCLELS_CIPHER_KEY_SIZE_AES_).

options.extkey == MCUXCLELS_AEAD_INTERN_KEY

keyIdx must be a valid key index with the correct usage rights.

pKey and keyLength are ignored.

options.msgendw
This field has to be set to the size of the last data block (plain/cipher text) in bytes, without padding. In case the last block is a full block, this field has to be set to 0.
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 invalid parameters were specified
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPTif a running operation prevented the request
MCUXCLELS_STATUS_OK_WAITon successful request

This is the fourth stage of AEAD encryption/decryption. This updates the authentication tag with the final data length block and outputs the tag at the desired location.

#mcuxClEls_Aead_Init_Async, #mcuxClEls_Aead_UpdateAad_Async and #mcuxClEls_Aead_UpdateData_Async must have been called before calling this function.

Call #mcuxClEls_WaitForOperation to complete the operation.

Parameters
[in]optionsThe AEAD command options. For more information, see mcuxClEls_AeadOption_t.
[in]keyIdxIndex of the key inside the ELS keystore
[in]pKeyPointer to the key
[in]keyLengthSize of pKey in bytes
[in]aadLengthLength of the complete Additional Authenticated Data (AAD) in bytes, without padding.
[in]dataLengthLength of the complete plaintext/ciphertext in bytes, without padding.
[out]pTagPointer where the resulting tag will be stored
[in]pAeadCtxPointer to the AEAD context structure. Must be at least MCUXCLELS_AEAD_CONTEXT_SIZE bytes long.

The properties of some parameters change with respect to selected options.

Parameter properties
options.extkey == MCUXCLELS_AEAD_EXTERN_KEY

keyIdx is ignored.

pKey must be a valid AES key and keyLength a valid AES key size (see MCUXCLELS_CIPHER_KEY_SIZE_AES_).

options.extkey == MCUXCLELS_AEAD_INTERN_KEY

keyIdx must be a valid key index with the correct usage rights.

pKey and keyLength are ignored.

options.msgendw
This field 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 invalid parameters were specified
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPTif a running operation prevented the request
MCUXCLELS_STATUS_OK_WAITon successful request