![]() |
![]() |
AESGCM driver implementation for the Low Power F3 family.
============================================================================
This file should only be included in the board file to fill the AESGCM_config struct.
The Low Power F3 family of devices has dedicated hardware accelerators. CC23XX devices have one dedicated accelerator whereas CC27XX devices have two (Primary and Secondary). Combined they can perform AES encryption operations with 128-bit, 192-bit and 256-bit keys. Only one operation can be carried out on the accelerator at a time. Mutual exclusion is implemented at the driver level and coordinated between all drivers relying on the accelerator. It is transparent to the application and only noted to ensure sensible access timeouts are set. The GHASH computation for GCM has optimizations using Shoup's 4-bit tables that are precomputed for each hash key H.
The driver implementation does not perform runtime checks for most input parameters. Only values that are likely to have a stochastic element to them are checked (such as whether a driver is already open). Higher input parameter validation coverage is achieved by turning on assertions when compiling the driver.
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <ti/drivers/AESGCM.h>
#include <ti/drivers/cryptoutils/aes/AESCommonLPF3.h>
#include <ti/devices/DeviceFamily.h>
#include <DeviceFamily_constructPath(driverlib/aes.h)>
Go to the source code of this file.
Data Structures | |
struct | AESGCMLPF3HSM_Object |
AESGCMLPF3HSM Object. More... | |
Typedefs | |
typedef AESCommonLPF3_HWAttrs | AESGCMLPF3HSM_HWAttrs |
AESGCMLPF3 Hardware Attributes. More... | |
Functions | |
int_fast16_t | AESGCMLPF3HSM_setMac (AESGCM_Handle handle, const uint8_t *mac, size_t macLength) |
Function to set the mac for an AES CCM segmented operation. This API needs to be called only when the subsequent AESGCM_addData() operation is processing all of the remaining data in a single call. More... | |
AESGCMLPF3 Hardware Attributes.
AESGCMLPF3 hardware attributes should be included in the board file and pointed to by the AESGCM_config struct.
int_fast16_t AESGCMLPF3HSM_setMac | ( | AESGCM_Handle | handle, |
const uint8_t * | mac, | ||
size_t | macLength | ||
) |
Function to set the mac for an AES CCM segmented operation. This API needs to be called only when the subsequent AESGCM_addData() operation is processing all of the remaining data in a single call.
[in] | handle | A CCM handle returned from AESGCM_open() or AESGCM_construct() |
[in] | mac | Pointer to the buffer containing the mac |
[in] | macLength | The length of the mac in bytes |
AESGCM_STATUS_SUCCESS | The operation succeeded. |
AESGCM_STATUS_ERROR | The operation failed. |
AESGCM_STATUS_FEATURE_NOT_SUPPORTED | The operation is not supported in this device. |