Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/ecmult_impl.h
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
#endif | #endif | ||||
#ifdef USE_ENDOMORPHISM | #ifdef USE_ENDOMORPHISM | ||||
#define WNAF_BITS 128 | #define WNAF_BITS 128 | ||||
#else | #else | ||||
#define WNAF_BITS 256 | #define WNAF_BITS 256 | ||||
#endif | #endif | ||||
#define WNAF_SIZE(w) ((WNAF_BITS + (w) - 1) / (w)) | #define WNAF_SIZE_BITS(bits, w) (((bits) + (w) - 1) / (w)) | ||||
#define WNAF_SIZE(w) WNAF_SIZE_BITS(WNAF_BITS, w) | |||||
/** The number of entries a table with precomputed multiples needs to have. */ | /** The number of entries a table with precomputed multiples needs to have. */ | ||||
#define ECMULT_TABLE_SIZE(w) (1 << ((w)-2)) | #define ECMULT_TABLE_SIZE(w) (1 << ((w)-2)) | ||||
/* The number of objects allocated on the scratch space for ecmult_multi algorithms */ | /* The number of objects allocated on the scratch space for ecmult_multi algorithms */ | ||||
#define PIPPENGER_SCRATCH_OBJECTS 6 | #define PIPPENGER_SCRATCH_OBJECTS 6 | ||||
#define STRAUSS_SCRATCH_OBJECTS 6 | #define STRAUSS_SCRATCH_OBJECTS 6 | ||||
▲ Show 20 Lines • Show All 964 Lines • Show Last 20 Lines |