Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
ecmult_impl.h File Reference
#include <string.h>
#include <stdint.h>
#include "util.h"
#include "group.h"
#include "scalar.h"
#include "ecmult.h"
#include "precomputed_ecmult.h"
Include dependency graph for ecmult_impl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  secp256k1_strauss_point_state
 
struct  secp256k1_strauss_state
 
struct  secp256k1_pippenger_point_state
 
struct  secp256k1_pippenger_state
 

Macros

#define WINDOW_A   5
 
#define WNAF_BITS   128
 
#define WNAF_SIZE_BITS(bits, w)
 
#define WNAF_SIZE(w)
 
#define PIPPENGER_SCRATCH_OBJECTS   6
 
#define STRAUSS_SCRATCH_OBJECTS   5
 
#define PIPPENGER_MAX_BUCKET_WINDOW   12
 
#define ECMULT_PIPPENGER_THRESHOLD   88
 
#define ECMULT_MAX_POINTS_PER_BATCH   5000000
 
#define SECP256K1_ECMULT_TABLE_VERIFY(n, w)
 

Typedefs

typedef int(* secp256k1_ecmult_multi_func) (const secp256k1_callback *error_callback, secp256k1_scratch *, secp256k1_gej *, const secp256k1_scalar *, secp256k1_ecmult_multi_callback cb, void *, size_t)
 

Macro Definition Documentation

◆ ECMULT_MAX_POINTS_PER_BATCH

#define ECMULT_MAX_POINTS_PER_BATCH   5000000

Definition at line 57 of file ecmult_impl.h.

◆ ECMULT_PIPPENGER_THRESHOLD

#define ECMULT_PIPPENGER_THRESHOLD   88

Definition at line 55 of file ecmult_impl.h.

◆ PIPPENGER_MAX_BUCKET_WINDOW

#define PIPPENGER_MAX_BUCKET_WINDOW   12

Definition at line 52 of file ecmult_impl.h.

◆ PIPPENGER_SCRATCH_OBJECTS

#define PIPPENGER_SCRATCH_OBJECTS   6

Definition at line 49 of file ecmult_impl.h.

◆ SECP256K1_ECMULT_TABLE_VERIFY

#define SECP256K1_ECMULT_TABLE_VERIFY ( n,
w )
Value:
VERIFY_CHECK(((n) & 1) == 1); \
VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \
VERIFY_CHECK((n) <= ((1 << ((w)-1)) - 1));
#define VERIFY_CHECK(cond)
Definition util.h:95

Definition at line 117 of file ecmult_impl.h.

117#define SECP256K1_ECMULT_TABLE_VERIFY(n,w) \
118 VERIFY_CHECK(((n) & 1) == 1); \
119 VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \
120 VERIFY_CHECK((n) <= ((1 << ((w)-1)) - 1));

◆ STRAUSS_SCRATCH_OBJECTS

#define STRAUSS_SCRATCH_OBJECTS   5

Definition at line 50 of file ecmult_impl.h.

◆ WINDOW_A

#define WINDOW_A   5

Definition at line 32 of file ecmult_impl.h.

◆ WNAF_BITS

#define WNAF_BITS   128

Larger values for ECMULT_WINDOW_SIZE result in possibly better performance at the cost of an exponentially larger precomputed table. The exact table size is (1 << (WINDOW_G - 2)) * sizeof(secp256k1_ge_storage) bytes, where sizeof(secp256k1_ge_storage) is typically 64 bytes but can be larger due to platform-specific padding and alignment. Two tables of this size are used (due to the endomorphism optimization).

Definition at line 44 of file ecmult_impl.h.

◆ WNAF_SIZE

#define WNAF_SIZE ( w)
Value:
#define WNAF_BITS
Definition ecmult_impl.h:44
#define WNAF_SIZE_BITS(bits, w)
Definition ecmult_impl.h:45

Definition at line 46 of file ecmult_impl.h.

◆ WNAF_SIZE_BITS

#define WNAF_SIZE_BITS ( bits,
w )
Value:
(((bits) + (w) - 1) / (w))

Definition at line 45 of file ecmult_impl.h.

Typedef Documentation

◆ secp256k1_ecmult_multi_func

typedef int(* secp256k1_ecmult_multi_func) (const secp256k1_callback *error_callback, secp256k1_scratch *, secp256k1_gej *, const secp256k1_scalar *, secp256k1_ecmult_multi_callback cb, void *, size_t)

Definition at line 810 of file ecmult_impl.h.