Bitcoin Core 28.99.0
P2P Digital Currency
Functions
scalar_low_impl.h File Reference
#include "checkmem.h"
#include "scalar.h"
#include "util.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_set_int (secp256k1_scalar *r, unsigned int v)
 
static SECP256K1_INLINE uint32_t secp256k1_scalar_get_bits_limb32 (const secp256k1_scalar *a, unsigned int offset, unsigned int count)
 
static SECP256K1_INLINE uint32_t 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 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)
 
static SECP256K1_INLINE void secp256k1_scalar_cmov (secp256k1_scalar *r, const secp256k1_scalar *a, int flag)
 
static void secp256k1_scalar_inverse (secp256k1_scalar *r, const secp256k1_scalar *x)
 
static void secp256k1_scalar_inverse_var (secp256k1_scalar *r, const secp256k1_scalar *x)
 
static void secp256k1_scalar_half (secp256k1_scalar *r, const secp256k1_scalar *a)
 

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 47 of file scalar_low_impl.h.

◆ secp256k1_scalar_cadd_bit()

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

Definition at line 57 of file scalar_low_impl.h.

◆ secp256k1_scalar_check_overflow()

static SECP256K1_INLINE int secp256k1_scalar_check_overflow ( const secp256k1_scalar a)
static

Definition at line 45 of file scalar_low_impl.h.

◆ secp256k1_scalar_cmov()

static SECP256K1_INLINE void secp256k1_scalar_cmov ( secp256k1_scalar r,
const secp256k1_scalar a,
int  flag 
)
static

Definition at line 157 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 122 of file scalar_low_impl.h.

Here is the call graph for this function:

◆ secp256k1_scalar_eq()

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

Definition at line 150 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 85 of file scalar_low_impl.h.

◆ secp256k1_scalar_get_bits_limb32()

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

Definition at line 28 of file scalar_low_impl.h.

Here is the caller graph for this function:

◆ secp256k1_scalar_get_bits_var()

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

Definition at line 39 of file scalar_low_impl.h.

Here is the call graph for this function:

◆ secp256k1_scalar_half()

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

Definition at line 198 of file scalar_low_impl.h.

◆ secp256k1_scalar_inverse()

static void secp256k1_scalar_inverse ( secp256k1_scalar r,
const secp256k1_scalar x 
)
static

Definition at line 170 of file scalar_low_impl.h.

Here is the caller graph for this function:

◆ secp256k1_scalar_inverse_var()

static void secp256k1_scalar_inverse_var ( secp256k1_scalar r,
const secp256k1_scalar x 
)
static

Definition at line 190 of file scalar_low_impl.h.

Here is the call graph for this function:

◆ secp256k1_scalar_is_even()

static SECP256K1_INLINE int secp256k1_scalar_is_even ( const secp256k1_scalar a)
static

Definition at line 16 of file scalar_low_impl.h.

◆ secp256k1_scalar_is_high()

static int secp256k1_scalar_is_high ( const secp256k1_scalar a)
static

Definition at line 116 of file scalar_low_impl.h.

◆ secp256k1_scalar_is_one()

static SECP256K1_INLINE int secp256k1_scalar_is_one ( const secp256k1_scalar a)
static

Definition at line 110 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 92 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 131 of file scalar_low_impl.h.

◆ secp256k1_scalar_negate()

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

Definition at line 98 of file scalar_low_impl.h.

Here is the caller graph for this function:

◆ secp256k1_scalar_set_b32()

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

Definition at line 69 of file scalar_low_impl.h.

◆ secp256k1_scalar_set_int()

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

Definition at line 22 of file scalar_low_impl.h.

◆ secp256k1_scalar_split_128()

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

Definition at line 140 of file scalar_low_impl.h.