WNAF_SIZE

This commit is contained in:
jl777
2019-02-21 01:55:28 -11:00
parent 99bf645bf1
commit ba4917acf4

View File

@@ -19,7 +19,15 @@
#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)
#ifdef USE_ENDOMORPHISM
#define WNAF_BITS 128
#else
#define WNAF_BITS 256
#endif
//#define WNAF_SIZE(w) ((WNAF_BITS + (w) - 1) / (w))
/* This is like `ECMULT_TABLE_GET_GE` but is constant time */ /* This is like `ECMULT_TABLE_GET_GE` but is constant time */
#define ECMULT_CONST_TABLE_GET_GE(r,pre,n,w) do { \ #define ECMULT_CONST_TABLE_GET_GE(r,pre,n,w) do { \