iPXE
|
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER) | |
int | aes_wrap (const void *kek, const void *src, void *dest, int nblk) |
Wrap a key or other data using AES Key Wrap (RFC 3394) More... | |
int | aes_unwrap (const void *kek, const void *src, void *dest, int nblk) |
Unwrap a key or other data using AES Key Wrap (RFC 3394) More... | |
FILE_LICENCE | ( | GPL2_OR_LATER | ) |
int aes_wrap | ( | const void * | kek, |
const void * | src, | ||
void * | dest, | ||
int | nblk | ||
) |
Wrap a key or other data using AES Key Wrap (RFC 3394)
kek | Key Encryption Key, 16 bytes |
src | Data to encrypt |
nblk | Number of 8-byte blocks in data |
dest | Encrypted data (8 bytes longer than input) |
The algorithm is implemented such that src and dest may point to the same buffer.
Definition at line 38 of file aes_wrap.c.
References aes_algorithm, AES_CTX_SIZE, cipher_encrypt, dest, free, kek, malloc(), memcpy(), memmove(), memset(), and src.
int aes_unwrap | ( | const void * | kek, |
const void * | src, | ||
void * | dest, | ||
int | nblk | ||
) |
Unwrap a key or other data using AES Key Wrap (RFC 3394)
kek | Key Encryption Key, 16 bytes |
src | Data to decrypt |
nblk | Number of 8-byte blocks in plaintext key |
dest | Decrypted data (8 bytes shorter than input) |
rc | Zero on success, nonzero on IV mismatch |
The algorithm is implemented such that src and dest may point to the same buffer.
Definition at line 85 of file aes_wrap.c.
References aes_algorithm, AES_CTX_SIZE, cipher_decrypt, dest, free, kek, malloc(), memcpy(), memmove(), and src.
Referenced by ccmp_kie_decrypt().