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 | SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL) |
#define | SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL) |
#define | SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL) |
#define | SECP256K1_N_3 ((uint64_t)0xFFFFFFFFFFFFFFFFULL) |
#define | SECP256K1_N_C_0 (~SECP256K1_N_0 + 1) |
#define | SECP256K1_N_C_1 (~SECP256K1_N_1) |
#define | SECP256K1_N_C_2 (1) |
#define | SECP256K1_N_H_0 ((uint64_t)0xDFE92F46681B20A0ULL) |
#define | SECP256K1_N_H_1 ((uint64_t)0x5D576E7357A4501DULL) |
#define | SECP256K1_N_H_2 ((uint64_t)0xFFFFFFFFFFFFFFFFULL) |
#define | SECP256K1_N_H_3 ((uint64_t)0x7FFFFFFFFFFFFFFFULL) |
#define | muladd(a, b) |
Add a*b to the number defined by (c0,c1,c2). More... | |
#define | muladd_fast(a, b) |
Add a*b to the number defined by (c0,c1). More... | |
#define | muladd2(a, b) |
Add 2*a*b to the number defined by (c0,c1,c2). More... | |
#define | sumadd(a) |
Add a to the number defined by (c0,c1,c2). More... | |
#define | sumadd_fast(a) |
Add a to the number defined by (c0,c1). More... | |
#define | extract(n) |
Extract the lowest 64 bits of (c0,c1,c2) into n, and left shift the number 64 bits. More... | |
#define | extract_fast(n) |
Extract the lowest 64 bits of (c0,c1,c2) into n, and left shift the number 64 bits. More... | |
Macro Definition Documentation
◆ extract
#define extract | ( | n | ) |
Extract the lowest 64 bits of (c0,c1,c2) into n, and left shift the number 64 bits.
Definition at line 255 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_mul_512(), secp256k1_scalar_reduce_512(), and secp256k1_scalar_sqr_512().
◆ extract_fast
#define extract_fast | ( | n | ) |
Extract the lowest 64 bits of (c0,c1,c2) into n, and left shift the number 64 bits.
c2 is required to be zero.
Definition at line 263 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_mul_512(), secp256k1_scalar_reduce_512(), and secp256k1_scalar_sqr_512().
◆ muladd
#define muladd | ( | a, | |
b | |||
) |
Add a*b to the number defined by (c0,c1,c2).
c2 must never overflow.
Definition at line 187 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_mul_512(), secp256k1_scalar_reduce_512(), and secp256k1_scalar_sqr_512().
◆ muladd2
#define muladd2 | ( | a, | |
b | |||
) |
Add 2*a*b to the number defined by (c0,c1,c2).
c2 must never overflow.
Definition at line 216 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_sqr_512().
◆ muladd_fast
#define muladd_fast | ( | a, | |
b | |||
) |
Add a*b to the number defined by (c0,c1).
c1 must never overflow.
Definition at line 202 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_mul_512(), secp256k1_scalar_reduce_512(), and secp256k1_scalar_sqr_512().
◆ SECP256K1_N_0
#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL) |
Definition at line 11 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_check_overflow(), secp256k1_scalar_cond_negate(), and secp256k1_scalar_negate().
◆ SECP256K1_N_1
#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL) |
Definition at line 12 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_check_overflow(), secp256k1_scalar_cond_negate(), and secp256k1_scalar_negate().
◆ SECP256K1_N_2
#define SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL) |
Definition at line 13 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_check_overflow(), secp256k1_scalar_cond_negate(), and secp256k1_scalar_negate().
◆ SECP256K1_N_3
#define SECP256K1_N_3 ((uint64_t)0xFFFFFFFFFFFFFFFFULL) |
Definition at line 14 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_check_overflow(), secp256k1_scalar_cond_negate(), and secp256k1_scalar_negate().
◆ SECP256K1_N_C_0
#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1) |
Definition at line 17 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_reduce(), and secp256k1_scalar_reduce_512().
◆ SECP256K1_N_C_1
#define SECP256K1_N_C_1 (~SECP256K1_N_1) |
Definition at line 18 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_reduce(), and secp256k1_scalar_reduce_512().
◆ SECP256K1_N_C_2
#define SECP256K1_N_C_2 (1) |
Definition at line 19 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_reduce().
◆ SECP256K1_N_H_0
#define SECP256K1_N_H_0 ((uint64_t)0xDFE92F46681B20A0ULL) |
Definition at line 22 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_is_high().
◆ SECP256K1_N_H_1
#define SECP256K1_N_H_1 ((uint64_t)0x5D576E7357A4501DULL) |
Definition at line 23 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_is_high().
◆ SECP256K1_N_H_2
#define SECP256K1_N_H_2 ((uint64_t)0xFFFFFFFFFFFFFFFFULL) |
Definition at line 24 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_is_high().
◆ SECP256K1_N_H_3
#define SECP256K1_N_H_3 ((uint64_t)0x7FFFFFFFFFFFFFFFULL) |
Definition at line 25 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_is_high().
◆ sumadd
#define sumadd | ( | a | ) |
Add a to the number defined by (c0,c1,c2).
c2 must never overflow.
Definition at line 238 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_reduce_512().
◆ sumadd_fast
#define sumadd_fast | ( | a | ) |
Add a to the number defined by (c0,c1).
c1 must never overflow, c2 must be zero.
Definition at line 247 of file scalar_4x64_impl.h.
Referenced by secp256k1_scalar_reduce_512().
Function Documentation
◆ secp256k1_scalar_add()
|
static |
Definition at line 83 of file scalar_4x64_impl.h.
References secp256k1_scalar::d, secp256k1_scalar_check_overflow(), secp256k1_scalar_reduce(), and VERIFY_CHECK.
◆ secp256k1_scalar_cadd_bit()
|
static |
Definition at line 99 of file scalar_4x64_impl.h.
References secp256k1_scalar::d, secp256k1_scalar_check_overflow(), and VERIFY_CHECK.
Referenced by secp256k1_scalar_mul_shift_var().
◆ secp256k1_scalar_check_overflow()
|
static |
Definition at line 57 of file scalar_4x64_impl.h.
References secp256k1_scalar::d, SECP256K1_N_0, SECP256K1_N_1, SECP256K1_N_2, and SECP256K1_N_3.
Referenced by run_scalar_tests(), secp256k1_scalar_add(), secp256k1_scalar_cadd_bit(), secp256k1_scalar_reduce_512(), and secp256k1_scalar_set_b32().
◆ secp256k1_scalar_clear()
|
static |
Definition at line 27 of file scalar_4x64_impl.h.
References secp256k1_scalar::d.
◆ secp256k1_scalar_cond_negate()
|
static |
Definition at line 168 of file scalar_4x64_impl.h.
References secp256k1_scalar::d, immer::detail::hamts::mask, SECP256K1_N_0, SECP256K1_N_1, SECP256K1_N_2, SECP256K1_N_3, and secp256k1_scalar_is_zero().
◆ secp256k1_scalar_eq()
|
static |
Definition at line 928 of file scalar_4x64_impl.h.
References secp256k1_scalar::d.
◆ secp256k1_scalar_get_b32()
|
static |
Definition at line 129 of file scalar_4x64_impl.h.
References secp256k1_scalar::d.
◆ secp256k1_scalar_get_bits()
|
static |
Definition at line 41 of file scalar_4x64_impl.h.
References count, secp256k1_scalar::d, and VERIFY_CHECK.
Referenced by secp256k1_scalar_get_bits_var().
◆ secp256k1_scalar_get_bits_var()
|
static |
Definition at line 46 of file scalar_4x64_impl.h.
References count, secp256k1_scalar::d, secp256k1_scalar_get_bits(), and VERIFY_CHECK.
◆ secp256k1_scalar_is_high()
|
static |
Definition at line 156 of file scalar_4x64_impl.h.
References secp256k1_scalar::d, SECP256K1_N_H_0, SECP256K1_N_H_1, SECP256K1_N_H_2, and SECP256K1_N_H_3.
◆ secp256k1_scalar_is_one()
|
static |
Definition at line 152 of file scalar_4x64_impl.h.
References secp256k1_scalar::d.
◆ secp256k1_scalar_is_zero()
|
static |
Definition at line 136 of file scalar_4x64_impl.h.
References secp256k1_scalar::d.
Referenced by secp256k1_scalar_cond_negate(), and secp256k1_scalar_negate().
◆ secp256k1_scalar_mul()
|
static |
Definition at line 891 of file scalar_4x64_impl.h.
References secp256k1_scalar_mul_512(), and secp256k1_scalar_reduce_512().
◆ secp256k1_scalar_mul_512()
|
static |
Definition at line 579 of file scalar_4x64_impl.h.
References secp256k1_scalar::d, extract, extract_fast, muladd, muladd_fast, and VERIFY_CHECK.
Referenced by secp256k1_scalar_mul(), and secp256k1_scalar_mul_shift_var().
◆ secp256k1_scalar_mul_shift_var()
|
static |
Definition at line 932 of file scalar_4x64_impl.h.
References secp256k1_scalar::d, secp256k1_scalar_cadd_bit(), secp256k1_scalar_mul_512(), and VERIFY_CHECK.
◆ secp256k1_scalar_negate()
|
static |
Definition at line 140 of file scalar_4x64_impl.h.
References secp256k1_scalar::d, SECP256K1_N_0, SECP256K1_N_1, SECP256K1_N_2, SECP256K1_N_3, and secp256k1_scalar_is_zero().
◆ secp256k1_scalar_reduce()
|
static |
Definition at line 69 of file scalar_4x64_impl.h.
References secp256k1_scalar::d, SECP256K1_N_C_0, SECP256K1_N_C_1, SECP256K1_N_C_2, and VERIFY_CHECK.
Referenced by secp256k1_scalar_add(), secp256k1_scalar_reduce_512(), and secp256k1_scalar_set_b32().
◆ secp256k1_scalar_reduce_512()
|
static |
Definition at line 270 of file scalar_4x64_impl.h.
References secp256k1_scalar::d, extract, extract_fast, muladd, muladd_fast, SECP256K1_N_C_0, SECP256K1_N_C_1, secp256k1_scalar_check_overflow(), secp256k1_scalar_reduce(), sumadd, sumadd_fast, and VERIFY_CHECK.
Referenced by secp256k1_scalar_mul(), and secp256k1_scalar_sqr().
◆ secp256k1_scalar_set_b32()
|
static |
Definition at line 117 of file scalar_4x64_impl.h.
References secp256k1_scalar::d, secp256k1_scalar_check_overflow(), and secp256k1_scalar_reduce().
◆ secp256k1_scalar_set_int()
|
static |
Definition at line 34 of file scalar_4x64_impl.h.
References secp256k1_scalar::d.
◆ secp256k1_scalar_shr_int()
|
static |
Definition at line 897 of file scalar_4x64_impl.h.
References secp256k1_scalar::d, and VERIFY_CHECK.
◆ secp256k1_scalar_sqr()
|
static |
Definition at line 909 of file scalar_4x64_impl.h.
References secp256k1_scalar_reduce_512(), and secp256k1_scalar_sqr_512().
◆ secp256k1_scalar_sqr_512()
|
static |
Definition at line 746 of file scalar_4x64_impl.h.
References secp256k1_scalar::d, extract, extract_fast, muladd, muladd2, muladd_fast, and VERIFY_CHECK.
Referenced by secp256k1_scalar_sqr().