Defines all functions of mcuxClEls_Aead. More...
Functions | |
MCUXCLELS_API mcuxClEls_Status_t | mcuxClEls_Aead_Init_Async (mcuxClEls_AeadOption_t options, mcuxClEls_KeyIndex_t keyIdx, uint8_t const *pKey, size_t keyLength, uint8_t const *pIV, size_t ivLength, uint8_t *pAeadCtx) |
AES-GCM initialization. More... | |
MCUXCLELS_API mcuxClEls_Status_t | mcuxClEls_Aead_PartialInit_Async (mcuxClEls_AeadOption_t options, mcuxClEls_KeyIndex_t keyIdx, uint8_t const *pKey, size_t keyLength, uint8_t const *pIV, size_t ivLength, uint8_t *pAeadCtx) |
AES-GCM partial initialization. More... | |
MCUXCLELS_API mcuxClEls_Status_t | mcuxClEls_Aead_UpdateAad_Async (mcuxClEls_AeadOption_t options, mcuxClEls_KeyIndex_t keyIdx, uint8_t const *pKey, size_t keyLength, uint8_t const *pAad, size_t aadLength, uint8_t *pAeadCtx) |
AES-GCM update of the Additional Authenticated Data (AAD) More... | |
MCUXCLELS_API mcuxClEls_Status_t | mcuxClEls_Aead_UpdateData_Async (mcuxClEls_AeadOption_t options, mcuxClEls_KeyIndex_t keyIdx, uint8_t const *pKey, size_t keyLength, uint8_t const *pInput, size_t inputLength, uint8_t *pOutput, uint8_t *pAeadCtx) |
AES-GCM update of the encrypted data. More... | |
MCUXCLELS_API mcuxClEls_Status_t | mcuxClEls_Aead_Finalize_Async (mcuxClEls_AeadOption_t options, mcuxClEls_KeyIndex_t keyIdx, uint8_t const *pKey, size_t keyLength, size_t aadLength, size_t dataLength, uint8_t *pTag, uint8_t *pAeadCtx) |
AES-GCM final encryption/decryption. More... | |
Defines all functions of mcuxClEls_Aead.
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_Aead_Init_Async | ( | mcuxClEls_AeadOption_t | options, |
mcuxClEls_KeyIndex_t | keyIdx, | ||
uint8_t const * | pKey, | ||
size_t | keyLength, | ||
uint8_t const * | pIV, | ||
size_t | ivLength, | ||
uint8_t * | pAeadCtx | ||
) |
AES-GCM 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.
[in] | options | The AEAD command options. For more information, see mcuxClEls_AeadOption_t. |
[in] | keyIdx | Index of the key inside the ELS keystore |
[in] | pKey | Pointer to the key |
[in] | keyLength | Size of pKey in bytes |
[in] | pIV | Pointer to memory area that contains the IV |
[in] | ivLength | Size of pIV in bytes, with padding |
[out] | pAeadCtx | Pointer 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.
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.
MCUXCLELS_STATUS_SW_INVALID_PARAM | if invalid parameters were specified |
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPT | if a running operation prevented the request |
MCUXCLELS_STATUS_OK_WAIT | on successful request |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_Aead_PartialInit_Async | ( | mcuxClEls_AeadOption_t | options, |
mcuxClEls_KeyIndex_t | keyIdx, | ||
uint8_t const * | pKey, | ||
size_t | keyLength, | ||
uint8_t const * | pIV, | ||
size_t | ivLength, | ||
uint8_t * | pAeadCtx | ||
) |
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.
[in] | options | The AEAD command options. For more information, see mcuxClEls_AeadOption_t. |
[in] | keyIdx | Index of the key inside the ELS keystore |
[in] | pKey | Pointer to the key |
[in] | keyLength | Size of pKey in bytes |
[in] | pIV | Pointer to memory area that contains the IV |
[in] | ivLength | Size of pIV in bytes, with padding |
[out] | pAeadCtx | Pointer 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.
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
MCUXCLELS_STATUS_SW_INVALID_PARAM | if invalid parameters were specified |
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPT | if a running operation prevented the request |
MCUXCLELS_STATUS_OK_WAIT | on successful request |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_Aead_UpdateAad_Async | ( | mcuxClEls_AeadOption_t | options, |
mcuxClEls_KeyIndex_t | keyIdx, | ||
uint8_t const * | pKey, | ||
size_t | keyLength, | ||
uint8_t const * | pAad, | ||
size_t | aadLength, | ||
uint8_t * | pAeadCtx | ||
) |
AES-GCM update of the Additional Authenticated Data (AAD)
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.
[in] | options | The AEAD command options. For more information, see mcuxClEls_AeadOption_t. |
[in] | keyIdx | Index of the key inside the ELS keystore |
[in] | pKey | Pointer to the key |
[in] | keyLength | Size of pKey in bytes |
[in] | pAad | Memory area that contains the AAD |
[in] | aadLength | Length of the pAad in bytes with padding |
[in,out] | pAeadCtx | Pointer 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.
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
MCUXCLELS_STATUS_SW_INVALID_PARAM | if invalid parameters were specified |
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPT | if a running operation prevented the request |
MCUXCLELS_STATUS_OK_WAIT | on successful request |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_Aead_UpdateData_Async | ( | mcuxClEls_AeadOption_t | options, |
mcuxClEls_KeyIndex_t | keyIdx, | ||
uint8_t const * | pKey, | ||
size_t | keyLength, | ||
uint8_t const * | pInput, | ||
size_t | inputLength, | ||
uint8_t * | pOutput, | ||
uint8_t * | pAeadCtx | ||
) |
AES-GCM update of the encrypted data.
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.
[in] | options | The AEAD command options. For more information, see mcuxClEls_AeadOption_t. |
[in] | keyIdx | Index of the key inside the ELS keystore |
[in] | pKey | Pointer to the key |
[in] | keyLength | Size of pKey in bytes |
[in] | pInput | Pointer to the memory location of the data to be processed |
[in] | inputLength | Size of pInput in bytes with padding |
[out] | pOutput | Pointer to the processed data memory location |
[in,out] | pAeadCtx | Pointer 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.
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
MCUXCLELS_STATUS_SW_INVALID_PARAM | if invalid parameters were specified |
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPT | if a running operation prevented the request |
MCUXCLELS_STATUS_OK_WAIT | on successful request |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_Aead_Finalize_Async | ( | mcuxClEls_AeadOption_t | options, |
mcuxClEls_KeyIndex_t | keyIdx, | ||
uint8_t const * | pKey, | ||
size_t | keyLength, | ||
size_t | aadLength, | ||
size_t | dataLength, | ||
uint8_t * | pTag, | ||
uint8_t * | pAeadCtx | ||
) |
AES-GCM final encryption/decryption.
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.
[in] | options | The AEAD command options. For more information, see mcuxClEls_AeadOption_t. |
[in] | keyIdx | Index of the key inside the ELS keystore |
[in] | pKey | Pointer to the key |
[in] | keyLength | Size of pKey in bytes |
[in] | aadLength | Length of the complete Additional Authenticated Data (AAD) in bytes, without padding. |
[in] | dataLength | Length of the complete plaintext/ciphertext in bytes, without padding. |
[out] | pTag | Pointer where the resulting tag will be stored |
[in] | pAeadCtx | Pointer 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.
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
MCUXCLELS_STATUS_SW_INVALID_PARAM | if invalid parameters were specified |
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPT | if a running operation prevented the request |
MCUXCLELS_STATUS_OK_WAIT | on successful request |