Botan
1.11.15
|
#include <botan/internal/block_utils.h>
#include <botan/noekeon_simd.h>
#include <botan/internal/simd_32.h>
Go to the source code of this file.
Namespaces | |
namespace | Botan |
Defines | |
#define | NOK_SIMD_GAMMA(A0, A1, A2, A3) |
#define | NOK_SIMD_THETA(A0, A1, A2, A3, K0, K1, K2, K3) |
Functions | |
Botan::BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF (SIMD_32::enabled(), Noekeon_SIMD,"Noekeon","simd32", 64) |
#define NOK_SIMD_GAMMA | ( | A0, | |
A1, | |||
A2, | |||
A3 | |||
) |
do \ { \ A1 ^= A3.andc(~A2); \ A0 ^= A2 & A1; \ \ SIMD_32 T = A3; \ A3 = A0; \ A0 = T; \ \ A2 ^= A0 ^ A1 ^ A3; \ \ A1 ^= A3.andc(~A2); \ A0 ^= A2 & A1; \ } while(0)
Definition at line 50 of file noekeon_simd.cpp.
Referenced by Botan::Noekeon_SIMD::decrypt_n(), and Botan::Noekeon_SIMD::encrypt_n().
#define NOK_SIMD_THETA | ( | A0, | |
A1, | |||
A2, | |||
A3, | |||
K0, | |||
K1, | |||
K2, | |||
K3 | |||
) |
do { \ SIMD_32 T = A0 ^ A2; \ SIMD_32 T_l8 = T; \ SIMD_32 T_r8 = T; \ T_l8.rotate_left(8); \ T_r8.rotate_right(8); \ T ^= T_l8; \ T ^= T_r8; \ A1 ^= T; \ A3 ^= T; \ \ A0 ^= K0; \ A1 ^= K1; \ A2 ^= K2; \ A3 ^= K3; \ \ T = A1 ^ A3; \ T_l8 = T; \ T_r8 = T; \ T_l8.rotate_left(8); \ T_r8.rotate_right(8); \ T ^= T_l8; \ T ^= T_r8; \ A0 ^= T; \ A2 ^= T; \ } while(0)
Definition at line 19 of file noekeon_simd.cpp.
Referenced by Botan::Noekeon_SIMD::decrypt_n(), and Botan::Noekeon_SIMD::encrypt_n().