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

Go to the source code of this file.

Namespaces

 Weak
 

Macros

#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)
 

Macro Definition Documentation

#define a (   i)    aPtr[((i)*13+16) % 17]
#define b (   i,
 
)    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:
CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 0, a(0+9));\
CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 1, a(1+9));\
CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 2, a(2+9));\
CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 3, a(3+9));\
CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 4, a(4+9));\
CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 5, a(5+9));\
CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 6, a(6+9));\
CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, B::ToEnum(), 7, a(7+9));
#define CRYPTOPP_KEYSTREAM_OUTPUT_WORD(x, b, i, a)
Helper macro to implement OperateKeystream.
Definition: strciphr.h:225
#define a(i)
#define x(i)
#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 TS1S (   i)    T(i+1, ConditionalByteReverse(B::ToEnum(), p[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;}
#define US (   i)    {word32 t=b(0,i); b(0,i)=ConditionalByteReverse(B::ToEnum(), p[i])^t; b(25,(i+6)%8)^=t;}