Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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

Go to the source code of this file.

## Namespaces
| 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

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

Value:
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 41 of file serpent_simd.cpp.

Referenced by Botan::Serpent::decrypt_n(), and Botan::Serpent::simd_decrypt_4().

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

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

Definition at line 16 of file serpent_simd.cpp.

Referenced by Botan::Serpent::simd_decrypt_4(), and Botan::Serpent::simd_encrypt_4().

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

Value:
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 27 of file serpent_simd.cpp.

Referenced by Botan::Serpent::encrypt_n(), and Botan::Serpent::simd_encrypt_4().