![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
Go to the source code of this file.
Macros | |
#define | SPH_GROESTL_64 1 |
#define | C32e(x) SPH_C32(x) |
#define | dec32e_aligned sph_dec32be_aligned |
#define | enc32e sph_enc32be |
#define | B32_0(x) ((x) >> 24) |
#define | B32_1(x) (((x) >> 16) & 0xFF) |
#define | B32_2(x) (((x) >> 8) & 0xFF) |
#define | B32_3(x) ((x) & 0xFF) |
#define | R32u(u, d) SPH_T32(((u) >> 16) | ((d) << 16)) |
#define | R32d(u, d) SPH_T32(((u) << 16) | ((d) >> 16)) |
#define | PC32up(j, r) ((sph_u32)((j) + (r)) << 24) |
#define | PC32dn(j, r) 0 |
#define | QC32up(j, r) SPH_C32(0xFFFFFFFF) |
#define | QC32dn(j, r) ((sph_u32)(r) ^ SPH_T32(~(sph_u32)(j))) |
#define | DECL_STATE_SMALL sph_u32 H[16]; |
#define | READ_STATE_SMALL(sc) |
#define | WRITE_STATE_SMALL(sc) |
#define | XCAT(x, y) XCAT_(x, y) |
#define | XCAT_(x, y) x ## y |
#define | RSTT(d0, d1, a, b0, b1, b2, b3, b4, b5, b6, b7) |
#define | ROUND_SMALL_P(a, r) |
#define | ROUND_SMALL_Q(a, r) |
#define | PERM_SMALL_P(a) |
#define | PERM_SMALL_Q(a) |
#define | COMPRESS_SMALL |
#define | FINAL_SMALL |
#define | DECL_STATE_BIG sph_u32 H[32]; |
#define | READ_STATE_BIG(sc) |
#define | WRITE_STATE_BIG(sc) |
#define | RBTT(d0, d1, a, b0, b1, b2, b3, b4, b5, b6, b7) |
#define | ROUND_BIG_P(a, r) |
#define | ROUND_BIG_Q(a, r) |
#define | PERM_BIG_P(a) |
#define | PERM_BIG_Q(a) |
#define | COMPRESS_BIG |
#define | FINAL_BIG |
Functions | |
static void | groestl_small_init (sph_groestl_small_context *sc, unsigned out_size) |
static void | groestl_small_core (sph_groestl_small_context *sc, const void *data, size_t len) |
static void | groestl_small_close (sph_groestl_small_context *sc, unsigned ub, unsigned n, void *dst, size_t out_len) |
static void | groestl_big_init (sph_groestl_big_context *sc, unsigned out_size) |
static void | groestl_big_core (sph_groestl_big_context *sc, const void *data, size_t len) |
static void | groestl_big_close (sph_groestl_big_context *sc, unsigned ub, unsigned n, void *dst, size_t out_len) |
void | sph_groestl224_init (void *cc) |
void | sph_groestl224 (void *cc, const void *data, size_t len) |
void | sph_groestl224_close (void *cc, void *dst) |
void | sph_groestl224_addbits_and_close (void *cc, unsigned ub, unsigned n, void *dst) |
void | sph_groestl256_init (void *cc) |
void | sph_groestl256 (void *cc, const void *data, size_t len) |
void | sph_groestl256_close (void *cc, void *dst) |
void | sph_groestl256_addbits_and_close (void *cc, unsigned ub, unsigned n, void *dst) |
void | sph_groestl384_init (void *cc) |
void | sph_groestl384 (void *cc, const void *data, size_t len) |
void | sph_groestl384_close (void *cc, void *dst) |
void | sph_groestl384_addbits_and_close (void *cc, unsigned ub, unsigned n, void *dst) |
void | sph_groestl512_init (void *cc) |
void | sph_groestl512 (void *cc, const void *data, size_t len) |
void | sph_groestl512_close (void *cc, void *dst) |
void | sph_groestl512_addbits_and_close (void *cc, unsigned ub, unsigned n, void *dst) |
Variables | |
static const sph_u32 | T0up [] |
static const sph_u32 | T0dn [] |
static const sph_u32 | T1up [] |
static const sph_u32 | T1dn [] |
static const sph_u32 | T2up [] |
static const sph_u32 | T2dn [] |
static const sph_u32 | T3up [] |
static const sph_u32 | T3dn [] |
#define COMPRESS_BIG |
Definition at line 2713 of file groestl.c.
Referenced by groestl_big_core().
#define COMPRESS_SMALL |
Definition at line 2330 of file groestl.c.
Referenced by groestl_small_core().
#define dec32e_aligned sph_dec32be_aligned |
Definition at line 2352 of file groestl.c.
Referenced by groestl_big_close(), and groestl_big_core().
Definition at line 2205 of file groestl.c.
Referenced by groestl_small_close(), and groestl_small_core().
#define enc32e sph_enc32be |
Definition at line 130 of file groestl.c.
Referenced by groestl_big_close(), and groestl_small_close().
#define FINAL_BIG |
#define FINAL_SMALL |
#define PERM_BIG_P | ( | a | ) |
#define PERM_BIG_Q | ( | a | ) |
#define PERM_SMALL_P | ( | a | ) |
#define PERM_SMALL_Q | ( | a | ) |
#define RBTT | ( | d0, | |
d1, | |||
a, | |||
b0, | |||
b1, | |||
b2, | |||
b3, | |||
b4, | |||
b5, | |||
b6, | |||
b7 | |||
) |
#define READ_STATE_BIG | ( | sc | ) |
Definition at line 2355 of file groestl.c.
Referenced by groestl_big_close(), and groestl_big_core().
#define READ_STATE_SMALL | ( | sc | ) |
Definition at line 2208 of file groestl.c.
Referenced by groestl_small_close(), and groestl_small_core().
#define ROUND_SMALL_P | ( | a, | |
r | |||
) |
#define ROUND_SMALL_Q | ( | a, | |
r | |||
) |
#define RSTT | ( | d0, | |
d1, | |||
a, | |||
b0, | |||
b1, | |||
b2, | |||
b3, | |||
b4, | |||
b5, | |||
b6, | |||
b7 | |||
) |
#define WRITE_STATE_BIG | ( | sc | ) |
#define WRITE_STATE_SMALL | ( | sc | ) |
|
static |
Definition at line 2949 of file groestl.c.
Referenced by sph_groestl384_addbits_and_close(), sph_groestl384_close(), sph_groestl512_addbits_and_close(), and sph_groestl512_close().
|
static |
Definition at line 2907 of file groestl.c.
Referenced by groestl_big_close(), sph_groestl384(), and sph_groestl512().
|
static |
Definition at line 2874 of file groestl.c.
Referenced by groestl_big_close(), sph_groestl384_init(), and sph_groestl512_init().
|
static |
Definition at line 2813 of file groestl.c.
Referenced by sph_groestl224_addbits_and_close(), sph_groestl224_close(), sph_groestl256_addbits_and_close(), and sph_groestl256_close().
|
static |
Definition at line 2771 of file groestl.c.
Referenced by groestl_small_close(), sph_groestl224(), and sph_groestl256().
|
static |
Definition at line 2738 of file groestl.c.
Referenced by groestl_small_close(), sph_groestl224_init(), and sph_groestl256_init().
void sph_groestl224 | ( | void * | cc, |
const void * | data, | ||
size_t | len | ||
) |
void sph_groestl224_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 Groestl-224 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
void sph_groestl224_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current Groestl-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 Groestl-224 context |
dst | the destination buffer |
void sph_groestl224_init | ( | void * | cc | ) |
void sph_groestl256 | ( | void * | cc, |
const void * | data, | ||
size_t | len | ||
) |
void sph_groestl256_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 Groestl-256 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
void sph_groestl256_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current Groestl-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 Groestl-256 context |
dst | the destination buffer |
void sph_groestl256_init | ( | void * | cc | ) |
void sph_groestl384 | ( | void * | cc, |
const void * | data, | ||
size_t | len | ||
) |
void sph_groestl384_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 Groestl-384 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
void sph_groestl384_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current Groestl-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 Groestl-384 context |
dst | the destination buffer |
void sph_groestl384_init | ( | void * | cc | ) |
void sph_groestl512 | ( | void * | cc, |
const void * | data, | ||
size_t | len | ||
) |
void sph_groestl512_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 Groestl-512 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
void sph_groestl512_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current Groestl-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 Groestl-512 context |
dst | the destination buffer |
Definition at line 3109 of file groestl.c.
Referenced by HashX11().
void sph_groestl512_init | ( | void * | cc | ) |