libbtc
bitcoinclibrary
|
Go to the source code of this file.
Data Structures | |
struct | aes_context |
Macros | |
#define | AES_ENC_PREKEYED /* AES encryption with a precomputed key schedule */ |
#define | AES_DEC_PREKEYED /* AES decryption with a precomputed key schedule */ |
#define | N_ROW 4 |
#define | N_COL 4 |
#define | N_BLOCK (N_ROW * N_COL) |
#define | N_MAX_ROUNDS 14 |
Typedefs | |
typedef unsigned char | uint_8t |
typedef uint_8t | return_type |
typedef uint_8t | length_type |
Functions | |
return_type | aes_set_key (const unsigned char key[], length_type keylen, aes_context ctx[1]) |
return_type | aes_encrypt (const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK], const aes_context ctx[1]) |
return_type | aes_cbc_encrypt (const unsigned char *in, unsigned char *out, int n_block, unsigned char iv[N_BLOCK], const aes_context ctx[1]) |
return_type | aes_decrypt (const unsigned char in[N_BLOCK], unsigned char out[N_BLOCK], const aes_context ctx[1]) |
return_type | aes_cbc_decrypt (const unsigned char *in, unsigned char *out, int n_block, unsigned char iv[N_BLOCK], const aes_context ctx[1]) |
#define AES_DEC_PREKEYED /* AES decryption with a precomputed key schedule */ |
#define AES_ENC_PREKEYED /* AES encryption with a precomputed key schedule */ |
Definition at line 60 of file aes.h.
Referenced by aes_cbc_decrypt(), aes_cbc_encrypt(), aes_decrypt(), aes_encrypt(), inv_mix_sub_columns(), and mix_sub_columns().
typedef uint_8t length_type |
typedef uint_8t return_type |
return_type aes_cbc_decrypt | ( | const unsigned char * | in, |
unsigned char * | out, | ||
int | n_block, | ||
unsigned char | iv[N_BLOCK], | ||
const aes_context | ctx[1] | ||
) |
Definition at line 586 of file aes.c.
References aes_decrypt(), N_BLOCK, and xor_block().
return_type aes_cbc_encrypt | ( | const unsigned char * | in, |
unsigned char * | out, | ||
int | n_block, | ||
unsigned char | iv[N_BLOCK], | ||
const aes_context | ctx[1] | ||
) |
Definition at line 537 of file aes.c.
References aes_encrypt(), N_BLOCK, and xor_block().
return_type aes_decrypt | ( | const unsigned char | in[N_BLOCK], |
unsigned char | out[N_BLOCK], | ||
const aes_context | ctx[1] | ||
) |
Definition at line 557 of file aes.c.
References add_round_key(), copy_and_key(), inv_mix_sub_columns(), inv_shift_sub_rows(), aes_context::ksch, N_BLOCK, and aes_context::rnd.
Referenced by aes_cbc_decrypt().
return_type aes_encrypt | ( | const unsigned char | in[N_BLOCK], |
unsigned char | out[N_BLOCK], | ||
const aes_context | ctx[1] | ||
) |
Definition at line 508 of file aes.c.
References add_round_key(), copy_and_key(), aes_context::ksch, mix_sub_columns(), N_BLOCK, aes_context::rnd, shift_sub_rows(), and VERSION_1.
Referenced by aes_cbc_encrypt().
return_type aes_set_key | ( | const unsigned char | key[], |
length_type | keylen, | ||
aes_context | ctx[1] | ||
) |
Definition at line 449 of file aes.c.
References block_copy_nn, f2, aes_context::ksch, aes_context::rnd, and s_box.