#include "pch.h"
#include "config.h"
#include "sosemanuk.h"
#include "serpentp.h"
#include "secblock.h"
#include "misc.h"
#include "cpu.h"
Go to the source code of this file.
|
#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 |
|
Value:S2(0, u0, u1, u2, u3, u4);
\ #define CRYPTOPP_KEYSTREAM_OUTPUT_SWITCH(x, y)
Helper macro to implement OperateKeystream.
#define SOSEMANUK_OUTPUT(x)
#define S2(i, r0, r1, r2, r3, r4)
#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.
byte order is little-endian
#define STEP |
( |
|
x0, |
|
|
|
x1, |
|
|
|
x2, |
|
|
|
x3, |
|
|
|
x4, |
|
|
|
x5, |
|
|
|
x6, |
|
|
|
x7, |
|
|
|
x8, |
|
|
|
x9, |
|
|
|
v, |
|
|
|
u |
|
) |
| |
Value:u = (s##x9 +
r2(x0)) ^
r1(x0);\
v = s##x0;\
T rotlFixed(T x, unsigned int y)
Performs a left rotate.
#define XMUX |
( |
|
c, |
|
|
|
x, |
|
|
|
y |
|
) |
| (x ^ (y & (0 - (c & 1)))) |
word32 s_sosemanukMulTables[512] |