Interfaces to perform AEAD operations in one shot. More...
Modules | |
Multi-part AEAD interfaces | |
Interfaces to perform AEAD operations in multiple parts. | |
Functions | |
mcuxClAead_Status_t | mcuxClAead_crypt (mcuxClSession_Handle_t session, mcuxClKey_Handle_t key, mcuxClAead_Mode_t mode, mcuxCl_InputBuffer_t pNonce, uint32_t nonceLength, mcuxCl_InputBuffer_t pIn, uint32_t inLength, mcuxCl_InputBuffer_t pAdata, uint32_t adataLength, mcuxCl_Buffer_t pOut, uint32_t *const pOutLength, mcuxCl_Buffer_t pTag, uint32_t tagLength) |
One-shot authenticated encryption/decryption function. | |
Interfaces to perform AEAD operations in one shot.
mcuxClAead_Status_t mcuxClAead_crypt | ( | mcuxClSession_Handle_t | session, |
mcuxClKey_Handle_t | key, | ||
mcuxClAead_Mode_t | mode, | ||
mcuxCl_InputBuffer_t | pNonce, | ||
uint32_t | nonceLength, | ||
mcuxCl_InputBuffer_t | pIn, | ||
uint32_t | inLength, | ||
mcuxCl_InputBuffer_t | pAdata, | ||
uint32_t | adataLength, | ||
mcuxCl_Buffer_t | pOut, | ||
uint32_t *const | pOutLength, | ||
mcuxCl_Buffer_t | pTag, | ||
uint32_t | tagLength | ||
) |
One-shot authenticated encryption/decryption function.
This function performs an authenticated encryption/decryption operation in one shot. The algorithm to be used will be determined based on the mode that is provided.
For example, to perform an AES authenticated encryption operation with a 128-bit key in GCM mode on padded data, the following needs to be provided:
session | Handle for the current CL session. | |
key | Key to be used to encrypt the data. | |
mode | AEAD mode that should be used during the encryption operation. | |
[in] | pNonce | Pointer to the buffer that contains the nonce. |
nonceLength | Number of bytes of nonce data in the nonce buffer. | |
[in] | pIn | Pointer to the input buffer that contains the plain data that need to be authenticated and encrypted. |
inLength | Number of bytes of plain data in the in buffer. | |
[in] | pAdata | Associated data for the authenticated encryption operation. Data format depends on the chosen mode . |
adataLength | Number of bytes of associated data in the adata buffer. | |
[out] | pOut | Pointer to the output buffer where the authenticated encrypted data needs to be written. |
[out] | pOutLength | Will be incremented by the number of bytes of authenticated encrypted data that have been written to the out buffer. |
[out] | pTag | Pointer to the output buffer where the tag needs to be written. |
tagLength | Number of bytes of tag data that will be written to the tag buffer. |