|
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. | |
| #define | AES_MAX_ROUNDS 15 |
| Maximum number of AES rounds. | |
| #define | AES_CTX_SIZE sizeof ( struct aes_context ) |
| AES context size. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| 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) | |
| 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) | |
Variables | |
| struct cipher_algorithm | aes_algorithm |
| Basic AES algorithm. | |
| 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_BLOCKSIZE 16 |
AES blocksize.
Definition at line 16 of file aes.h.
Referenced by __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), CBC_CIPHER(), ECB_CIPHER(), and GCM_CIPHER().
| #define AES_CTX_SIZE sizeof ( struct aes_context ) |
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
| 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(), src, and u8.
| 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(), src, and u8.
Referenced by ccmp_kie_decrypt().
|
extern |
Basic AES algorithm.
Definition at line 784 of file aes.c.
Referenced by aes_unwrap(), aes_wrap(), CBC_CIPHER(), ccmp_cbc_mac(), ccmp_ctr_xor(), ccmp_feed_cbc_mac(), ccmp_init(), ECB_CIPHER(), and GCM_CIPHER().
|
extern |
Referenced by aes_test_exec(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), and ECB_CIPHER().
|
extern |
Referenced by __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), aes_test_exec(), CBC_CIPHER(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), and peerblk_parse_header().
|
extern |
Referenced by __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), __tls_cipher_suite(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), CIPHER_TEST(), GCM_CIPHER(), and gcm_test_exec().