Go to the source code of this file.
|
static void | secp256k1_scalar_clear (secp256k1_scalar *r) |
|
static unsigned int | secp256k1_scalar_get_bits (const secp256k1_scalar *a, unsigned int offset, unsigned int count) |
|
static unsigned int | secp256k1_scalar_get_bits_var (const secp256k1_scalar *a, unsigned int offset, unsigned int count) |
|
static void | secp256k1_scalar_set_b32 (secp256k1_scalar *r, const unsigned char *bin, int *overflow) |
|
static void | secp256k1_scalar_set_int (secp256k1_scalar *r, unsigned int v) |
|
static void | secp256k1_scalar_get_b32 (unsigned char *bin, const secp256k1_scalar *a) |
|
static int | secp256k1_scalar_add (secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) |
|
static void | secp256k1_scalar_cadd_bit (secp256k1_scalar *r, unsigned int bit, int flag) |
|
static void | secp256k1_scalar_mul (secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) |
|
static int | secp256k1_scalar_shr_int (secp256k1_scalar *r, int n) |
|
static void | secp256k1_scalar_sqr (secp256k1_scalar *r, const secp256k1_scalar *a) |
|
static void | secp256k1_scalar_inverse (secp256k1_scalar *r, const secp256k1_scalar *a) |
|
static void | secp256k1_scalar_inverse_var (secp256k1_scalar *r, const secp256k1_scalar *a) |
|
static void | secp256k1_scalar_negate (secp256k1_scalar *r, const secp256k1_scalar *a) |
|
static int | secp256k1_scalar_is_zero (const secp256k1_scalar *a) |
|
static int | secp256k1_scalar_is_one (const secp256k1_scalar *a) |
|
static int | secp256k1_scalar_is_even (const secp256k1_scalar *a) |
|
static int | secp256k1_scalar_is_high (const secp256k1_scalar *a) |
|
static int | secp256k1_scalar_cond_negate (secp256k1_scalar *a, int flag) |
|
static void | secp256k1_scalar_get_num (secp256k1_num *r, const secp256k1_scalar *a) |
|
static void | secp256k1_scalar_order_get_num (secp256k1_num *r) |
|
static int | secp256k1_scalar_eq (const secp256k1_scalar *a, const secp256k1_scalar *b) |
|
static void | secp256k1_scalar_mul_shift_var (secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b, unsigned int shift) |
|
◆ secp256k1_scalar_add()
Add two scalars together (modulo the group order). Returns whether it overflowed.
◆ secp256k1_scalar_cadd_bit()
static void secp256k1_scalar_cadd_bit |
( |
secp256k1_scalar * |
r, |
|
|
unsigned int |
bit, |
|
|
int |
flag |
|
) |
| |
|
static |
Conditionally add a power of two to a scalar. The result is not allowed to overflow.
◆ secp256k1_scalar_clear()
Clear a scalar to prevent the leak of sensitive data.
◆ secp256k1_scalar_cond_negate()
Conditionally negate a number, in constant time. Returns -1 if the number was negated, 1 otherwise
◆ secp256k1_scalar_eq()
◆ secp256k1_scalar_get_b32()
static void secp256k1_scalar_get_b32 |
( |
unsigned char * |
bin, |
|
|
const secp256k1_scalar * |
a |
|
) |
| |
|
static |
Convert a scalar to a byte array.
◆ secp256k1_scalar_get_bits()
static unsigned int secp256k1_scalar_get_bits |
( |
const secp256k1_scalar * |
a, |
|
|
unsigned int |
offset, |
|
|
unsigned int |
count |
|
) |
| |
|
static |
Access bits from a scalar. All requested bits must belong to the same 32-bit limb.
◆ secp256k1_scalar_get_bits_var()
static unsigned int secp256k1_scalar_get_bits_var |
( |
const secp256k1_scalar * |
a, |
|
|
unsigned int |
offset, |
|
|
unsigned int |
count |
|
) |
| |
|
static |
Access bits from a scalar. Not constant time.
◆ secp256k1_scalar_get_num()
Convert a scalar to a number.
◆ secp256k1_scalar_inverse()
Compute the inverse of a scalar (modulo the group order).
◆ secp256k1_scalar_inverse_var()
Compute the inverse of a scalar (modulo the group order), without constant-time guarantee.
◆ secp256k1_scalar_is_even()
Check whether a scalar, considered as an nonnegative integer, is even.
◆ secp256k1_scalar_is_high()
Check whether a scalar is higher than the group order divided by 2.
◆ secp256k1_scalar_is_one()
Check whether a scalar equals one.
◆ secp256k1_scalar_is_zero()
Check whether a scalar equals zero.
◆ secp256k1_scalar_mul()
Multiply two scalars (modulo the group order).
◆ secp256k1_scalar_mul_shift_var()
Multiply a and b (without taking the modulus!), divide by 2**shift, and round to the nearest integer. Shift must be at least 256.
◆ secp256k1_scalar_negate()
Compute the complement of a scalar (modulo the group order).
◆ secp256k1_scalar_order_get_num()
Get the order of the group as a number.
◆ secp256k1_scalar_set_b32()
static void secp256k1_scalar_set_b32 |
( |
secp256k1_scalar * |
r, |
|
|
const unsigned char * |
bin, |
|
|
int * |
overflow |
|
) |
| |
|
static |
Set a scalar from a big endian byte array.
◆ secp256k1_scalar_set_int()
Set a scalar to an unsigned integer.
◆ secp256k1_scalar_shr_int()
Shift a scalar right by some amount strictly between 0 and 16, returning the low bits that were shifted off
◆ secp256k1_scalar_sqr()
Compute the square of a scalar (modulo the group order).