Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
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) |
Initialize a Groestl-224 context. More... | |
void | sph_groestl224 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_groestl224_close (void *cc, void *dst) |
Terminate the current Groestl-224 computation and output the result into the provided buffer. More... | |
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). More... | |
void | sph_groestl256_init (void *cc) |
Initialize a Groestl-256 context. More... | |
void | sph_groestl256 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_groestl256_close (void *cc, void *dst) |
Terminate the current Groestl-256 computation and output the result into the provided buffer. More... | |
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). More... | |
void | sph_groestl384_init (void *cc) |
Initialize a Groestl-384 context. More... | |
void | sph_groestl384 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_groestl384_close (void *cc, void *dst) |
Terminate the current Groestl-384 computation and output the result into the provided buffer. More... | |
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). More... | |
void | sph_groestl512_init (void *cc) |
Initialize a Groestl-512 context. More... | |
void | sph_groestl512 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_groestl512_close (void *cc, void *dst) |
Terminate the current Groestl-512 computation and output the result into the provided buffer. More... | |
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). More... | |
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 [] |
Macro Definition Documentation
◆ B32_0
◆ B32_1
◆ B32_2
◆ B32_3
◆ C32e
◆ COMPRESS_BIG
#define COMPRESS_BIG |
Definition at line 2713 of file groestl.c.
Referenced by groestl_big_core().
◆ COMPRESS_SMALL
#define COMPRESS_SMALL |
Definition at line 2330 of file groestl.c.
Referenced by groestl_small_core().
◆ dec32e_aligned
#define dec32e_aligned sph_dec32be_aligned |
◆ DECL_STATE_BIG
Definition at line 2352 of file groestl.c.
Referenced by groestl_big_close(), and groestl_big_core().
◆ DECL_STATE_SMALL
Definition at line 2205 of file groestl.c.
Referenced by groestl_small_close(), and groestl_small_core().
◆ enc32e
#define enc32e sph_enc32be |
Definition at line 130 of file groestl.c.
Referenced by groestl_big_close(), and groestl_small_close().
◆ FINAL_BIG
#define FINAL_BIG |
◆ FINAL_SMALL
#define FINAL_SMALL |
◆ PC32dn
◆ PC32up
◆ PERM_BIG_P
#define PERM_BIG_P | ( | a | ) |
◆ PERM_BIG_Q
#define PERM_BIG_Q | ( | a | ) |
◆ PERM_SMALL_P
#define PERM_SMALL_P | ( | a | ) |
◆ PERM_SMALL_Q
#define PERM_SMALL_Q | ( | a | ) |
◆ QC32dn
◆ QC32up
◆ R32d
◆ R32u
◆ RBTT
#define RBTT | ( | d0, | |
d1, | |||
a, | |||
b0, | |||
b1, | |||
b2, | |||
b3, | |||
b4, | |||
b5, | |||
b6, | |||
b7 | |||
) |
◆ READ_STATE_BIG
#define READ_STATE_BIG | ( | sc | ) |
Definition at line 2355 of file groestl.c.
Referenced by groestl_big_close(), and groestl_big_core().
◆ READ_STATE_SMALL
#define READ_STATE_SMALL | ( | sc | ) |
Definition at line 2208 of file groestl.c.
Referenced by groestl_small_close(), and groestl_small_core().
◆ ROUND_BIG_P
◆ ROUND_BIG_Q
◆ ROUND_SMALL_P
#define ROUND_SMALL_P | ( | a, | |
r | |||
) |
◆ ROUND_SMALL_Q
#define ROUND_SMALL_Q | ( | a, | |
r | |||
) |
◆ RSTT
#define RSTT | ( | d0, | |
d1, | |||
a, | |||
b0, | |||
b1, | |||
b2, | |||
b3, | |||
b4, | |||
b5, | |||
b6, | |||
b7 | |||
) |
◆ SPH_GROESTL_64
◆ WRITE_STATE_BIG
#define WRITE_STATE_BIG | ( | sc | ) |
◆ WRITE_STATE_SMALL
#define WRITE_STATE_SMALL | ( | sc | ) |
◆ XCAT
◆ XCAT_
Function Documentation
◆ groestl_big_close()
|
static |
Definition at line 2949 of file groestl.c.
References sph_groestl_big_context::buf, count, sph_groestl_big_context::count_high, sph_groestl_big_context::count_low, DECL_STATE_BIG, enc32e, FINAL_BIG, groestl_big_core(), groestl_big_init(), H, memcpy(), sph_groestl_big_context::ptr, READ_STATE_BIG, and SPH_T32.
Referenced by sph_groestl384_addbits_and_close(), sph_groestl384_close(), sph_groestl512_addbits_and_close(), and sph_groestl512_close().
◆ groestl_big_core()
|
static |
Definition at line 2907 of file groestl.c.
References sph_groestl_big_context::buf, COMPRESS_BIG, sph_groestl_big_context::count_high, sph_groestl_big_context::count_low, DECL_STATE_BIG, memcpy(), sph_groestl_big_context::ptr, READ_STATE_BIG, SPH_T32, and WRITE_STATE_BIG.
Referenced by groestl_big_close(), sph_groestl384(), and sph_groestl512().
◆ groestl_big_init()
|
static |
Definition at line 2874 of file groestl.c.
References sph_groestl_big_context::count_high, sph_groestl_big_context::count_low, sph_groestl_big_context::narrow, sph_groestl_big_context::ptr, and sph_groestl_big_context::state.
Referenced by groestl_big_close(), sph_groestl384_init(), and sph_groestl512_init().
◆ groestl_small_close()
|
static |
Definition at line 2813 of file groestl.c.
References sph_groestl_small_context::buf, count, sph_groestl_small_context::count_high, sph_groestl_small_context::count_low, DECL_STATE_SMALL, enc32e, FINAL_SMALL, groestl_small_core(), groestl_small_init(), H, memcpy(), sph_groestl_small_context::ptr, READ_STATE_SMALL, and SPH_T32.
Referenced by sph_groestl224_addbits_and_close(), sph_groestl224_close(), sph_groestl256_addbits_and_close(), and sph_groestl256_close().
◆ groestl_small_core()
|
static |
Definition at line 2771 of file groestl.c.
References sph_groestl_small_context::buf, COMPRESS_SMALL, sph_groestl_small_context::count_high, sph_groestl_small_context::count_low, DECL_STATE_SMALL, memcpy(), sph_groestl_small_context::ptr, READ_STATE_SMALL, SPH_T32, and WRITE_STATE_SMALL.
Referenced by groestl_small_close(), sph_groestl224(), and sph_groestl256().
◆ groestl_small_init()
|
static |
Definition at line 2738 of file groestl.c.
References sph_groestl_small_context::count_high, sph_groestl_small_context::count_low, sph_groestl_small_context::narrow, sph_groestl_small_context::ptr, and sph_groestl_small_context::state.
Referenced by groestl_small_close(), sph_groestl224_init(), and sph_groestl256_init().
◆ sph_groestl224()
void sph_groestl224 | ( | 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
-
cc the Groestl-224 context data the input data len the input data length (in bytes)
Definition at line 3018 of file groestl.c.
References groestl_small_core().
◆ sph_groestl224_addbits_and_close()
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.
- Parameters
-
cc the Groestl-224 context ub the extra bits n the number of extra bits (0 to 7) dst the destination buffer
Definition at line 3032 of file groestl.c.
References groestl_small_close().
◆ sph_groestl224_close()
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.
- Parameters
-
cc the Groestl-224 context dst the destination buffer
Definition at line 3025 of file groestl.c.
References groestl_small_close().
◆ sph_groestl224_init()
void sph_groestl224_init | ( | void * | cc | ) |
Initialize a Groestl-224 context.
This process performs no memory allocation.
- Parameters
-
cc the Groestl-224 context (pointer to a sph_groestl224_context
)
Definition at line 3011 of file groestl.c.
References groestl_small_init().
◆ sph_groestl256()
void sph_groestl256 | ( | 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
-
cc the Groestl-256 context data the input data len the input data length (in bytes)
Definition at line 3046 of file groestl.c.
References groestl_small_core().
◆ sph_groestl256_addbits_and_close()
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.
- Parameters
-
cc the Groestl-256 context ub the extra bits n the number of extra bits (0 to 7) dst the destination buffer
Definition at line 3060 of file groestl.c.
References groestl_small_close().
◆ sph_groestl256_close()
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.
- Parameters
-
cc the Groestl-256 context dst the destination buffer
Definition at line 3053 of file groestl.c.
References groestl_small_close().
◆ sph_groestl256_init()
void sph_groestl256_init | ( | void * | cc | ) |
Initialize a Groestl-256 context.
This process performs no memory allocation.
- Parameters
-
cc the Groestl-256 context (pointer to a sph_groestl256_context
)
Definition at line 3039 of file groestl.c.
References groestl_small_init().
◆ sph_groestl384()
void sph_groestl384 | ( | 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
-
cc the Groestl-384 context data the input data len the input data length (in bytes)
Definition at line 3074 of file groestl.c.
References groestl_big_core().
◆ sph_groestl384_addbits_and_close()
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.
- Parameters
-
cc the Groestl-384 context ub the extra bits n the number of extra bits (0 to 7) dst the destination buffer
Definition at line 3088 of file groestl.c.
References groestl_big_close().
◆ sph_groestl384_close()
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.
- Parameters
-
cc the Groestl-384 context dst the destination buffer
Definition at line 3081 of file groestl.c.
References groestl_big_close().
◆ sph_groestl384_init()
void sph_groestl384_init | ( | void * | cc | ) |
Initialize a Groestl-384 context.
This process performs no memory allocation.
- Parameters
-
cc the Groestl-384 context (pointer to a sph_groestl384_context
)
Definition at line 3067 of file groestl.c.
References groestl_big_init().
◆ sph_groestl512()
void sph_groestl512 | ( | 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
-
cc the Groestl-512 context data the input data len the input data length (in bytes)
Definition at line 3102 of file groestl.c.
References groestl_big_core().
Referenced by HashX11().
◆ sph_groestl512_addbits_and_close()
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.
- Parameters
-
cc the Groestl-512 context ub the extra bits n the number of extra bits (0 to 7) dst the destination buffer
Definition at line 3116 of file groestl.c.
References groestl_big_close().
◆ sph_groestl512_close()
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.
- Parameters
-
cc the Groestl-512 context dst the destination buffer
Definition at line 3109 of file groestl.c.
References groestl_big_close().
Referenced by HashX11().
◆ sph_groestl512_init()
void sph_groestl512_init | ( | void * | cc | ) |
Initialize a Groestl-512 context.
This process performs no memory allocation.
- Parameters
-
cc the Groestl-512 context (pointer to a sph_groestl512_context
)
Definition at line 3095 of file groestl.c.
References groestl_big_init().
Referenced by HashX11().