Fabcoin Core  0.16.2
P2P Digital Currency
Macros
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 WNAF_BITS   256
 
#define WNAF_SIZE(w)   ((WNAF_BITS + (w) - 1) / (w))
 
#define ECMULT_CONST_TABLE_GET_GE(r, pre, n, w)
 

Macro Definition Documentation

#define ECMULT_CONST_TABLE_GET_GE (   r,
  pre,
  n,
 
)
Value:
do { \
int m; \
int abs_n = (n) * (((n) > 0) * 2 - 1); \
int idx_n = abs_n / 2; \
secp256k1_fe neg_y; \
VERIFY_CHECK(((n) & 1) == 1); \
VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \
VERIFY_CHECK((n) <= ((1 << ((w)-1)) - 1)); \
VERIFY_SETUP(secp256k1_fe_clear(&(r)->x)); \
VERIFY_SETUP(secp256k1_fe_clear(&(r)->y)); \
for (m = 0; m < ECMULT_TABLE_SIZE(w); m++) { \
/* This loop is used to avoid secret data in array indices. See
* the comment in ecmult_gen_impl.h for rationale. */ \
secp256k1_fe_cmov(&(r)->x, &(pre)[m].x, m == idx_n); \
secp256k1_fe_cmov(&(r)->y, &(pre)[m].y, m == idx_n); \
} \
(r)->infinity = 0; \
secp256k1_fe_negate(&neg_y, &(r)->y, 1); \
secp256k1_fe_cmov(&(r)->y, &neg_y, (n) != abs_n); \
} while(0)
#define VERIFY_CHECK(cond)
Definition: util.h:67
#define VERIFY_SETUP(stmt)
Definition: util.h:68
#define ECMULT_TABLE_SIZE(w)
The number of entries a table with precomputed multiples needs to have.
Definition: ecmult_impl.h:45
for(size_t i=trim;i< len;i++) hash[i-trim]
#define x(i)

Definition at line 23 of file ecmult_const_impl.h.

#define WNAF_BITS   256

Definition at line 18 of file ecmult_const_impl.h.

#define WNAF_SIZE (   w)    ((WNAF_BITS + (w) - 1) / (w))

Definition at line 20 of file ecmult_const_impl.h.