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.
Functions | |
static void | secp256k1_num_copy (secp256k1_num *r, const secp256k1_num *a) |
Copy a number. More... | |
static void | secp256k1_num_get_bin (unsigned char *r, unsigned int rlen, const secp256k1_num *a) |
Convert a number's absolute value to a binary big-endian string. More... | |
static void | secp256k1_num_set_bin (secp256k1_num *r, const unsigned char *a, unsigned int alen) |
Set a number to the value of a binary big-endian string. More... | |
static void | secp256k1_num_mod_inverse (secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *m) |
Compute a modular inverse. More... | |
static int | secp256k1_num_jacobi (const secp256k1_num *a, const secp256k1_num *b) |
Compute the jacobi symbol (a|b). More... | |
static int | secp256k1_num_cmp (const secp256k1_num *a, const secp256k1_num *b) |
Compare the absolute value of two numbers. More... | |
static int | secp256k1_num_eq (const secp256k1_num *a, const secp256k1_num *b) |
Test whether two number are equal (including sign). More... | |
static void | secp256k1_num_add (secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b) |
Add two (signed) numbers. More... | |
static void | secp256k1_num_sub (secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b) |
Subtract two (signed) numbers. More... | |
static void | secp256k1_num_mul (secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *b) |
Multiply two (signed) numbers. More... | |
static void | secp256k1_num_mod (secp256k1_num *r, const secp256k1_num *m) |
Replace a number by its remainder modulo m. More... | |
static void | secp256k1_num_shift (secp256k1_num *r, int bits) |
Right-shift the passed number by bits bits. More... | |
static int | secp256k1_num_is_zero (const secp256k1_num *a) |
Check whether a number is zero. More... | |
static int | secp256k1_num_is_one (const secp256k1_num *a) |
Check whether a number is one. More... | |
static int | secp256k1_num_is_neg (const secp256k1_num *a) |
Check whether a number is strictly negative. More... | |
static void | secp256k1_num_negate (secp256k1_num *r) |
Change a number's sign. More... | |
Function Documentation
◆ secp256k1_num_add()
|
static |
Add two (signed) numbers.
Referenced by scalar_test(), test_num_add_sub(), test_num_jacobi(), test_num_mod(), and test_num_negate().
◆ secp256k1_num_cmp()
|
static |
Compare the absolute value of two numbers.
Referenced by scalar_test().
◆ secp256k1_num_copy()
|
static |
Copy a number.
Referenced by test_num_negate().
◆ secp256k1_num_eq()
|
static |
Test whether two number are equal (including sign).
Referenced by scalar_test(), test_num_add_sub(), and test_num_negate().
◆ secp256k1_num_get_bin()
|
static |
Convert a number's absolute value to a binary big-endian string.
There must be enough place.
Referenced by run_scalar_tests(), secp256k1_fe_inv_var(), and secp256k1_scalar_inverse_var().
◆ secp256k1_num_is_neg()
|
static |
Check whether a number is strictly negative.
Referenced by test_num_negate().
◆ secp256k1_num_is_one()
|
static |
Check whether a number is one.
Referenced by scalar_test(), and test_num_add_sub().
◆ secp256k1_num_is_zero()
|
static |
Check whether a number is zero.
Referenced by scalar_test(), test_num_jacobi(), test_num_mod(), and test_num_negate().
◆ secp256k1_num_jacobi()
|
static |
Compute the jacobi symbol (a|b).
b must be positive and odd.
Referenced by bench_num_jacobi(), secp256k1_fe_is_quad_var(), and test_num_jacobi().
◆ secp256k1_num_mod()
|
static |
Replace a number by its remainder modulo m.
M's sign is ignored. The result is a number between 0 and m-1, even if r was negative.
Referenced by scalar_test(), test_num_jacobi(), and test_num_mod().
◆ secp256k1_num_mod_inverse()
|
static |
Compute a modular inverse.
The input must be less than the modulus.
Referenced by scalar_test(), secp256k1_fe_inv_var(), and secp256k1_scalar_inverse_var().
◆ secp256k1_num_mul()
|
static |
Multiply two (signed) numbers.
Referenced by scalar_test().
◆ secp256k1_num_negate()
|
static |
Change a number's sign.
Referenced by random_num_negate(), test_num_add_sub(), and test_num_negate().
◆ secp256k1_num_set_bin()
|
static |
Set a number to the value of a binary big-endian string.
Referenced by scalar_test(), secp256k1_fe_inv_var(), secp256k1_fe_is_quad_var(), secp256k1_scalar_get_num(), secp256k1_scalar_inverse_var(), and secp256k1_scalar_order_get_num().
◆ secp256k1_num_shift()
|
static |
Right-shift the passed number by bits bits.
Referenced by scalar_test().
◆ secp256k1_num_sub()
|
static |
Subtract two (signed) numbers.
Referenced by scalar_test(), test_num_add_sub(), test_num_jacobi(), and test_num_negate().