Interface to authenticated AES wrap algorithm (RFC 3394:2002)
| 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
-
| aes | block cipher expanded key |
| out | output buffer |
| in | input buffer |
| inSize | byte size of in |
| iv | 8 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
-
| aes | block cipher expanded key |
| out | output buffer |
| in | input buffer |
| inSize | byte size of in |
| iv | 8 byte IV field (NULL for default) |
- Examples:
- test_aes_wrap.c.