![]() |
Raven Core
3.0.0
P2P Digital Currency
|
Go to the source code of this file.
Macros | |
#define | C32 SPH_C32 |
#define | T32 SPH_T32 |
#define | ROL32 SPH_ROTL32 |
#define | XCAT(x, y) XCAT_(x, y) |
#define | XCAT_(x, y) x ## y |
#define | REDS1(x) (((x) & 0xFF) - ((x) >> 8)) |
#define | REDS2(x) (((x) & 0xFFFF) + ((x) >> 16)) |
#define | FFT_LOOP(rb, hk, as, id) |
#define | FFT8(xb, xs, d) |
#define | FFT16(xb, xs, rb) |
#define | FFT32(xb, xs, rb, id) |
#define | FFT64(xb, xs, rb, id) |
#define | FFT128(xb, xs, rb, id) |
#define | FFT256(xb, xs, rb, id) |
#define | INNER(l, h, mm) |
#define | W_SMALL(sb, o1, o2, mm) |
#define | WS_0_0 W_SMALL( 4, 0, 1, 185) |
#define | WS_0_1 W_SMALL( 6, 0, 1, 185) |
#define | WS_0_2 W_SMALL( 0, 0, 1, 185) |
#define | WS_0_3 W_SMALL( 2, 0, 1, 185) |
#define | WS_0_4 W_SMALL( 7, 0, 1, 185) |
#define | WS_0_5 W_SMALL( 5, 0, 1, 185) |
#define | WS_0_6 W_SMALL( 3, 0, 1, 185) |
#define | WS_0_7 W_SMALL( 1, 0, 1, 185) |
#define | WS_1_0 W_SMALL(15, 0, 1, 185) |
#define | WS_1_1 W_SMALL(11, 0, 1, 185) |
#define | WS_1_2 W_SMALL(12, 0, 1, 185) |
#define | WS_1_3 W_SMALL( 8, 0, 1, 185) |
#define | WS_1_4 W_SMALL( 9, 0, 1, 185) |
#define | WS_1_5 W_SMALL(13, 0, 1, 185) |
#define | WS_1_6 W_SMALL(10, 0, 1, 185) |
#define | WS_1_7 W_SMALL(14, 0, 1, 185) |
#define | WS_2_0 W_SMALL(17, -128, -64, 233) |
#define | WS_2_1 W_SMALL(18, -128, -64, 233) |
#define | WS_2_2 W_SMALL(23, -128, -64, 233) |
#define | WS_2_3 W_SMALL(20, -128, -64, 233) |
#define | WS_2_4 W_SMALL(22, -128, -64, 233) |
#define | WS_2_5 W_SMALL(21, -128, -64, 233) |
#define | WS_2_6 W_SMALL(16, -128, -64, 233) |
#define | WS_2_7 W_SMALL(19, -128, -64, 233) |
#define | WS_3_0 W_SMALL(30, -191, -127, 233) |
#define | WS_3_1 W_SMALL(24, -191, -127, 233) |
#define | WS_3_2 W_SMALL(25, -191, -127, 233) |
#define | WS_3_3 W_SMALL(31, -191, -127, 233) |
#define | WS_3_4 W_SMALL(27, -191, -127, 233) |
#define | WS_3_5 W_SMALL(29, -191, -127, 233) |
#define | WS_3_6 W_SMALL(28, -191, -127, 233) |
#define | WS_3_7 W_SMALL(26, -191, -127, 233) |
#define | W_BIG(sb, o1, o2, mm) |
#define | WB_0_0 W_BIG( 4, 0, 1, 185) |
#define | WB_0_1 W_BIG( 6, 0, 1, 185) |
#define | WB_0_2 W_BIG( 0, 0, 1, 185) |
#define | WB_0_3 W_BIG( 2, 0, 1, 185) |
#define | WB_0_4 W_BIG( 7, 0, 1, 185) |
#define | WB_0_5 W_BIG( 5, 0, 1, 185) |
#define | WB_0_6 W_BIG( 3, 0, 1, 185) |
#define | WB_0_7 W_BIG( 1, 0, 1, 185) |
#define | WB_1_0 W_BIG(15, 0, 1, 185) |
#define | WB_1_1 W_BIG(11, 0, 1, 185) |
#define | WB_1_2 W_BIG(12, 0, 1, 185) |
#define | WB_1_3 W_BIG( 8, 0, 1, 185) |
#define | WB_1_4 W_BIG( 9, 0, 1, 185) |
#define | WB_1_5 W_BIG(13, 0, 1, 185) |
#define | WB_1_6 W_BIG(10, 0, 1, 185) |
#define | WB_1_7 W_BIG(14, 0, 1, 185) |
#define | WB_2_0 W_BIG(17, -256, -128, 233) |
#define | WB_2_1 W_BIG(18, -256, -128, 233) |
#define | WB_2_2 W_BIG(23, -256, -128, 233) |
#define | WB_2_3 W_BIG(20, -256, -128, 233) |
#define | WB_2_4 W_BIG(22, -256, -128, 233) |
#define | WB_2_5 W_BIG(21, -256, -128, 233) |
#define | WB_2_6 W_BIG(16, -256, -128, 233) |
#define | WB_2_7 W_BIG(19, -256, -128, 233) |
#define | WB_3_0 W_BIG(30, -383, -255, 233) |
#define | WB_3_1 W_BIG(24, -383, -255, 233) |
#define | WB_3_2 W_BIG(25, -383, -255, 233) |
#define | WB_3_3 W_BIG(31, -383, -255, 233) |
#define | WB_3_4 W_BIG(27, -383, -255, 233) |
#define | WB_3_5 W_BIG(29, -383, -255, 233) |
#define | WB_3_6 W_BIG(28, -383, -255, 233) |
#define | WB_3_7 W_BIG(26, -383, -255, 233) |
#define | IF(x, y, z) ((((y) ^ (z)) & (x)) ^ (z)) |
#define | MAJ(x, y, z) (((x) & (y)) | (((x) | (y)) & (z))) |
#define | PP4_0_0 1 |
#define | PP4_0_1 0 |
#define | PP4_0_2 3 |
#define | PP4_0_3 2 |
#define | PP4_1_0 2 |
#define | PP4_1_1 3 |
#define | PP4_1_2 0 |
#define | PP4_1_3 1 |
#define | PP4_2_0 3 |
#define | PP4_2_1 2 |
#define | PP4_2_2 1 |
#define | PP4_2_3 0 |
#define | PP8_0_0 1 |
#define | PP8_0_1 0 |
#define | PP8_0_2 3 |
#define | PP8_0_3 2 |
#define | PP8_0_4 5 |
#define | PP8_0_5 4 |
#define | PP8_0_6 7 |
#define | PP8_0_7 6 |
#define | PP8_1_0 6 |
#define | PP8_1_1 7 |
#define | PP8_1_2 4 |
#define | PP8_1_3 5 |
#define | PP8_1_4 2 |
#define | PP8_1_5 3 |
#define | PP8_1_6 0 |
#define | PP8_1_7 1 |
#define | PP8_2_0 2 |
#define | PP8_2_1 3 |
#define | PP8_2_2 0 |
#define | PP8_2_3 1 |
#define | PP8_2_4 6 |
#define | PP8_2_5 7 |
#define | PP8_2_6 4 |
#define | PP8_2_7 5 |
#define | PP8_3_0 3 |
#define | PP8_3_1 2 |
#define | PP8_3_2 1 |
#define | PP8_3_3 0 |
#define | PP8_3_4 7 |
#define | PP8_3_5 6 |
#define | PP8_3_6 5 |
#define | PP8_3_7 4 |
#define | PP8_4_0 5 |
#define | PP8_4_1 4 |
#define | PP8_4_2 7 |
#define | PP8_4_3 6 |
#define | PP8_4_4 1 |
#define | PP8_4_5 0 |
#define | PP8_4_6 3 |
#define | PP8_4_7 2 |
#define | PP8_5_0 7 |
#define | PP8_5_1 6 |
#define | PP8_5_2 5 |
#define | PP8_5_3 4 |
#define | PP8_5_4 3 |
#define | PP8_5_5 2 |
#define | PP8_5_6 1 |
#define | PP8_5_7 0 |
#define | PP8_6_0 4 |
#define | PP8_6_1 5 |
#define | PP8_6_2 6 |
#define | PP8_6_3 7 |
#define | PP8_6_4 0 |
#define | PP8_6_5 1 |
#define | PP8_6_6 2 |
#define | PP8_6_7 3 |
#define | DECL_STATE_SMALL u32 A0, A1, A2, A3, B0, B1, B2, B3, C0, C1, C2, C3, D0, D1, D2, D3; |
#define | READ_STATE_SMALL(sc) |
#define | WRITE_STATE_SMALL(sc) |
#define | DECL_STATE_BIG |
#define | READ_STATE_BIG(sc) |
#define | WRITE_STATE_BIG(sc) |
#define | STEP_ELT(n, w, fun, s, ppb) |
#define | STEP_SMALL(w0, w1, w2, w3, fun, r, s, pp4b) |
#define | STEP_BIG(w0, w1, w2, w3, w4, w5, w6, w7, fun, r, s, pp8b) |
#define | M3_0_0 0_ |
#define | M3_1_0 1_ |
#define | M3_2_0 2_ |
#define | M3_3_0 0_ |
#define | M3_4_0 1_ |
#define | M3_5_0 2_ |
#define | M3_6_0 0_ |
#define | M3_7_0 1_ |
#define | M3_0_1 1_ |
#define | M3_1_1 2_ |
#define | M3_2_1 0_ |
#define | M3_3_1 1_ |
#define | M3_4_1 2_ |
#define | M3_5_1 0_ |
#define | M3_6_1 1_ |
#define | M3_7_1 2_ |
#define | M3_0_2 2_ |
#define | M3_1_2 0_ |
#define | M3_2_2 1_ |
#define | M3_3_2 2_ |
#define | M3_4_2 0_ |
#define | M3_5_2 1_ |
#define | M3_6_2 2_ |
#define | M3_7_2 0_ |
#define | STEP_SMALL_(w, fun, r, s, pp4b) STEP_SMALL w, fun, r, s, pp4b) |
#define | ONE_ROUND_SMALL(ri, isp, p0, p1, p2, p3) |
#define | M7_0_0 0_ |
#define | M7_1_0 1_ |
#define | M7_2_0 2_ |
#define | M7_3_0 3_ |
#define | M7_4_0 4_ |
#define | M7_5_0 5_ |
#define | M7_6_0 6_ |
#define | M7_7_0 0_ |
#define | M7_0_1 1_ |
#define | M7_1_1 2_ |
#define | M7_2_1 3_ |
#define | M7_3_1 4_ |
#define | M7_4_1 5_ |
#define | M7_5_1 6_ |
#define | M7_6_1 0_ |
#define | M7_7_1 1_ |
#define | M7_0_2 2_ |
#define | M7_1_2 3_ |
#define | M7_2_2 4_ |
#define | M7_3_2 5_ |
#define | M7_4_2 6_ |
#define | M7_5_2 0_ |
#define | M7_6_2 1_ |
#define | M7_7_2 2_ |
#define | M7_0_3 3_ |
#define | M7_1_3 4_ |
#define | M7_2_3 5_ |
#define | M7_3_3 6_ |
#define | M7_4_3 0_ |
#define | M7_5_3 1_ |
#define | M7_6_3 2_ |
#define | M7_7_3 3_ |
#define | STEP_BIG_(w, fun, r, s, pp8b) STEP_BIG w, fun, r, s, pp8b) |
#define | ONE_ROUND_BIG(ri, isp, p0, p1, p2, p3) |
Typedefs | |
typedef sph_u32 | u32 |
typedef sph_s32 | s32 |
Functions | |
void | sph_simd224_init (void *cc) |
Initialize an SIMD-224 context. More... | |
void | sph_simd224 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_simd224_close (void *cc, void *dst) |
Terminate the current SIMD-224 computation and output the result into the provided buffer. More... | |
void | sph_simd224_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_simd256_init (void *cc) |
Initialize an SIMD-256 context. More... | |
void | sph_simd256 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_simd256_close (void *cc, void *dst) |
Terminate the current SIMD-256 computation and output the result into the provided buffer. More... | |
void | sph_simd256_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_simd384_init (void *cc) |
Initialize an SIMD-384 context. More... | |
void | sph_simd384 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_simd384_close (void *cc, void *dst) |
Terminate the current SIMD-384 computation and output the result into the provided buffer. More... | |
void | sph_simd384_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_simd512_init (void *cc) |
Initialize an SIMD-512 context. More... | |
void | sph_simd512 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_simd512_close (void *cc, void *dst) |
Terminate the current SIMD-512 computation and output the result into the provided buffer. More... | |
void | sph_simd512_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 |
#define DECL_STATE_SMALL u32 A0, A1, A2, A3, B0, B1, B2, B3, C0, C1, C2, C3, D0, D1, D2, D3; |
#define FFT128 | ( | xb, | |
xs, | |||
rb, | |||
id | |||
) |
#define FFT16 | ( | xb, | |
xs, | |||
rb | |||
) |
#define FFT256 | ( | xb, | |
xs, | |||
rb, | |||
id | |||
) |
#define FFT32 | ( | xb, | |
xs, | |||
rb, | |||
id | |||
) |
#define FFT64 | ( | xb, | |
xs, | |||
rb, | |||
id | |||
) |
#define FFT8 | ( | xb, | |
xs, | |||
d | |||
) |
#define INNER | ( | l, | |
h, | |||
mm | |||
) |
#define ONE_ROUND_BIG | ( | ri, | |
isp, | |||
p0, | |||
p1, | |||
p2, | |||
p3 | |||
) |
#define ONE_ROUND_SMALL | ( | ri, | |
isp, | |||
p0, | |||
p1, | |||
p2, | |||
p3 | |||
) |
#define READ_STATE_SMALL | ( | sc | ) |
#define ROL32 SPH_ROTL32 |
#define STEP_BIG | ( | w0, | |
w1, | |||
w2, | |||
w3, | |||
w4, | |||
w5, | |||
w6, | |||
w7, | |||
fun, | |||
r, | |||
s, | |||
pp8b | |||
) |
#define STEP_BIG_ | ( | w, | |
fun, | |||
r, | |||
s, | |||
pp8b | |||
) | STEP_BIG w, fun, r, s, pp8b) |
#define STEP_ELT | ( | n, | |
w, | |||
fun, | |||
s, | |||
ppb | |||
) |
#define STEP_SMALL | ( | w0, | |
w1, | |||
w2, | |||
w3, | |||
fun, | |||
r, | |||
s, | |||
pp4b | |||
) |
#define STEP_SMALL_ | ( | w, | |
fun, | |||
r, | |||
s, | |||
pp4b | |||
) | STEP_SMALL w, fun, r, s, pp4b) |
#define W_BIG | ( | sb, | |
o1, | |||
o2, | |||
mm | |||
) |
#define W_SMALL | ( | sb, | |
o1, | |||
o2, | |||
mm | |||
) |
#define WRITE_STATE_SMALL | ( | sc | ) |
void sph_simd224 | ( | void * | cc, |
const void * | data, | ||
size_t | len | ||
) |
void sph_simd224_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 SIMD-224 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
Definition at line 1717 of file simd.c.
void sph_simd224_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current SIMD-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 SIMD-224 context |
dst | the destination buffer |
Definition at line 1711 of file simd.c.
void sph_simd224_init | ( | void * | cc | ) |
void sph_simd256 | ( | void * | cc, |
const void * | data, | ||
size_t | len | ||
) |
void sph_simd256_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 SIMD-256 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
Definition at line 1742 of file simd.c.
void sph_simd256_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current SIMD-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 SIMD-256 context |
dst | the destination buffer |
Definition at line 1736 of file simd.c.
void sph_simd256_init | ( | void * | cc | ) |
void sph_simd384 | ( | void * | cc, |
const void * | data, | ||
size_t | len | ||
) |
void sph_simd384_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 SIMD-384 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
Definition at line 1767 of file simd.c.
void sph_simd384_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current SIMD-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 SIMD-384 context |
dst | the destination buffer |
Definition at line 1761 of file simd.c.
void sph_simd384_init | ( | void * | cc | ) |
void sph_simd512 | ( | void * | cc, |
const void * | data, | ||
size_t | len | ||
) |
void sph_simd512_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 SIMD-512 context |
ub | the extra bits |
n | the number of extra bits (0 to 7) |
dst | the destination buffer |
Definition at line 1792 of file simd.c.
void sph_simd512_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current SIMD-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 SIMD-512 context |
dst | the destination buffer |
Definition at line 1786 of file simd.c.