Botan  2.8.0
Crypto and TLS for C++11
Macros
serpent_sbox.h File Reference

Go to the source code of this file.

Macros

#define SBoxD1(B0, B1, B2, B3)
 
#define SBoxD2(B0, B1, B2, B3)
 
#define SBoxD3(B0, B1, B2, B3)
 
#define SBoxD4(B0, B1, B2, B3)
 
#define SBoxD5(B0, B1, B2, B3)
 
#define SBoxD6(B0, B1, B2, B3)
 
#define SBoxD7(B0, B1, B2, B3)
 
#define SBoxD8(B0, B1, B2, B3)
 
#define SBoxE1(B0, B1, B2, B3)
 
#define SBoxE2(B0, B1, B2, B3)
 
#define SBoxE3(B0, B1, B2, B3)
 
#define SBoxE4(B0, B1, B2, B3)
 
#define SBoxE5(B0, B1, B2, B3)
 
#define SBoxE6(B0, B1, B2, B3)
 
#define SBoxE7(B0, B1, B2, B3)
 
#define SBoxE8(B0, B1, B2, B3)
 

Macro Definition Documentation

◆ SBoxD1

#define SBoxD1 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
B2 = ~B2; \
auto B4 = B1; \
B1 |= B0; \
B4 = ~B4; \
B1 ^= B2; \
B2 |= B4; \
B1 ^= B3; \
B0 ^= B4; \
B2 ^= B0; \
B0 &= B3; \
B4 ^= B0; \
B0 |= B1; \
B0 ^= B2; \
B3 ^= B4; \
B2 ^= B1; \
B3 ^= B0; \
B3 ^= B1; \
B2 &= B3; \
B4 ^= B2; \
B2 = B1; \
B1 = B4; \
} while(0)

Definition at line 219 of file serpent_sbox.h.

Referenced by Botan::Serpent::decrypt_n().

◆ SBoxD2

#define SBoxD2 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
auto B4 = B1; \
B1 ^= B3; \
B3 &= B1; \
B4 ^= B2; \
B3 ^= B0; \
B0 |= B1; \
B2 ^= B3; \
B0 ^= B4; \
B0 |= B2; \
B1 ^= B3; \
B0 ^= B1; \
B1 |= B3; \
B1 ^= B0; \
B4 = ~B4; \
B4 ^= B1; \
B1 |= B0; \
B1 ^= B0; \
B1 |= B4; \
B3 ^= B1; \
B1 = B0; \
B0 = B4; \
B4 = B2; \
B2 = B3; \
B3 = B4; \
} while(0)

Definition at line 244 of file serpent_sbox.h.

Referenced by Botan::Serpent::decrypt_n().

◆ SBoxD3

#define SBoxD3 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
B2 ^= B3; \
B3 ^= B0; \
auto B4 = B3; \
B3 &= B2; \
B3 ^= B1; \
B1 |= B2; \
B1 ^= B4; \
B4 &= B3; \
B2 ^= B3; \
B4 &= B0; \
B4 ^= B2; \
B2 &= B1; \
B2 |= B0; \
B3 = ~B3; \
B2 ^= B3; \
B0 ^= B3; \
B0 &= B1; \
B3 ^= B4; \
B3 ^= B0; \
B0 = B1; \
B1 = B4; \
} while(0)

Definition at line 272 of file serpent_sbox.h.

Referenced by Botan::Serpent::decrypt_n().

◆ SBoxD4

#define SBoxD4 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
auto B4 = B2; \
B2 ^= B1; \
B0 ^= B2; \
B4 &= B2; \
B4 ^= B0; \
B0 &= B1; \
B1 ^= B3; \
B3 |= B4; \
B2 ^= B3; \
B0 ^= B3; \
B1 ^= B4; \
B3 &= B2; \
B3 ^= B1; \
B1 ^= B0; \
B1 |= B2; \
B0 ^= B3; \
B1 ^= B4; \
B0 ^= B1; \
B4 = B0; \
B0 = B2; \
B2 = B3; \
B3 = B4; \
} while(0)

Definition at line 297 of file serpent_sbox.h.

Referenced by Botan::Serpent::decrypt_n().

◆ SBoxD5

#define SBoxD5 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
auto B4 = B2; \
B2 &= B3; \
B2 ^= B1; \
B1 |= B3; \
B1 &= B0; \
B4 ^= B2; \
B4 ^= B1; \
B1 &= B2; \
B0 = ~B0; \
B3 ^= B4; \
B1 ^= B3; \
B3 &= B0; \
B3 ^= B2; \
B0 ^= B1; \
B2 &= B0; \
B3 ^= B0; \
B2 ^= B4; \
B2 |= B3; \
B3 ^= B0; \
B2 ^= B1; \
B1 = B3; \
B3 = B4; \
} while(0)

Definition at line 323 of file serpent_sbox.h.

Referenced by Botan::Serpent::decrypt_n().

◆ SBoxD6

#define SBoxD6 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
B1 = ~B1; \
auto B4 = B3; \
B2 ^= B1; \
B3 |= B0; \
B3 ^= B2; \
B2 |= B1; \
B2 &= B0; \
B4 ^= B3; \
B2 ^= B4; \
B4 |= B0; \
B4 ^= B1; \
B1 &= B2; \
B1 ^= B3; \
B4 ^= B2; \
B3 &= B4; \
B4 ^= B1; \
B3 ^= B4; \
B4 = ~B4; \
B3 ^= B0; \
B0 = B1; \
B1 = B4; \
B4 = B3; \
B3 = B2; \
B2 = B4; \
} while(0)

Definition at line 349 of file serpent_sbox.h.

Referenced by Botan::Serpent::decrypt_n().

◆ SBoxD7

#define SBoxD7 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
B0 ^= B2; \
auto B4 = B2; \
B2 &= B0; \
B4 ^= B3; \
B2 = ~B2; \
B3 ^= B1; \
B2 ^= B3; \
B4 |= B0; \
B0 ^= B2; \
B3 ^= B4; \
B4 ^= B1; \
B1 &= B3; \
B1 ^= B0; \
B0 ^= B3; \
B0 |= B2; \
B3 ^= B1; \
B4 ^= B0; \
B0 = B1; \
B1 = B2; \
B2 = B4; \
} while(0)

Definition at line 377 of file serpent_sbox.h.

Referenced by Botan::Serpent::decrypt_n().

◆ SBoxD8

#define SBoxD8 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
auto B4 = B2; \
B2 ^= B0; \
B0 &= B3; \
B4 |= B3; \
B2 = ~B2; \
B3 ^= B1; \
B1 |= B0; \
B0 ^= B2; \
B2 &= B4; \
B3 &= B4; \
B1 ^= B2; \
B2 ^= B0; \
B0 |= B2; \
B4 ^= B1; \
B0 ^= B3; \
B3 ^= B4; \
B4 |= B0; \
B3 ^= B2; \
B4 ^= B2; \
B2 = B1; \
B1 = B0; \
B0 = B3; \
B3 = B4; \
} while(0)

Definition at line 401 of file serpent_sbox.h.

Referenced by Botan::Serpent::decrypt_n().

◆ SBoxE1

#define SBoxE1 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
B3 ^= B0; \
auto B4 = B1; \
B1 &= B3; \
B4 ^= B2; \
B1 ^= B0; \
B0 |= B3; \
B0 ^= B4; \
B4 ^= B3; \
B3 ^= B2; \
B2 |= B1; \
B2 ^= B4; \
B4 = ~B4; \
B4 |= B1; \
B1 ^= B3; \
B1 ^= B4; \
B3 |= B0; \
B1 ^= B3; \
B4 ^= B3; \
B3 = B0; \
B0 = B1; \
B1 = B4; \
} while(0)

Definition at line 14 of file serpent_sbox.h.

Referenced by Botan::Serpent::encrypt_n().

◆ SBoxE2

#define SBoxE2 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
B0 = ~B0; \
B2 = ~B2; \
auto B4 = B0; \
B0 &= B1; \
B2 ^= B0; \
B0 |= B3; \
B3 ^= B2; \
B1 ^= B0; \
B0 ^= B4; \
B4 |= B1; \
B1 ^= B3; \
B2 |= B0; \
B2 &= B4; \
B0 ^= B1; \
B1 &= B2; \
B1 ^= B0; \
B0 &= B2; \
B4 ^= B0; \
B0 = B2; \
B2 = B3; \
B3 = B1; \
B1 = B4; \
} while(0)

Definition at line 39 of file serpent_sbox.h.

Referenced by Botan::Serpent::encrypt_n().

◆ SBoxE3

#define SBoxE3 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
auto B4 = B0; \
B0 &= B2; \
B0 ^= B3; \
B2 ^= B1; \
B2 ^= B0; \
B3 |= B4; \
B3 ^= B1; \
B4 ^= B2; \
B1 = B3; \
B3 |= B4; \
B3 ^= B0; \
B0 &= B1; \
B4 ^= B0; \
B1 ^= B3; \
B1 ^= B4; \
B0 = B2; \
B2 = B1; \
B1 = B3; \
B3 = ~B4; \
} while(0)

Definition at line 65 of file serpent_sbox.h.

Referenced by Botan::Serpent::encrypt_n().

◆ SBoxE4

#define SBoxE4 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
auto B4 = B0; \
B0 |= B3; \
B3 ^= B1; \
B1 &= B4; \
B4 ^= B2; \
B2 ^= B3; \
B3 &= B0; \
B4 |= B1; \
B3 ^= B4; \
B0 ^= B1; \
B4 &= B0; \
B1 ^= B3; \
B4 ^= B2; \
B1 |= B0; \
B1 ^= B2; \
B0 ^= B3; \
B2 = B1; \
B1 |= B3; \
B0 ^= B1; \
B1 = B2; \
B2 = B3; \
B3 = B4; \
} while(0)

Definition at line 88 of file serpent_sbox.h.

Referenced by Botan::Serpent::encrypt_n().

◆ SBoxE5

#define SBoxE5 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
B1 ^= B3; \
B3 = ~B3; \
B2 ^= B3; \
B3 ^= B0; \
auto B4 = B1; \
B1 &= B3; \
B1 ^= B2; \
B4 ^= B3; \
B0 ^= B4; \
B2 &= B4; \
B2 ^= B0; \
B0 &= B1; \
B3 ^= B0; \
B4 |= B1; \
B4 ^= B0; \
B0 |= B3; \
B0 ^= B2; \
B2 &= B3; \
B0 = ~B0; \
B4 ^= B2; \
B2 = B0; \
B0 = B1; \
B1 = B4; \
} while(0)

Definition at line 114 of file serpent_sbox.h.

Referenced by Botan::Serpent::encrypt_n().

◆ SBoxE6

#define SBoxE6 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
B0 ^= B1; \
B1 ^= B3; \
B3 = ~B3; \
auto B4 = B1; \
B1 &= B0; \
B2 ^= B3; \
B1 ^= B2; \
B2 |= B4; \
B4 ^= B3; \
B3 &= B1; \
B3 ^= B0; \
B4 ^= B1; \
B4 ^= B2; \
B2 ^= B0; \
B0 &= B3; \
B2 = ~B2; \
B0 ^= B4; \
B4 |= B3; \
B4 ^= B2; \
B2 = B0; \
B0 = B1; \
B1 = B3; \
B3 = B4; \
} while(0)

Definition at line 141 of file serpent_sbox.h.

Referenced by Botan::Serpent::encrypt_n().

◆ SBoxE7

#define SBoxE7 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
B2 = ~B2; \
auto B4 = B3; \
B3 &= B0; \
B0 ^= B4; \
B3 ^= B2; \
B2 |= B4; \
B1 ^= B3; \
B2 ^= B0; \
B0 |= B1; \
B2 ^= B1; \
B4 ^= B0; \
B0 |= B3; \
B0 ^= B2; \
B4 ^= B3; \
B4 ^= B0; \
B3 = ~B3; \
B2 &= B4; \
B3 ^= B2; \
B2 = B4; \
} while(0)

Definition at line 168 of file serpent_sbox.h.

Referenced by Botan::Serpent::encrypt_n().

◆ SBoxE8

#define SBoxE8 (   B0,
  B1,
  B2,
  B3 
)
Value:
do { \
auto B4 = B1; \
B1 |= B2; \
B1 ^= B3; \
B4 ^= B2; \
B2 ^= B1; \
B3 |= B4; \
B3 &= B0; \
B4 ^= B2; \
B3 ^= B1; \
B1 |= B4; \
B1 ^= B0; \
B0 |= B4; \
B0 ^= B2; \
B1 ^= B4; \
B2 ^= B1; \
B1 &= B0; \
B1 ^= B4; \
B2 = ~B2; \
B2 |= B0; \
B4 ^= B2; \
B2 = B1; \
B1 = B3; \
B3 = B0; \
B0 = B4; \
} while(0)

Definition at line 191 of file serpent_sbox.h.

Referenced by Botan::Serpent::encrypt_n().