547 #ifndef ti_drivers_AESGCM__include 548 #define ti_drivers_AESGCM__include 572 #define AESGCM_STATUS_RESERVED (-32) 580 #define AESGCM_STATUS_SUCCESS (0) 588 #define AESGCM_STATUS_ERROR (-1) 598 #define AESGCM_STATUS_RESOURCE_UNAVAILABLE (-2) 607 #define AESGCM_STATUS_MAC_INVALID (-3) 612 #define AESGCM_STATUS_CANCELED (-4) 620 #define AESGCM_STATUS_FEATURE_NOT_SUPPORTED (-5) 872 int_fast16_t returnValue,
985 size_t totalAADLength,
986 size_t totalPlaintextLength);
1017 size_t totalAADLength,
1018 size_t totalPlaintextLength);
1048 size_t plaintextLength);
ADC_Params params
Definition: Driver_Init.h:11
void * custom
Definition: AESGCM.h:890
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:843
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:803
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:739
int_fast16_t AESGCM_cancelOperation(AESGCM_Handle handle)
Cancels an ongoing AESGCM operation.
uint8_t * iv
Definition: AESGCM.h:713
const AESGCM_Params AESGCM_defaultParams
Default AESGCM_Params structure.
uint8_t * input
Definition: AESGCM.h:768
size_t inputLength
Definition: AESGCM.h:809
void * object
Definition: AESGCM.h:635
CryptoKey datastructure.
Definition: CryptoKey.h:192
AESGCM_SegmentedAADOperation segmentedAADOperation
Definition: AESGCM.h:835
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:767
size_t inputLength
Definition: AESGCM.h:728
uint8_t * input
Definition: AESGCM.h:702
uint8_t * aad
Definition: AESGCM.h:698
uint8_t ivLength
Definition: AESGCM.h:733
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:750
AESGCM_ReturnBehavior returnBehavior
Definition: AESGCM.h:885
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:719
uint8_t * aad
Definition: AESGCM.h:751
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.
AESGCM Global configuration.
Definition: AESGCM.h:633
uint8_t macLength
Definition: AESGCM.h:814
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:871
Struct containing the parameters required for finalizing an encryption/decryption and authentication/...
Definition: AESGCM.h:791
AESGCM_ReturnBehavior
The way in which GCM function calls return after performing an encryption + authentication or decrypt...
Definition: AESGCM.h:667
size_t aadLength
Definition: AESGCM.h:725
Struct containing the parameters required for encrypting/decrypting and authenticating/verifying a me...
Definition: AESGCM.h:696
AESGCM_OneStepOperation oneStepOperation
Definition: AESGCM.h:834
AESGCM_SegmentedDataOperation segmentedDataOperation
Definition: AESGCM.h:836
uint8_t * input
Definition: AESGCM.h:792
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:887
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:797
AESGCM_Config * AESGCM_Handle
A handle that is returned from an AESGCM_open() call.
Definition: AESGCM.h:644
Union containing a reference to a one step, segmented AAD, segmented data, or segmented finalize oper...
Definition: AESGCM.h:832
uint8_t * output
Definition: AESGCM.h:707
size_t inputLength
Definition: AESGCM.h:779
size_t aadLength
Definition: AESGCM.h:755
void AESGCM_Params_init(AESGCM_Params *params)
Function to initialize the AESGCM_Params struct to its defaults.
uint8_t macLength
Definition: AESGCM.h:736
int_fast16_t AESGCM_finalizeEncrypt(AESGCM_Handle handle, AESGCM_SegmentedFinalizeOperation *operation)
Finalize the MAC and ciphertext.
uint8_t * output
Definition: AESGCM.h:773
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:697
AESGCM_Mode
Enum for the direction of the GCM operation.
Definition: AESGCM.h:687
GCM Parameters.
Definition: AESGCM.h:884
AESGCM_SegmentedFinalizeOperation segmentedFinalizeOperation
Definition: AESGCM.h:837
AESGCM_OneStepOperation AESGCM_Operation
Definition: AESGCM.h:826
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:886
void const * hwAttrs
Definition: AESGCM.h:638