PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Classes | Macros
ecmult_impl.h File Reference
#include "group.h"
#include "scalar.h"
#include "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_ecmult_consts_t
 

Macros

#define WINDOW_A   5
 
#define WINDOW_G   15
 larger numbers may result in slightly better performance, at the cost of exponentially larger precomputed tables. More...
 
#define ECMULT_TABLE_SIZE(w)   (1 << ((w)-2))
 The number of entries a table with precomputed multiples needs to have. More...
 
#define ECMULT_TABLE_GET(r, pre, n, w, neg)
 The following two macro retrieves a particular odd multiple from a table of precomputed multiples. More...
 
#define ECMULT_TABLE_GET_GEJ(r, pre, n, w)   ECMULT_TABLE_GET((r),(pre),(n),(w),secp256k1_gej_neg)
 
#define ECMULT_TABLE_GET_GE(r, pre, n, w)   ECMULT_TABLE_GET((r),(pre),(n),(w),secp256k1_ge_neg)
 

Macro Definition Documentation

◆ ECMULT_TABLE_GET

#define ECMULT_TABLE_GET (   r,
  pre,
  n,
  w,
  neg 
)
Value:
do { \
VERIFY_CHECK(((n) & 1) == 1); \
VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \
VERIFY_CHECK((n) <= ((1 << ((w)-1)) - 1)); \
if ((n) > 0) \
*(r) = (pre)[((n)-1)/2]; \
else \
(neg)((r), &(pre)[(-(n)-1)/2]); \
} while(0)

The following two macro retrieves a particular odd multiple from a table of precomputed multiples.

Definition at line 60 of file ecmult_impl.h.

◆ ECMULT_TABLE_GET_GE

#define ECMULT_TABLE_GET_GE (   r,
  pre,
  n,
 
)    ECMULT_TABLE_GET((r),(pre),(n),(w),secp256k1_ge_neg)

Definition at line 71 of file ecmult_impl.h.

◆ ECMULT_TABLE_GET_GEJ

#define ECMULT_TABLE_GET_GEJ (   r,
  pre,
  n,
 
)    ECMULT_TABLE_GET((r),(pre),(n),(w),secp256k1_gej_neg)

Definition at line 70 of file ecmult_impl.h.

◆ ECMULT_TABLE_SIZE

#define ECMULT_TABLE_SIZE (   w)    (1 << ((w)-2))

The number of entries a table with precomputed multiples needs to have.

Definition at line 56 of file ecmult_impl.h.

◆ WINDOW_A

#define WINDOW_A   5

Definition at line 15 of file ecmult_impl.h.

◆ WINDOW_G

#define WINDOW_G   15

larger numbers may result in slightly better performance, at the cost of exponentially larger precomputed tables.

WINDOW_G == 14 results in 640 KiB.

Definition at line 22 of file ecmult_impl.h.

r
void const uint64_t uint64_t * r
Definition: field_5x52_asm_impl.h:10