547 #ifndef ti_drivers_AESGCM__include 548 #define ti_drivers_AESGCM__include 562 #define AESGCM_IV_LENGTH_BYTES 12 576 #define AESGCM_STATUS_RESERVED AES_STATUS_RESERVED 583 #define AESGCM_STATUS_SUCCESS AES_STATUS_SUCCESS 591 #define AESGCM_STATUS_ERROR AES_STATUS_ERROR 601 #define AESGCM_STATUS_RESOURCE_UNAVAILABLE AES_STATUS_RESOURCE_UNAVAILABLE 606 #define AESGCM_STATUS_CANCELED AES_STATUS_CANCELED 615 #define AESGCM_STATUS_MAC_INVALID AES_STATUS_MAC_INVALID 623 #define AESGCM_STATUS_FEATURE_NOT_SUPPORTED AES_STATUS_FEATURE_NOT_SUPPORTED 628 #define AESGCM_STATUS_KEYSTORE_INVALID_ID AES_STATUS_KEYSTORE_INVALID_ID 634 #define AESGCM_STATUS_KEYSTORE_GENERIC_ERROR AES_STATUS_KEYSTORE_GENERIC_ERROR 642 #define AESGCM_STATUS_UNALIGNED_IO_NOT_SUPPORTED AES_STATUS_UNALIGNED_IO_NOT_SUPPORTED 899 int_fast16_t returnValue,
1013 size_t totalAADLength,
1014 size_t totalPlaintextLength);
1045 size_t totalAADLength,
1046 size_t totalPlaintextLength);
1074 int_fast16_t
AESGCM_setLengths(AESGCM_Handle handle,
size_t aadLength,
size_t plaintextLength);
1096 int_fast16_t
AESGCM_setIV(AESGCM_Handle handle,
const uint8_t *iv,
size_t ivLength);
1122 int_fast16_t
AESGCM_generateIV(AESGCM_Handle handle, uint8_t *iv,
size_t ivSize,
size_t *ivLength);
ADC_Params params
Definition: Driver_Init.h:11
void * custom
Definition: AESGCM.h:918
The CryptoKey type is an opaque representation of a cryptographic key.
void AESGCM_SegmentedFinalizeOperation_init(AESGCM_SegmentedFinalizeOperation *operationStruct)
Function to initialize an AESGCM_SegmentedFinalizeOperation struct to its defaults.
int_fast16_t AESGCM_finalizeDecrypt(AESGCM_Handle handle, AESGCM_SegmentedFinalizeOperation *operation)
Finalize the MAC and plaintext and verify it.
AESGCM_OperationType
Enum for the operation types supported by the driver.
Definition: AESGCM.h:868
int_fast16_t AESGCM_setupEncrypt(AESGCM_Handle handle, const CryptoKey *key, size_t totalAADLength, size_t totalPlaintextLength)
Function to prepare a segmented AESGCM encryption operation.
uint8_t * mac
Definition: AESGCM.h:827
int_fast16_t AESGCM_oneStepDecrypt(AESGCM_Handle handle, AESGCM_OneStepOperation *operationStruct)
Function to perform an AESGCM decryption + verification operation in one call.
bool ivInternallyGenerated
Definition: AESGCM.h:760
int_fast16_t AESGCM_cancelOperation(AESGCM_Handle handle)
Cancels an ongoing AESGCM operation.
uint8_t * iv
Definition: AESGCM.h:734
const AESGCM_Params AESGCM_defaultParams
Default AESGCM_Params structure.
uint8_t * input
Definition: AESGCM.h:791
AES Global configuration.
Definition: AESCommon.h:154
size_t inputLength
Definition: AESGCM.h:833
CryptoKey datastructure.
Definition: CryptoKey.h:192
AESGCM_SegmentedAADOperation segmentedAADOperation
Definition: AESGCM.h:859
int_fast16_t AESGCM_addData(AESGCM_Handle handle, AESGCM_SegmentedDataOperation *operation)
Adds a segment of data with a length that is a multiple of an AES block-size (16 bytes) to the plaint...
Struct containing the parameters required for encrypting/decrypting a message in a segmented operatio...
Definition: AESGCM.h:789
size_t inputLength
Definition: AESGCM.h:749
uint8_t * input
Definition: AESGCM.h:723
Definition: AESCommon.h:186
uint8_t * aad
Definition: AESGCM.h:719
Definition: AESCommon.h:196
uint8_t ivLength
Definition: AESGCM.h:754
void AESGCM_Operation_init(AESGCM_Operation *operationStruct)
Function to initialize an AESGCM_Operation struct to its defaults.
Struct containing the parameters required for authenticating/verifying additional data in a segmented...
Definition: AESGCM.h:771
AESGCM_ReturnBehavior returnBehavior
Definition: AESGCM.h:913
void AESGCM_init(void)
This function initializes the GCM module.
int_fast16_t AESGCM_addAAD(AESGCM_Handle handle, AESGCM_SegmentedAADOperation *operation)
Adds a segment of aad with a length in bytes to the generated MAC.
uint8_t * mac
Definition: AESGCM.h:740
uint8_t * aad
Definition: AESGCM.h:773
int_fast16_t AESGCM_setIV(AESGCM_Handle handle, const uint8_t *iv, size_t ivLength)
Function to set the initialization vector (IV) for an AES GCM segmented operation.
int_fast16_t AESGCM_setLengths(AESGCM_Handle handle, size_t aadLength, size_t plaintextLength)
Function to set the lengths of the message and additional data.
Definition: AESCommon.h:192
uint8_t macLength
Definition: AESGCM.h:838
void(* AESGCM_CallbackFxn)(AESGCM_Handle handle, int_fast16_t returnValue, AESGCM_OperationUnion *operation, AESGCM_OperationType operationType)
The definition of a callback function used by the AESGCM driver when used in AESGCM_RETURN_BEHAVIOR_C...
Definition: AESGCM.h:898
Struct containing the parameters required for finalizing an encryption/decryption and authentication/...
Definition: AESGCM.h:814
AESGCM_ReturnBehavior
The way in which GCM function calls return after performing an encryption + authentication or decrypt...
Definition: AESGCM.h:682
size_t aadLength
Definition: AESGCM.h:746
Struct containing the parameters required for encrypting/decrypting and authenticating/verifying a me...
Definition: AESGCM.h:716
AESGCM_OneStepOperation oneStepOperation
Definition: AESGCM.h:858
AESGCM_SegmentedDataOperation segmentedDataOperation
Definition: AESGCM.h:860
uint8_t * input
Definition: AESGCM.h:816
int_fast16_t AESGCM_oneStepEncrypt(AESGCM_Handle handle, AESGCM_OneStepOperation *operationStruct)
Function to perform an AESGCM encryption + authentication operation in one call.
int_fast16_t AESGCM_generateIV(AESGCM_Handle handle, uint8_t *iv, size_t ivSize, size_t *ivLength)
Function to generate an IV for an AES GCM segmented encryption operation.
uint32_t timeout
Definition: AESGCM.h:915
void AESGCM_close(AESGCM_Handle handle)
Function to close a GCM peripheral specified by the GCM handle.
AESGCM_Handle AESGCM_construct(AESGCM_Config *config, const AESGCM_Params *params)
Constructs a new AESGCM object.
uint8_t * output
Definition: AESGCM.h:821
AESGCM_Config * AESGCM_Handle
A handle that is returned from an AESGCM_open() call.
Definition: AESGCM.h:659
Union containing a reference to a one step, segmented AAD, segmented data, or segmented finalize oper...
Definition: AESGCM.h:856
uint8_t * output
Definition: AESGCM.h:728
size_t inputLength
Definition: AESGCM.h:802
size_t aadLength
Definition: AESGCM.h:777
void AESGCM_Params_init(AESGCM_Params *params)
Function to initialize the AESGCM_Params struct to its defaults.
uint8_t macLength
Definition: AESGCM.h:757
int_fast16_t AESGCM_finalizeEncrypt(AESGCM_Handle handle, AESGCM_SegmentedFinalizeOperation *operation)
Finalize the MAC and ciphertext.
uint8_t * output
Definition: AESGCM.h:796
AESGCM_Handle AESGCM_open(uint_least8_t index, const AESGCM_Params *params)
This function opens a given GCM peripheral.
int_fast16_t AESGCM_setupDecrypt(AESGCM_Handle handle, const CryptoKey *key, size_t totalAADLength, size_t totalPlaintextLength)
Function to prepare a segmented AESGCM decryption operation.
CryptoKey * key
Definition: AESGCM.h:718
AESGCM_Mode
Enum for the direction of the GCM operation.
Definition: AESGCM.h:706
AES common module header for all devices.
GCM Parameters.
Definition: AESGCM.h:911
AESCommon_Config AESGCM_Config
AESGCM Global configuration.
Definition: AESGCM.h:655
AESGCM_SegmentedFinalizeOperation segmentedFinalizeOperation
Definition: AESGCM.h:861
AESGCM_OneStepOperation AESGCM_Operation
Definition: AESGCM.h:850
union AESGCM_OperationUnion AESGCM_OperationUnion
Union containing a reference to a one step, segmented AAD, segmented data, or segmented finalize oper...
void AESGCM_OneStepOperation_init(AESGCM_OneStepOperation *operationStruct)
Function to initialize an AESGCM_OneStepOperation struct to its defaults.
void AESGCM_SegmentedDataOperation_init(AESGCM_SegmentedDataOperation *operationStruct)
Function to initialize an AESGCM_SegmentedDataOperation struct to its defaults.
void AESGCM_SegmentedAADOperation_init(AESGCM_SegmentedAADOperation *operationStruct)
Function to initialize an AESGCM_SegmentedAADOperation struct to its defaults.
AESGCM_CallbackFxn callbackFxn
Definition: AESGCM.h:914