605 #ifndef ti_drivers_AESGCM__include 606 #define ti_drivers_AESGCM__include 620 #define AESGCM_IV_LENGTH_BYTES 12 634 #define AESGCM_STATUS_RESERVED AES_STATUS_RESERVED 641 #define AESGCM_STATUS_SUCCESS AES_STATUS_SUCCESS 649 #define AESGCM_STATUS_ERROR AES_STATUS_ERROR 659 #define AESGCM_STATUS_RESOURCE_UNAVAILABLE AES_STATUS_RESOURCE_UNAVAILABLE 664 #define AESGCM_STATUS_CANCELED AES_STATUS_CANCELED 673 #define AESGCM_STATUS_MAC_INVALID AES_STATUS_MAC_INVALID 681 #define AESGCM_STATUS_FEATURE_NOT_SUPPORTED AES_STATUS_FEATURE_NOT_SUPPORTED 686 #define AESGCM_STATUS_KEYSTORE_INVALID_ID AES_STATUS_KEYSTORE_INVALID_ID 692 #define AESGCM_STATUS_KEYSTORE_GENERIC_ERROR AES_STATUS_KEYSTORE_GENERIC_ERROR 700 #define AESGCM_STATUS_UNALIGNED_IO_NOT_SUPPORTED AES_STATUS_UNALIGNED_IO_NOT_SUPPORTED 957 int_fast16_t returnValue,
1071 size_t totalAADLength,
1072 size_t totalPlaintextLength);
1103 size_t totalAADLength,
1104 size_t totalPlaintextLength);
1132 int_fast16_t
AESGCM_setLengths(AESGCM_Handle handle,
size_t aadLength,
size_t plaintextLength);
1154 int_fast16_t
AESGCM_setIV(AESGCM_Handle handle,
const uint8_t *iv,
size_t ivLength);
1180 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:976
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:926
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:885
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:818
int_fast16_t AESGCM_cancelOperation(AESGCM_Handle handle)
Cancels an ongoing AESGCM operation.
uint8_t * iv
Definition: AESGCM.h:792
const AESGCM_Params AESGCM_defaultParams
Default AESGCM_Params structure.
uint8_t * input
Definition: AESGCM.h:849
AES Global configuration.
Definition: AESCommon.h:154
size_t inputLength
Definition: AESGCM.h:891
CryptoKey datastructure.
Definition: CryptoKey.h:208
AESGCM_SegmentedAADOperation segmentedAADOperation
Definition: AESGCM.h:917
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:847
size_t inputLength
Definition: AESGCM.h:807
uint8_t * input
Definition: AESGCM.h:781
Definition: AESCommon.h:186
uint8_t * aad
Definition: AESGCM.h:777
Definition: AESCommon.h:196
uint8_t ivLength
Definition: AESGCM.h:812
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:829
AESGCM_ReturnBehavior returnBehavior
Definition: AESGCM.h:971
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:798
uint8_t * aad
Definition: AESGCM.h:831
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:896
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:956
Struct containing the parameters required for finalizing an encryption/decryption and authentication/...
Definition: AESGCM.h:872
AESGCM_ReturnBehavior
The way in which GCM function calls return after performing an encryption + authentication or decrypt...
Definition: AESGCM.h:740
size_t aadLength
Definition: AESGCM.h:804
Struct containing the parameters required for encrypting/decrypting and authenticating/verifying a me...
Definition: AESGCM.h:774
AESGCM_OneStepOperation oneStepOperation
Definition: AESGCM.h:916
AESGCM_SegmentedDataOperation segmentedDataOperation
Definition: AESGCM.h:918
uint8_t * input
Definition: AESGCM.h:874
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:973
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:879
AESGCM_Config * AESGCM_Handle
A handle that is returned from an AESGCM_open() call.
Definition: AESGCM.h:717
Union containing a reference to a one step, segmented AAD, segmented data, or segmented finalize oper...
Definition: AESGCM.h:914
uint8_t * output
Definition: AESGCM.h:786
size_t inputLength
Definition: AESGCM.h:860
size_t aadLength
Definition: AESGCM.h:835
void AESGCM_Params_init(AESGCM_Params *params)
Function to initialize the AESGCM_Params struct to its defaults.
uint8_t macLength
Definition: AESGCM.h:815
int_fast16_t AESGCM_finalizeEncrypt(AESGCM_Handle handle, AESGCM_SegmentedFinalizeOperation *operation)
Finalize the MAC and ciphertext.
uint8_t * output
Definition: AESGCM.h:854
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:776
AESGCM_Mode
Enum for the direction of the GCM operation.
Definition: AESGCM.h:764
AES common module header for all devices.
GCM Parameters.
Definition: AESGCM.h:969
AESCommon_Config AESGCM_Config
AESGCM Global configuration.
Definition: AESGCM.h:713
AESGCM_SegmentedFinalizeOperation segmentedFinalizeOperation
Definition: AESGCM.h:919
AESGCM_OneStepOperation AESGCM_Operation
Definition: AESGCM.h:908
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:972