49#ifndef MCUXCLELS_AEAD_H_
50#define MCUXCLELS_AEAD_H_
52#include <mcuxClConfig.h>
74#define MCUXCLELS_AEAD_ENCRYPT ((uint8_t)0x00U)
75#define MCUXCLELS_AEAD_DECRYPT ((uint8_t)0x01U)
77#define MCUXCLELS_AEAD_STATE_IN_DISABLE ((uint8_t)0x00U)
78#define MCUXCLELS_AEAD_STATE_IN_ENABLE ((uint8_t)0x01U)
80#define MCUXCLELS_AEAD_LASTINIT_TRUE (0x01U)
81#define MCUXCLELS_AEAD_LASTINIT_FALSE (0x00U)
83#define MCUXCLELS_AEAD_EXTERN_KEY ((uint8_t)0x01U)
84#define MCUXCLELS_AEAD_INTERN_KEY ((uint8_t)0x00U)
86#define MCUXCLELS_AEAD_ACPMOD_INIT ((uint8_t)0x00U)
87#define MCUXCLELS_AEAD_ACPMOD_AADPROC ((uint8_t)0x01U)
88#define MCUXCLELS_AEAD_ACPMOD_MSGPROC ((uint8_t)0x02U)
89#define MCUXCLELS_AEAD_ACPMOD_FINAL ((uint8_t)0x03U)
91#ifndef MCUXCL_FEATURE_ELS_NO_INTERNAL_STATE_FLAGS
92#define MCUXCLELS_AEAD_STATE_OUT_ENABLE ((uint8_t)0x01U)
98#define MCUXCLELS_AEAD_IV_BLOCK_SIZE 16U
99#define MCUXCLELS_AEAD_AAD_BLOCK_SIZE 16U
100#define MCUXCLELS_AEAD_TAG_SIZE 16U
101#define MCUXCLELS_AEAD_CONTEXT_SIZE 80U
129#ifndef MCUXCL_FEATURE_ELS_NO_INTERNAL_STATE_FLAGS
206 uint8_t const * pKey,
266 uint8_t const * pKey,
328 uint8_t const * pKey,
330 uint8_t const * pAad,
393 uint8_t const * pKey,
395 uint8_t const * pInput,
459 uint8_t const * pKey,
ELS header for common functionality.
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_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_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_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_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.
#define MCUXCLELS_API
Marks a function as a public API function of the mcuxClEls component.
Definition mcuxClEls_Common.h:66
uint32_t mcuxClEls_Status_t
Type for ELS driver status codes.
Definition mcuxClEls_Types.h:232
uint32_t mcuxClEls_KeyIndex_t
Type for ELS keystore indices.
Definition mcuxClEls_Types.h:242
#define MCUX_CSSL_FP_FUNCTION_DECL(...)
Declaration of a flow protected function.
Definition mcuxCsslFlowProtection.h:145
#define MCUX_CSSL_FP_PROTECTED_TYPE(resultType)
Based on a given base type, builds a return type with flow protection.
Definition mcuxCsslFlowProtection.h:101
Command option bit field for mcuxClEls_Aead_Init_Async, mcuxClEls_Aead_UpdateAad_Async,...
Definition mcuxClEls_Aead.h:119
uint32_t acpmod
This field is managed internally.
Definition mcuxClEls_Aead.h:128
uint32_t acpsie
This field is managed internally.
Definition mcuxClEls_Aead.h:134
uint32_t msgendw
The size of the last data block (plain/cipher text) in bytes, without padding.
Definition mcuxClEls_Aead.h:135
uint32_t extkey
Defines whether an external key shall be used.
Definition mcuxClEls_Aead.h:138
uint32_t lastinit
Defines whether this is the last call to init.
Definition mcuxClEls_Aead.h:136
uint32_t acpsoe
This field is managed internally.
Definition mcuxClEls_Aead.h:130
uint32_t dcrpt
Defines if encryption or decryption shall be performed.
Definition mcuxClEls_Aead.h:127
uint32_t value
Accesses the bit field as a full word.
Definition mcuxClEls_Aead.h:122