324 #ifndef ti_drivers_AESCCM__include 325 #define ti_drivers_AESCCM__include 354 #define AESCCM_CMD_RESERVED (32) 368 #define AESCCM_STATUS_RESERVED (-32) 383 #define AESCCM_STATUS_SUCCESS (0) 391 #define AESCCM_STATUS_ERROR (-1) 400 #define AESCCM_STATUS_UNDEFINEDCMD (-2) 410 #define AESCCM_STATUS_RESOURCE_UNAVAILABLE (-3) 419 #define AESCCM_STATUS_MAC_INVALID (-4) 640 int_fast16_t
AESCCM_control(AESCCM_Handle handle, uint32_t cmd,
void *args);
677 uint8_t *nonce, uint8_t nonceLength,
678 size_t aadTotalLength,
679 size_t plaintextTotalLength,
713 uint8_t *nonce, uint8_t nonceLength,
714 size_t aadTotalLength,
715 size_t ciphertextTotalLength,
736 int_fast16_t
AESCCM_processAAD(AESCCM_Handle handle, uint8_t *aad,
size_t length);
759 int_fast16_t
AESCCM_processPayload(AESCCM_Handle handle, uint8_t *input,
size_t length, uint8_t *output);
833 uint8_t *aad,
size_t aadLength,
834 uint8_t *plaintext,
size_t plaintextLength,
835 uint8_t *nonce, uint8_t nonceLength,
836 uint8_t *mac, uint8_t macLength,
837 uint8_t *ciphertext);
881 uint8_t *aad,
size_t aadLength,
882 uint8_t *ciphertext,
size_t ciphertextLength,
883 uint8_t *nonce, uint8_t nonceLength,
884 uint8_t *mac, uint8_t macLength,
926 int_fast16_t
AESCCM_getNonce(AESCCM_Handle handle, uint8_t **nonce, uint8_t *nonceLength);
941 int_fast16_t
AESCCM_getAAD(AESCCM_Handle handle, uint8_t **aad,
size_t *aadLength);
958 int_fast16_t
AESCCM_getInput(AESCCM_Handle handle, uint8_t **input,
size_t *inputLength,
size_t *totalInputLength);
975 int_fast16_t
AESCCM_getOutput(AESCCM_Handle handle, uint8_t **output,
size_t *outputLength,
size_t *totalOutputLength);
990 int_fast16_t
AESCCM_getMAC(AESCCM_Handle handle, uint8_t *mac, uint8_t *macLength);
CCM Parameters.
Definition: AESCCM.h:507
int_fast16_t AESCCM_getNonce(AESCCM_Handle handle, uint8_t **nonce, uint8_t *nonceLength)
Returns a pointer to the nonce and the nonce length of an AESCCM operation in progress.
The CryptoKey type is an opaque representation of a cryptographic key.
AESCCM_ReturnBehavior returnBehavior
Definition: AESCCM.h:508
int_fast16_t AESCCM_getMAC(AESCCM_Handle handle, uint8_t *mac, uint8_t *macLength)
Returns a pointer to the MAC and the MAC length of the last completed AESCCM operation.
int_fast16_t AESCCM_processAAD(AESCCM_Handle handle, uint8_t *aad, size_t length)
Function to process the additional authentication data in one or more calls.
int_fast16_t AESCCM_getCryptoKey(AESCCM_Handle handle, CryptoKey **key)
Returns a pointer to the CryptoKey used for an AESCCM operation in progress.
void const * hwAttrs
Definition: AESCCM.h:538
CryptoKey datastructure.
Definition: CryptoKey.h:210
const AESCCM_Params AESCCM_defaultParams
Default AESCCM_Params structure.
void * custom
Definition: AESCCM.h:515
enum AESCCM_ReturnBehavior_ AESCCM_ReturnBehavior
The way in which CCM function calls return after performing an encryption + authentication or decrypt...
bool nonceInternallyGenerated
Definition: AESCCM.h:510
int_fast16_t AESCCM_verifyMAC(AESCCM_Handle handle, uint8_t *mac)
Function to verify the provided message authentication code.
struct AESCCM_Config_ * AESCCM_Handle
A handle that is returned from an AESCCM_open() call.
Definition: AESCCM.h:441
int_fast16_t AESCCM_computeMAC(AESCCM_Handle handle, uint8_t *mac)
Function to compute the message authentication code.
int_fast16_t AESCCM_getAAD(AESCCM_Handle handle, uint8_t **aad, size_t *aadLength)
Returns a pointer to the AAD and the AAD length of an AESCCM operation in progress.
void AESCCM_Params_init(AESCCM_Params *params)
Function to initialize the AESCCM_Params struct to its defaults.
struct AESCCM_Params_ AESCCM_Params
CCM Parameters.
int_fast16_t AESCCM_setMACReturnPointer(AESCCM_Handle handle, uint8_t *mac)
AESCCM_ReturnBehavior_
The way in which CCM function calls return after performing an encryption + authentication or decrypt...
Definition: AESCCM.h:474
int_fast16_t AESCCM_getInput(AESCCM_Handle handle, uint8_t **input, size_t *inputLength, size_t *totalInputLength)
Returns a pointer to the input (plaintext or ciphertext) and the input length of an AESCCM operation ...
enum AESCCM_Mode_ AESCCM_Mode
Enum for the direction of the CCM operation.
void(* AESCCM_CallbackFxn)(AESCCM_Handle handle, CryptoKey *processedKey)
The definition of a callback function used by the AESCCM driver when used in AESCCM_RETURN_BEHAVIOR_C...
Definition: AESCCM.h:451
void * object
Definition: AESCCM.h:535
void AESCCM_close(AESCCM_Handle handle)
Function to close a CCM peripheral specified by the CCM handle.
int_fast16_t AESCCM_oneStepEncrypt(AESCCM_Handle handle, CryptoKey *key, uint8_t *aad, size_t aadLength, uint8_t *plaintext, size_t plaintextLength, uint8_t *nonce, uint8_t nonceLength, uint8_t *mac, uint8_t macLength, uint8_t *ciphertext)
Function to perform an AESCCM encryption + authentication operation in one call.
struct AESCCM_Config_ AESCCM_Config
AESCCM Global configuration.
int_fast16_t AESCCM_control(AESCCM_Handle handle, uint32_t cmd, void *args)
Function performs implementation specific features on a given AESCCM_Handle.
int_fast16_t AESCCM_processPayload(AESCCM_Handle handle, uint8_t *input, size_t length, uint8_t *output)
Function to process the input data in one or more calls.
int_fast16_t AESCCM_getOutput(AESCCM_Handle handle, uint8_t **output, size_t *outputLength, size_t *totalOutputLength)
Returns a pointer to the output (plaintext or ciphertext) and the output length of an AESCCM operatio...
int_fast16_t AESCCM_setupDecrypt(AESCCM_Handle handle, CryptoKey *key, uint8_t *nonce, uint8_t nonceLength, size_t aadTotalLength, size_t ciphertextTotalLength, uint8_t macLength)
Function to set up an AESCCM decryption + verification operation in multiple calls.
int_fast16_t AESCCM_oneStepDecrypt(AESCCM_Handle handle, CryptoKey *key, uint8_t *aad, size_t aadLength, uint8_t *ciphertext, size_t ciphertextLength, uint8_t *nonce, uint8_t nonceLength, uint8_t *mac, uint8_t macLength, uint8_t *plaintext)
Function to perform an AESCCM decryption + verification operation in one call.
int_fast16_t AESCCM_setupEncrypt(AESCCM_Handle handle, CryptoKey *key, uint8_t *nonce, uint8_t nonceLength, size_t aadTotalLength, size_t plaintextTotalLength, uint8_t macLength)
Function to set up an AESCCM encryption + authentication operation in multiple calls.
void AESCCM_init(void)
This function initializes the CCM module.
uint32_t timeout
Definition: AESCCM.h:514
int_fast16_t AESCCM_getMode(AESCCM_Handle handle, AESCCM_Mode *mode)
Returns the AESCCM_Mode of an AESCCM operation in progress.
AESCCM Global configuration.
Definition: AESCCM.h:533
AESCCM_CallbackFxn callbackFxn
Definition: AESCCM.h:509
AESCCM_Mode_
Enum for the direction of the CCM operation.
Definition: AESCCM.h:494
AESCCM_Handle AESCCM_open(uint_least8_t index, AESCCM_Params *params)
This function opens a given CCM peripheral.