libosmogsm
1.9.2
Osmocom GSM library
|
#include "aes.h"
Go to the source code of this file.
Macros | |
#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) |
Functions | |
static u32 | rotr (u32 val, int bits) |
void | rijndaelKeySetupEnc (u32 rk[], const u8 cipherKey[]) |
Expand the cipher key into the encryption key schedule. More... | |
Variables | |
const u32 | Te0 [256] |
const u32 | Te1 [256] |
const u32 | Te2 [256] |
const u32 | Te3 [256] |
const u32 | Te4 [256] |
const u32 | Td0 [256] |
const u32 | Td1 [256] |
const u32 | Td2 [256] |
const u32 | Td3 [256] |
const u32 | Td4 [256] |
const u32 | rcon [10] |
const u8 | Td4s [256] |
const u8 | rcons [10] |
AES (Rijndael) cipher.
#define AES_PRIV_SIZE (4 * 44) |
#define AES_SMALL_TABLES |
#define GETU32 | ( | pt | ) |
#define PUTU32 | ( | ct, | |
st | |||
) |
#define TD0 | ( | i | ) | Td0[((i) >> 24) & 0xff] |
#define TD0_ | ( | i | ) | Td0[(i) & 0xff] |
#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 TE0 | ( | i | ) | Te0[((i) >> 24) & 0xff] |
#define TE4 | ( | i | ) | ((Te0[(i)] >> 8) & 0x000000ff) |
#define TE41 | ( | i | ) | ((Te0[((i) >> 24) & 0xff] << 8) & 0xff000000) |
#define TE414 | ( | i | ) | ((Te0[((i) >> 24) & 0xff] >> 8) & 0x000000ff) |
#define TE42 | ( | i | ) | (Te0[((i) >> 16) & 0xff] & 0x00ff0000) |
#define TE421 | ( | i | ) | ((Te0[((i) >> 16) & 0xff] << 8) & 0xff000000) |
#define TE43 | ( | i | ) | (Te0[((i) >> 8) & 0xff] & 0x0000ff00) |
#define TE432 | ( | i | ) | (Te0[((i) >> 8) & 0xff] & 0x00ff0000) |
#define TE44 | ( | i | ) | ((Te0[(i) & 0xff] >> 8) & 0x000000ff) |
#define TE443 | ( | i | ) | (Te0[(i) & 0xff] & 0x0000ff00) |
const u32 rcon[10] |
const u8 rcons[10] |
const u32 Td0[256] |
const u32 Td1[256] |
const u32 Td2[256] |
const u32 Td3[256] |
const u32 Td4[256] |
const u8 Td4s[256] |
const u32 Te0[256] |
const u32 Te1[256] |
const u32 Te2[256] |
const u32 Te3[256] |
const u32 Te4[256] |