Rizin
unix-like reverse engineering framework and cli tools
|
#include "aes.h"
Go to the source code of this file.
Classes | |
struct | aes_table |
Macros | |
#define | AES_SMALL 0 |
#define | AES_TABLE_SIZE 4 |
#define | B0(x) ((x) & 0xff) |
#define | B1(x) (((x) >> 8) & 0xff) |
#define | B2(x) (((x) >> 16) & 0xff) |
#define | B3(x) (((x) >> 24) & 0xff) |
#define | SUBBYTE(x, box) |
#define | AES_ROUND(T, w0, w1, w2, w3, k) |
#define | AES_FINAL_ROUND(T, w0, w1, w2, w3, k) |
#define | aes_sbox (_nettle_aes_encrypt_table.sbox) |
Functions | |
void | _nettle_aes_set_key (unsigned nr, unsigned nk, uint32_t *subkeys, const uint8_t *key) |
void | _nettle_aes_invert (unsigned rounds, uint32_t *dst, const uint32_t *src) |
void | _nettle_aes_encrypt (unsigned rounds, const uint32_t *keys, const struct aes_table *T, size_t length, uint8_t *dst, const uint8_t *src) |
void | _nettle_aes_decrypt (unsigned rounds, const uint32_t *keys, const struct aes_table *T, size_t length, uint8_t *dst, const uint8_t *src) |
Variables | |
const struct aes_table | _nettle_aes_encrypt_table |
const struct aes_table | _nettle_aes_decrypt_table |
Definition at line 96 of file aes-internal.h.
#define aes_sbox (_nettle_aes_encrypt_table.sbox) |
Definition at line 103 of file aes-internal.h.
#define AES_SMALL 0 |
Definition at line 44 of file aes-internal.h.
#define AES_TABLE_SIZE 4 |
Definition at line 50 of file aes-internal.h.
Definition at line 80 of file aes-internal.h.
Definition at line 81 of file aes-internal.h.
Definition at line 82 of file aes-internal.h.
Definition at line 83 of file aes-internal.h.
#define SUBBYTE | ( | x, | |
box | |||
) |
void _nettle_aes_decrypt | ( | unsigned | rounds, |
const uint32_t * | keys, | ||
const struct aes_table * | T, | ||
size_t | length, | ||
uint8_t * | dst, | ||
const uint8_t * | src | ||
) |
Definition at line 57 of file aes-decrypt-internal.c.
References AES_BLOCK_SIZE, AES_FINAL_ROUND, AES_ROUND, dst, FOR_BLOCKS, i, keys, LE_READ_UINT32, LE_WRITE_UINT32, length, src, T, benchmark::t1, w0, w1, w2, and w3.
Referenced by nettle_aes128_decrypt(), nettle_aes192_decrypt(), and nettle_aes256_decrypt().
void _nettle_aes_encrypt | ( | unsigned | rounds, |
const uint32_t * | keys, | ||
const struct aes_table * | T, | ||
size_t | length, | ||
uint8_t * | dst, | ||
const uint8_t * | src | ||
) |
Definition at line 57 of file aes-encrypt-internal.c.
References AES_BLOCK_SIZE, AES_FINAL_ROUND, AES_ROUND, dst, FOR_BLOCKS, i, keys, LE_READ_UINT32, LE_WRITE_UINT32, length, src, T, benchmark::t1, w0, w1, w2, and w3.
Referenced by nettle_aes128_encrypt(), nettle_aes192_encrypt(), and nettle_aes256_encrypt().
Definition at line 139 of file aes-invert-internal.c.
References dst, i, k, MIX_COLUMN, mtable, src, and SWAP.
Referenced by nettle_aes128_invert_key(), nettle_aes192_invert_key(), and nettle_aes256_invert_key().
Definition at line 50 of file aes-set-key-internal.c.
References AES_BLOCK_SIZE, aes_sbox, assert(), i, key, LE_READ_UINT32, ROTL32, rp, and SUBBYTE.
Referenced by nettle_aes128_set_encrypt_key(), nettle_aes192_set_encrypt_key(), and nettle_aes256_set_encrypt_key().
Definition at line 1 of file aes-decrypt-table.c.
Referenced by nettle_aes128_decrypt(), nettle_aes192_decrypt(), and nettle_aes256_decrypt().
Definition at line 1 of file aes-encrypt-table.c.
Referenced by nettle_aes128_encrypt(), nettle_aes192_encrypt(), and nettle_aes256_encrypt().