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 | Ch(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) |
#define | Maj(x, y, z) (((x) & (y)) | ((z) & ((x) | (y)))) |
#define | Sigma0(x) (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10)) |
#define | Sigma1(x) (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7)) |
#define | sigma0(x) (((x) >> 7 | (x) << 25) ^ ((x) >> 18 | (x) << 14) ^ ((x) >> 3)) |
#define | sigma1(x) (((x) >> 17 | (x) << 15) ^ ((x) >> 19 | (x) << 13) ^ ((x) >> 10)) |
#define | Round(a, b, c, d, e, f, g, h, k, w) |
#define | BE32(p) ((((p) & 0xFF) << 24) | (((p) & 0xFF00) << 8) | (((p) & 0xFF0000) >> 8) | (((p) & 0xFF000000) >> 24)) |
Functions | |
static void | secp256k1_sha256_initialize (secp256k1_sha256 *hash) |
static void | secp256k1_sha256_transform (uint32_t *s, const uint32_t *chunk) |
Perform one SHA-256 transformation, processing 16 big endian 32-bit words. More... | |
static void | secp256k1_sha256_write (secp256k1_sha256 *hash, const unsigned char *data, size_t len) |
static void | secp256k1_sha256_finalize (secp256k1_sha256 *hash, unsigned char *out32) |
static void | secp256k1_hmac_sha256_initialize (secp256k1_hmac_sha256 *hash, const unsigned char *key, size_t keylen) |
static void | secp256k1_hmac_sha256_write (secp256k1_hmac_sha256 *hash, const unsigned char *data, size_t size) |
static void | secp256k1_hmac_sha256_finalize (secp256k1_hmac_sha256 *hash, unsigned char *out32) |
static void | secp256k1_rfc6979_hmac_sha256_initialize (secp256k1_rfc6979_hmac_sha256 *rng, const unsigned char *key, size_t keylen) |
static void | secp256k1_rfc6979_hmac_sha256_generate (secp256k1_rfc6979_hmac_sha256 *rng, unsigned char *out, size_t outlen) |
static void | secp256k1_rfc6979_hmac_sha256_finalize (secp256k1_rfc6979_hmac_sha256 *rng) |
Macro Definition Documentation
◆ BE32
#define BE32 | ( | p | ) | ((((p) & 0xFF) << 24) | (((p) & 0xFF00) << 8) | (((p) & 0xFF0000) >> 8) | (((p) & 0xFF000000) >> 24)) |
Definition at line 33 of file hash_impl.h.
Referenced by secp256k1_sha256_finalize(), and secp256k1_sha256_transform().
◆ Ch
#define Ch | ( | x, | |
y, | |||
z | |||
) | ((z) ^ ((x) & ((y) ^ (z)))) |
Definition at line 16 of file hash_impl.h.
◆ Maj
#define Maj | ( | x, | |
y, | |||
z | |||
) | (((x) & (y)) | ((z) & ((x) | (y)))) |
Definition at line 17 of file hash_impl.h.
◆ Round
#define Round | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h, | |||
k, | |||
w | |||
) |
Definition at line 23 of file hash_impl.h.
Referenced by secp256k1_sha256_transform().
◆ Sigma0
#define Sigma0 | ( | x | ) | (((x) >> 2 | (x) << 30) ^ ((x) >> 13 | (x) << 19) ^ ((x) >> 22 | (x) << 10)) |
Definition at line 18 of file hash_impl.h.
◆ sigma0
#define sigma0 | ( | x | ) | (((x) >> 7 | (x) << 25) ^ ((x) >> 18 | (x) << 14) ^ ((x) >> 3)) |
Definition at line 20 of file hash_impl.h.
Referenced by secp256k1_sha256_transform().
◆ Sigma1
#define Sigma1 | ( | x | ) | (((x) >> 6 | (x) << 26) ^ ((x) >> 11 | (x) << 21) ^ ((x) >> 25 | (x) << 7)) |
Definition at line 19 of file hash_impl.h.
◆ sigma1
#define sigma1 | ( | x | ) | (((x) >> 17 | (x) << 15) ^ ((x) >> 19 | (x) << 13) ^ ((x) >> 10)) |
Definition at line 21 of file hash_impl.h.
Referenced by secp256k1_sha256_transform().
Function Documentation
◆ secp256k1_hmac_sha256_finalize()
|
static |
Definition at line 197 of file hash_impl.h.
References secp256k1_hmac_sha256::inner, secp256k1_hmac_sha256::outer, secp256k1_sha256_finalize(), and secp256k1_sha256_write().
Referenced by secp256k1_rfc6979_hmac_sha256_generate(), and secp256k1_rfc6979_hmac_sha256_initialize().
◆ secp256k1_hmac_sha256_initialize()
|
static |
Definition at line 165 of file hash_impl.h.
References secp256k1_hmac_sha256::inner, memcpy(), secp256k1_hmac_sha256::outer, secp256k1_sha256_finalize(), secp256k1_sha256_initialize(), and secp256k1_sha256_write().
Referenced by secp256k1_rfc6979_hmac_sha256_generate(), and secp256k1_rfc6979_hmac_sha256_initialize().
◆ secp256k1_hmac_sha256_write()
|
static |
Definition at line 193 of file hash_impl.h.
References secp256k1_hmac_sha256::inner, and secp256k1_sha256_write().
Referenced by secp256k1_rfc6979_hmac_sha256_generate(), and secp256k1_rfc6979_hmac_sha256_initialize().
◆ secp256k1_rfc6979_hmac_sha256_finalize()
|
static |
Definition at line 267 of file hash_impl.h.
References secp256k1_rfc6979_hmac_sha256::k, secp256k1_rfc6979_hmac_sha256::retry, and secp256k1_rfc6979_hmac_sha256::v.
◆ secp256k1_rfc6979_hmac_sha256_generate()
|
static |
Definition at line 236 of file hash_impl.h.
References secp256k1_rfc6979_hmac_sha256::k, memcpy(), secp256k1_rfc6979_hmac_sha256::retry, secp256k1_hmac_sha256_finalize(), secp256k1_hmac_sha256_initialize(), secp256k1_hmac_sha256_write(), and secp256k1_rfc6979_hmac_sha256::v.
◆ secp256k1_rfc6979_hmac_sha256_initialize()
|
static |
Definition at line 206 of file hash_impl.h.
References secp256k1_rfc6979_hmac_sha256::k, secp256k1_rfc6979_hmac_sha256::retry, secp256k1_hmac_sha256_finalize(), secp256k1_hmac_sha256_initialize(), secp256k1_hmac_sha256_write(), and secp256k1_rfc6979_hmac_sha256::v.
◆ secp256k1_sha256_finalize()
|
static |
Definition at line 149 of file hash_impl.h.
References BE32, secp256k1_sha256::bytes, memcpy(), secp256k1_sha256::s, and secp256k1_sha256_write().
Referenced by secp256k1_hmac_sha256_finalize(), and secp256k1_hmac_sha256_initialize().
◆ secp256k1_sha256_initialize()
|
static |
Definition at line 36 of file hash_impl.h.
References secp256k1_sha256::bytes, and secp256k1_sha256::s.
Referenced by secp256k1_hmac_sha256_initialize().
◆ secp256k1_sha256_transform()
|
static |
Perform one SHA-256 transformation, processing 16 big endian 32-bit words.
Definition at line 49 of file hash_impl.h.
References BE32, Round, sigma0, and sigma1.
Referenced by secp256k1_sha256_write().
◆ secp256k1_sha256_write()
|
static |
Definition at line 131 of file hash_impl.h.
References secp256k1_sha256::buf, secp256k1_sha256::bytes, memcpy(), secp256k1_sha256::s, and secp256k1_sha256_transform().
Referenced by secp256k1_hmac_sha256_finalize(), secp256k1_hmac_sha256_initialize(), secp256k1_hmac_sha256_write(), and secp256k1_sha256_finalize().