8 #include <botan/noekeon.h>
9 #include <botan/internal/simd_32.h>
16 #define NOK_SIMD_THETA(A0, A1, A2, A3, K0, K1, K2, K3) \
18 SIMD_32 T = A0 ^ A2; \
21 T_l8.rotate_left(8); \
22 T_r8.rotate_right(8); \
36 T_l8.rotate_left(8); \
37 T_r8.rotate_right(8); \
47 #define NOK_SIMD_GAMMA(A0, A1, A2, A3) \
66 void Noekeon::simd_encrypt_4(
const uint8_t in[], uint8_t out[])
const
80 for(
size_t i = 0; i != 16; ++i)
103 A1.store_be(out + 16);
104 A2.store_be(out + 32);
105 A3.store_be(out + 48);
111 void Noekeon::simd_decrypt_4(
const uint8_t in[], uint8_t out[])
const
125 for(
size_t i = 0; i != 16; ++i)
148 A1.store_be(out + 16);
149 A2.store_be(out + 32);
150 A3.store_be(out + 48);
static void transpose(SIMD_4x32 &B0, SIMD_4x32 &B1, SIMD_4x32 &B2, SIMD_4x32 &B3)
#define NOK_SIMD_GAMMA(A0, A1, A2, A3)
static SIMD_4x32 load_be(const void *in)
static SIMD_4x32 splat(uint32_t B)
#define NOK_SIMD_THETA(A0, A1, A2, A3, K0, K1, K2, K3)