MCUX CLNS
MCUX Crypto Library Normal Secure
 
Loading...
Searching...
No Matches

Interfaces to perform AEAD operations in multiple parts. More...

Functions

mcuxClAead_Status_t mcuxClAead_init (mcuxClSession_Handle_t session, mcuxClAead_Context_t *const pContext, mcuxClKey_Handle_t key, mcuxClAead_Mode_t mode, mcuxCl_InputBuffer_t pNonce, uint32_t nonceLength, uint32_t inLength, uint32_t adataLength, uint32_t tagLength)
 Multi-part authenticated encryption/decryption initialization function.
 
mcuxClAead_Status_t mcuxClAead_process (mcuxClSession_Handle_t session, mcuxClAead_Context_t *const pContext, mcuxCl_InputBuffer_t pIn, uint32_t inLength, mcuxCl_Buffer_t pOut, uint32_t *const pOutLength)
 Multi-part authenticated encryption/decryption processing function for the regular data (authenticated and encrypted)
 
mcuxClAead_Status_t mcuxClAead_process_adata (mcuxClSession_Handle_t session, mcuxClAead_Context_t *const pContext, mcuxCl_InputBuffer_t pAdata, uint32_t adataLength)
 Multi-part authenticated encryption/decryption processing function for the associated data (authenticated only)
 
mcuxClAead_Status_t mcuxClAead_finish (mcuxClSession_Handle_t session, mcuxClAead_Context_t *const pContext, mcuxCl_Buffer_t pOut, uint32_t *const pOutLength, mcuxCl_Buffer_t pTag)
 Multi-part authenticated encryption/decryption finalization function.
 
mcuxClAead_Status_t mcuxClAead_verify (mcuxClSession_Handle_t session, mcuxClAead_Context_t *const pContext, mcuxCl_InputBuffer_t pTag, mcuxCl_Buffer_t pOut, uint32_t *const pOutLength)
 Multi-part authenticated decryption verification function.
 

Detailed Description

Interfaces to perform AEAD operations in multiple parts.

Function Documentation

◆ mcuxClAead_init()

mcuxClAead_Status_t mcuxClAead_init ( mcuxClSession_Handle_t  session,
mcuxClAead_Context_t *const  pContext,
mcuxClKey_Handle_t  key,
mcuxClAead_Mode_t  mode,
mcuxCl_InputBuffer_t  pNonce,
uint32_t  nonceLength,
uint32_t  inLength,
uint32_t  adataLength,
uint32_t  tagLength 
)

Multi-part authenticated encryption/decryption initialization function.

This function performs the initialization for a multi part authenticated encryption/decryption operation. The algorithm to be used will be determined based on the key and mode that are provided.

Parameters
sessionHandle for the current CL session.
pContextAEAD context which is used to maintain the state and store other relevant information about the operation.
keyKey to be used to encrypt the data.
modeAEAD mode that should be used during the encryption/decryption operation.
[in]pNoncePointer to the buffer that contains the nonce.
nonceLengthNumber of bytes of nonce data in the nonce buffer.
inLengthNumber of bytes of plain data that will be processed.
adataLengthNumber of bytes of associated data that will be processed.
tagLengthNumber of bytes to be used for the authentication tag.
Returns
status

◆ mcuxClAead_process()

mcuxClAead_Status_t mcuxClAead_process ( mcuxClSession_Handle_t  session,
mcuxClAead_Context_t *const  pContext,
mcuxCl_InputBuffer_t  pIn,
uint32_t  inLength,
mcuxCl_Buffer_t  pOut,
uint32_t *const  pOutLength 
)

Multi-part authenticated encryption/decryption processing function for the regular data (authenticated and encrypted)

This function performs the processing of (a part of) a data stream for an authenticated encryption/decryption operation. The algorithm and key to be used will be determined based on the context that is provided.

Parameters
sessionHandle for the current CL session.
pContextAEAD context which is used to maintain the state and store other relevant information about the operation.
[in]pInPointer to the input buffer that contains the data that needs to be processed.
inLengthNumber of bytes of data in the in buffer.
[out]pOutPointer to the output buffer where the processed data needs to be written.
[out]pOutLengthWill be incremented by the number of bytes of processed data that have been written to the out buffer.
Returns
status

◆ mcuxClAead_process_adata()

mcuxClAead_Status_t mcuxClAead_process_adata ( mcuxClSession_Handle_t  session,
mcuxClAead_Context_t *const  pContext,
mcuxCl_InputBuffer_t  pAdata,
uint32_t  adataLength 
)

Multi-part authenticated encryption/decryption processing function for the associated data (authenticated only)

This function performs the processing of (a part of) an associated data stream for an authenticated encryption/decryption operation. The algorithm and key to be used will be determined based on the context that is provided.

Parameters
sessionHandle for the current CL session.
pContextAEAD context which is used to maintain the state and store other relevant information about the operation.
[in]pAdataAssociated data that needs to be proccessed.
adataLengthNumber of bytes of associated data in the adata buffer.
Returns
status

◆ mcuxClAead_finish()

mcuxClAead_Status_t mcuxClAead_finish ( mcuxClSession_Handle_t  session,
mcuxClAead_Context_t *const  pContext,
mcuxCl_Buffer_t  pOut,
uint32_t *const  pOutLength,
mcuxCl_Buffer_t  pTag 
)

Multi-part authenticated encryption/decryption finalization function.

This function performs the finalization of an authenticated encryption or decryption operation and produces the authentication tag. The algorithm and key to be used will be determined based on the context that is provided.

Note: the taglength is already specified when the INIT function is called.

Parameters
sessionHandle for the current CL session.
pContextAEAD context which is used to maintain the state and store other relevant information about the operation.
[out]pOutPointer to the output buffer where the processed data needs to be written.
[out]pOutLengthWill be incremented by the number of bytes of processed data that have been written to the out buffer.
[out]pTagPointer to the output buffer where the tag needs to be written.
Returns
status

◆ mcuxClAead_verify()

mcuxClAead_Status_t mcuxClAead_verify ( mcuxClSession_Handle_t  session,
mcuxClAead_Context_t *const  pContext,
mcuxCl_InputBuffer_t  pTag,
mcuxCl_Buffer_t  pOut,
uint32_t *const  pOutLength 
)

Multi-part authenticated decryption verification function.

This function performs the finalization of an authenticated decryption operation and verifies the authentication tag. The algorithm and key to be used will be determined based on the context that is provided.

This function can be used as an alternative for mcuxClAead_finish when one also wants to perform the tag verification step.

Note: the taglength is already specified when the INIT function is called.

Parameters
sessionHandle for the current CL session.
pContextAEAD context which is used to maintain the state and store other relevant information about the operation.
[in]pTagPointer to the buffer that contains the tag.
[out]pOutPointer to the output buffer where the authenticated decrypted data needs to be written.
[out]pOutLengthWill be incremented by the number of bytes of authenticated decrypted data that have been written to the out buffer.
Returns
status