Interface to single pass stream cipher with authentication from a single key (NIST SP 800-38D)
|
| void | MODA_AES_GCM_Encrypt (const struct aes_ctxt *aes, const uint8_t *iv, uint32_t ivSize, uint8_t *out, const uint8_t *in, uint32_t textSize, const uint8_t *aad, uint32_t aadSize, uint8_t *t, uint8_t tSize) |
| | AES GCM Encrypt. More...
|
| |
| bool | MODA_AES_GCM_Decrypt (const struct aes_ctxt *aes, const uint8_t *iv, uint32_t ivSize, uint8_t *out, const uint8_t *in, uint32_t textSize, const uint8_t *aad, uint32_t aadSize, const uint8_t *t, uint8_t tSize) |
| | AES GCM Decrypt. More...
|
| |
| bool MODA_AES_GCM_Decrypt |
( |
const struct aes_ctxt * |
aes, |
|
|
const uint8_t * |
iv, |
|
|
uint32_t |
ivSize, |
|
|
uint8_t * |
out, |
|
|
const uint8_t * |
in, |
|
|
uint32_t |
textSize, |
|
|
const uint8_t * |
aad, |
|
|
uint32_t |
aadSize, |
|
|
const uint8_t * |
t, |
|
|
uint8_t |
tSize |
|
) |
| |
AES GCM Decrypt.
- Note
- if
in == out then encryption will be performed in place
-
tSize is valid in the range (0..16)
- Parameters
-
| aes | block cipher expanded key |
| iv | initialisation vector |
| ivSize | byte size of iv |
| out | output buffer |
| in | input buffer |
| textSize | byte size of in |
| *aad | additional data authenticated but not encrypted/decrypted |
| aadSize | byte size of aad |
| *t | optional authentication tag input buffer |
| tSize | size of t |
- Returns
- true if input is valid
- Examples:
- test_aes_gcm.c.
| void MODA_AES_GCM_Encrypt |
( |
const struct aes_ctxt * |
aes, |
|
|
const uint8_t * |
iv, |
|
|
uint32_t |
ivSize, |
|
|
uint8_t * |
out, |
|
|
const uint8_t * |
in, |
|
|
uint32_t |
textSize, |
|
|
const uint8_t * |
aad, |
|
|
uint32_t |
aadSize, |
|
|
uint8_t * |
t, |
|
|
uint8_t |
tSize |
|
) |
| |
AES GCM Encrypt.
- Note
- if
in == out then encryption will be performed in place
-
tSize is valid in the range (0..16)
- Parameters
-
| aes | block cipher expanded key |
| iv | initialisation vector |
| ivSize | byte size of iv |
| out | output buffer |
| in | input buffer |
| textSize | byte size of in |
| aad | additional data authenticated but not encrypted/decrypted |
| aadSize | byte size of aad |
| t | optional authentication tag input buffer |
| tSize | byte size of t |
- Examples:
- test_aes_gcm.c.