Bitcoin Core 28.99.0
P2P Digital Currency
Macros | Functions | Variables
ecmult_const_impl.h File Reference
#include "scalar.h"
#include "group.h"
#include "ecmult_const.h"
#include "ecmult_impl.h"
Include dependency graph for ecmult_const_impl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ECMULT_CONST_GROUP_SIZE   5
 
#define ECMULT_CONST_TABLE_SIZE   (1L << (ECMULT_CONST_GROUP_SIZE - 1))
 
#define ECMULT_CONST_GROUPS   ((129 + ECMULT_CONST_GROUP_SIZE - 1) / ECMULT_CONST_GROUP_SIZE)
 
#define ECMULT_CONST_BITS   (ECMULT_CONST_GROUPS * ECMULT_CONST_GROUP_SIZE)
 
#define ECMULT_CONST_TABLE_GET_GE(r, pre, n)
 

Functions

static void secp256k1_ecmult_const_odd_multiples_table_globalz (secp256k1_ge *pre, secp256k1_fe *globalz, const secp256k1_gej *a)
 Fill a table 'pre' with precomputed odd multiples of a. More...
 
static void secp256k1_ecmult_const (secp256k1_gej *r, const secp256k1_ge *a, const secp256k1_scalar *q)
 
static int secp256k1_ecmult_const_xonly (secp256k1_fe *r, const secp256k1_fe *n, const secp256k1_fe *d, const secp256k1_scalar *q, int known_on_curve)
 

Variables

static const secp256k1_scalar secp256k1_ecmult_const_K = SECP256K1_SCALAR_CONST(0xa4e88a7dul, 0xcb13034eul, 0xc2bdd6bful, 0x7c118d6bul, 0x589ae848ul, 0x26ba29e4ul, 0xb5c2c1dcul, 0xde9798d9ul)
 

Macro Definition Documentation

◆ ECMULT_CONST_BITS

#define ECMULT_CONST_BITS   (ECMULT_CONST_GROUPS * ECMULT_CONST_GROUP_SIZE)

Definition at line 35 of file ecmult_const_impl.h.

◆ ECMULT_CONST_GROUP_SIZE

#define ECMULT_CONST_GROUP_SIZE   5

Definition at line 30 of file ecmult_const_impl.h.

◆ ECMULT_CONST_GROUPS

#define ECMULT_CONST_GROUPS   ((129 + ECMULT_CONST_GROUP_SIZE - 1) / ECMULT_CONST_GROUP_SIZE)

Definition at line 34 of file ecmult_const_impl.h.

◆ ECMULT_CONST_TABLE_GET_GE

#define ECMULT_CONST_TABLE_GET_GE (   r,
  pre,
 
)

Definition at line 61 of file ecmult_const_impl.h.

◆ ECMULT_CONST_TABLE_SIZE

#define ECMULT_CONST_TABLE_SIZE   (1L << (ECMULT_CONST_GROUP_SIZE - 1))

Definition at line 33 of file ecmult_const_impl.h.

Function Documentation

◆ secp256k1_ecmult_const()

static void secp256k1_ecmult_const ( secp256k1_gej r,
const secp256k1_ge a,
const secp256k1_scalar q 
)
static

Definition at line 102 of file ecmult_const_impl.h.

◆ secp256k1_ecmult_const_odd_multiples_table_globalz()

static void secp256k1_ecmult_const_odd_multiples_table_globalz ( secp256k1_ge pre,
secp256k1_fe globalz,
const secp256k1_gej a 
)
static

Fill a table 'pre' with precomputed odd multiples of a.

The resulting point set is brought to a single constant Z denominator, stores the X and Y coordinates as ge points in pre, and stores the global Z in globalz.

'pre' must be an array of size ECMULT_CONST_TABLE_SIZE.

Definition at line 44 of file ecmult_const_impl.h.

Here is the call graph for this function:

◆ secp256k1_ecmult_const_xonly()

static int secp256k1_ecmult_const_xonly ( secp256k1_fe r,
const secp256k1_fe n,
const secp256k1_fe d,
const secp256k1_scalar q,
int  known_on_curve 
)
static

Definition at line 248 of file ecmult_const_impl.h.

Variable Documentation

◆ secp256k1_ecmult_const_K

const secp256k1_scalar secp256k1_ecmult_const_K = SECP256K1_SCALAR_CONST(0xa4e88a7dul, 0xcb13034eul, 0xc2bdd6bful, 0x7c118d6bul, 0x589ae848ul, 0x26ba29e4ul, 0xb5c2c1dcul, 0xde9798d9ul)
static

Definition at line 94 of file ecmult_const_impl.h.