Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

luffa.c File Reference
#include <stddef.h>
#include <string.h>
#include <limits.h>
#include "sph_luffa.h"
+ Include dependency graph for luffa.c:

Go to the source code of this file.

Macros

#define DECL_TMP8(w)   sph_u32 w ## 0, w ## 1, w ## 2, w ## 3, w ## 4, w ## 5, w ## 6, w ## 7;
 
#define M2(d, s)
 
#define XOR(d, s1, s2)
 
#define SUB_CRUMB(a0, a1, a2, a3)
 
#define MIX_WORD(u, v)
 
#define DECL_STATE3
 
#define READ_STATE3(state)
 
#define WRITE_STATE3(state)
 
#define MI3
 
#define TWEAK3
 
#define P3
 
#define DECL_STATE4
 
#define READ_STATE4(state)
 
#define WRITE_STATE4(state)
 
#define MI4
 
#define TWEAK4
 
#define P4
 
#define DECL_STATE5
 
#define READ_STATE5(state)
 
#define WRITE_STATE5(state)
 
#define MI5
 
#define TWEAK5
 
#define P5
 

Functions

static void luffa3 (sph_luffa224_context *sc, const void *data, size_t len)
 
static void luffa3_close (sph_luffa224_context *sc, unsigned ub, unsigned n, void *dst, unsigned out_size_w32)
 
static void luffa4 (sph_luffa384_context *sc, const void *data, size_t len)
 
static void luffa4_close (sph_luffa384_context *sc, unsigned ub, unsigned n, void *dst)
 
static void luffa5 (sph_luffa512_context *sc, const void *data, size_t len)
 
static void luffa5_close (sph_luffa512_context *sc, unsigned ub, unsigned n, void *dst)
 
void sph_luffa224_init (void *cc)
 Initialize a Luffa-224 context. More...
 
void sph_luffa224 (void *cc, const void *data, size_t len)
 Process some data bytes. More...
 
void sph_luffa224_close (void *cc, void *dst)
 Terminate the current Luffa-224 computation and output the result into the provided buffer. More...
 
void sph_luffa224_addbits_and_close (void *cc, unsigned ub, unsigned n, void *dst)
 Add a few additional bits (0 to 7) to the current computation, then terminate it and output the result in the provided buffer, which must be wide enough to accomodate the result (28 bytes). More...
 
void sph_luffa256_init (void *cc)
 Initialize a Luffa-256 context. More...
 
void sph_luffa256 (void *cc, const void *data, size_t len)
 Process some data bytes. More...
 
void sph_luffa256_close (void *cc, void *dst)
 Terminate the current Luffa-256 computation and output the result into the provided buffer. More...
 
void sph_luffa256_addbits_and_close (void *cc, unsigned ub, unsigned n, void *dst)
 Add a few additional bits (0 to 7) to the current computation, then terminate it and output the result in the provided buffer, which must be wide enough to accomodate the result (32 bytes). More...
 
void sph_luffa384_init (void *cc)
 Initialize a Luffa-384 context. More...
 
void sph_luffa384 (void *cc, const void *data, size_t len)
 Process some data bytes. More...
 
void sph_luffa384_close (void *cc, void *dst)
 Terminate the current Luffa-384 computation and output the result into the provided buffer. More...
 
void sph_luffa384_addbits_and_close (void *cc, unsigned ub, unsigned n, void *dst)
 Add a few additional bits (0 to 7) to the current computation, then terminate it and output the result in the provided buffer, which must be wide enough to accomodate the result (48 bytes). More...
 
void sph_luffa512_init (void *cc)
 Initialize a Luffa-512 context. More...
 
void sph_luffa512 (void *cc, const void *data, size_t len)
 Process some data bytes. More...
 
void sph_luffa512_close (void *cc, void *dst)
 Terminate the current Luffa-512 computation and output the result into the provided buffer. More...
 
void sph_luffa512_addbits_and_close (void *cc, unsigned ub, unsigned n, void *dst)
 Add a few additional bits (0 to 7) to the current computation, then terminate it and output the result in the provided buffer, which must be wide enough to accomodate the result (64 bytes). More...
 

Variables

static const sph_u32 V_INIT [5][8]
 
static const sph_u32 RC00 [8]
 
static const sph_u32 RC04 [8]
 
static const sph_u32 RC10 [8]
 
static const sph_u32 RC14 [8]
 
static const sph_u32 RC20 [8]
 
static const sph_u32 RC24 [8]
 
static const sph_u32 RC30 [8]
 
static const sph_u32 RC34 [8]
 
static const sph_u32 RC40 [8]
 
static const sph_u32 RC44 [8]
 

Macro Definition Documentation

◆ DECL_STATE3

#define DECL_STATE3
Value:
sph_u32 V00, V01, V02, V03, V04, V05, V06, V07; \
sph_u32 V10, V11, V12, V13, V14, V15, V16, V17; \
sph_u32 V20, V21, V22, V23, V24, V25, V26, V27;
unsigned long sph_u32
Definition: sph_types.h:870

Definition at line 310 of file luffa.c.

Referenced by luffa3(), and luffa3_close().

◆ DECL_STATE4

#define DECL_STATE4
Value:
sph_u32 V00, V01, V02, V03, V04, V05, V06, V07; \
sph_u32 V10, V11, V12, V13, V14, V15, V16, V17; \
sph_u32 V20, V21, V22, V23, V24, V25, V26, V27; \
sph_u32 V30, V31, V32, V33, V34, V35, V36, V37;
unsigned long sph_u32
Definition: sph_types.h:870

Definition at line 495 of file luffa.c.

Referenced by luffa4(), and luffa4_close().

◆ DECL_STATE5

#define DECL_STATE5
Value:
sph_u32 V00, V01, V02, V03, V04, V05, V06, V07; \
sph_u32 V10, V11, V12, V13, V14, V15, V16, V17; \
sph_u32 V20, V21, V22, V23, V24, V25, V26, V27; \
sph_u32 V30, V31, V32, V33, V34, V35, V36, V37; \
sph_u32 V40, V41, V42, V43, V44, V45, V46, V47;
unsigned long sph_u32
Definition: sph_types.h:870

Definition at line 748 of file luffa.c.

Referenced by luffa5(), and luffa5_close().

◆ DECL_TMP8

#define DECL_TMP8 (   w)    sph_u32 w ## 0, w ## 1, w ## 2, w ## 3, w ## 4, w ## 5, w ## 6, w ## 7;

Definition at line 187 of file luffa.c.

◆ M2

#define M2 (   d,
 
)
Value:
do { \
sph_u32 tmp = s ## 7; \
d ## 7 = s ## 6; \
d ## 6 = s ## 5; \
d ## 5 = s ## 4; \
d ## 4 = s ## 3 ^ tmp; \
d ## 3 = s ## 2 ^ tmp; \
d ## 2 = s ## 1; \
d ## 1 = s ## 0 ^ tmp; \
d ## 0 = tmp; \
} while (0)

Definition at line 190 of file luffa.c.

◆ MI3

#define MI3
Value:
do { \
DECL_TMP8(M) \
DECL_TMP8(a) \
M0 = sph_dec32be_aligned(buf + 0); \
M1 = sph_dec32be_aligned(buf + 4); \
M2 = sph_dec32be_aligned(buf + 8); \
M3 = sph_dec32be_aligned(buf + 12); \
M4 = sph_dec32be_aligned(buf + 16); \
M5 = sph_dec32be_aligned(buf + 20); \
M6 = sph_dec32be_aligned(buf + 24); \
M7 = sph_dec32be_aligned(buf + 28); \
XOR(a, V0, V1); \
XOR(a, a, V2); \
M2(a, a); \
XOR(V0, a, V0); \
XOR(V0, M, V0); \
M2(M, M); \
XOR(V1, a, V1); \
XOR(V1, M, V1); \
M2(M, M); \
XOR(V2, a, V2); \
XOR(V2, M, V2); \
} while (0)
static SPH_INLINE sph_u32 sph_dec32be_aligned(const void *src)
Decode a 32-bit value from the provided buffer (big endian convention).
Definition: sph_types.h:1464
#define M(x)

Definition at line 369 of file luffa.c.

Referenced by luffa3(), and luffa3_close().

◆ MI4

#define MI4

Definition at line 571 of file luffa.c.

Referenced by luffa4(), and luffa4_close().

◆ MI5

#define MI5

Definition at line 841 of file luffa.c.

Referenced by luffa5(), and luffa5_close().

◆ MIX_WORD

#define MIX_WORD (   u,
 
)
Value:
do { \
(v) ^= (u); \
(u) = SPH_ROTL32((u), 2) ^ (v); \
(v) = SPH_ROTL32((v), 14) ^ (u); \
(u) = SPH_ROTL32((u), 10) ^ (v); \
(v) = SPH_ROTL32((v), 1); \
} while (0)
#define SPH_ROTL32(x, n)
Definition: sph_types.h:933

Definition at line 302 of file luffa.c.

◆ P3

#define P3

Definition at line 458 of file luffa.c.

Referenced by luffa3(), and luffa3_close().

◆ P4

#define P4

Definition at line 701 of file luffa.c.

Referenced by luffa4(), and luffa4_close().

◆ P5

#define P5

Definition at line 1001 of file luffa.c.

Referenced by luffa5(), and luffa5_close().

◆ READ_STATE3

#define READ_STATE3 (   state)
Value:
do { \
V00 = (state)->V[0][0]; \
V01 = (state)->V[0][1]; \
V02 = (state)->V[0][2]; \
V03 = (state)->V[0][3]; \
V04 = (state)->V[0][4]; \
V05 = (state)->V[0][5]; \
V06 = (state)->V[0][6]; \
V07 = (state)->V[0][7]; \
V10 = (state)->V[1][0]; \
V11 = (state)->V[1][1]; \
V12 = (state)->V[1][2]; \
V13 = (state)->V[1][3]; \
V14 = (state)->V[1][4]; \
V15 = (state)->V[1][5]; \
V16 = (state)->V[1][6]; \
V17 = (state)->V[1][7]; \
V20 = (state)->V[2][0]; \
V21 = (state)->V[2][1]; \
V22 = (state)->V[2][2]; \
V23 = (state)->V[2][3]; \
V24 = (state)->V[2][4]; \
V25 = (state)->V[2][5]; \
V26 = (state)->V[2][6]; \
V27 = (state)->V[2][7]; \
} while (0)

Definition at line 315 of file luffa.c.

Referenced by luffa3(), and luffa3_close().

◆ READ_STATE4

#define READ_STATE4 (   state)

Definition at line 501 of file luffa.c.

Referenced by luffa4(), and luffa4_close().

◆ READ_STATE5

#define READ_STATE5 (   state)

Definition at line 755 of file luffa.c.

Referenced by luffa5(), and luffa5_close().

◆ SUB_CRUMB

#define SUB_CRUMB (   a0,
  a1,
  a2,
  a3 
)
Value:
do { \
sph_u32 tmp; \
tmp = (a0); \
(a0) |= (a1); \
(a2) ^= (a3); \
(a1) = SPH_T32(~(a1)); \
(a0) ^= (a3); \
(a3) &= tmp; \
(a1) ^= (a3); \
(a3) ^= (a2); \
(a2) &= (a0); \
(a0) = SPH_T32(~(a0)); \
(a2) ^= (a1); \
(a1) |= (a3); \
tmp ^= (a1); \
(a3) ^= (a2); \
(a2) &= (a1); \
(a1) ^= (a0); \
(a0) = tmp; \
} while (0)
#define SPH_T32(x)
Definition: sph_types.h:932

Definition at line 279 of file luffa.c.

◆ TWEAK3

#define TWEAK3
Value:
do { \
V14 = SPH_ROTL32(V14, 1); \
V15 = SPH_ROTL32(V15, 1); \
V16 = SPH_ROTL32(V16, 1); \
V17 = SPH_ROTL32(V17, 1); \
V24 = SPH_ROTL32(V24, 2); \
V25 = SPH_ROTL32(V25, 2); \
V26 = SPH_ROTL32(V26, 2); \
V27 = SPH_ROTL32(V27, 2); \
} while (0)
#define SPH_ROTL32(x, n)
Definition: sph_types.h:933

Definition at line 393 of file luffa.c.

◆ TWEAK4

#define TWEAK4
Value:
do { \
V14 = SPH_ROTL32(V14, 1); \
V15 = SPH_ROTL32(V15, 1); \
V16 = SPH_ROTL32(V16, 1); \
V17 = SPH_ROTL32(V17, 1); \
V24 = SPH_ROTL32(V24, 2); \
V25 = SPH_ROTL32(V25, 2); \
V26 = SPH_ROTL32(V26, 2); \
V27 = SPH_ROTL32(V27, 2); \
V34 = SPH_ROTL32(V34, 3); \
V35 = SPH_ROTL32(V35, 3); \
V36 = SPH_ROTL32(V36, 3); \
V37 = SPH_ROTL32(V37, 3); \
} while (0)
#define SPH_ROTL32(x, n)
Definition: sph_types.h:933

Definition at line 608 of file luffa.c.

◆ TWEAK5

#define TWEAK5
Value:
do { \
V14 = SPH_ROTL32(V14, 1); \
V15 = SPH_ROTL32(V15, 1); \
V16 = SPH_ROTL32(V16, 1); \
V17 = SPH_ROTL32(V17, 1); \
V24 = SPH_ROTL32(V24, 2); \
V25 = SPH_ROTL32(V25, 2); \
V26 = SPH_ROTL32(V26, 2); \
V27 = SPH_ROTL32(V27, 2); \
V34 = SPH_ROTL32(V34, 3); \
V35 = SPH_ROTL32(V35, 3); \
V36 = SPH_ROTL32(V36, 3); \
V37 = SPH_ROTL32(V37, 3); \
V44 = SPH_ROTL32(V44, 4); \
V45 = SPH_ROTL32(V45, 4); \
V46 = SPH_ROTL32(V46, 4); \
V47 = SPH_ROTL32(V47, 4); \
} while (0)
#define SPH_ROTL32(x, n)
Definition: sph_types.h:933

Definition at line 894 of file luffa.c.

◆ WRITE_STATE3

#define WRITE_STATE3 (   state)
Value:
do { \
(state)->V[0][0] = V00; \
(state)->V[0][1] = V01; \
(state)->V[0][2] = V02; \
(state)->V[0][3] = V03; \
(state)->V[0][4] = V04; \
(state)->V[0][5] = V05; \
(state)->V[0][6] = V06; \
(state)->V[0][7] = V07; \
(state)->V[1][0] = V10; \
(state)->V[1][1] = V11; \
(state)->V[1][2] = V12; \
(state)->V[1][3] = V13; \
(state)->V[1][4] = V14; \
(state)->V[1][5] = V15; \
(state)->V[1][6] = V16; \
(state)->V[1][7] = V17; \
(state)->V[2][0] = V20; \
(state)->V[2][1] = V21; \
(state)->V[2][2] = V22; \
(state)->V[2][3] = V23; \
(state)->V[2][4] = V24; \
(state)->V[2][5] = V25; \
(state)->V[2][6] = V26; \
(state)->V[2][7] = V27; \
} while (0)

Definition at line 342 of file luffa.c.

Referenced by luffa3().

◆ WRITE_STATE4

#define WRITE_STATE4 (   state)

Definition at line 536 of file luffa.c.

Referenced by luffa4().

◆ WRITE_STATE5

#define WRITE_STATE5 (   state)

Definition at line 798 of file luffa.c.

Referenced by luffa5().

◆ XOR

#define XOR (   d,
  s1,
  s2 
)
Value:
do { \
d ## 0 = s1 ## 0 ^ s2 ## 0; \
d ## 1 = s1 ## 1 ^ s2 ## 1; \
d ## 2 = s1 ## 2 ^ s2 ## 2; \
d ## 3 = s1 ## 3 ^ s2 ## 3; \
d ## 4 = s1 ## 4 ^ s2 ## 4; \
d ## 5 = s1 ## 5 ^ s2 ## 5; \
d ## 6 = s1 ## 6 ^ s2 ## 6; \
d ## 7 = s1 ## 7 ^ s2 ## 7; \
} while (0)

Definition at line 202 of file luffa.c.

Function Documentation

◆ luffa3()

static void luffa3 ( sph_luffa224_context sc,
const void *  data,
size_t  len 
)
static

◆ luffa3_close()

static void luffa3_close ( sph_luffa224_context sc,
unsigned  ub,
unsigned  n,
void *  dst,
unsigned  out_size_w32 
)
static

◆ luffa4()

static void luffa4 ( sph_luffa384_context sc,
const void *  data,
size_t  len 
)
static

◆ luffa4_close()

static void luffa4_close ( sph_luffa384_context sc,
unsigned  ub,
unsigned  n,
void *  dst 
)
static

◆ luffa5()

static void luffa5 ( sph_luffa512_context sc,
const void *  data,
size_t  len 
)
static

◆ luffa5_close()

static void luffa5_close ( sph_luffa512_context sc,
unsigned  ub,
unsigned  n,
void *  dst 
)
static

◆ sph_luffa224()

void sph_luffa224 ( void *  cc,
const void *  data,
size_t  len 
)

Process some data bytes.

It is acceptable that len is zero (in which case this function does nothing).

Parameters
ccthe Luffa-224 context
datathe input data
lenthe input data length (in bytes)

Definition at line 1305 of file luffa.c.

References luffa3().

◆ sph_luffa224_addbits_and_close()

void sph_luffa224_addbits_and_close ( void *  cc,
unsigned  ub,
unsigned  n,
void *  dst 
)

Add a few additional bits (0 to 7) to the current computation, then terminate it and output the result in the provided buffer, which must be wide enough to accomodate the result (28 bytes).

If bit number i in ub has value 2^i, then the extra bits are those numbered 7 downto 8-n (this is the big-endian convention at the byte level). The context is automatically reinitialized.

Parameters
ccthe Luffa-224 context
ubthe extra bits
nthe number of extra bits (0 to 7)
dstthe destination buffer

Definition at line 1319 of file luffa.c.

References luffa3_close(), and sph_luffa224_init().

Referenced by sph_luffa224_close().

◆ sph_luffa224_close()

void sph_luffa224_close ( void *  cc,
void *  dst 
)

Terminate the current Luffa-224 computation and output the result into the provided buffer.

The destination buffer must be wide enough to accomodate the result (28 bytes). The context is automatically reinitialized.

Parameters
ccthe Luffa-224 context
dstthe destination buffer

Definition at line 1312 of file luffa.c.

References sph_luffa224_addbits_and_close().

◆ sph_luffa224_init()

void sph_luffa224_init ( void *  cc)

Initialize a Luffa-224 context.

This process performs no memory allocation.

Parameters
ccthe Luffa-224 context (pointer to a sph_luffa224_context)

Definition at line 1294 of file luffa.c.

References memcpy(), sph_luffa224_context::ptr, sph_luffa224_context::V, and V_INIT.

Referenced by sph_luffa224_addbits_and_close().

◆ sph_luffa256()

void sph_luffa256 ( void *  cc,
const void *  data,
size_t  len 
)

Process some data bytes.

It is acceptable that len is zero (in which case this function does nothing).

Parameters
ccthe Luffa-256 context
datathe input data
lenthe input data length (in bytes)

Definition at line 1338 of file luffa.c.

References luffa3().

◆ sph_luffa256_addbits_and_close()

void sph_luffa256_addbits_and_close ( void *  cc,
unsigned  ub,
unsigned  n,
void *  dst 
)

Add a few additional bits (0 to 7) to the current computation, then terminate it and output the result in the provided buffer, which must be wide enough to accomodate the result (32 bytes).

If bit number i in ub has value 2^i, then the extra bits are those numbered 7 downto 8-n (this is the big-endian convention at the byte level). The context is automatically reinitialized.

Parameters
ccthe Luffa-256 context
ubthe extra bits
nthe number of extra bits (0 to 7)
dstthe destination buffer

Definition at line 1352 of file luffa.c.

References luffa3_close(), and sph_luffa256_init().

Referenced by sph_luffa256_close().

◆ sph_luffa256_close()

void sph_luffa256_close ( void *  cc,
void *  dst 
)

Terminate the current Luffa-256 computation and output the result into the provided buffer.

The destination buffer must be wide enough to accomodate the result (32 bytes). The context is automatically reinitialized.

Parameters
ccthe Luffa-256 context
dstthe destination buffer

Definition at line 1345 of file luffa.c.

References sph_luffa256_addbits_and_close().

◆ sph_luffa256_init()

void sph_luffa256_init ( void *  cc)

Initialize a Luffa-256 context.

This process performs no memory allocation.

Parameters
ccthe Luffa-256 context (pointer to a sph_luffa256_context)

Definition at line 1327 of file luffa.c.

References memcpy(), sph_luffa224_context::ptr, sph_luffa224_context::V, and V_INIT.

Referenced by sph_luffa256_addbits_and_close().

◆ sph_luffa384()

void sph_luffa384 ( void *  cc,
const void *  data,
size_t  len 
)

Process some data bytes.

It is acceptable that len is zero (in which case this function does nothing).

Parameters
ccthe Luffa-384 context
datathe input data
lenthe input data length (in bytes)

Definition at line 1371 of file luffa.c.

References luffa4().

◆ sph_luffa384_addbits_and_close()

void sph_luffa384_addbits_and_close ( void *  cc,
unsigned  ub,
unsigned  n,
void *  dst 
)

Add a few additional bits (0 to 7) to the current computation, then terminate it and output the result in the provided buffer, which must be wide enough to accomodate the result (48 bytes).

If bit number i in ub has value 2^i, then the extra bits are those numbered 7 downto 8-n (this is the big-endian convention at the byte level). The context is automatically reinitialized.

Parameters
ccthe Luffa-384 context
ubthe extra bits
nthe number of extra bits (0 to 7)
dstthe destination buffer

Definition at line 1385 of file luffa.c.

References luffa4_close(), and sph_luffa384_init().

Referenced by sph_luffa384_close().

◆ sph_luffa384_close()

void sph_luffa384_close ( void *  cc,
void *  dst 
)

Terminate the current Luffa-384 computation and output the result into the provided buffer.

The destination buffer must be wide enough to accomodate the result (48 bytes). The context is automatically reinitialized.

Parameters
ccthe Luffa-384 context
dstthe destination buffer

Definition at line 1378 of file luffa.c.

References sph_luffa384_addbits_and_close().

◆ sph_luffa384_init()

void sph_luffa384_init ( void *  cc)

Initialize a Luffa-384 context.

This process performs no memory allocation.

Parameters
ccthe Luffa-384 context (pointer to a sph_luffa384_context)

Definition at line 1360 of file luffa.c.

References memcpy(), sph_luffa384_context::ptr, sph_luffa384_context::V, and V_INIT.

Referenced by sph_luffa384_addbits_and_close().

◆ sph_luffa512()

void sph_luffa512 ( void *  cc,
const void *  data,
size_t  len 
)

Process some data bytes.

It is acceptable that len is zero (in which case this function does nothing).

Parameters
ccthe Luffa-512 context
datathe input data
lenthe input data length (in bytes)

Definition at line 1404 of file luffa.c.

References luffa5().

Referenced by HashX11().

◆ sph_luffa512_addbits_and_close()

void sph_luffa512_addbits_and_close ( void *  cc,
unsigned  ub,
unsigned  n,
void *  dst 
)

Add a few additional bits (0 to 7) to the current computation, then terminate it and output the result in the provided buffer, which must be wide enough to accomodate the result (64 bytes).

If bit number i in ub has value 2^i, then the extra bits are those numbered 7 downto 8-n (this is the big-endian convention at the byte level). The context is automatically reinitialized.

Parameters
ccthe Luffa-512 context
ubthe extra bits
nthe number of extra bits (0 to 7)
dstthe destination buffer

Definition at line 1418 of file luffa.c.

References luffa5_close(), and sph_luffa512_init().

Referenced by sph_luffa512_close().

◆ sph_luffa512_close()

void sph_luffa512_close ( void *  cc,
void *  dst 
)

Terminate the current Luffa-512 computation and output the result into the provided buffer.

The destination buffer must be wide enough to accomodate the result (64 bytes). The context is automatically reinitialized.

Parameters
ccthe Luffa-512 context
dstthe destination buffer

Definition at line 1411 of file luffa.c.

References sph_luffa512_addbits_and_close().

Referenced by HashX11().

◆ sph_luffa512_init()

void sph_luffa512_init ( void *  cc)

Initialize a Luffa-512 context.

This process performs no memory allocation.

Parameters
ccthe Luffa-512 context (pointer to a sph_luffa512_context)

Definition at line 1393 of file luffa.c.

References memcpy(), sph_luffa512_context::ptr, sph_luffa512_context::V, and V_INIT.

Referenced by HashX11(), and sph_luffa512_addbits_and_close().

Variable Documentation

◆ RC00

const sph_u32 RC00[8]
static
Initial value:
= {
SPH_C32(0x303994a6), SPH_C32(0xc0e65299),
SPH_C32(0x6cc33a12), SPH_C32(0xdc56983e),
SPH_C32(0x1e00108f), SPH_C32(0x7800423d),
SPH_C32(0x8f5b7882), SPH_C32(0x96e1db12)
}
#define SPH_C32(x)
Definition: sph_types.h:873

Definition at line 80 of file luffa.c.

◆ RC04

const sph_u32 RC04[8]
static
Initial value:
= {
SPH_C32(0xe0337818), SPH_C32(0x441ba90d),
SPH_C32(0x7f34d442), SPH_C32(0x9389217f),
SPH_C32(0xe5a8bce6), SPH_C32(0x5274baf4),
SPH_C32(0x26889ba7), SPH_C32(0x9a226e9d)
}
#define SPH_C32(x)
Definition: sph_types.h:873

Definition at line 87 of file luffa.c.

◆ RC10

const sph_u32 RC10[8]
static
Initial value:
= {
SPH_C32(0xb6de10ed), SPH_C32(0x70f47aae),
SPH_C32(0x0707a3d4), SPH_C32(0x1c1e8f51),
SPH_C32(0x707a3d45), SPH_C32(0xaeb28562),
SPH_C32(0xbaca1589), SPH_C32(0x40a46f3e)
}
#define SPH_C32(x)
Definition: sph_types.h:873

Definition at line 94 of file luffa.c.

◆ RC14

const sph_u32 RC14[8]
static
Initial value:
= {
SPH_C32(0x01685f3d), SPH_C32(0x05a17cf4),
SPH_C32(0xbd09caca), SPH_C32(0xf4272b28),
SPH_C32(0x144ae5cc), SPH_C32(0xfaa7ae2b),
SPH_C32(0x2e48f1c1), SPH_C32(0xb923c704)
}
#define SPH_C32(x)
Definition: sph_types.h:873

Definition at line 101 of file luffa.c.

◆ RC20

const sph_u32 RC20[8]
static
Initial value:
= {
SPH_C32(0xfc20d9d2), SPH_C32(0x34552e25),
SPH_C32(0x7ad8818f), SPH_C32(0x8438764a),
SPH_C32(0xbb6de032), SPH_C32(0xedb780c8),
SPH_C32(0xd9847356), SPH_C32(0xa2c78434)
}
#define SPH_C32(x)
Definition: sph_types.h:873

Definition at line 126 of file luffa.c.

◆ RC24

const sph_u32 RC24[8]
static
Initial value:
= {
SPH_C32(0xe25e72c1), SPH_C32(0xe623bb72),
SPH_C32(0x5c58a4a4), SPH_C32(0x1e38e2e7),
SPH_C32(0x78e38b9d), SPH_C32(0x27586719),
SPH_C32(0x36eda57f), SPH_C32(0x703aace7)
}
#define SPH_C32(x)
Definition: sph_types.h:873

Definition at line 133 of file luffa.c.

◆ RC30

const sph_u32 RC30[8]
static
Initial value:
= {
SPH_C32(0xb213afa5), SPH_C32(0xc84ebe95),
SPH_C32(0x4e608a22), SPH_C32(0x56d858fe),
SPH_C32(0x343b138f), SPH_C32(0xd0ec4e3d),
SPH_C32(0x2ceb4882), SPH_C32(0xb3ad2208)
}
#define SPH_C32(x)
Definition: sph_types.h:873

Definition at line 140 of file luffa.c.

◆ RC34

const sph_u32 RC34[8]
static
Initial value:
= {
SPH_C32(0xe028c9bf), SPH_C32(0x44756f91),
SPH_C32(0x7e8fce32), SPH_C32(0x956548be),
SPH_C32(0xfe191be2), SPH_C32(0x3cb226e5),
SPH_C32(0x5944a28e), SPH_C32(0xa1c4c355)
}
#define SPH_C32(x)
Definition: sph_types.h:873

Definition at line 147 of file luffa.c.

◆ RC40

const sph_u32 RC40[8]
static
Initial value:
= {
SPH_C32(0xf0d2e9e3), SPH_C32(0xac11d7fa),
SPH_C32(0x1bcb66f2), SPH_C32(0x6f2d9bc9),
SPH_C32(0x78602649), SPH_C32(0x8edae952),
SPH_C32(0x3b6ba548), SPH_C32(0xedae9520)
}
#define SPH_C32(x)
Definition: sph_types.h:873

Definition at line 173 of file luffa.c.

◆ RC44

const sph_u32 RC44[8]
static
Initial value:
= {
SPH_C32(0x5090d577), SPH_C32(0x2d1925ab),
SPH_C32(0xb46496ac), SPH_C32(0xd1925ab0),
SPH_C32(0x29131ab6), SPH_C32(0x0fc053c3),
SPH_C32(0x3f014f0c), SPH_C32(0xfc053c31)
}
#define SPH_C32(x)
Definition: sph_types.h:873

Definition at line 180 of file luffa.c.

◆ V_INIT

const sph_u32 V_INIT[5][8]
static
Initial value:
= {
{
SPH_C32(0x6d251e69), SPH_C32(0x44b051e0),
SPH_C32(0x4eaa6fb4), SPH_C32(0xdbf78465),
SPH_C32(0x6e292011), SPH_C32(0x90152df4),
SPH_C32(0xee058139), SPH_C32(0xdef610bb)
}, {
SPH_C32(0xc3b44b95), SPH_C32(0xd9d2f256),
SPH_C32(0x70eee9a0), SPH_C32(0xde099fa3),
SPH_C32(0x5d9b0557), SPH_C32(0x8fc944b3),
SPH_C32(0xcf1ccf0e), SPH_C32(0x746cd581)
}, {
SPH_C32(0xf7efc89d), SPH_C32(0x5dba5781),
SPH_C32(0x04016ce5), SPH_C32(0xad659c05),
SPH_C32(0x0306194f), SPH_C32(0x666d1836),
SPH_C32(0x24aa230a), SPH_C32(0x8b264ae7)
}, {
SPH_C32(0x858075d5), SPH_C32(0x36d79cce),
SPH_C32(0xe571f7d7), SPH_C32(0x204b1f67),
SPH_C32(0x35870c6a), SPH_C32(0x57e9e923),
SPH_C32(0x14bcb808), SPH_C32(0x7cde72ce)
}, {
SPH_C32(0x6c68e9be), SPH_C32(0x5ec41e22),
SPH_C32(0xc825b7c7), SPH_C32(0xaffb4363),
SPH_C32(0xf5df3999), SPH_C32(0x0fc688f1),
SPH_C32(0xb07224cc), SPH_C32(0x03e86cea)
}
}
#define SPH_C32(x)
Definition: sph_types.h:873

Definition at line 51 of file luffa.c.

Referenced by sph_luffa224_init(), sph_luffa256_init(), sph_luffa384_init(), and sph_luffa512_init().

Released under the MIT license