26 #define SET_BIT(reg, pos) reg |= (1<<pos)
27 #define CLR_BIT(reg, pos) reg &= ~(1<<pos)
28 #define GET_BIT(reg, pos) (reg & (1<<pos))
30 #define WORD_BYTES (uint8_t)(4)
31 #define KEY_BYTES (uint8_t)(16)
32 #define STATE_BYTES (uint8_t)(16)
33 #define SBOX_BYTES (uint16_t)(256)
34 #define ROUNDS (uint8_t)(10)
37 typedef uint8_t byte_t;
38 typedef uint8_t state_t[WORD_BYTES][WORD_BYTES];
39 typedef uint8_t aes_key_t[KEY_BYTES];
40 typedef uint8_t sub_keys_t[ROUNDS+1][KEY_BYTES];