Raven Core
3.0.0
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 | |
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... | |
#define COMPRESS_BIG |
#define COMPRESS_SMALL |
#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 | ) |
#define READ_STATE_SMALL | ( | sc | ) |
#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 | ) |
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.