Raven Core
3.0.0
P2P Digital Currency
|
Go to the source code of this file.
Macros | |
#define | SPH_HAMSI_EXPAND_SMALL 8 |
#define | SPH_HAMSI_EXPAND_BIG 8 |
#define | DECL_STATE_SMALL sph_u32 c0, c1, c2, c3, c4, c5, c6, c7; |
#define | READ_STATE_SMALL(sc) |
#define | WRITE_STATE_SMALL(sc) |
#define | s0 m0 |
#define | s1 m1 |
#define | s2 c0 |
#define | s3 c1 |
#define | s4 c2 |
#define | s5 c3 |
#define | s6 m2 |
#define | s7 m3 |
#define | s8 m4 |
#define | s9 m5 |
#define | sA c4 |
#define | sB c5 |
#define | sC c6 |
#define | sD c7 |
#define | sE m6 |
#define | sF m7 |
#define | SBOX(a, b, c, d) |
#define | L(a, b, c, d) |
#define | ROUND_SMALL(rc, alpha) |
#define | P_SMALL |
#define | PF_SMALL |
#define | T_SMALL |
#define | DECL_STATE_BIG |
#define | READ_STATE_BIG(sc) |
#define | WRITE_STATE_BIG(sc) |
#define | s00 m0 |
#define | s01 m1 |
#define | s02 c0 |
#define | s03 c1 |
#define | s04 m2 |
#define | s05 m3 |
#define | s06 c2 |
#define | s07 c3 |
#define | s08 c4 |
#define | s09 c5 |
#define | s0A m4 |
#define | s0B m5 |
#define | s0C c6 |
#define | s0D c7 |
#define | s0E m6 |
#define | s0F m7 |
#define | s10 m8 |
#define | s11 m9 |
#define | s12 c8 |
#define | s13 c9 |
#define | s14 mA |
#define | s15 mB |
#define | s16 cA |
#define | s17 cB |
#define | s18 cC |
#define | s19 cD |
#define | s1A mC |
#define | s1B mD |
#define | s1C cE |
#define | s1D cF |
#define | s1E mE |
#define | s1F mF |
#define | ROUND_BIG(rc, alpha) |
#define | P_BIG |
#define | PF_BIG |
#define | T_BIG |
Functions | |
void | sph_hamsi224_init (void *cc) |
Initialize a Hamsi-224 context. More... | |
void | sph_hamsi224 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_hamsi224_close (void *cc, void *dst) |
Terminate the current Hamsi-224 computation and output the result into the provided buffer. More... | |
void | sph_hamsi224_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_hamsi256_init (void *cc) |
Initialize a Hamsi-256 context. More... | |
void | sph_hamsi256 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_hamsi256_close (void *cc, void *dst) |
Terminate the current Hamsi-256 computation and output the result into the provided buffer. More... | |
void | sph_hamsi256_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_hamsi384_init (void *cc) |
Initialize a Hamsi-384 context. More... | |
void | sph_hamsi384 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_hamsi384_close (void *cc, void *dst) |
Terminate the current Hamsi-384 computation and output the result into the provided buffer. More... | |
void | sph_hamsi384_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_hamsi512_init (void *cc) |
Initialize a Hamsi-512 context. More... | |
void | sph_hamsi512 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_hamsi512_close (void *cc, void *dst) |
Terminate the current Hamsi-512 computation and output the result into the provided buffer. More... | |
void | sph_hamsi512_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 DECL_STATE_BIG |
Definition at line 428 of file sph_hamsi.c.
#define DECL_STATE_SMALL sph_u32 c0, c1, c2, c3, c4, c5, c6, c7; |
Definition at line 187 of file sph_hamsi.c.
#define L | ( | a, | |
b, | |||
c, | |||
d | |||
) |
Definition at line 252 of file sph_hamsi.c.
#define P_BIG |
Definition at line 574 of file sph_hamsi.c.
#define P_SMALL |
Definition at line 292 of file sph_hamsi.c.
#define PF_BIG |
Definition at line 583 of file sph_hamsi.c.
#define PF_SMALL |
Definition at line 298 of file sph_hamsi.c.
#define READ_STATE_BIG | ( | sc | ) |
Definition at line 432 of file sph_hamsi.c.
#define READ_STATE_SMALL | ( | sc | ) |
Definition at line 190 of file sph_hamsi.c.
#define ROUND_BIG | ( | rc, | |
alpha | |||
) |
Definition at line 503 of file sph_hamsi.c.
#define ROUND_SMALL | ( | rc, | |
alpha | |||
) |
Definition at line 265 of file sph_hamsi.c.
#define s0 m0 |
Definition at line 212 of file sph_hamsi.c.
#define s00 m0 |
Definition at line 470 of file sph_hamsi.c.
#define s01 m1 |
Definition at line 471 of file sph_hamsi.c.
#define s02 c0 |
Definition at line 472 of file sph_hamsi.c.
#define s03 c1 |
Definition at line 473 of file sph_hamsi.c.
#define s04 m2 |
Definition at line 474 of file sph_hamsi.c.
#define s05 m3 |
Definition at line 475 of file sph_hamsi.c.
#define s06 c2 |
Definition at line 476 of file sph_hamsi.c.
#define s07 c3 |
Definition at line 477 of file sph_hamsi.c.
#define s08 c4 |
Definition at line 478 of file sph_hamsi.c.
#define s09 c5 |
Definition at line 479 of file sph_hamsi.c.
#define s0A m4 |
Definition at line 480 of file sph_hamsi.c.
#define s0B m5 |
Definition at line 481 of file sph_hamsi.c.
#define s0C c6 |
Definition at line 482 of file sph_hamsi.c.
#define s0D c7 |
Definition at line 483 of file sph_hamsi.c.
#define s0E m6 |
Definition at line 484 of file sph_hamsi.c.
#define s0F m7 |
Definition at line 485 of file sph_hamsi.c.
#define s1 m1 |
Definition at line 213 of file sph_hamsi.c.
#define s10 m8 |
Definition at line 486 of file sph_hamsi.c.
#define s11 m9 |
Definition at line 487 of file sph_hamsi.c.
#define s12 c8 |
Definition at line 488 of file sph_hamsi.c.
#define s13 c9 |
Definition at line 489 of file sph_hamsi.c.
#define s14 mA |
Definition at line 490 of file sph_hamsi.c.
#define s15 mB |
Definition at line 491 of file sph_hamsi.c.
#define s16 cA |
Definition at line 492 of file sph_hamsi.c.
#define s17 cB |
Definition at line 493 of file sph_hamsi.c.
#define s18 cC |
Definition at line 494 of file sph_hamsi.c.
#define s19 cD |
Definition at line 495 of file sph_hamsi.c.
#define s1A mC |
Definition at line 496 of file sph_hamsi.c.
#define s1B mD |
Definition at line 497 of file sph_hamsi.c.
#define s1C cE |
Definition at line 498 of file sph_hamsi.c.
#define s1D cF |
Definition at line 499 of file sph_hamsi.c.
#define s1E mE |
Definition at line 500 of file sph_hamsi.c.
#define s1F mF |
Definition at line 501 of file sph_hamsi.c.
#define s2 c0 |
Definition at line 214 of file sph_hamsi.c.
#define s3 c1 |
Definition at line 215 of file sph_hamsi.c.
#define s4 c2 |
Definition at line 216 of file sph_hamsi.c.
#define s5 c3 |
Definition at line 217 of file sph_hamsi.c.
#define s6 m2 |
Definition at line 218 of file sph_hamsi.c.
#define s7 m3 |
Definition at line 219 of file sph_hamsi.c.
#define s8 m4 |
Definition at line 220 of file sph_hamsi.c.
#define s9 m5 |
Definition at line 221 of file sph_hamsi.c.
#define sA c4 |
Definition at line 222 of file sph_hamsi.c.
#define sB c5 |
Definition at line 223 of file sph_hamsi.c.
#define SBOX | ( | a, | |
b, | |||
c, | |||
d | |||
) |
Definition at line 229 of file sph_hamsi.c.
#define sC c6 |
Definition at line 224 of file sph_hamsi.c.
#define sD c7 |
Definition at line 225 of file sph_hamsi.c.
#define sE m6 |
Definition at line 226 of file sph_hamsi.c.
#define sF m7 |
Definition at line 227 of file sph_hamsi.c.
#define SPH_HAMSI_EXPAND_BIG 8 |
Definition at line 108 of file sph_hamsi.c.
#define SPH_HAMSI_EXPAND_SMALL 8 |
Definition at line 103 of file sph_hamsi.c.
#define T_BIG |
Definition at line 600 of file sph_hamsi.c.
#define T_SMALL |
#define WRITE_STATE_BIG | ( | sc | ) |
Definition at line 451 of file sph_hamsi.c.
#define WRITE_STATE_SMALL | ( | sc | ) |
Definition at line 201 of file sph_hamsi.c.
void sph_hamsi224 | ( | 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).
cc | the Hamsi-224 context |
data | the input data |
len | the input data length (in bytes) |
Definition at line 754 of file sph_hamsi.c.
void sph_hamsi224_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 Hamsi-224 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
Definition at line 769 of file sph_hamsi.c.
void sph_hamsi224_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current Hamsi-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 Hamsi-224 context |
dst | the destination buffer |
Definition at line 761 of file sph_hamsi.c.
void sph_hamsi224_init | ( | void * | cc | ) |
Initialize a Hamsi-224 context.
This process performs no memory allocation.
cc | the Hamsi-224 context (pointer to a sph_hamsi224_context ) |
Definition at line 747 of file sph_hamsi.c.
void sph_hamsi256 | ( | 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).
cc | the Hamsi-256 context |
data | the input data |
len | the input data length (in bytes) |
Definition at line 784 of file sph_hamsi.c.
void sph_hamsi256_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 Hamsi-256 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
Definition at line 799 of file sph_hamsi.c.
void sph_hamsi256_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current Hamsi-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 Hamsi-256 context |
dst | the destination buffer |
Definition at line 791 of file sph_hamsi.c.
void sph_hamsi256_init | ( | void * | cc | ) |
Initialize a Hamsi-256 context.
This process performs no memory allocation.
cc | the Hamsi-256 context (pointer to a sph_hamsi256_context ) |
Definition at line 777 of file sph_hamsi.c.
void sph_hamsi384 | ( | 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).
cc | the Hamsi-384 context |
data | the input data |
len | the input data length (in bytes) |
Definition at line 814 of file sph_hamsi.c.
void sph_hamsi384_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 Hamsi-384 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
Definition at line 829 of file sph_hamsi.c.
void sph_hamsi384_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current Hamsi-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 Hamsi-384 context |
dst | the destination buffer |
Definition at line 821 of file sph_hamsi.c.
void sph_hamsi384_init | ( | void * | cc | ) |
Initialize a Hamsi-384 context.
This process performs no memory allocation.
cc | the Hamsi-384 context (pointer to a sph_hamsi384_context ) |
Definition at line 807 of file sph_hamsi.c.
void sph_hamsi512 | ( | 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).
cc | the Hamsi-512 context |
data | the input data |
len | the input data length (in bytes) |
Definition at line 844 of file sph_hamsi.c.
void sph_hamsi512_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 Hamsi-512 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
Definition at line 859 of file sph_hamsi.c.
void sph_hamsi512_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current Hamsi-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 Hamsi-512 context |
dst | the destination buffer |
Definition at line 851 of file sph_hamsi.c.
void sph_hamsi512_init | ( | void * | cc | ) |
Initialize a Hamsi-512 context.
This process performs no memory allocation.
cc | the Hamsi-512 context (pointer to a sph_hamsi512_context ) |
Definition at line 837 of file sph_hamsi.c.