Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
field_10x26_impl.h File Reference
#include "checkmem.h"
#include "util.h"
#include "field.h"
#include "modinv32_impl.h"
Include dependency graph for field_10x26_impl.h:

Go to the source code of this file.

Macros

#define VERIFY_BITS(x, n)

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 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.
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 (secp256k1_fe *r, const secp256k1_fe *a)
static SECP256K1_INLINE void secp256k1_fe_impl_add_int (secp256k1_fe *r, int a)
static SECP256K1_INLINE void secp256k1_fe_mul_inner (uint32_t *r, const uint32_t *a, const uint32_t *SECP256K1_RESTRICT b)
static SECP256K1_INLINE void secp256k1_fe_sqr_inner (uint32_t *r, const uint32_t *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_signed30 (secp256k1_fe *r, const secp256k1_modinv32_signed30 *a)
static void secp256k1_fe_to_signed30 (secp256k1_modinv32_signed30 *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_modinv32_modinfo secp256k1_const_modinfo_fe

Macro Definition Documentation

◆ VERIFY_BITS

#define VERIFY_BITS ( x,
n )
Value:
VERIFY_CHECK(((x) >> (n)) == 0)
#define VERIFY_CHECK(cond)
Definition util.h:159

Definition at line 399 of file field_10x26_impl.h.

Function Documentation

◆ secp256k1_fe_from_signed30()

void secp256k1_fe_from_signed30 ( secp256k1_fe * r,
const secp256k1_modinv32_signed30 * a )
static

Definition at line 1139 of file field_10x26_impl.h.

Here is the caller graph for this function:

◆ secp256k1_fe_impl_add()

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

Definition at line 374 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_add_int()

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

Definition at line 387 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_cmov()

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

Definition at line 1014 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_cmp_var()

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

Definition at line 273 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_from_storage()

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

Definition at line 1126 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_get_b32()

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 305 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_get_bounds()

void secp256k1_fe_impl_get_bounds ( secp256k1_fe * r,
int m )
static

Definition at line 40 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_half()

SECP256K1_INLINE void secp256k1_fe_impl_half ( secp256k1_fe * r)
static

Definition at line 1033 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_inv()

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

Definition at line 1191 of file field_10x26_impl.h.

Here is the call graph for this function:

◆ secp256k1_fe_impl_inv_var()

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

Definition at line 1201 of file field_10x26_impl.h.

Here is the call graph for this function:

◆ secp256k1_fe_impl_is_odd()

SECP256K1_INLINE int secp256k1_fe_impl_is_odd ( const secp256k1_fe * a)
static

Definition at line 269 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_is_square_var()

int secp256k1_fe_impl_is_square_var ( const secp256k1_fe * x)
static

Definition at line 1211 of file field_10x26_impl.h.

Here is the call graph for this function:

◆ secp256k1_fe_impl_is_zero()

SECP256K1_INLINE int secp256k1_fe_impl_is_zero ( const secp256k1_fe * a)
static

Definition at line 264 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_mul()

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

Definition at line 1006 of file field_10x26_impl.h.

Here is the call graph for this function:

◆ secp256k1_fe_impl_mul_int_unchecked()

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

Definition at line 361 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_negate_unchecked()

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

Definition at line 340 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_normalize()

void secp256k1_fe_impl_normalize ( secp256k1_fe * r)
static

Definition at line 53 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_normalize_var()

void secp256k1_fe_impl_normalize_var ( secp256k1_fe * r)
static

Definition at line 128 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_normalize_weak()

void secp256k1_fe_impl_normalize_weak ( secp256k1_fe * r)
static

Definition at line 102 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_normalizes_to_zero()

int secp256k1_fe_impl_normalizes_to_zero ( const secp256k1_fe * r)
static

Definition at line 178 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_normalizes_to_zero_var()

int secp256k1_fe_impl_normalizes_to_zero_var ( const secp256k1_fe * r)
static

Definition at line 207 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_set_b32_limit()

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

Definition at line 299 of file field_10x26_impl.h.

Here is the call graph for this function:

◆ secp256k1_fe_impl_set_b32_mod()

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

Definition at line 286 of file field_10x26_impl.h.

Here is the caller graph for this function:

◆ secp256k1_fe_impl_set_int()

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

Definition at line 259 of file field_10x26_impl.h.

◆ secp256k1_fe_impl_sqr()

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

Definition at line 1010 of file field_10x26_impl.h.

Here is the call graph for this function:

◆ secp256k1_fe_impl_to_storage()

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

Definition at line 1115 of file field_10x26_impl.h.

◆ secp256k1_fe_mul_inner()

SECP256K1_INLINE void secp256k1_fe_mul_inner ( uint32_t * r,
const uint32_t * a,
const uint32_t *SECP256K1_RESTRICT b )
static

[... a b c] is a shorthand for ... + a<<52 + b<<26 + c<<0 mod n. for 0 <= x <= 9, px is a shorthand for sum(a[i]*b[x-i], i=0..x). for 9 <= x <= 18, px is a shorthand for sum(a[i]*b[x-i], i=(x-9)..9) Note that [x 0 0 0 0 0 0 0 0 0 0] = [x*R1 x*R0].

Definition at line 401 of file field_10x26_impl.h.

Here is the caller graph for this function:

◆ secp256k1_fe_sqr_inner()

SECP256K1_INLINE void secp256k1_fe_sqr_inner ( uint32_t * r,
const uint32_t * a )
static

[... a b c] is a shorthand for ... + a<<52 + b<<26 + c<<0 mod n. px is a shorthand for sum(a[i]*a[x-i], i=0..x). Note that [x 0 0 0 0 0 0 0 0 0 0] = [x*R1 x*R0].

Definition at line 731 of file field_10x26_impl.h.

Here is the caller graph for this function:

◆ secp256k1_fe_storage_cmov()

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

Definition at line 1098 of file field_10x26_impl.h.

◆ secp256k1_fe_to_signed30()

void secp256k1_fe_to_signed30 ( secp256k1_modinv32_signed30 * r,
const secp256k1_fe * a )
static

Definition at line 1169 of file field_10x26_impl.h.

Here is the caller graph for this function:

Variable Documentation

◆ secp256k1_const_modinfo_fe

const secp256k1_modinv32_modinfo secp256k1_const_modinfo_fe
static
Initial value:
= {
{{-0x3D1, -4, 0, 0, 0, 0, 0, 0, 65536}},
0x2DDACACFL
}

Definition at line 1186 of file field_10x26_impl.h.