Botan: src/block/gost_28147/gost_28147.cpp File Reference

Botan 1.10.16

Namespaces | Macros
gost_28147.cpp File Reference
`#include <botan/gost_28147.h>`
`#include <botan/loadstor.h>`
`#include <botan/rotate.h>`

Go to the source code of this file.

## Namespaces
| Botan

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

## Macro Definition Documentation

## ◆ GOST_2ROUND

#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)
Botan::get_byte
byte get_byte(size_t byte_num, T input)
Definition: get_byte.h:21
R2
#define R2
Definition: asm_x86_64.h:53
R1
#define R1
Definition: asm_x86_64.h:52

Definition at line 89 of file gost_28147.cpp.

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