MCUX CLNS
MCUX Crypto Library Normal Secure
 
Loading...
Searching...
No Matches
mcuxClEls_Aead.h File Reference

ELS header for Authenticated Encryption with Associated Data (AEAD). More...

#include <mcuxClConfig.h>
#include <mcuxClEls_Common.h>

Go to the source code of this file.

Data Structures

union  mcuxClEls_AeadOption_t
 Command option bit field for mcuxClEls_Aead_Init_Async, mcuxClEls_Aead_UpdateAad_Async, mcuxClEls_Aead_UpdateData_Async and mcuxClEls_Aead_Finalize_Async. More...
 

Macros

#define MCUXCLELS_AEAD_ENCRYPT
 Set mcuxClEls_AeadOption_t.dcrpt to this value to encrypt data.
 
#define MCUXCLELS_AEAD_DECRYPT
 Set mcuxClEls_AeadOption_t.dcrpt to this value to decrypt data.
 
#define MCUXCLELS_AEAD_STATE_IN_DISABLE
 Set mcuxClEls_AeadOption_t.acpsie to this value to load the GCM state from ELS.
 
#define MCUXCLELS_AEAD_STATE_IN_ENABLE
 Set mcuxClEls_AeadOption_t.acpsie to this value to load the GCM state from the context.
 
#define MCUXCLELS_AEAD_LASTINIT_TRUE
 Set mcuxClEls_AeadOption_t.lastinit to this value if this is the last call to init.
 
#define MCUXCLELS_AEAD_LASTINIT_FALSE
 Set mcuxClEls_AeadOption_t.lastinit to this value if this is not the last call to init.
 
#define MCUXCLELS_AEAD_EXTERN_KEY
 Set mcuxClEls_AeadOption_t.extkey to this value to use an external key.
 
#define MCUXCLELS_AEAD_INTERN_KEY
 Set mcuxClEls_AeadOption_t.extkey to this value to use a key from the ELS keystore.
 
#define MCUXCLELS_AEAD_ACPMOD_INIT
 Set mcuxClEls_AeadOption_t.acpmod to this value for Init mode. For internal use.
 
#define MCUXCLELS_AEAD_ACPMOD_AADPROC
 Set mcuxClEls_AeadOption_t.acpmod to this value for Process Additional Authenticated Data mode. For internal use.
 
#define MCUXCLELS_AEAD_ACPMOD_MSGPROC
 Set mcuxClEls_AeadOption_t.acpmod to this value for Process Message mode. For internal use.
 
#define MCUXCLELS_AEAD_ACPMOD_FINAL
 Set mcuxClEls_AeadOption_t.acpmod to this value for Finalize mode. For internal use.
 
#define MCUXCLELS_AEAD_STATE_OUT_ENABLE
 Set mcuxClEls_AeadOption_t.acpsoe to this value to save the state to the context. For internal use.
 
#define MCUXCLELS_AEAD_IV_BLOCK_SIZE
 
#define MCUXCLELS_AEAD_AAD_BLOCK_SIZE
 AES-GCM AAD Granularity: 128 bit (16 bytes)
 
#define MCUXCLELS_AEAD_TAG_SIZE
 tag size: Tag generation supports only a 128 bit wide tag (16 bytes)
 
#define MCUXCLELS_AEAD_CONTEXT_SIZE
 context size: 512 bit (64 bytes) + 16 bytes for finalize
 

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.
 
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.
 
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)
 
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.
 
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.
 

Detailed Description

ELS header for Authenticated Encryption with Associated Data (AEAD).

This header exposes functions that enable using the ELS for Authenticated Encryption with Associated Data (AEAD). The AEAD algorithm supported by ELS is AES in Galois/Counter Mode (GCM), as described in NIST Special Publication 800-38D.