|
libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
|
Go to the source code of this file.
Data Structures | |
| struct | aes128_ctx |
Macros | |
| #define | AES_BLOCK_SIZE 16 |
| #define | AES_KEY_SIZE 16 |
| #define | AES_NUM_ROUNDS 10 |
| #define | AES_KEY_EXP_SIZE 176 /* 16 * (10 + 1) */ |
| #define | MULTIPLY(x, y) |
Functions | |
| static uint8_t | xtime (uint8_t x) |
| static void | key_expansion (aes128_ctx *ctx, const uint8_t key[16]) |
| static void | add_round_key (uint8_t round, uint8_t state[4][4], const uint8_t *round_key) |
| static void | sub_bytes (uint8_t state[4][4]) |
| static void | inv_sub_bytes (uint8_t state[4][4]) |
| static void | shift_rows (uint8_t state[4][4]) |
| static void | inv_shift_rows (uint8_t state[4][4]) |
| static void | mix_columns (uint8_t state[4][4]) |
| static void | inv_mix_columns (uint8_t state[4][4]) |
| static void | cipher (uint8_t state[4][4], const uint8_t *round_key) |
| static void | inv_cipher (uint8_t state[4][4], const uint8_t *round_key) |
| static void | xor_block (uint8_t *buf, const uint8_t *xor_val) |
| void | aes128_cbc_encrypt (const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length) |
| AES-128 CBC encrypt data in-place. | |
| void | aes128_cbc_decrypt (const uint8_t key[16], const uint8_t iv[16], uint8_t *data, uint32_t length) |
| AES-128 CBC decrypt data in-place. | |
Variables | |
| static const uint8_t | sbox [256] |
| static const uint8_t | rsbox [256] |
| static const uint8_t | rcon [11] = {0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36} |
| #define AES_BLOCK_SIZE 16 |
Definition at line 27 of file aes128.c.
Referenced by aes128_cbc_decrypt(), aes128_cbc_encrypt(), and xor_block().
| #define AES_KEY_SIZE 16 |
Definition at line 28 of file aes128.c.
Referenced by key_expansion().
| #define AES_NUM_ROUNDS 10 |
Definition at line 29 of file aes128.c.
Referenced by cipher(), inv_cipher(), and key_expansion().
| #define MULTIPLY | ( | x, | |
| y ) |
|
static |
Definition at line 118 of file aes128.c.
Referenced by cipher(), and inv_cipher().
| void aes128_cbc_decrypt | ( | const uint8_t | key[16], |
| const uint8_t | iv[16], | ||
| uint8_t * | data, | ||
| uint32_t | length ) |
AES-128 CBC decrypt data in-place.
| key | 16-byte decryption key. |
| iv | 16-byte initialization vector (not modified). |
| data | Buffer to decrypt in-place. Must be a multiple of 16 bytes. |
| length | Number of bytes to decrypt. Must be a multiple of 16. |
Definition at line 290 of file aes128.c.
References AES_BLOCK_SIZE, inv_cipher(), key_expansion(), aes128_ctx::round_key, and xor_block().
Referenced by ps3_decrypt_sector(), wii_decrypt_group(), and wiiu_decrypt_physical_sector().
| void aes128_cbc_encrypt | ( | const uint8_t | key[16], |
| const uint8_t | iv[16], | ||
| uint8_t * | data, | ||
| uint32_t | length ) |
AES-128 CBC encrypt data in-place.
| key | 16-byte encryption key. |
| iv | 16-byte initialization vector (not modified). |
| data | Buffer to encrypt in-place. Must be a multiple of 16 bytes. |
| length | Number of bytes to encrypt. Must be a multiple of 16. |
Definition at line 274 of file aes128.c.
References AES_BLOCK_SIZE, cipher(), key_expansion(), aes128_ctx::round_key, and xor_block().
Referenced by ps3_derive_disc_key(), ps3_encrypt_sector(), wii_encrypt_group(), and wiiu_encrypt_physical_sector().
|
static |
Definition at line 235 of file aes128.c.
References add_round_key(), AES_NUM_ROUNDS, mix_columns(), shift_rows(), and sub_bytes().
Referenced by aes128_cbc_encrypt().
|
static |
Definition at line 252 of file aes128.c.
References add_round_key(), AES_NUM_ROUNDS, inv_mix_columns(), inv_shift_rows(), and inv_sub_bytes().
Referenced by aes128_cbc_decrypt().
|
static |
|
static |
Definition at line 163 of file aes128.c.
Referenced by inv_cipher().
|
static |
|
static |
Definition at line 76 of file aes128.c.
References AES_KEY_SIZE, AES_NUM_ROUNDS, rcon, aes128_ctx::round_key, and sbox.
Referenced by aes128_cbc_decrypt(), and aes128_cbc_encrypt().
|
static |
|
static |
|
static |
|
static |
Definition at line 269 of file aes128.c.
References AES_BLOCK_SIZE.
Referenced by aes128_cbc_decrypt(), and aes128_cbc_encrypt().
|
static |
Definition at line 74 of file aes128.c.
Referenced by mix_columns().
|
static |
Definition at line 67 of file aes128.c.
Referenced by key_expansion().
|
static |
Definition at line 50 of file aes128.c.
Referenced by inv_sub_bytes().
|
static |
Definition at line 33 of file aes128.c.
Referenced by key_expansion(), and sub_bytes().