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 891 int_fast16_t returnValue,
1005 size_t totalAADLength,
1006 size_t totalPlaintextLength);
1037 size_t totalAADLength,
1038 size_t totalPlaintextLength);
1066 int_fast16_t
AESGCM_setLengths(AESGCM_Handle handle,
size_t aadLength,
size_t plaintextLength);
1088 int_fast16_t
AESGCM_setIV(AESGCM_Handle handle,
const uint8_t *iv,
size_t ivLength);
1114 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:910
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:860
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:819
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:752
int_fast16_t AESGCM_cancelOperation(AESGCM_Handle handle)
Cancels an ongoing AESGCM operation.
uint8_t * iv
Definition: AESGCM.h:726
const AESGCM_Params AESGCM_defaultParams
Default AESGCM_Params structure.
uint8_t * input
Definition: AESGCM.h:783
AES Global configuration.
Definition: AESCommon.h:154
size_t inputLength
Definition: AESGCM.h:825
CryptoKey datastructure.
Definition: CryptoKey.h:192
AESGCM_SegmentedAADOperation segmentedAADOperation
Definition: AESGCM.h:851
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:781
size_t inputLength
Definition: AESGCM.h:741
uint8_t * input
Definition: AESGCM.h:715
Definition: AESCommon.h:186
uint8_t * aad
Definition: AESGCM.h:711
Definition: AESCommon.h:196
uint8_t ivLength
Definition: AESGCM.h:746
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:763
AESGCM_ReturnBehavior returnBehavior
Definition: AESGCM.h:905
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:732
uint8_t * aad
Definition: AESGCM.h:765
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:830
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:890
Struct containing the parameters required for finalizing an encryption/decryption and authentication/...
Definition: AESGCM.h:806
AESGCM_ReturnBehavior
The way in which GCM function calls return after performing an encryption + authentication or decrypt...
Definition: AESGCM.h:674
size_t aadLength
Definition: AESGCM.h:738
Struct containing the parameters required for encrypting/decrypting and authenticating/verifying a me...
Definition: AESGCM.h:708
AESGCM_OneStepOperation oneStepOperation
Definition: AESGCM.h:850
AESGCM_SegmentedDataOperation segmentedDataOperation
Definition: AESGCM.h:852
uint8_t * input
Definition: AESGCM.h:808
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:907
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:813
AESGCM_Config * AESGCM_Handle
A handle that is returned from an AESGCM_open() call.
Definition: AESGCM.h:651
Union containing a reference to a one step, segmented AAD, segmented data, or segmented finalize oper...
Definition: AESGCM.h:848
uint8_t * output
Definition: AESGCM.h:720
size_t inputLength
Definition: AESGCM.h:794
size_t aadLength
Definition: AESGCM.h:769
void AESGCM_Params_init(AESGCM_Params *params)
Function to initialize the AESGCM_Params struct to its defaults.
uint8_t macLength
Definition: AESGCM.h:749
int_fast16_t AESGCM_finalizeEncrypt(AESGCM_Handle handle, AESGCM_SegmentedFinalizeOperation *operation)
Finalize the MAC and ciphertext.
uint8_t * output
Definition: AESGCM.h:788
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:710
AESGCM_Mode
Enum for the direction of the GCM operation.
Definition: AESGCM.h:698
AES common module header for all devices.
GCM Parameters.
Definition: AESGCM.h:903
AESCommon_Config AESGCM_Config
AESGCM Global configuration.
Definition: AESGCM.h:647
AESGCM_SegmentedFinalizeOperation segmentedFinalizeOperation
Definition: AESGCM.h:853
AESGCM_OneStepOperation AESGCM_Operation
Definition: AESGCM.h:842
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:906