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. | |
Interfaces to perform AEAD operations in multiple parts.
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.
session | Handle for the current CL session. | |
pContext | AEAD context which is used to maintain the state and store other relevant information about the operation. | |
key | Key to be used to encrypt the data. | |
mode | AEAD mode that should be used during the encryption/decryption operation. | |
[in] | pNonce | Pointer to the buffer that contains the nonce. |
nonceLength | Number of bytes of nonce data in the nonce buffer. | |
inLength | Number of bytes of plain data that will be processed. | |
adataLength | Number of bytes of associated data that will be processed. | |
tagLength | Number of bytes to be used for the authentication tag. |
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.
session | Handle for the current CL session. | |
pContext | AEAD 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 needs to be processed. |
inLength | Number of bytes of data in the in buffer. | |
[out] | pOut | Pointer to the output buffer where the processed data needs to be written. |
[out] | pOutLength | Will be incremented by the number of bytes of processed data that have been written to the out buffer. |
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.
session | Handle for the current CL session. | |
pContext | AEAD context which is used to maintain the state and store other relevant information about the operation. | |
[in] | pAdata | Associated data that needs to be proccessed. |
adataLength | Number of bytes of associated data in the adata buffer. |
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.
session | Handle for the current CL session. | |
pContext | AEAD context which is used to maintain the state and store other relevant information about the operation. | |
[out] | pOut | Pointer to the output buffer where the processed data needs to be written. |
[out] | pOutLength | Will be incremented by the number of bytes of processed data that have been written to the out buffer. |
[out] | pTag | Pointer to the output buffer where the tag needs to be written. |
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.
session | Handle for the current CL session. | |
pContext | AEAD context which is used to maintain the state and store other relevant information about the operation. | |
[in] | pTag | Pointer to the buffer that contains the tag. |
[out] | pOut | Pointer to the output buffer where the authenticated decrypted data needs to be written. |
[out] | pOutLength | Will be incremented by the number of bytes of authenticated decrypted data that have been written to the out buffer. |