29#ifndef MCUXCLELS_AEAD_H_
30#define MCUXCLELS_AEAD_H_
32#include <mcuxClConfig.h>
54#define MCUXCLELS_AEAD_ENCRYPT ((uint8_t)0x00U)
55#define MCUXCLELS_AEAD_DECRYPT ((uint8_t)0x01U)
57#define MCUXCLELS_AEAD_STATE_IN_DISABLE ((uint8_t)0x00U)
58#define MCUXCLELS_AEAD_STATE_IN_ENABLE ((uint8_t)0x01U)
60#define MCUXCLELS_AEAD_LASTINIT_TRUE ((uint8_t)0x01U)
61#define MCUXCLELS_AEAD_LASTINIT_FALSE ((uint8_t)0x00U)
63#define MCUXCLELS_AEAD_EXTERN_KEY ((uint8_t)0x01U)
64#define MCUXCLELS_AEAD_INTERN_KEY ((uint8_t)0x00U)
66#define MCUXCLELS_AEAD_ACPMOD_INIT ((uint8_t)0x00U)
67#define MCUXCLELS_AEAD_ACPMOD_AADPROC ((uint8_t)0x01U)
68#define MCUXCLELS_AEAD_ACPMOD_MSGPROC ((uint8_t)0x02U)
69#define MCUXCLELS_AEAD_ACPMOD_FINAL ((uint8_t)0x03U)
71#ifndef MCUXCL_FEATURE_ELS_NO_INTERNAL_STATE_FLAGS
72#define MCUXCLELS_AEAD_STATE_OUT_ENABLE ((uint8_t)0x01U)
78#define MCUXCLELS_AEAD_IV_BLOCK_SIZE 16U
79#define MCUXCLELS_AEAD_AAD_BLOCK_SIZE 16U
80#define MCUXCLELS_AEAD_TAG_SIZE 16U
81#define MCUXCLELS_AEAD_CONTEXT_SIZE 80U
109#ifndef MCUXCL_FEATURE_ELS_NO_INTERNAL_STATE_FLAGS
186 uint8_t const * pKey,
246 uint8_t const * pKey,
308 uint8_t const * pKey,
310 uint8_t const * pAad,
373 uint8_t const * pKey,
375 uint8_t const * pInput,
439 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:46
uint32_t mcuxClEls_Status_t
Type for ELS driver status codes.
Definition mcuxClEls_Types.h:212
uint32_t mcuxClEls_KeyIndex_t
Type for ELS keystore indices.
Definition mcuxClEls_Types.h:222
#define MCUX_CSSL_FP_FUNCTION_DECL(...)
Declaration of a flow protected function.
Definition mcuxCsslFlowProtection.h:125
#define MCUX_CSSL_FP_PROTECTED_TYPE(resultType)
Based on a given base type, builds a return type with flow protection.
Definition mcuxCsslFlowProtection.h:81
Command option bit field for mcuxClEls_Aead_Init_Async, mcuxClEls_Aead_UpdateAad_Async,...
Definition mcuxClEls_Aead.h:99
uint32_t acpmod
This field is managed internally.
Definition mcuxClEls_Aead.h:108
uint32_t acpsie
This field is managed internally.
Definition mcuxClEls_Aead.h:114
uint32_t msgendw
The size of the last data block (plain/cipher text) in bytes, without padding.
Definition mcuxClEls_Aead.h:115
uint32_t extkey
Defines whether an external key shall be used.
Definition mcuxClEls_Aead.h:118
uint32_t lastinit
Defines whether this is the last call to init.
Definition mcuxClEls_Aead.h:116
uint32_t acpsoe
This field is managed internally.
Definition mcuxClEls_Aead.h:110
uint32_t dcrpt
Defines if encryption or decryption shall be performed.
Definition mcuxClEls_Aead.h:107
uint32_t value
Accesses the bit field as a full word.
Definition mcuxClEls_Aead.h:102