Fabcoin Core  0.16.2
P2P Digital Currency
Macros | Variables
sosemanuk.cpp File Reference
#include "pch.h"
#include "config.h"
#include "sosemanuk.h"
#include "serpentp.h"
#include "secblock.h"
#include "misc.h"
#include "cpu.h"
Include dependency graph for sosemanuk.cpp:

Go to the source code of this file.

Macros

#define XMUX(c, x, y)   (x ^ (y & (0 - (c & 1))))
 
#define MUL_A(x)   (((x) << 8) ^ s_sosemanukMulTables[(x) >> 24])
 
#define DIV_A(x)   (((x) >> 8) ^ s_sosemanukMulTables[256 + byte(x)])
 
#define r1(i)   ((i%2) ? reg2 : reg1)
 
#define r2(i)   ((i%2) ? reg1 : reg2)
 
#define STEP(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, v, u)
 
#define SOSEMANUK_OUTPUT(x)
 
#define OUTPUT4
 

Variables

word32 s_sosemanukMulTables [512]
 

Macro Definition Documentation

#define DIV_A (   x)    (((x) >> 8) ^ s_sosemanukMulTables[256 + byte(x)])
#define MUL_A (   x)    (((x) << 8) ^ s_sosemanukMulTables[(x) >> 24])
#define OUTPUT4
Value:
S2(0, u0, u1, u2, u3, u4);\
#define CRYPTOPP_KEYSTREAM_OUTPUT_SWITCH(x, y)
Helper macro to implement OperateKeystream.
Definition: strciphr.h:235
#define SOSEMANUK_OUTPUT(x)
#define S2(i, r0, r1, r2, r3, r4)
Definition: serpentp.h:141
#define r1 (   i)    ((i%2) ? reg2 : reg1)
#define r2 (   i)    ((i%2) ? reg1 : reg2)
#define SOSEMANUK_OUTPUT (   x)
Value:
#define CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, b, i, a)
Helper macro to implement OperateKeystream.
Definition: strciphr.h:225
byte order is little-endian
Definition: cryptlib.h:126
#define x(i)
#define STEP (   x0,
  x1,
  x2,
  x3,
  x4,
  x5,
  x6,
  x7,
  x8,
  x9,
  v,
 
)
Value:
u = (s##x9 + r2(x0)) ^ r1(x0);\
v = s##x0;\
s##x0 = MUL_A(s##x0) ^ DIV_A(s##x3) ^ s##x9;\
r1(x0) += XMUX(r2(x0), s##x2, s##x9);\
r2(x0) = rotlFixed(r2(x0) * 0x54655307, 7);\
T rotlFixed(T x, unsigned int y)
Performs a left rotate.
Definition: misc.h:1263
#define MUL_A(x)
#define r1(i)
#define r2(i)
#define DIV_A(x)
#define XMUX(c, x, y)
#define XMUX (   c,
  x,
 
)    (x ^ (y & (0 - (c & 1))))

Variable Documentation

word32 s_sosemanukMulTables[512]

Definition at line 92 of file sosemanuk.cpp.