|
#define | ENCRYPTION_IN_C 1 |
|
#define | DECRYPTION_IN_C 2 |
|
#define | ENC_KEYING_IN_C 4 |
|
#define | DEC_KEYING_IN_C 8 |
|
#define | NO_TABLES 0 |
|
#define | ONE_TABLE 1 |
|
#define | FOUR_TABLES 4 |
|
#define | NONE 0 |
|
#define | PARTIAL 1 |
|
#define | FULL 2 |
|
#define | ALGORITHM_BYTE_ORDER PLATFORM_BYTE_ORDER |
|
#define | SAFE_IO |
|
#define | ENC_UNROLL FULL |
|
#define | DEC_UNROLL FULL |
|
#define | FF_TABLES |
|
#define | ARRAYS |
|
#define | FIXED_TABLES |
|
#define | to_byte(x) ((x) & 0xff) |
|
#define | ENC_ROUND FOUR_TABLES |
|
#define | LAST_ENC_ROUND FOUR_TABLES |
|
#define | DEC_ROUND FOUR_TABLES |
|
#define | LAST_DEC_ROUND FOUR_TABLES |
|
#define | KEY_SCHED FOUR_TABLES |
|
#define | s(x, c) x[c] |
|
#define | EFUNCS_IN_C 0 |
|
#define | DFUNCS_IN_C 0 |
|
#define | FUNCS_IN_C ( EFUNCS_IN_C | DFUNCS_IN_C ) |
|
#define | RC_LENGTH (5 * (AES_BLOCK_SIZE / 4 - 2)) |
|
#define | brot(x, n) (((uint_32t)(x) << n) | ((uint_32t)(x) >> (32 - n))) |
|
#define | aes_sw32(x) ((brot((x),8) & 0x00ff00ff) | (brot((x),24) & 0xff00ff00)) |
|
#define | upr(x, n) (((uint_32t)(x) << (8 * (n))) | ((uint_32t)(x) >> (32 - 8 * (n)))) |
|
#define | ups(x, n) ((uint_32t) (x) << (8 * (n))) |
|
#define | bval(x, n) to_byte((x) >> (8 * (n))) |
|
#define | bytes2word(b0, b1, b2, b3) (((uint_32t)(b3) << 24) | ((uint_32t)(b2) << 16) | ((uint_32t)(b1) << 8) | (b0)) |
|
#define | upr(x, n) (((uint_32t)(x) >> (8 * (n))) | ((uint_32t)(x) << (32 - 8 * (n)))) |
|
#define | ups(x, n) ((uint_32t) (x) >> (8 * (n))) |
|
#define | bval(x, n) to_byte((x) >> (24 - 8 * (n))) |
|
#define | bytes2word(b0, b1, b2, b3) (((uint_32t)(b0) << 24) | ((uint_32t)(b1) << 16) | ((uint_32t)(b2) << 8) | (b3)) |
|
#define | word_in(x, c) |
|
#define | word_out(x, c, v) |
|
#define | WPOLY 0x011b |
|
#define | BPOLY 0x1b |
|
#define | m1 0x80808080 |
|
#define | m2 0x7f7f7f7f |
|
#define | gf_mulx(x) ((((x) & m2) << 1) ^ ((((x) & m1) >> 7) * BPOLY)) |
|
#define | no_table(x, box, vf, rf, c) |
|
#define | one_table(x, op, tab, vf, rf, c) |
|
#define | four_tables(x, tab, vf, rf, c) |
|
#define | vf1(x, r, c) (x) |
|
#define | rf1(r, c) (r) |
|
#define | rf2(r, c) ((8+r-c)&3) |
|
#define | dec_fmvars uint_32t g2 |
|
#define | fwd_mcol(x) (g2 = gf_mulx(x), g2 ^ upr((x) ^ g2, 3) ^ upr((x), 2) ^ upr((x), 1)) |
|
#define | dec_imvars uint_32t g2, g4, g9 |
|
#define | inv_mcol(x) |
|
#define | ls_box(x, c) no_table(x,t_use(s,box),vf1,rf2,c) |
|