Botan  1.11.15
Namespaces | Defines | Functions
src/lib/block/gost_28147/gost_28147.cpp File Reference
#include <botan/internal/block_utils.h>
#include <botan/gost_28147.h>

Go to the source code of this file.

Namespaces

namespace  Botan

Defines

#define GOST_2ROUND(N1, N2, R1, R2)

Functions

 Botan::BOTAN_REGISTER_BLOCK_CIPHER_NAMED_1STR (GOST_28147_89,"GOST-28147-89","R3411_94_TestParam")

Define Documentation

#define GOST_2ROUND (   N1,
  N2,
  R1,
  R2 
)
Value:
do {                               \
   u32bit T0 = N1 + EK[R1];           \
   N2 ^= SBOX[get_byte(3, T0)] |      \
         SBOX[get_byte(2, T0)+256] |  \
         SBOX[get_byte(1, T0)+512] |  \
         SBOX[get_byte(0, T0)+768];   \
                                      \
   u32bit T1 = N2 + EK[R2];           \
   N1 ^= SBOX[get_byte(3, T1)] |      \
         SBOX[get_byte(2, T1)+256] |  \
         SBOX[get_byte(1, T1)+512] |  \
         SBOX[get_byte(0, T1)+768];   \
   } while(0)

Definition at line 89 of file gost_28147.cpp.

Referenced by Botan::GOST_28147_89::decrypt_n(), and Botan::GOST_28147_89::encrypt_n().