#include "pch.h"
#include "panama.h"
#include "secblock.h"
#include "misc.h"
#include "cpu.h"
Go to the source code of this file.
|
#define | bPtr ((byte *)(aPtr+20)) |
|
#define | a(i) aPtr[((i)*13+16) % 17] |
|
#define | c(i) cPtr[((i)*13+16) % 17] |
|
#define | b(i, j) b##i[(j)*2%8 + (j)/4] |
|
#define | US(i) {word32 t=b(0,i); b(0,i)=ConditionalByteReverse(B::ToEnum(), p[i])^t; b(25,(i+6)%8)^=t;} |
|
#define | UL(i) {word32 t=b(0,i); b(0,i)=a(i+1)^t; b(25,(i+6)%8)^=t;} |
|
#define | GP(i) c(5*i%17) = rotlFixed(a(i) ^ (a((i+1)%17) | ~a((i+2)%17)), ((5*i%17)*((5*i%17)+1)/2)%32) |
|
#define | T(i, x) a(i) = c(i) ^ c((i+1)%17) ^ c((i+4)%17) ^ x |
|
#define | TS1S(i) T(i+1, ConditionalByteReverse(B::ToEnum(), p[i])) |
|
#define | TS1L(i) T(i+1, b(4,i)) |
|
#define | TS2(i) T(i+9, b(16,i)) |
|
#define | PANAMA_OUTPUT(x) |
|
#define a |
( |
|
i | ) |
aPtr[((i)*13+16) % 17] |
#define b |
( |
|
i, |
|
|
|
j |
|
) |
| b##i[(j)*2%8 + (j)/4] |
#define bPtr ((byte *)(aPtr+20)) |
#define c |
( |
|
i | ) |
cPtr[((i)*13+16) % 17] |
#define GP |
( |
|
i | ) |
c(5*i%17) = rotlFixed(a(i) ^ (a((i+1)%17) | ~a((i+2)%17)), ((5*i%17)*((5*i%17)+1)/2)%32) |
#define PANAMA_OUTPUT |
( |
|
x | ) |
|
Value:#define CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, b, i, a)
Helper macro to implement OperateKeystream.
#define T |
( |
|
i, |
|
|
|
x |
|
) |
| a(i) = c(i) ^ c((i+1)%17) ^ c((i+4)%17) ^ x |
#define TS1L |
( |
|
i | ) |
T(i+1, b(4,i)) |
#define TS2 |
( |
|
i | ) |
T(i+9, b(16,i)) |
#define UL |
( |
|
i | ) |
{word32 t=b(0,i); b(0,i)=a(i+1)^t; b(25,(i+6)%8)^=t;} |