Botan
1.11.15
|
#include <botan/internal/block_utils.h>
#include <botan/serp_simd.h>
#include <botan/internal/serpent_sbox.h>
#include <botan/internal/simd_32.h>
Go to the source code of this file.
Namespaces | |
namespace | Botan |
Defines | |
#define | i_transform(B0, B1, B2, B3) |
#define | key_xor(round, B0, B1, B2, B3) |
#define | transform(B0, B1, B2, B3) |
Functions | |
Botan::BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF (SIMD_32::enabled(), Serpent_SIMD,"Serpent","simd32", 64) |
#define i_transform | ( | B0, | |
B1, | |||
B2, | |||
B3 | |||
) |
do { \ B2.rotate_right(22); \ B0.rotate_right(5); \ B2 ^= B3 ^ (B1 << 7); \ B0 ^= B1 ^ B3; \ B3.rotate_right(7); \ B1.rotate_right(1); \ B3 ^= B2 ^ (B0 << 3); \ B1 ^= B0 ^ B2; \ B2.rotate_right(3); \ B0.rotate_right(13); \ } while(0);
Definition at line 44 of file serp_simd.cpp.
Referenced by Botan::Serpent::decrypt_n().
#define key_xor | ( | round, | |
B0, | |||
B1, | |||
B2, | |||
B3 | |||
) |
do { \ B0 ^= SIMD_32(keys[4*round ]); \ B1 ^= SIMD_32(keys[4*round+1]); \ B2 ^= SIMD_32(keys[4*round+2]); \ B3 ^= SIMD_32(keys[4*round+3]); \ } while(0);
Definition at line 19 of file serp_simd.cpp.
#define transform | ( | B0, | |
B1, | |||
B2, | |||
B3 | |||
) |
do { \ B0.rotate_left(13); \ B2.rotate_left(3); \ B1 ^= B0 ^ B2; \ B3 ^= B2 ^ (B0 << 3); \ B1.rotate_left(1); \ B3.rotate_left(7); \ B0 ^= B1 ^ B3; \ B2 ^= B3 ^ (B1 << 7); \ B0.rotate_left(5); \ B2.rotate_left(22); \ } while(0);
Definition at line 30 of file serp_simd.cpp.
Referenced by Botan::Serpent::encrypt_n().