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_4x32 T = A0 ^ A2; \
19 T ^= T.rotl<8>() ^ T.rotr<8>(); \
29 T ^= T.rotl<8>() ^ T.rotr<8>(); \
37#define NOK_SIMD_GAMMA(A0, A1, A2, A3) \
56void Noekeon::simd_encrypt_4(
const uint8_t in[], uint8_t out[])
const
70 for(
size_t i = 0; i != 16; ++i)
93 A1.store_be(out + 16);
94 A2.store_be(out + 32);
95 A3.store_be(out + 48);
101void Noekeon::simd_decrypt_4(
const uint8_t in[], uint8_t out[])
const
115 for(
size_t i = 0; i != 16; ++i)
138 A1.store_be(out + 16);
139 A2.store_be(out + 32);
140 A3.store_be(out + 48);
static SIMD_4x32 splat(uint32_t B)
static void transpose(SIMD_4x32 &B0, SIMD_4x32 &B1, SIMD_4x32 &B2, SIMD_4x32 &B3)
static SIMD_4x32 load_be(const void *in)
#define NOK_SIMD_THETA(A0, A1, A2, A3, K0, K1, K2, K3)
#define NOK_SIMD_GAMMA(A0, A1, A2, A3)