Fabcoin Core  0.16.2
P2P Digital Currency
Macros | Typedefs
square.cpp File Reference
#include "pch.h"
#include "config.h"
#include "square.h"
#include "misc.h"
#include "gf256.h"
Include dependency graph for square.cpp:

Go to the source code of this file.

Macros

#define roundkeys(i, j)   m_roundkeys[(i)*4+(j)]
 
#define roundkeys4(i)   (m_roundkeys+(i)*4)
 
#define MSB(x)   (((x) >> 24) & 0xffU) /* most significant byte */
 
#define SSB(x)   (((x) >> 16) & 0xffU) /* second in significance */
 
#define TSB(x)   (((x) >> 8) & 0xffU) /* third in significance */
 
#define LSB(x)   (((x) ) & 0xffU) /* least significant byte */
 
#define squareRound(text, temp, T0, T1, T2, T3, roundkey)
 
#define squareFinal(text, temp, S, roundkey)
 

Typedefs

typedef BlockGetAndPut< word32, BigEndianBlock
 

Macro Definition Documentation

#define LSB (   x)    (((x) ) & 0xffU) /* least significant byte */

Definition at line 85 of file square.cpp.

#define MSB (   x)    (((x) >> 24) & 0xffU) /* most significant byte */

Definition at line 82 of file square.cpp.

#define roundkeys (   i,
 
)    m_roundkeys[(i)*4+(j)]

Definition at line 44 of file square.cpp.

#define roundkeys4 (   i)    (m_roundkeys+(i)*4)

Definition at line 45 of file square.cpp.

#define squareFinal (   text,
  temp,
  S,
  roundkey 
)
Value:
{ \
text[0] = ((word32) (S[MSB (temp[0])]) << 24) \
^ ((word32) (S[MSB (temp[1])]) << 16) \
^ ((word32) (S[MSB (temp[2])]) << 8) \
^ (word32) (S[MSB (temp[3])]) \
^ roundkey[0]; \
text[1] = ((word32) (S[SSB (temp[0])]) << 24) \
^ ((word32) (S[SSB (temp[1])]) << 16) \
^ ((word32) (S[SSB (temp[2])]) << 8) \
^ (word32) (S[SSB (temp[3])]) \
^ roundkey[1]; \
text[2] = ((word32) (S[TSB (temp[0])]) << 24) \
^ ((word32) (S[TSB (temp[1])]) << 16) \
^ ((word32) (S[TSB (temp[2])]) << 8) \
^ (word32) (S[TSB (temp[3])]) \
^ roundkey[2]; \
text[3] = ((word32) (S[LSB (temp[0])]) << 24) \
^ ((word32) (S[LSB (temp[1])]) << 16) \
^ ((word32) (S[LSB (temp[2])]) << 8) \
^ (word32) (S[LSB (temp[3])]) \
^ roundkey[3]; \
} /* squareFinal */
#define MSB(x)
Definition: square.cpp:82
#define LSB(x)
Definition: square.cpp:85
#define TSB(x)
Definition: square.cpp:84
#define SSB(x)
Definition: square.cpp:83
#define S(a)
Definition: mars.cpp:50
unsigned int word32
Definition: config.h:231

Definition at line 111 of file square.cpp.

#define squareRound (   text,
  temp,
  T0,
  T1,
  T2,
  T3,
  roundkey 
)
Value:
{ \
temp[0] = T0[MSB (text[0])] \
^ T1[MSB (text[1])] \
^ T2[MSB (text[2])] \
^ T3[MSB (text[3])] \
^ roundkey[0]; \
temp[1] = T0[SSB (text[0])] \
^ T1[SSB (text[1])] \
^ T2[SSB (text[2])] \
^ T3[SSB (text[3])] \
^ roundkey[1]; \
temp[2] = T0[TSB (text[0])] \
^ T1[TSB (text[1])] \
^ T2[TSB (text[2])] \
^ T3[TSB (text[3])] \
^ roundkey[2]; \
temp[3] = T0[LSB (text[0])] \
^ T1[LSB (text[1])] \
^ T2[LSB (text[2])] \
^ T3[LSB (text[3])] \
^ roundkey[3]; \
} /* squareRound */
#define T1
Definition: integer.cpp:2170
#define MSB(x)
Definition: square.cpp:82
#define T2
Definition: integer.cpp:2171
#define LSB(x)
Definition: square.cpp:85
#define T0
Definition: integer.cpp:2169
#define TSB(x)
Definition: square.cpp:84
#define SSB(x)
Definition: square.cpp:83
#define T3
Definition: integer.cpp:2172

Definition at line 87 of file square.cpp.

#define SSB (   x)    (((x) >> 16) & 0xffU) /* second in significance */

Definition at line 83 of file square.cpp.

#define TSB (   x)    (((x) >> 8) & 0xffU) /* third in significance */

Definition at line 84 of file square.cpp.

Typedef Documentation

Definition at line 135 of file square.cpp.