AES (Rijndael) cipher.
More...
Go to the source code of this file.
|
#define | AES_SMALL_TABLES |
|
#define | RCON(i) ((u32)rcons[(i)] << 24) |
|
#define | TE0(i) Te0[((i) >> 24) & 0xff] |
|
#define | TE1(i) rotr(Te0[((i) >> 16) & 0xff], 8) |
|
#define | TE2(i) rotr(Te0[((i) >> 8) & 0xff], 16) |
|
#define | TE3(i) rotr(Te0[(i) & 0xff], 24) |
|
#define | TE41(i) ((Te0[((i) >> 24) & 0xff] << 8) & 0xff000000) |
|
#define | TE42(i) (Te0[((i) >> 16) & 0xff] & 0x00ff0000) |
|
#define | TE43(i) (Te0[((i) >> 8) & 0xff] & 0x0000ff00) |
|
#define | TE44(i) ((Te0[(i) & 0xff] >> 8) & 0x000000ff) |
|
#define | TE421(i) ((Te0[((i) >> 16) & 0xff] << 8) & 0xff000000) |
|
#define | TE432(i) (Te0[((i) >> 8) & 0xff] & 0x00ff0000) |
|
#define | TE443(i) (Te0[(i) & 0xff] & 0x0000ff00) |
|
#define | TE414(i) ((Te0[((i) >> 24) & 0xff] >> 8) & 0x000000ff) |
|
#define | TE4(i) ((Te0[(i)] >> 8) & 0x000000ff) |
|
#define | TD0(i) Td0[((i) >> 24) & 0xff] |
|
#define | TD1(i) rotr(Td0[((i) >> 16) & 0xff], 8) |
|
#define | TD2(i) rotr(Td0[((i) >> 8) & 0xff], 16) |
|
#define | TD3(i) rotr(Td0[(i) & 0xff], 24) |
|
#define | TD41(i) (Td4s[((i) >> 24) & 0xff] << 24) |
|
#define | TD42(i) (Td4s[((i) >> 16) & 0xff] << 16) |
|
#define | TD43(i) (Td4s[((i) >> 8) & 0xff] << 8) |
|
#define | TD44(i) (Td4s[(i) & 0xff]) |
|
#define | TD0_(i) Td0[(i) & 0xff] |
|
#define | TD1_(i) rotr(Td0[(i) & 0xff], 8) |
|
#define | TD2_(i) rotr(Td0[(i) & 0xff], 16) |
|
#define | TD3_(i) rotr(Td0[(i) & 0xff], 24) |
|
#define | GETU32(pt) |
|
#define | PUTU32(ct, st) |
|
#define | AES_PRIV_SIZE (4 * 44) |
|
◆ AES_PRIV_SIZE
#define AES_PRIV_SIZE (4 * 44) |
◆ AES_SMALL_TABLES
◆ GETU32
Value:(((
u32)(pt)[0] << 24) ^ ((
u32)(pt)[1] << 16) ^ \
((
u32)(pt)[2] << 8) ^ ((
u32)(pt)[3]))
uint32_t u32
Definition: common.h:25
◆ PUTU32
#define PUTU32 |
( |
|
ct, |
|
|
|
st |
|
) |
| |
Value:{ \
(ct)[0] = (
u8)((st) >> 24); (ct)[1] = (
u8)((st) >> 16); \
(ct)[2] = (
u8)((st) >> 8); (ct)[3] = (
u8)(st); }
uint8_t u8
Definition: common.h:27
◆ RCON
#define RCON |
( |
|
i | ) |
((u32)rcons[(i)] << 24) |
◆ TD0
#define TD0 |
( |
|
i | ) |
Td0[((i) >> 24) & 0xff] |
◆ TD0_
#define TD0_ |
( |
|
i | ) |
Td0[(i) & 0xff] |
◆ TD1
#define TD1 |
( |
|
i | ) |
rotr(Td0[((i) >> 16) & 0xff], 8) |
◆ TD1_
#define TD1_ |
( |
|
i | ) |
rotr(Td0[(i) & 0xff], 8) |
◆ TD2
#define TD2 |
( |
|
i | ) |
rotr(Td0[((i) >> 8) & 0xff], 16) |
◆ TD2_
#define TD2_ |
( |
|
i | ) |
rotr(Td0[(i) & 0xff], 16) |
◆ TD3
#define TD3 |
( |
|
i | ) |
rotr(Td0[(i) & 0xff], 24) |
◆ TD3_
#define TD3_ |
( |
|
i | ) |
rotr(Td0[(i) & 0xff], 24) |
◆ TD41
#define TD41 |
( |
|
i | ) |
(Td4s[((i) >> 24) & 0xff] << 24) |
◆ TD42
#define TD42 |
( |
|
i | ) |
(Td4s[((i) >> 16) & 0xff] << 16) |
◆ TD43
#define TD43 |
( |
|
i | ) |
(Td4s[((i) >> 8) & 0xff] << 8) |
◆ TD44
#define TD44 |
( |
|
i | ) |
(Td4s[(i) & 0xff]) |
◆ TE0
#define TE0 |
( |
|
i | ) |
Te0[((i) >> 24) & 0xff] |
◆ TE1
#define TE1 |
( |
|
i | ) |
rotr(Te0[((i) >> 16) & 0xff], 8) |
◆ TE2
#define TE2 |
( |
|
i | ) |
rotr(Te0[((i) >> 8) & 0xff], 16) |
◆ TE3
#define TE3 |
( |
|
i | ) |
rotr(Te0[(i) & 0xff], 24) |
◆ TE4
#define TE4 |
( |
|
i | ) |
((Te0[(i)] >> 8) & 0x000000ff) |
◆ TE41
#define TE41 |
( |
|
i | ) |
((Te0[((i) >> 24) & 0xff] << 8) & 0xff000000) |
◆ TE414
#define TE414 |
( |
|
i | ) |
((Te0[((i) >> 24) & 0xff] >> 8) & 0x000000ff) |
◆ TE42
#define TE42 |
( |
|
i | ) |
(Te0[((i) >> 16) & 0xff] & 0x00ff0000) |
◆ TE421
#define TE421 |
( |
|
i | ) |
((Te0[((i) >> 16) & 0xff] << 8) & 0xff000000) |
◆ TE43
#define TE43 |
( |
|
i | ) |
(Te0[((i) >> 8) & 0xff] & 0x0000ff00) |
◆ TE432
#define TE432 |
( |
|
i | ) |
(Te0[((i) >> 8) & 0xff] & 0x00ff0000) |
◆ TE44
#define TE44 |
( |
|
i | ) |
((Te0[(i) & 0xff] >> 8) & 0x000000ff) |
◆ TE443
#define TE443 |
( |
|
i | ) |
(Te0[(i) & 0xff] & 0x0000ff00) |
◆ rijndaelKeySetupEnc()
void rijndaelKeySetupEnc |
( |
u32 |
rk[], |
|
|
const u8 |
cipherKey[] |
|
) |
| |
◆ rotr()
static u32 rotr |
( |
u32 |
val, |
|
|
int |
bits |
|
) |
| |
|
inlinestatic |
◆ rcon
◆ rcons
◆ Td0
◆ Td1
◆ Td2
◆ Td3
◆ Td4
◆ Td4s
◆ Te0
◆ Te1
◆ Te2
◆ Te3
◆ Te4