Botan 2.19.5 Crypto and TLS for C&

Namespaces | Macros
serpent_avx2.cpp File Reference
`#include <botan/serpent.h>`
`#include <botan/internal/serpent_sbox.h>`
`#include <botan/internal/simd_avx2.h>`

Go to the source code of this file.

## Namespaces
namespace | Botan

## Macros
#define | i_transform(B0, B1, B2, B3)
#define | key_xor(round, B0, B1, B2, B3)
#define | transform(B0, B1, B2, B3)

## Macro Definition Documentation

## ◆ i_transform

#define i_transform | ( |  | B0,
|  |  | B1,
|  |  | B2,
|  |  | B3
| ) |  |

Value:
do { \
B2 = B2.rotr<22>(); \
B0 = B0.rotr<5>(); \
B2 ^= B3 ^ B1.shl<7>(); \
B0 ^= B1 ^ B3; \
B3 = B3.rotr<7>(); \
B1 = B1.rotr<1>(); \
B3 ^= B2 ^ B0.shl<3>(); \
B1 ^= B0 ^ B2; \
B2 = B2.rotr<3>(); \
B0 = B0.rotr<13>(); \
} while(0)

Definition at line 39 of file serpent_avx2.cpp.

## ◆ key_xor

#define key_xor | ( |  | round,
|  |  | B0,
|  |  | B1,
|  |  | B2,
|  |  | B3
| ) |  |

Value:
do { \
B0 ^= SIMD_8x32::splat(m_round_key[4*round ]); \
B1 ^= SIMD_8x32::splat(m_round_key[4*round+1]); \
B2 ^= SIMD_8x32::splat(m_round_key[4*round+2]); \
B3 ^= SIMD_8x32::splat(m_round_key[4*round+3]); \
} while(0)

Definition at line 14 of file serpent_avx2.cpp.

## ◆ transform

#define transform | ( |  | B0,
|  |  | B1,
|  |  | B2,
|  |  | B3
| ) |  |

Value:
do { \
B0 = B0.rotl<13>(); \
B2 = B2.rotl<3>(); \
B1 ^= B0 ^ B2; \
B3 ^= B2 ^ B0.shl<3>(); \
B1 = B1.rotl<1>(); \
B3 = B3.rotl<7>(); \
B0 ^= B1 ^ B3; \
B2 ^= B3 ^ B1.shl<7>(); \
B0 = B0.rotl<5>(); \
B2 = B2.rotl<22>(); \
} while(0)

Definition at line 25 of file serpent_avx2.cpp.