Bitcoin Core  27.99.0
P2P Digital Currency
Functions | Variables
field_5x52_impl.h File Reference
#include "checkmem.h"
#include "util.h"
#include "field.h"
#include "modinv64_impl.h"
#include "field_5x52_int128_impl.h"
Include dependency graph for field_5x52_impl.h:

Go to the source code of this file.

Functions

static void secp256k1_fe_impl_get_bounds (secp256k1_fe *r, int m)
 
static void secp256k1_fe_impl_normalize (secp256k1_fe *r)
 
static void secp256k1_fe_impl_normalize_weak (secp256k1_fe *r)
 
static void secp256k1_fe_impl_normalize_var (secp256k1_fe *r)
 
static int secp256k1_fe_impl_normalizes_to_zero (const secp256k1_fe *r)
 
static int secp256k1_fe_impl_normalizes_to_zero_var (const secp256k1_fe *r)
 
static SECP256K1_INLINE void secp256k1_fe_impl_set_int (secp256k1_fe *r, int a)
 
static SECP256K1_INLINE int secp256k1_fe_impl_is_zero (const secp256k1_fe *a)
 
static SECP256K1_INLINE int secp256k1_fe_impl_is_odd (const secp256k1_fe *a)
 
static SECP256K1_INLINE void secp256k1_fe_impl_clear (secp256k1_fe *a)
 
static int secp256k1_fe_impl_cmp_var (const secp256k1_fe *a, const secp256k1_fe *b)
 
static void secp256k1_fe_impl_set_b32_mod (secp256k1_fe *r, const unsigned char *a)
 
static int secp256k1_fe_impl_set_b32_limit (secp256k1_fe *r, const unsigned char *a)
 
static void secp256k1_fe_impl_get_b32 (unsigned char *r, const secp256k1_fe *a)
 Convert a field element to a 32-byte big endian value. More...
 
static SECP256K1_INLINE void secp256k1_fe_impl_negate_unchecked (secp256k1_fe *r, const secp256k1_fe *a, int m)
 
static SECP256K1_INLINE void secp256k1_fe_impl_mul_int_unchecked (secp256k1_fe *r, int a)
 
static SECP256K1_INLINE void secp256k1_fe_impl_add_int (secp256k1_fe *r, int a)
 
static SECP256K1_INLINE void secp256k1_fe_impl_add (secp256k1_fe *r, const secp256k1_fe *a)
 
static SECP256K1_INLINE void secp256k1_fe_impl_mul (secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe *SECP256K1_RESTRICT b)
 
static SECP256K1_INLINE void secp256k1_fe_impl_sqr (secp256k1_fe *r, const secp256k1_fe *a)
 
static SECP256K1_INLINE void secp256k1_fe_impl_cmov (secp256k1_fe *r, const secp256k1_fe *a, int flag)
 
static SECP256K1_INLINE void secp256k1_fe_impl_half (secp256k1_fe *r)
 
static SECP256K1_INLINE void secp256k1_fe_storage_cmov (secp256k1_fe_storage *r, const secp256k1_fe_storage *a, int flag)
 
static void secp256k1_fe_impl_to_storage (secp256k1_fe_storage *r, const secp256k1_fe *a)
 
static SECP256K1_INLINE void secp256k1_fe_impl_from_storage (secp256k1_fe *r, const secp256k1_fe_storage *a)
 
static void secp256k1_fe_from_signed62 (secp256k1_fe *r, const secp256k1_modinv64_signed62 *a)
 
static void secp256k1_fe_to_signed62 (secp256k1_modinv64_signed62 *r, const secp256k1_fe *a)
 
static void secp256k1_fe_impl_inv (secp256k1_fe *r, const secp256k1_fe *x)
 
static void secp256k1_fe_impl_inv_var (secp256k1_fe *r, const secp256k1_fe *x)
 
static int secp256k1_fe_impl_is_square_var (const secp256k1_fe *x)
 

Variables

static const secp256k1_modinv64_modinfo secp256k1_const_modinfo_fe
 

Function Documentation

◆ secp256k1_fe_from_signed62()

static void secp256k1_fe_from_signed62 ( secp256k1_fe r,
const secp256k1_modinv64_signed62 a 
)
static

Definition at line 450 of file field_5x52_impl.h.

Here is the caller graph for this function:

◆ secp256k1_fe_impl_add()

static SECP256K1_INLINE void secp256k1_fe_impl_add ( secp256k1_fe r,
const secp256k1_fe a 
)
static

Definition at line 340 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_add_int()

static SECP256K1_INLINE void secp256k1_fe_impl_add_int ( secp256k1_fe r,
int  a 
)
static

Definition at line 336 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_clear()

static SECP256K1_INLINE void secp256k1_fe_impl_clear ( secp256k1_fe a)
static

Definition at line 215 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_cmov()

static SECP256K1_INLINE void secp256k1_fe_impl_cmov ( secp256k1_fe r,
const secp256k1_fe a,
int  flag 
)
static

Definition at line 356 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_cmp_var()

static int secp256k1_fe_impl_cmp_var ( const secp256k1_fe a,
const secp256k1_fe b 
)
static

Definition at line 222 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_from_storage()

static SECP256K1_INLINE void secp256k1_fe_impl_from_storage ( secp256k1_fe r,
const secp256k1_fe_storage a 
)
static

Definition at line 442 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_get_b32()

static void secp256k1_fe_impl_get_b32 ( unsigned char *  r,
const secp256k1_fe a 
)
static

Convert a field element to a 32-byte big endian value.

Requires the input to be normalized

Definition at line 278 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_get_bounds()

static void secp256k1_fe_impl_get_bounds ( secp256k1_fe r,
int  m 
)
static

Definition at line 35 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_half()

static SECP256K1_INLINE void secp256k1_fe_impl_half ( secp256k1_fe r)
static

Definition at line 369 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_inv()

static void secp256k1_fe_impl_inv ( secp256k1_fe r,
const secp256k1_fe x 
)
static

Definition at line 486 of file field_5x52_impl.h.

Here is the call graph for this function:

◆ secp256k1_fe_impl_inv_var()

static void secp256k1_fe_impl_inv_var ( secp256k1_fe r,
const secp256k1_fe x 
)
static

Definition at line 496 of file field_5x52_impl.h.

Here is the call graph for this function:

◆ secp256k1_fe_impl_is_odd()

static SECP256K1_INLINE int secp256k1_fe_impl_is_odd ( const secp256k1_fe a)
static

Definition at line 211 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_is_square_var()

static int secp256k1_fe_impl_is_square_var ( const secp256k1_fe x)
static

Definition at line 506 of file field_5x52_impl.h.

Here is the call graph for this function:

◆ secp256k1_fe_impl_is_zero()

static SECP256K1_INLINE int secp256k1_fe_impl_is_zero ( const secp256k1_fe a)
static

Definition at line 206 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_mul()

static SECP256K1_INLINE void secp256k1_fe_impl_mul ( secp256k1_fe r,
const secp256k1_fe a,
const secp256k1_fe *SECP256K1_RESTRICT  b 
)
static

Definition at line 348 of file field_5x52_impl.h.

Here is the call graph for this function:

◆ secp256k1_fe_impl_mul_int_unchecked()

static SECP256K1_INLINE void secp256k1_fe_impl_mul_int_unchecked ( secp256k1_fe r,
int  a 
)
static

Definition at line 328 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_negate_unchecked()

static SECP256K1_INLINE void secp256k1_fe_impl_negate_unchecked ( secp256k1_fe r,
const secp256k1_fe a,
int  m 
)
static

Definition at line 313 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_normalize()

static void secp256k1_fe_impl_normalize ( secp256k1_fe r)
static

Definition at line 43 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_normalize_var()

static void secp256k1_fe_impl_normalize_var ( secp256k1_fe r)
static

Definition at line 99 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_normalize_weak()

static void secp256k1_fe_impl_normalize_weak ( secp256k1_fe r)
static

Definition at line 80 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_normalizes_to_zero()

static int secp256k1_fe_impl_normalizes_to_zero ( const secp256k1_fe r)
static

Definition at line 137 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_normalizes_to_zero_var()

static int secp256k1_fe_impl_normalizes_to_zero_var ( const secp256k1_fe r)
static

Definition at line 160 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_set_b32_limit()

static int secp256k1_fe_impl_set_b32_limit ( secp256k1_fe r,
const unsigned char *  a 
)
static

Definition at line 272 of file field_5x52_impl.h.

Here is the call graph for this function:

◆ secp256k1_fe_impl_set_b32_mod()

static void secp256k1_fe_impl_set_b32_mod ( secp256k1_fe r,
const unsigned char *  a 
)
static

Definition at line 235 of file field_5x52_impl.h.

Here is the caller graph for this function:

◆ secp256k1_fe_impl_set_int()

static SECP256K1_INLINE void secp256k1_fe_impl_set_int ( secp256k1_fe r,
int  a 
)
static

Definition at line 201 of file field_5x52_impl.h.

◆ secp256k1_fe_impl_sqr()

static SECP256K1_INLINE void secp256k1_fe_impl_sqr ( secp256k1_fe r,
const secp256k1_fe a 
)
static

Definition at line 352 of file field_5x52_impl.h.

Here is the call graph for this function:

◆ secp256k1_fe_impl_to_storage()

static void secp256k1_fe_impl_to_storage ( secp256k1_fe_storage r,
const secp256k1_fe a 
)
static

Definition at line 435 of file field_5x52_impl.h.

◆ secp256k1_fe_storage_cmov()

static SECP256K1_INLINE void secp256k1_fe_storage_cmov ( secp256k1_fe_storage r,
const secp256k1_fe_storage a,
int  flag 
)
static

Definition at line 423 of file field_5x52_impl.h.

◆ secp256k1_fe_to_signed62()

static void secp256k1_fe_to_signed62 ( secp256k1_modinv64_signed62 r,
const secp256k1_fe a 
)
static

Definition at line 470 of file field_5x52_impl.h.

Here is the caller graph for this function:

Variable Documentation

◆ secp256k1_const_modinfo_fe

const secp256k1_modinv64_modinfo secp256k1_const_modinfo_fe
static
Initial value:
= {
{{-0x1000003D1LL, 0, 0, 0, 256}},
0x27C7F6E22DDACACFLL
}

Definition at line 481 of file field_5x52_impl.h.