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) | |
union aes_matrix | __attribute__ ((packed)) |
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 | |
uint8_t | byte [16] |
Viewed as an array of bytes. More... | |
uint32_t | column [4] |
Viewed as an array of four-byte columns. More... | |
struct aes_round_keys | __attribute__ |
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 | ) |
union aes_matrix __attribute__ | ( | (packed) | ) |
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().
uint32_t column[4] |
Viewed as an array of four-byte columns.
Definition at line 14 of file aes.h.
Referenced by __attribute__(), aes_key_sbox(), ar5008_hw_phy_modify_rx_buffer(), ar9003_hw_prog_ini(), ath9k_hw_write_array(), and fbcon_draw().
struct aes_round_keys __attribute__ |
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().