MODA  1.0.1
ModularAES
Authenticated AES Wrap Algorithm (RFC 3394:2002)

Description

Interface to authenticated AES wrap algorithm (RFC 3394:2002)

Functions

void MODA_AES_WRAP_Encrypt (const struct aes_ctxt *aes, uint8_t *out, const uint8_t *in, uint16_t inSize, const uint8_t *iv)
 Wrap input. More...
 
bool MODA_AES_WRAP_Decrypt (const struct aes_ctxt *aes, uint8_t *out, const uint8_t *in, uint16_t inSize, const uint8_t *iv)
 Unwrap input. More...
 

Function Documentation

bool MODA_AES_WRAP_Decrypt ( const struct aes_ctxt aes,
uint8_t *  out,
const uint8_t *  in,
uint16_t  inSize,
const uint8_t *  iv 
)

Unwrap input.

Note
this process is able to validate correctness of out
inSize must be a multiple 8 and be equal to or greater than 16
out must be large enough to accomodate (inSize - 8) bytes
if in == out the process will be performed in place
the internal default IV shall be used if iv is set to NULL
Parameters
aesblock cipher expanded key
outoutput buffer
ininput buffer
inSizebyte size of in
iv8 byte IV field (NULL for default)
Returns
true if in unwrapped successfully
Examples:
test_aes_wrap.c.
void MODA_AES_WRAP_Encrypt ( const struct aes_ctxt aes,
uint8_t *  out,
const uint8_t *  in,
uint16_t  inSize,
const uint8_t *  iv 
)

Wrap input.

Note
inSize must be a multiple 8 and be equal to or greater than 8
out must be large enough to accomodate inSize + 8 bytes
if in == out the process will be performed in place
the internal default IV shall be used if iv is set to NULL
Parameters
aesblock cipher expanded key
outoutput buffer
ininput buffer
inSizebyte size of in
iv8 byte IV field (NULL for default)
Examples:
test_aes_wrap.c.