Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

scalar_low_impl.h File Reference
#include "scalar.h"
#include <string.h>
+ Include dependency graph for scalar_low_impl.h:

Go to the source code of this file.

Functions

static SECP256K1_INLINE int secp256k1_scalar_is_even (const secp256k1_scalar *a)
 
static SECP256K1_INLINE void secp256k1_scalar_clear (secp256k1_scalar *r)
 
static SECP256K1_INLINE void secp256k1_scalar_set_int (secp256k1_scalar *r, unsigned int v)
 
static SECP256K1_INLINE unsigned int secp256k1_scalar_get_bits (const secp256k1_scalar *a, unsigned int offset, unsigned int count)
 
static SECP256K1_INLINE unsigned int secp256k1_scalar_get_bits_var (const secp256k1_scalar *a, unsigned int offset, unsigned int count)
 
static SECP256K1_INLINE int secp256k1_scalar_check_overflow (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_set_b32 (secp256k1_scalar *r, const unsigned char *b32, int *overflow)
 
static void secp256k1_scalar_get_b32 (unsigned char *bin, const secp256k1_scalar *a)
 
static SECP256K1_INLINE int secp256k1_scalar_is_zero (const secp256k1_scalar *a)
 
static void secp256k1_scalar_negate (secp256k1_scalar *r, const secp256k1_scalar *a)
 
static SECP256K1_INLINE int secp256k1_scalar_is_one (const secp256k1_scalar *a)
 
static int secp256k1_scalar_is_high (const secp256k1_scalar *a)
 
static int secp256k1_scalar_cond_negate (secp256k1_scalar *r, 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_split_128 (secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a)
 
static SECP256K1_INLINE int secp256k1_scalar_eq (const secp256k1_scalar *a, const secp256k1_scalar *b)
 

Function Documentation

◆ secp256k1_scalar_add()

static int secp256k1_scalar_add ( secp256k1_scalar r,
const secp256k1_scalar a,
const secp256k1_scalar b 
)
static

Definition at line 34 of file scalar_low_impl.h.

References EXHAUSTIVE_TEST_ORDER.

◆ secp256k1_scalar_cadd_bit()

static void secp256k1_scalar_cadd_bit ( secp256k1_scalar r,
unsigned int  bit,
int  flag 
)
static

Definition at line 39 of file scalar_low_impl.h.

References secp256k1_scalar_check_overflow(), and VERIFY_CHECK.

◆ secp256k1_scalar_check_overflow()

static SECP256K1_INLINE int secp256k1_scalar_check_overflow ( const secp256k1_scalar a)
static

Definition at line 32 of file scalar_low_impl.h.

References EXHAUSTIVE_TEST_ORDER.

Referenced by secp256k1_scalar_cadd_bit().

◆ secp256k1_scalar_clear()

static SECP256K1_INLINE void secp256k1_scalar_clear ( secp256k1_scalar r)
static

Definition at line 18 of file scalar_low_impl.h.

◆ secp256k1_scalar_cond_negate()

static int secp256k1_scalar_cond_negate ( secp256k1_scalar r,
int  flag 
)
static

Definition at line 83 of file scalar_low_impl.h.

References secp256k1_scalar_negate().

◆ secp256k1_scalar_eq()

static SECP256K1_INLINE int secp256k1_scalar_eq ( const secp256k1_scalar a,
const secp256k1_scalar b 
)
static

Definition at line 110 of file scalar_low_impl.h.

◆ secp256k1_scalar_get_b32()

static void secp256k1_scalar_get_b32 ( unsigned char *  bin,
const secp256k1_scalar a 
)
static

Definition at line 58 of file scalar_low_impl.h.

◆ secp256k1_scalar_get_bits()

static SECP256K1_INLINE unsigned int secp256k1_scalar_get_bits ( const secp256k1_scalar a,
unsigned int  offset,
unsigned int  count 
)
static

Definition at line 21 of file scalar_low_impl.h.

References count.

Referenced by secp256k1_scalar_get_bits_var().

◆ secp256k1_scalar_get_bits_var()

static SECP256K1_INLINE unsigned int secp256k1_scalar_get_bits_var ( const secp256k1_scalar a,
unsigned int  offset,
unsigned int  count 
)
static

Definition at line 28 of file scalar_low_impl.h.

References count, and secp256k1_scalar_get_bits().

◆ secp256k1_scalar_is_even()

static SECP256K1_INLINE int secp256k1_scalar_is_even ( const secp256k1_scalar a)
static

Definition at line 14 of file scalar_low_impl.h.

◆ secp256k1_scalar_is_high()

static int secp256k1_scalar_is_high ( const secp256k1_scalar a)
static

Definition at line 79 of file scalar_low_impl.h.

References EXHAUSTIVE_TEST_ORDER.

◆ secp256k1_scalar_is_one()

static SECP256K1_INLINE int secp256k1_scalar_is_one ( const secp256k1_scalar a)
static

Definition at line 75 of file scalar_low_impl.h.

◆ secp256k1_scalar_is_zero()

static SECP256K1_INLINE int secp256k1_scalar_is_zero ( const secp256k1_scalar a)
static

Definition at line 63 of file scalar_low_impl.h.

◆ secp256k1_scalar_mul()

static void secp256k1_scalar_mul ( secp256k1_scalar r,
const secp256k1_scalar a,
const secp256k1_scalar b 
)
static

Definition at line 88 of file scalar_low_impl.h.

References EXHAUSTIVE_TEST_ORDER.

◆ secp256k1_scalar_negate()

static void secp256k1_scalar_negate ( secp256k1_scalar r,
const secp256k1_scalar a 
)
static

Definition at line 67 of file scalar_low_impl.h.

References EXHAUSTIVE_TEST_ORDER.

Referenced by secp256k1_scalar_cond_negate().

◆ secp256k1_scalar_set_b32()

static void secp256k1_scalar_set_b32 ( secp256k1_scalar r,
const unsigned char *  b32,
int *  overflow 
)
static

Definition at line 47 of file scalar_low_impl.h.

References EXHAUSTIVE_TEST_ORDER.

◆ secp256k1_scalar_set_int()

static SECP256K1_INLINE void secp256k1_scalar_set_int ( secp256k1_scalar r,
unsigned int  v 
)
static

Definition at line 19 of file scalar_low_impl.h.

◆ secp256k1_scalar_shr_int()

static int secp256k1_scalar_shr_int ( secp256k1_scalar r,
int  n 
)
static

Definition at line 92 of file scalar_low_impl.h.

References VERIFY_CHECK.

◆ secp256k1_scalar_split_128()

static void secp256k1_scalar_split_128 ( secp256k1_scalar r1,
secp256k1_scalar r2,
const secp256k1_scalar a 
)
static

Definition at line 105 of file scalar_low_impl.h.

Referenced by secp256k1_ecmult_strauss_wnaf().

◆ secp256k1_scalar_sqr()

static void secp256k1_scalar_sqr ( secp256k1_scalar r,
const secp256k1_scalar a 
)
static

Definition at line 101 of file scalar_low_impl.h.

References EXHAUSTIVE_TEST_ORDER.

Released under the MIT license