Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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

Go to the source code of this file.

## Namespaces
| Botan

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

## Macro Definition Documentation

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

Value:
do { \
uint32_t T0 = N1 + m_EK[R1]; \
N2 ^= m_SBOX[get_byte(3, T0)] | \
m_SBOX[get_byte(2, T0)+256] | \
m_SBOX[get_byte(1, T0)+512] | \
m_SBOX[get_byte(0, T0)+768]; \
\
uint32_t T1 = N2 + m_EK[R2]; \
N1 ^= m_SBOX[get_byte(3, T1)] | \
m_SBOX[get_byte(2, T1)+256] | \
m_SBOX[get_byte(1, T1)+512] | \
m_SBOX[get_byte(0, T1)+768]; \
} while(0)
Botan::get_byte
uint8_t get_byte(size_t byte_num, T input)
Definition: loadstor.h:47

Definition at line 87 of file gost_28147.cpp.

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