|
file | gcm.c |
| Implementation of the cc2538 AES-GCM driver.
|
|
file | gcm.h |
| Header file for the cc2538 AES-GCM driver.
|
|
|
uint8_t | gcm_auth_encrypt_start (uint8_t key_area, const void *iv, const void *adata, uint16_t adata_len, const void *pdata, uint16_t pdata_len, void *cdata, struct process *process) |
| Starts a GCM authentication and encryption operation.
|
|
uint8_t | gcm_auth_encrypt_get_result (void *tag) |
| Gets the result of the GCM authentication and encryption operation.
|
|
uint8_t | gcm_auth_decrypt_start (uint8_t key_area, const void *iv, const void *adata, uint16_t adata_len, const void *cdata, uint16_t cdata_len, void *pdata, struct process *process) |
| Starts a GCM authentication checking and decryption operation.
|
|
uint8_t | gcm_auth_decrypt_get_result (const void *tag_in, void *tag_out) |
| Gets the result of the GCM authentication checking and decryption operation.
|
|
#define | gcm_auth_encrypt_check_status aes_auth_crypt_check_status |
| Checks the status of the GCM authentication and encryption operation.
|
|
#define | gcm_auth_decrypt_check_status aes_auth_crypt_check_status |
| Checks the status of the GCM authentication checking and decryption operation.
|
|
Driver for the cc2538 AES-GCM mode of the security core
◆ gcm_auth_decrypt_check_status
Checks the status of the GCM authentication checking and decryption operation.
- Return values
-
false | Result not yet available, and no error occurred |
true | Result available, or error occurred |
Definition at line 121 of file gcm.h.
◆ gcm_auth_encrypt_check_status
Checks the status of the GCM authentication and encryption operation.
- Return values
-
false | Result not yet available, and no error occurred |
true | Result available, or error occurred |
Definition at line 88 of file gcm.h.
◆ gcm_auth_decrypt_get_result()
uint8_t gcm_auth_decrypt_get_result |
( |
const void * | tag_in, |
|
|
void * | tag_out ) |
Gets the result of the GCM authentication checking and decryption operation.
- Parameters
-
tag_in | Pointer to 128-bit input authentication tag, or NULL |
tag_out | Pointer to 128-bit output authentication tag, or NULL |
- Returns
CRYPTO_SUCCESS
if successful, or CRYPTO/AES/GCM error code
- Note
- This function must be called only after
gcm_auth_decrypt_start()
.
◆ gcm_auth_decrypt_start()
uint8_t gcm_auth_decrypt_start |
( |
uint8_t | key_area, |
|
|
const void * | iv, |
|
|
const void * | adata, |
|
|
uint16_t | adata_len, |
|
|
const void * | cdata, |
|
|
uint16_t | cdata_len, |
|
|
void * | pdata, |
|
|
struct process * | process ) |
Starts a GCM authentication checking and decryption operation.
- Parameters
-
key_area | Area in Key RAM where the key is stored (0 to AES_KEY_AREAS - 1) |
iv | Pointer to 96-bit initialization vector |
adata | Pointer to additional authenticated data in SRAM, or NULL |
adata_len | Length of additional authenticated data in octets, or 0 |
cdata | Pointer to encrypted message in SRAM, or NULL |
cdata_len | Length of encrypted message in octets, or 0 |
pdata | Pointer to decrypted message in SRAM (may be cdata ), or NULL |
process | Process to be polled upon completion of the operation, or NULL |
- Returns
CRYPTO_SUCCESS
if successful, or CRYPTO/AES/GCM error code
Definition at line 113 of file gcm.c.
◆ gcm_auth_encrypt_get_result()
uint8_t gcm_auth_encrypt_get_result |
( |
void * | tag | ) |
|
Gets the result of the GCM authentication and encryption operation.
- Parameters
-
tag | Pointer to 128-bit authentication tag, or NULL |
- Returns
CRYPTO_SUCCESS
if successful, or CRYPTO/AES/GCM error code
- Note
- This function must be called only after
gcm_auth_encrypt_start()
.
Definition at line 107 of file gcm.c.
◆ gcm_auth_encrypt_start()
uint8_t gcm_auth_encrypt_start |
( |
uint8_t | key_area, |
|
|
const void * | iv, |
|
|
const void * | adata, |
|
|
uint16_t | adata_len, |
|
|
const void * | pdata, |
|
|
uint16_t | pdata_len, |
|
|
void * | cdata, |
|
|
struct process * | process ) |
Starts a GCM authentication and encryption operation.
- Parameters
-
key_area | Area in Key RAM where the key is stored (0 to AES_KEY_AREAS - 1) |
iv | Pointer to 96-bit initialization vector |
adata | Pointer to additional authenticated data in SRAM, or NULL |
adata_len | Length of additional authenticated data in octets, or 0 |
pdata | Pointer to message to authenticate and encrypt in SRAM, or NULL |
pdata_len | Length of message to authenticate and encrypt in octets, or 0 |
cdata | Pointer to encrypted message in SRAM (may be pdata ), or NULL |
process | Process to be polled upon completion of the operation, or NULL |
- Returns
CRYPTO_SUCCESS
if successful, or CRYPTO/AES/GCM error code
Definition at line 98 of file gcm.c.