12.1.2.16 aes_sync_gcm_crypt_and_tag
AES-GCM block encryption/decryption.
int32_t aes_sync_gcm_crypt_and_tag(
struct aes_sync_descriptor *const descr,
const enum aes_action enc,
const uint8_t * input,
uint8_t * output,
uint32_t length,
const uint8_t * iv,
uint32_t iv_len,
const uint8_t * aad,
uint32_t aad_len,
uint8_t * tag,
uint32_t tag_len
)
Parameters
- descr
-
Type: struct aes_sync_descriptor Struct *const
The AES descriptor
- enc
-
Type: const enum aes_action
AES_SYNC_ENCRYPT or AES_SYNC_DECRYPT
- input
-
Type: const uint8_t *
Buffer holding the input data
- output
-
Type: uint8_t *
Buffer holding the output data
- length
-
Type: uint32_t
Byte length of the input data
- iv
-
Type: const uint8_t *
Initialization Vector
- iv_len
-
Type: uint32_t
Length of IV
- aad
-
Type: const uint8_t *
Additional data
- aad_len
-
Type: uint32_t
Length of additional data
- tag
-
Type: uint8_t *
Buffer holding the input data
- tag_len
-
Type: uint32_t
Length of tag
Returns
Type: int32_t
ERR_NONE if successful