|
iPXE
|
AES algorithm. More...
#include <ipxe/crypto.h>Go to the source code of this file.
Data Structures | |
| union | aes_matrix |
| AES matrix. More... | |
| struct | aes_round_keys |
| AES round keys. More... | |
| struct | aes_context |
| AES context. More... | |
Macros | |
| #define | AES_BLOCKSIZE 16 |
| AES blocksize. More... | |
| #define | AES_MAX_ROUNDS 15 |
| Maximum number of AES rounds. More... | |
| #define | AES_CTX_SIZE sizeof ( struct aes_context ) |
| AES context size. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| 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... | |
Variables | |
| struct cipher_algorithm | aes_algorithm |
| Basic AES algorithm. More... | |
| struct cipher_algorithm | aes_ecb_algorithm |
| struct cipher_algorithm | aes_cbc_algorithm |
| struct cipher_algorithm | aes_gcm_algorithm |
AES algorithm.
Definition in file aes.h.
| #define AES_CTX_SIZE sizeof ( struct aes_context ) |
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| 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, cipher_setkey(), 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, cipher_setkey(), dest, free, kek, malloc(), memcpy(), memmove(), and src.
Referenced by ccmp_kie_decrypt().
| struct cipher_algorithm aes_algorithm |
Basic AES algorithm.
Definition at line 783 of file aes.c.
Referenced by aes_unwrap(), aes_wrap(), ccmp_cbc_mac(), ccmp_ctr_xor(), ccmp_feed_cbc_mac(), and ccmp_init().
| struct cipher_algorithm aes_ecb_algorithm |
Referenced by aes_test_exec().
| struct cipher_algorithm aes_cbc_algorithm |
Referenced by aes_test_exec(), and peerblk_parse_header().
| struct cipher_algorithm aes_gcm_algorithm |
Referenced by gcm_test_exec().
1.8.15