![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
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) |
void | sph_luffa224 (void *cc, const void *data, size_t len) |
void | sph_luffa224_close (void *cc, void *dst) |
void | sph_luffa224_addbits_and_close (void *cc, unsigned ub, unsigned n, void *dst) |
void | sph_luffa256_init (void *cc) |
void | sph_luffa256 (void *cc, const void *data, size_t len) |
void | sph_luffa256_close (void *cc, void *dst) |
void | sph_luffa256_addbits_and_close (void *cc, unsigned ub, unsigned n, void *dst) |
void | sph_luffa384_init (void *cc) |
void | sph_luffa384 (void *cc, const void *data, size_t len) |
void | sph_luffa384_close (void *cc, void *dst) |
void | sph_luffa384_addbits_and_close (void *cc, unsigned ub, unsigned n, void *dst) |
void | sph_luffa512_init (void *cc) |
void | sph_luffa512 (void *cc, const void *data, size_t len) |
void | sph_luffa512_close (void *cc, void *dst) |
void | sph_luffa512_addbits_and_close (void *cc, unsigned ub, unsigned n, void *dst) |
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] |
#define DECL_STATE3 |
Definition at line 310 of file luffa.c.
Referenced by luffa3(), and luffa3_close().
#define DECL_STATE4 |
Definition at line 495 of file luffa.c.
Referenced by luffa4(), and luffa4_close().
#define DECL_STATE5 |
Definition at line 748 of file luffa.c.
Referenced by luffa5(), and luffa5_close().
#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 MI3 |
Definition at line 369 of file luffa.c.
Referenced by luffa3(), and luffa3_close().
#define MI4 |
Definition at line 571 of file luffa.c.
Referenced by luffa4(), and luffa4_close().
#define MI5 |
Definition at line 841 of file luffa.c.
Referenced by luffa5(), and luffa5_close().
#define MIX_WORD | ( | u, | |
v | |||
) |
#define P3 |
Definition at line 458 of file luffa.c.
Referenced by luffa3(), and luffa3_close().
#define P4 |
Definition at line 701 of file luffa.c.
Referenced by luffa4(), and luffa4_close().
#define P5 |
Definition at line 1001 of file luffa.c.
Referenced by luffa5(), and luffa5_close().
#define READ_STATE3 | ( | state | ) |
Definition at line 315 of file luffa.c.
Referenced by luffa3(), and luffa3_close().
#define READ_STATE4 | ( | state | ) |
Definition at line 501 of file luffa.c.
Referenced by luffa4(), and luffa4_close().
#define READ_STATE5 | ( | state | ) |
Definition at line 755 of file luffa.c.
Referenced by luffa5(), and luffa5_close().
#define SUB_CRUMB | ( | a0, | |
a1, | |||
a2, | |||
a3 | |||
) |
#define TWEAK3 |
#define TWEAK4 |
#define TWEAK5 |
#define WRITE_STATE3 | ( | state | ) |
Definition at line 342 of file luffa.c.
Referenced by luffa3().
#define XOR | ( | d, | |
s1, | |||
s2 | |||
) |
|
static |
Definition at line 1059 of file luffa.c.
Referenced by sph_luffa224(), and sph_luffa256().
|
static |
Definition at line 1096 of file luffa.c.
Referenced by sph_luffa224_addbits_and_close(), and sph_luffa256_addbits_and_close().
|
static |
Definition at line 1129 of file luffa.c.
Referenced by sph_luffa384().
|
static |
Definition at line 1166 of file luffa.c.
Referenced by sph_luffa384_addbits_and_close().
|
static |
Definition at line 1209 of file luffa.c.
Referenced by sph_luffa512().
|
static |
Definition at line 1246 of file luffa.c.
Referenced by sph_luffa512_addbits_and_close().
void sph_luffa224 | ( | void * | cc, |
const void * | data, | ||
size_t | len | ||
) |
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.
cc | the Luffa-224 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
Definition at line 1319 of file luffa.c.
Referenced by 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.
cc | the Luffa-224 context |
dst | the destination buffer |
void sph_luffa224_init | ( | void * | cc | ) |
Initialize a Luffa-224 context. This process performs no memory allocation.
cc | the Luffa-224 context (pointer to a sph_luffa224_context ) |
Definition at line 1294 of file luffa.c.
Referenced by sph_luffa224_addbits_and_close().
void sph_luffa256 | ( | void * | cc, |
const void * | data, | ||
size_t | len | ||
) |
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.
cc | the Luffa-256 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
Definition at line 1352 of file luffa.c.
Referenced by 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.
cc | the Luffa-256 context |
dst | the destination buffer |
void sph_luffa256_init | ( | void * | cc | ) |
Initialize a Luffa-256 context. This process performs no memory allocation.
cc | the Luffa-256 context (pointer to a sph_luffa256_context ) |
Definition at line 1327 of file luffa.c.
Referenced by sph_luffa256_addbits_and_close().
void sph_luffa384 | ( | void * | cc, |
const void * | data, | ||
size_t | len | ||
) |
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.
cc | the Luffa-384 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
Definition at line 1385 of file luffa.c.
Referenced by 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.
cc | the Luffa-384 context |
dst | the destination buffer |
void sph_luffa384_init | ( | void * | cc | ) |
Initialize a Luffa-384 context. This process performs no memory allocation.
cc | the Luffa-384 context (pointer to a sph_luffa384_context ) |
Definition at line 1360 of file luffa.c.
Referenced by sph_luffa384_addbits_and_close().
void sph_luffa512 | ( | void * | cc, |
const void * | data, | ||
size_t | len | ||
) |
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.
cc | the Luffa-512 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
Definition at line 1418 of file luffa.c.
Referenced by 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.
cc | the Luffa-512 context |
dst | the destination buffer |
Definition at line 1411 of file luffa.c.
Referenced by HashX11().
void sph_luffa512_init | ( | void * | cc | ) |
Initialize a Luffa-512 context. This process performs no memory allocation.
cc | the Luffa-512 context (pointer to a sph_luffa512_context ) |
Definition at line 1393 of file luffa.c.
Referenced by HashX11(), and sph_luffa512_addbits_and_close().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 51 of file luffa.c.
Referenced by sph_luffa224_init(), sph_luffa256_init(), sph_luffa384_init(), and sph_luffa512_init().