Botan  2.9.0
Crypto and TLS for C++11
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

 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,
 
)
Value:
do { \
B##0 ^= F(B##1 ^ B##2 ^ B##3 ^ m_RK[4*R+3]); \
B##1 ^= F(B##0 ^ B##2 ^ B##3 ^ m_RK[4*R+2]); \
B##2 ^= F(B##0 ^ B##1 ^ B##3 ^ 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.

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

◆ SM4_E_RNDS

#define SM4_E_RNDS (   B,
  R,
 
)
Value:
do { \
B##0 ^= F(B##1 ^ B##2 ^ B##3 ^ m_RK[4*R+0]); \
B##1 ^= F(B##0 ^ B##2 ^ B##3 ^ m_RK[4*R+1]); \
B##2 ^= F(B##0 ^ B##1 ^ B##3 ^ 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.

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