Botan 2.19.5 Crypto and TLS for C&

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

Go to the source code of this file.

## Namespaces
namespace | Botan

## Macros
#define | SM4_D_RNDS(B, R, F)
#define | SM4_E_RNDS(B, R, F)

## Macro Definition Documentation

## ◆ SM4_D_RNDS

#define SM4_D_RNDS | ( |  | B,
|  |  | R,
|  |  | F
| ) |  |

Value:
do { \
B##0 ^= F(B##1 ^ B##2 ^ B##3 ^ m_RK[4*R+3]); \
B##1 ^= F(B##2 ^ B##3 ^ B##0 ^ m_RK[4*R+2]); \
B##2 ^= F(B##3 ^ B##0 ^ B##1 ^ m_RK[4*R+1]); \
B##3 ^= F(B##0 ^ B##1 ^ B##2 ^ m_RK[4*R+0]); \
} while(0)

Definition at line 125 of file sm4.cpp.

## ◆ SM4_E_RNDS

#define SM4_E_RNDS | ( |  | B,
|  |  | R,
|  |  | F
| ) |  |

Value:
do { \
B##0 ^= F(B##1 ^ B##2 ^ B##3 ^ m_RK[4*R+0]); \
B##1 ^= F(B##2 ^ B##3 ^ B##0 ^ m_RK[4*R+1]); \
B##2 ^= F(B##3 ^ B##0 ^ B##1 ^ m_RK[4*R+2]); \
B##3 ^= F(B##0 ^ B##1 ^ B##2 ^ m_RK[4*R+3]); \
} while(0)

Definition at line 118 of file sm4.cpp.