7#ifndef SECP256K1_FIELD_IMPL_H
8#define SECP256K1_FIELD_IMPL_H
10#if defined HAVE_CONFIG_H
11#include "libsecp256k1-config.h"
16#if defined(SECP256K1_WIDEMUL_INT128)
18#elif defined(SECP256K1_WIDEMUL_INT64)
21#error "Please select wide multiplication implementation"
48 secp256k1_fe x2,
x3,
x6,
x9,
x11,
x22,
x44,
x88,
x176,
x220,
x223,
t1;
83 for (
j=0;
j<11;
j++) {
89 for (
j=0;
j<22;
j++) {
95 for (
j=0;
j<44;
j++) {
101 for (
j=0;
j<88;
j++) {
107 for (
j=0;
j<44;
j++) {
113 for (
j=0;
j<3;
j++) {
121 for (
j=0;
j<23;
j++) {
125 for (
j=0;
j<6;
j++) {
static void secp256k1_fe_negate(secp256k1_fe *r, const secp256k1_fe *a, int m)
Set a field element equal to the additive inverse of another.
static void secp256k1_fe_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe *SECP256K1_RESTRICT b)
Sets a field element to be the product of two others.
static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe *r)
Verify whether a field element represents zero i.e.
static void secp256k1_fe_sqr(secp256k1_fe *r, const secp256k1_fe *a)
Sets a field element to be the square of another.
static void secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a)
Adds a field element to another.
static int secp256k1_fe_normalizes_to_zero(secp256k1_fe *r)
Verify whether a field element represents zero i.e.
#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0)
static int secp256k1_fe_is_quad_var(const secp256k1_fe *a)
static int secp256k1_fe_sqrt(secp256k1_fe *r, const secp256k1_fe *a)
static SECP256K1_INLINE int secp256k1_fe_equal_var(const secp256k1_fe *a, const secp256k1_fe *b)
static const secp256k1_fe secp256k1_fe_one
static SECP256K1_INLINE int secp256k1_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b)
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
#define VERIFY_CHECK(cond)