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

Go to the source code of this file.

Macros

#define g(tab, w, i, j, k, l)
 The key-dependent permutation G on V^16 is a four-round Feistel network. More...
 
#define g0(tab, w)   g(tab, w, 0, 1, 2, 3)
 
#define g1(tab, w)   g(tab, w, 4, 5, 6, 7)
 
#define g2(tab, w)   g(tab, w, 8, 9, 0, 1)
 
#define g3(tab, w)   g(tab, w, 2, 3, 4, 5)
 
#define g4(tab, w)   g(tab, w, 6, 7, 8, 9)
 
#define h(tab, w, i, j, k, l)
 The inverse of the G permutation. More...
 
#define h0(tab, w)   h(tab, w, 0, 1, 2, 3)
 
#define h1(tab, w)   h(tab, w, 4, 5, 6, 7)
 
#define h2(tab, w)   h(tab, w, 8, 9, 0, 1)
 
#define h3(tab, w)   h(tab, w, 2, 3, 4, 5)
 
#define h4(tab, w)   h(tab, w, 6, 7, 8, 9)
 

Typedefs

typedef BlockGetAndPut< word16, LittleEndianBlock
 

Macro Definition Documentation

#define g (   tab,
  w,
  i,
  j,
  k,
 
)
Value:
{ \
w ^= (word)tab[i*256 + (w & 0xff)] << 8; \
w ^= (word)tab[j*256 + (w >> 8)]; \
w ^= (word)tab[k*256 + (w & 0xff)] << 8; \
w ^= (word)tab[l*256 + (w >> 8)]; \
}
word32 word
Definition: config.h:308

The key-dependent permutation G on V^16 is a four-round Feistel network.

The round function is a fixed byte-substitution table (permutation on V^8), the F-table. Each round of G incorporates a single byte from the key.

Definition at line 47 of file skipjack.cpp.

#define g0 (   tab,
 
)    g(tab, w, 0, 1, 2, 3)

Definition at line 55 of file skipjack.cpp.

#define g1 (   tab,
 
)    g(tab, w, 4, 5, 6, 7)

Definition at line 56 of file skipjack.cpp.

#define g2 (   tab,
 
)    g(tab, w, 8, 9, 0, 1)

Definition at line 57 of file skipjack.cpp.

#define g3 (   tab,
 
)    g(tab, w, 2, 3, 4, 5)

Definition at line 58 of file skipjack.cpp.

#define g4 (   tab,
 
)    g(tab, w, 6, 7, 8, 9)

Definition at line 59 of file skipjack.cpp.

#define h (   tab,
  w,
  i,
  j,
  k,
 
)
Value:
{ \
w ^= (word)tab[l*256 + (w >> 8)]; \
w ^= (word)tab[k*256 + (w & 0xff)] << 8; \
w ^= (word)tab[j*256 + (w >> 8)]; \
w ^= (word)tab[i*256 + (w & 0xff)] << 8; \
}
word32 word
Definition: config.h:308

The inverse of the G permutation.

Definition at line 64 of file skipjack.cpp.

#define h0 (   tab,
 
)    h(tab, w, 0, 1, 2, 3)

Definition at line 72 of file skipjack.cpp.

#define h1 (   tab,
 
)    h(tab, w, 4, 5, 6, 7)

Definition at line 73 of file skipjack.cpp.

#define h2 (   tab,
 
)    h(tab, w, 8, 9, 0, 1)

Definition at line 74 of file skipjack.cpp.

#define h3 (   tab,
 
)    h(tab, w, 2, 3, 4, 5)

Definition at line 75 of file skipjack.cpp.

#define h4 (   tab,
 
)    h(tab, w, 6, 7, 8, 9)

Definition at line 76 of file skipjack.cpp.

Typedef Documentation

Definition at line 96 of file skipjack.cpp.