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_KECCAK_INTERLEAVE 1 |
#define | SPH_KECCAK_UNROLL 8 |
#define | SPH_KECCAK_NOCOPY 0 |
#define | INTERLEAVE(xl, xh) |
#define | UNINTERLEAVE(xl, xh) |
#define | DECL_STATE |
#define | READ_STATE(state) |
#define | WRITE_STATE(state) |
#define | READ64(d, off) |
#define | INPUT_BUF144 |
#define | INPUT_BUF136 |
#define | INPUT_BUF104 |
#define | INPUT_BUF72 |
#define | INPUT_BUF(lim) |
#define | DECL64(x) sph_u64 x ## l, x ## h |
#define | MOV64(d, s) (d ## l = s ## l, d ## h = s ## h) |
#define | XOR64(d, a, b) (d ## l = a ## l ^ b ## l, d ## h = a ## h ^ b ## h) |
#define | AND64(d, a, b) (d ## l = a ## l & b ## l, d ## h = a ## h & b ## h) |
#define | OR64(d, a, b) (d ## l = a ## l | b ## l, d ## h = a ## h | b ## h) |
#define | NOT64(d, s) (d ## l = SPH_T32(~s ## l), d ## h = SPH_T32(~s ## h)) |
#define | ROL64(d, v, n) ROL64_ ## n(d, v) |
#define | ROL64_odd1(d, v) |
#define | ROL64_odd63(d, v) |
#define | ROL64_odd(d, v, n) |
#define | ROL64_even(d, v, n) |
#define | ROL64_0(d, v) |
#define | ROL64_1(d, v) ROL64_odd1(d, v) |
#define | ROL64_2(d, v) ROL64_even(d, v, 1) |
#define | ROL64_3(d, v) ROL64_odd( d, v, 2) |
#define | ROL64_4(d, v) ROL64_even(d, v, 2) |
#define | ROL64_5(d, v) ROL64_odd( d, v, 3) |
#define | ROL64_6(d, v) ROL64_even(d, v, 3) |
#define | ROL64_7(d, v) ROL64_odd( d, v, 4) |
#define | ROL64_8(d, v) ROL64_even(d, v, 4) |
#define | ROL64_9(d, v) ROL64_odd( d, v, 5) |
#define | ROL64_10(d, v) ROL64_even(d, v, 5) |
#define | ROL64_11(d, v) ROL64_odd( d, v, 6) |
#define | ROL64_12(d, v) ROL64_even(d, v, 6) |
#define | ROL64_13(d, v) ROL64_odd( d, v, 7) |
#define | ROL64_14(d, v) ROL64_even(d, v, 7) |
#define | ROL64_15(d, v) ROL64_odd( d, v, 8) |
#define | ROL64_16(d, v) ROL64_even(d, v, 8) |
#define | ROL64_17(d, v) ROL64_odd( d, v, 9) |
#define | ROL64_18(d, v) ROL64_even(d, v, 9) |
#define | ROL64_19(d, v) ROL64_odd( d, v, 10) |
#define | ROL64_20(d, v) ROL64_even(d, v, 10) |
#define | ROL64_21(d, v) ROL64_odd( d, v, 11) |
#define | ROL64_22(d, v) ROL64_even(d, v, 11) |
#define | ROL64_23(d, v) ROL64_odd( d, v, 12) |
#define | ROL64_24(d, v) ROL64_even(d, v, 12) |
#define | ROL64_25(d, v) ROL64_odd( d, v, 13) |
#define | ROL64_26(d, v) ROL64_even(d, v, 13) |
#define | ROL64_27(d, v) ROL64_odd( d, v, 14) |
#define | ROL64_28(d, v) ROL64_even(d, v, 14) |
#define | ROL64_29(d, v) ROL64_odd( d, v, 15) |
#define | ROL64_30(d, v) ROL64_even(d, v, 15) |
#define | ROL64_31(d, v) ROL64_odd( d, v, 16) |
#define | ROL64_32(d, v) ROL64_even(d, v, 16) |
#define | ROL64_33(d, v) ROL64_odd( d, v, 17) |
#define | ROL64_34(d, v) ROL64_even(d, v, 17) |
#define | ROL64_35(d, v) ROL64_odd( d, v, 18) |
#define | ROL64_36(d, v) ROL64_even(d, v, 18) |
#define | ROL64_37(d, v) ROL64_odd( d, v, 19) |
#define | ROL64_38(d, v) ROL64_even(d, v, 19) |
#define | ROL64_39(d, v) ROL64_odd( d, v, 20) |
#define | ROL64_40(d, v) ROL64_even(d, v, 20) |
#define | ROL64_41(d, v) ROL64_odd( d, v, 21) |
#define | ROL64_42(d, v) ROL64_even(d, v, 21) |
#define | ROL64_43(d, v) ROL64_odd( d, v, 22) |
#define | ROL64_44(d, v) ROL64_even(d, v, 22) |
#define | ROL64_45(d, v) ROL64_odd( d, v, 23) |
#define | ROL64_46(d, v) ROL64_even(d, v, 23) |
#define | ROL64_47(d, v) ROL64_odd( d, v, 24) |
#define | ROL64_48(d, v) ROL64_even(d, v, 24) |
#define | ROL64_49(d, v) ROL64_odd( d, v, 25) |
#define | ROL64_50(d, v) ROL64_even(d, v, 25) |
#define | ROL64_51(d, v) ROL64_odd( d, v, 26) |
#define | ROL64_52(d, v) ROL64_even(d, v, 26) |
#define | ROL64_53(d, v) ROL64_odd( d, v, 27) |
#define | ROL64_54(d, v) ROL64_even(d, v, 27) |
#define | ROL64_55(d, v) ROL64_odd( d, v, 28) |
#define | ROL64_56(d, v) ROL64_even(d, v, 28) |
#define | ROL64_57(d, v) ROL64_odd( d, v, 29) |
#define | ROL64_58(d, v) ROL64_even(d, v, 29) |
#define | ROL64_59(d, v) ROL64_odd( d, v, 30) |
#define | ROL64_60(d, v) ROL64_even(d, v, 30) |
#define | ROL64_61(d, v) ROL64_odd( d, v, 31) |
#define | ROL64_62(d, v) ROL64_even(d, v, 31) |
#define | ROL64_63(d, v) ROL64_odd63(d, v) |
#define | XOR64_IOTA(d, s, k) (d ## l = s ## l ^ k.low, d ## h = s ## h ^ k.high) |
#define | TH_ELT(t, c0, c1, c2, c3, c4, d0, d1, d2, d3, d4) |
#define | THETA(b00, b01, b02, b03, b04, b10, b11, b12, b13, b14, b20, b21, b22, b23, b24, b30, b31, b32, b33, b34, b40, b41, b42, b43, b44) |
#define | RHO(b00, b01, b02, b03, b04, b10, b11, b12, b13, b14, b20, b21, b22, b23, b24, b30, b31, b32, b33, b34, b40, b41, b42, b43, b44) |
#define | KHI_XO(d, a, b, c) |
#define | KHI_XA(d, a, b, c) |
#define | KHI(b00, b01, b02, b03, b04, b10, b11, b12, b13, b14, b20, b21, b22, b23, b24, b30, b31, b32, b33, b34, b40, b41, b42, b43, b44) |
#define | IOTA(r) XOR64_IOTA(a00, a00, r) |
#define | P0 |
#define | P1 |
#define | P2 |
#define | P3 |
#define | P4 |
#define | P5 |
#define | P6 |
#define | P7 |
#define | P8 |
#define | P9 |
#define | P10 |
#define | P11 |
#define | P12 |
#define | P13 |
#define | P14 |
#define | P15 |
#define | P16 |
#define | P17 |
#define | P18 |
#define | P19 |
#define | P20 |
#define | P21 |
#define | P22 |
#define | P23 |
#define | P1_TO_P0 |
#define | P2_TO_P0 |
#define | P4_TO_P0 |
#define | P6_TO_P0 |
#define | P8_TO_P0 |
#define | P12_TO_P0 |
#define | LPAR ( |
#define | RPAR ) |
#define | KF_ELT(r, s, k) |
#define | DO(x) x |
#define | KECCAK_F_1600 DO(KECCAK_F_1600_) |
#define | KECCAK_F_1600_ |
#define | DEFCLOSE(d, lim) |
Functions | |
static void | keccak_init (sph_keccak_context *kc, unsigned out_size) |
static void | keccak_core (sph_keccak_context *kc, const void *data, size_t len, size_t lim) |
void | sph_keccak224_init (void *cc) |
Initialize a Keccak-224 context. More... | |
void | sph_keccak224 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_keccak224_close (void *cc, void *dst) |
Terminate the current Keccak-224 computation and output the result into the provided buffer. More... | |
void | sph_keccak224_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_keccak256_init (void *cc) |
Initialize a Keccak-256 context. More... | |
void | sph_keccak256 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_keccak256_close (void *cc, void *dst) |
Terminate the current Keccak-256 computation and output the result into the provided buffer. More... | |
void | sph_keccak256_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_keccak384_init (void *cc) |
Initialize a Keccak-384 context. More... | |
void | sph_keccak384 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_keccak384_close (void *cc, void *dst) |
Terminate the current Keccak-384 computation and output the result into the provided buffer. More... | |
void | sph_keccak384_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_keccak512_init (void *cc) |
Initialize a Keccak-512 context. More... | |
void | sph_keccak512 (void *cc, const void *data, size_t len) |
Process some data bytes. More... | |
void | sph_keccak512_close (void *cc, void *dst) |
Terminate the current Keccak-512 computation and output the result into the provided buffer. More... | |
void | sph_keccak512_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 struct { ... } | RC [] |
Macro Definition Documentation
◆ AND64
#define AND64 | ( | d, | |
a, | |||
b | |||
) | (d ## l = a ## l & b ## l, d ## h = a ## h & b ## h) |
◆ DECL64
◆ DECL_STATE
#define DECL_STATE |
Definition at line 542 of file keccak.c.
Referenced by keccak_core().
◆ DEFCLOSE
◆ DO
◆ INPUT_BUF
#define INPUT_BUF | ( | lim | ) |
Definition at line 733 of file keccak.c.
Referenced by keccak_core().
◆ INPUT_BUF104
#define INPUT_BUF104 |
◆ INPUT_BUF136
#define INPUT_BUF136 |
◆ INPUT_BUF144
#define INPUT_BUF144 |
◆ INPUT_BUF72
#define INPUT_BUF72 |
◆ INTERLEAVE
#define INTERLEAVE | ( | xl, | |
xh | |||
) |
◆ IOTA
#define IOTA | ( | r | ) | XOR64_IOTA(a00, a00, r) |
◆ KECCAK_F_1600
#define KECCAK_F_1600 DO(KECCAK_F_1600_) |
Definition at line 1401 of file keccak.c.
Referenced by keccak_core().
◆ KECCAK_F_1600_
#define KECCAK_F_1600_ |
◆ KF_ELT
#define KF_ELT | ( | r, | |
s, | |||
k | |||
) |
◆ KHI
#define KHI | ( | b00, | |
b01, | |||
b02, | |||
b03, | |||
b04, | |||
b10, | |||
b11, | |||
b12, | |||
b13, | |||
b14, | |||
b20, | |||
b21, | |||
b22, | |||
b23, | |||
b24, | |||
b30, | |||
b31, | |||
b32, | |||
b33, | |||
b34, | |||
b40, | |||
b41, | |||
b42, | |||
b43, | |||
b44 | |||
) |
◆ KHI_XA
#define KHI_XA | ( | d, | |
a, | |||
b, | |||
c | |||
) |
◆ KHI_XO
#define KHI_XO | ( | d, | |
a, | |||
b, | |||
c | |||
) |
◆ LPAR
◆ MOV64
◆ NOT64
◆ OR64
#define OR64 | ( | d, | |
a, | |||
b | |||
) | (d ## l = a ## l | b ## l, d ## h = a ## h | b ## h) |
◆ P0
#define P0 |
Definition at line 1139 of file keccak.c.
Referenced by SubBytes().
◆ P1
#define P1 |
Definition at line 1141 of file keccak.c.
Referenced by SubBytes().
◆ P10
#define P10 |
Definition at line 1159 of file keccak.c.
Referenced by SubBytes().
◆ P11
#define P11 |
Definition at line 1161 of file keccak.c.
Referenced by SubBytes().
◆ P12
#define P12 |
Definition at line 1163 of file keccak.c.
Referenced by SubBytes().
◆ P12_TO_P0
◆ P13
#define P13 |
Definition at line 1165 of file keccak.c.
Referenced by SubBytes().
◆ P14
#define P14 |
Definition at line 1167 of file keccak.c.
Referenced by SubBytes().
◆ P15
#define P15 |
Definition at line 1169 of file keccak.c.
Referenced by SubBytes().
◆ P16
#define P16 |
Definition at line 1171 of file keccak.c.
Referenced by SubBytes().
◆ P17
#define P17 |
Definition at line 1173 of file keccak.c.
Referenced by SubBytes().
◆ P18
#define P18 |
Definition at line 1175 of file keccak.c.
Referenced by SubBytes().
◆ P19
#define P19 |
Definition at line 1177 of file keccak.c.
Referenced by SubBytes().
◆ P1_TO_P0
#define P1_TO_P0 |
◆ P2
#define P2 |
Definition at line 1143 of file keccak.c.
Referenced by SubBytes().
◆ P20
#define P20 |
Definition at line 1179 of file keccak.c.
Referenced by SubBytes().
◆ P21
#define P21 |
◆ P22
#define P22 |
Definition at line 1183 of file keccak.c.
Referenced by SubBytes().
◆ P23
#define P23 |
Definition at line 1185 of file keccak.c.
Referenced by SubBytes().
◆ P2_TO_P0
#define P2_TO_P0 |
◆ P3
#define P3 |
Definition at line 1145 of file keccak.c.
Referenced by SubBytes().
◆ P4
#define P4 |
Definition at line 1147 of file keccak.c.
Referenced by SubBytes().
◆ P4_TO_P0
◆ P5
#define P5 |
Definition at line 1149 of file keccak.c.
Referenced by SubBytes().
◆ P6
#define P6 |
Definition at line 1151 of file keccak.c.
Referenced by SubBytes().
◆ P6_TO_P0
◆ P7
#define P7 |
Definition at line 1153 of file keccak.c.
Referenced by SubBytes().
◆ P8
#define P8 |
Definition at line 1155 of file keccak.c.
Referenced by SubBytes().
◆ P8_TO_P0
◆ P9
#define P9 |
Definition at line 1157 of file keccak.c.
Referenced by SubBytes().
◆ READ64
#define READ64 | ( | d, | |
off | |||
) |
◆ READ_STATE
#define READ_STATE | ( | state | ) |
Definition at line 549 of file keccak.c.
Referenced by keccak_core().
◆ RHO
#define RHO | ( | b00, | |
b01, | |||
b02, | |||
b03, | |||
b04, | |||
b10, | |||
b11, | |||
b12, | |||
b13, | |||
b14, | |||
b20, | |||
b21, | |||
b22, | |||
b23, | |||
b24, | |||
b30, | |||
b31, | |||
b32, | |||
b33, | |||
b34, | |||
b40, | |||
b41, | |||
b42, | |||
b43, | |||
b44 | |||
) |
◆ ROL64
◆ ROL64_0
◆ ROL64_1
#define ROL64_1 | ( | d, | |
v | |||
) | ROL64_odd1(d, v) |
◆ ROL64_10
#define ROL64_10 | ( | d, | |
v | |||
) | ROL64_even(d, v, 5) |
◆ ROL64_11
◆ ROL64_12
#define ROL64_12 | ( | d, | |
v | |||
) | ROL64_even(d, v, 6) |
◆ ROL64_13
◆ ROL64_14
#define ROL64_14 | ( | d, | |
v | |||
) | ROL64_even(d, v, 7) |
◆ ROL64_15
◆ ROL64_16
#define ROL64_16 | ( | d, | |
v | |||
) | ROL64_even(d, v, 8) |
◆ ROL64_17
◆ ROL64_18
#define ROL64_18 | ( | d, | |
v | |||
) | ROL64_even(d, v, 9) |
◆ ROL64_19
◆ ROL64_2
#define ROL64_2 | ( | d, | |
v | |||
) | ROL64_even(d, v, 1) |
◆ ROL64_20
#define ROL64_20 | ( | d, | |
v | |||
) | ROL64_even(d, v, 10) |
◆ ROL64_21
◆ ROL64_22
#define ROL64_22 | ( | d, | |
v | |||
) | ROL64_even(d, v, 11) |
◆ ROL64_23
◆ ROL64_24
#define ROL64_24 | ( | d, | |
v | |||
) | ROL64_even(d, v, 12) |
◆ ROL64_25
◆ ROL64_26
#define ROL64_26 | ( | d, | |
v | |||
) | ROL64_even(d, v, 13) |
◆ ROL64_27
◆ ROL64_28
#define ROL64_28 | ( | d, | |
v | |||
) | ROL64_even(d, v, 14) |
◆ ROL64_29
◆ ROL64_3
◆ ROL64_30
#define ROL64_30 | ( | d, | |
v | |||
) | ROL64_even(d, v, 15) |
◆ ROL64_31
◆ ROL64_32
#define ROL64_32 | ( | d, | |
v | |||
) | ROL64_even(d, v, 16) |
◆ ROL64_33
◆ ROL64_34
#define ROL64_34 | ( | d, | |
v | |||
) | ROL64_even(d, v, 17) |
◆ ROL64_35
◆ ROL64_36
#define ROL64_36 | ( | d, | |
v | |||
) | ROL64_even(d, v, 18) |
◆ ROL64_37
◆ ROL64_38
#define ROL64_38 | ( | d, | |
v | |||
) | ROL64_even(d, v, 19) |
◆ ROL64_39
◆ ROL64_4
#define ROL64_4 | ( | d, | |
v | |||
) | ROL64_even(d, v, 2) |
◆ ROL64_40
#define ROL64_40 | ( | d, | |
v | |||
) | ROL64_even(d, v, 20) |
◆ ROL64_41
◆ ROL64_42
#define ROL64_42 | ( | d, | |
v | |||
) | ROL64_even(d, v, 21) |
◆ ROL64_43
◆ ROL64_44
#define ROL64_44 | ( | d, | |
v | |||
) | ROL64_even(d, v, 22) |
◆ ROL64_45
◆ ROL64_46
#define ROL64_46 | ( | d, | |
v | |||
) | ROL64_even(d, v, 23) |
◆ ROL64_47
◆ ROL64_48
#define ROL64_48 | ( | d, | |
v | |||
) | ROL64_even(d, v, 24) |
◆ ROL64_49
◆ ROL64_5
◆ ROL64_50
#define ROL64_50 | ( | d, | |
v | |||
) | ROL64_even(d, v, 25) |
◆ ROL64_51
◆ ROL64_52
#define ROL64_52 | ( | d, | |
v | |||
) | ROL64_even(d, v, 26) |
◆ ROL64_53
◆ ROL64_54
#define ROL64_54 | ( | d, | |
v | |||
) | ROL64_even(d, v, 27) |
◆ ROL64_55
◆ ROL64_56
#define ROL64_56 | ( | d, | |
v | |||
) | ROL64_even(d, v, 28) |
◆ ROL64_57
◆ ROL64_58
#define ROL64_58 | ( | d, | |
v | |||
) | ROL64_even(d, v, 29) |
◆ ROL64_59
◆ ROL64_6
#define ROL64_6 | ( | d, | |
v | |||
) | ROL64_even(d, v, 3) |
◆ ROL64_60
#define ROL64_60 | ( | d, | |
v | |||
) | ROL64_even(d, v, 30) |
◆ ROL64_61
◆ ROL64_62
#define ROL64_62 | ( | d, | |
v | |||
) | ROL64_even(d, v, 31) |
◆ ROL64_63
#define ROL64_63 | ( | d, | |
v | |||
) | ROL64_odd63(d, v) |
◆ ROL64_7
◆ ROL64_8
#define ROL64_8 | ( | d, | |
v | |||
) | ROL64_even(d, v, 4) |
◆ ROL64_9
◆ ROL64_even
#define ROL64_even | ( | d, | |
v, | |||
n | |||
) |
◆ ROL64_odd
#define ROL64_odd | ( | d, | |
v, | |||
n | |||
) |
◆ ROL64_odd1
#define ROL64_odd1 | ( | d, | |
v | |||
) |
◆ ROL64_odd63
#define ROL64_odd63 | ( | d, | |
v | |||
) |
◆ RPAR
◆ SPH_KECCAK_INTERLEAVE
◆ SPH_KECCAK_NOCOPY
◆ SPH_KECCAK_UNROLL
◆ TH_ELT
#define TH_ELT | ( | t, | |
c0, | |||
c1, | |||
c2, | |||
c3, | |||
c4, | |||
d0, | |||
d1, | |||
d2, | |||
d3, | |||
d4 | |||
) |
◆ THETA
#define THETA | ( | b00, | |
b01, | |||
b02, | |||
b03, | |||
b04, | |||
b10, | |||
b11, | |||
b12, | |||
b13, | |||
b14, | |||
b20, | |||
b21, | |||
b22, | |||
b23, | |||
b24, | |||
b30, | |||
b31, | |||
b32, | |||
b33, | |||
b34, | |||
b40, | |||
b41, | |||
b42, | |||
b43, | |||
b44 | |||
) |
◆ UNINTERLEAVE
#define UNINTERLEAVE | ( | xl, | |
xh | |||
) |
◆ WRITE_STATE
#define WRITE_STATE | ( | state | ) |
Definition at line 602 of file keccak.c.
Referenced by keccak_core().
◆ XOR64
#define XOR64 | ( | d, | |
a, | |||
b | |||
) | (d ## l = a ## l ^ b ## l, d ## h = a ## h ^ b ## h) |
◆ XOR64_IOTA
Function Documentation
◆ keccak_core()
|
static |
Definition at line 1569 of file keccak.c.
References sph_keccak_context::buf, DECL_STATE, INPUT_BUF, KECCAK_F_1600, memcpy(), sph_keccak_context::ptr, READ_STATE, and WRITE_STATE.
Referenced by sph_keccak224(), sph_keccak256(), sph_keccak384(), and sph_keccak512().
◆ keccak_init()
|
static |
Definition at line 1526 of file keccak.c.
References sph_keccak_context::lim, sph_keccak_context::narrow, sph_keccak_context::ptr, SPH_C32, and sph_keccak_context::u.
Referenced by sph_keccak224_init(), sph_keccak256_init(), sph_keccak384_init(), and sph_keccak512_init().
◆ sph_keccak224()
void sph_keccak224 | ( | 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 Keccak-224 context data the input data len the input data length (in bytes)
Definition at line 1718 of file keccak.c.
References keccak_core().
◆ sph_keccak224_addbits_and_close()
void sph_keccak224_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 Keccak-224 context ub the extra bits n the number of extra bits (0 to 7) dst the destination buffer
Definition at line 1732 of file keccak.c.
Referenced by sph_keccak224_close().
◆ sph_keccak224_close()
void sph_keccak224_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current Keccak-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 Keccak-224 context dst the destination buffer
Definition at line 1725 of file keccak.c.
References sph_keccak224_addbits_and_close().
◆ sph_keccak224_init()
void sph_keccak224_init | ( | void * | cc | ) |
Initialize a Keccak-224 context.
This process performs no memory allocation.
- Parameters
-
cc the Keccak-224 context (pointer to a sph_keccak224_context
)
Definition at line 1711 of file keccak.c.
References keccak_init().
◆ sph_keccak256()
void sph_keccak256 | ( | 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 Keccak-256 context data the input data len the input data length (in bytes)
Definition at line 1746 of file keccak.c.
References keccak_core().
◆ sph_keccak256_addbits_and_close()
void sph_keccak256_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 Keccak-256 context ub the extra bits n the number of extra bits (0 to 7) dst the destination buffer
Definition at line 1760 of file keccak.c.
Referenced by sph_keccak256_close().
◆ sph_keccak256_close()
void sph_keccak256_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current Keccak-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 Keccak-256 context dst the destination buffer
Definition at line 1753 of file keccak.c.
References sph_keccak256_addbits_and_close().
◆ sph_keccak256_init()
void sph_keccak256_init | ( | void * | cc | ) |
Initialize a Keccak-256 context.
This process performs no memory allocation.
- Parameters
-
cc the Keccak-256 context (pointer to a sph_keccak256_context
)
Definition at line 1739 of file keccak.c.
References keccak_init().
◆ sph_keccak384()
void sph_keccak384 | ( | 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 Keccak-384 context data the input data len the input data length (in bytes)
Definition at line 1774 of file keccak.c.
References keccak_core().
◆ sph_keccak384_addbits_and_close()
void sph_keccak384_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 Keccak-384 context ub the extra bits n the number of extra bits (0 to 7) dst the destination buffer
Definition at line 1788 of file keccak.c.
Referenced by sph_keccak384_close().
◆ sph_keccak384_close()
void sph_keccak384_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current Keccak-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 Keccak-384 context dst the destination buffer
Definition at line 1781 of file keccak.c.
References sph_keccak384_addbits_and_close().
◆ sph_keccak384_init()
void sph_keccak384_init | ( | void * | cc | ) |
Initialize a Keccak-384 context.
This process performs no memory allocation.
- Parameters
-
cc the Keccak-384 context (pointer to a sph_keccak384_context
)
Definition at line 1767 of file keccak.c.
References keccak_init().
◆ sph_keccak512()
void sph_keccak512 | ( | 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 Keccak-512 context data the input data len the input data length (in bytes)
Definition at line 1802 of file keccak.c.
References keccak_core().
Referenced by HashX11().
◆ sph_keccak512_addbits_and_close()
void sph_keccak512_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 Keccak-512 context ub the extra bits n the number of extra bits (0 to 7) dst the destination buffer
Definition at line 1816 of file keccak.c.
Referenced by sph_keccak512_close().
◆ sph_keccak512_close()
void sph_keccak512_close | ( | void * | cc, |
void * | dst | ||
) |
Terminate the current Keccak-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 Keccak-512 context dst the destination buffer
Definition at line 1809 of file keccak.c.
References sph_keccak512_addbits_and_close().
Referenced by HashX11().
◆ sph_keccak512_init()
void sph_keccak512_init | ( | void * | cc | ) |
Initialize a Keccak-512 context.
This process performs no memory allocation.
- Parameters
-
cc the Keccak-512 context (pointer to a sph_keccak512_context
)
Definition at line 1795 of file keccak.c.
References keccak_init().
Referenced by HashX11().
Variable Documentation
◆ high
sph_u32 high |
Definition at line 370 of file keccak.c.
Referenced by encode_count_big(), encode_count_small(), getblockhashes(), GetTimestampIndex(), CBlockTreeDB::ReadTimestampIndex(), and CCoinsViewDB::Upgrade().
◆ low
sph_u32 low |
Definition at line 370 of file keccak.c.
Referenced by encode_count_big(), encode_count_small(), getblockhashes(), GetTimestampIndex(), CBlockTreeDB::ReadTimestampIndex(), and scalar_test().
◆ RC
const { ... } RC[] |