MODA  1.0.1
ModularAES

Description

Interface to single pass stream cipher with authentication from a single key (NIST SP 800-38D)

Functions

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...
 

Function Documentation

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
aesblock cipher expanded key
ivinitialisation vector
ivSizebyte size of iv
outoutput buffer
ininput buffer
textSizebyte size of in
*aadadditional data authenticated but not encrypted/decrypted
aadSizebyte size of aad
*toptional authentication tag input buffer
tSizesize 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
aesblock cipher expanded key
ivinitialisation vector
ivSizebyte size of iv
outoutput buffer
ininput buffer
textSizebyte size of in
aadadditional data authenticated but not encrypted/decrypted
aadSizebyte size of aad
toptional authentication tag input buffer
tSizebyte size of t
Examples:
test_aes_gcm.c.