8 #include <botan/noekeon.h>
9 #include <botan/loadstor.h>
10 #include <botan/rotate.h>
80 0x80, 0x1B, 0x36, 0x6C, 0xD8, 0xAB, 0x4D, 0x9A,
81 0x2F, 0x5E, 0xBC, 0x63, 0xC6, 0x97, 0x35, 0x6A,
89 for(
size_t i = 0; i != blocks; ++i)
96 for(
size_t j = 0; j != 16; ++j)
99 theta(A0, A1, A2, A3, &EK[0]);
105 gamma(A0, A1, A2, A3);
113 theta(A0, A1, A2, A3, &EK[0]);
127 for(
size_t i = 0; i != blocks; ++i)
134 for(
size_t j = 16; j != 0; --j)
136 theta(A0, A1, A2, A3, &DK[0]);
143 gamma(A0, A1, A2, A3);
150 theta(A0, A1, A2, A3, &DK[0]);
163 void Noekeon::key_schedule(
const byte key[],
size_t)
170 for(
size_t i = 0; i != 16; ++i)
173 theta(A0, A1, A2, A3);
179 gamma(A0, A1, A2, A3);
193 theta(A0, A1, A2, A3);
T rotate_left(T input, size_t rot)
void encrypt_n(const byte in[], byte out[], size_t blocks) const
T rotate_right(T input, size_t rot)
u32bit load_be< u32bit >(const byte in[], size_t off)
void store_be(u16bit in, byte out[2])
void decrypt_n(const byte in[], byte out[], size_t blocks) const
void zeroise(MemoryRegion< T > &vec)