![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
Go to the source code of this file.
Macros | |
#define | WINDOW_A 5 |
#define | WINDOW_G 16 |
#define | ECMULT_TABLE_SIZE(w) (1 << ((w)-2)) |
#define | ECMULT_TABLE_GET_GE(r, pre, n, w) |
#define | ECMULT_TABLE_GET_GE_STORAGE(r, pre, n, w) |
#define ECMULT_TABLE_GET_GE | ( | r, | |
pre, | |||
n, | |||
w | |||
) |
The following two macro retrieves a particular odd multiple from a table of precomputed multiples.
Definition at line 117 of file ecmult_impl.h.
Referenced by secp256k1_ecmult().
#define ECMULT_TABLE_GET_GE_STORAGE | ( | r, | |
pre, | |||
n, | |||
w | |||
) |
Definition at line 128 of file ecmult_impl.h.
Referenced by secp256k1_ecmult().
#define ECMULT_TABLE_SIZE | ( | w | ) | (1 << ((w)-2)) |
The number of entries a table with precomputed multiples needs to have.
Definition at line 28 of file ecmult_impl.h.
Referenced by secp256k1_ecmult(), secp256k1_ecmult_const(), secp256k1_ecmult_context_build(), secp256k1_ecmult_context_clone(), and secp256k1_ecmult_odd_multiples_table_globalz_windowa().
#define WINDOW_A 5 |
Definition at line 15 of file ecmult_impl.h.
Referenced by bench_ecmult_wnaf(), bench_wnaf_const(), secp256k1_ecmult(), secp256k1_ecmult_const(), and secp256k1_ecmult_odd_multiples_table_globalz_windowa().
#define WINDOW_G 16 |
larger numbers may result in slightly better performance, at the cost of exponentially larger precomputed tables. One table for window size 16: 1.375 MiB.
Definition at line 24 of file ecmult_impl.h.
Referenced by secp256k1_ecmult(), secp256k1_ecmult_context_build(), and secp256k1_ecmult_context_clone().
|
static |
Definition at line 269 of file ecmult_impl.h.
|
static |
Definition at line 147 of file ecmult_impl.h.
|
static |
Definition at line 203 of file ecmult_impl.h.
|
static |
Definition at line 179 of file ecmult_impl.h.
|
static |
Definition at line 140 of file ecmult_impl.h.
Referenced by secp256k1_ecmult_context_clear().
|
static |
Definition at line 199 of file ecmult_impl.h.
|
static |
Fill a table 'prej' with precomputed odd multiples of a. Prej will contain the values [1*a,3*a,...,(2*n-1)*a], so it space for n values. zr[0] will contain prej[0].z / a.z. The other zr[i] values = prej[i].z / prej[i-1].z. Prej's Z values are undefined, except for the last value.
Definition at line 35 of file ecmult_impl.h.
Referenced by secp256k1_ecmult_odd_multiples_table_globalz_windowa(), and secp256k1_ecmult_odd_multiples_table_storage_var().
|
static |
Fill a table 'pre' with precomputed odd multiples of a.
There are two versions of this function:
To compute a*P + b*G, we compute a table for P using the first function, and for G using the second (which requires an inverse, but it only needs to happen once).
Definition at line 85 of file ecmult_impl.h.
Referenced by secp256k1_ecmult(), and secp256k1_ecmult_const().
|
static |
Definition at line 95 of file ecmult_impl.h.
Referenced by secp256k1_ecmult_context_build().
|
static |
Convert a number to WNAF notation. The number becomes represented by sum(2^i * wnaf[i], i=0..bits), with the following guarantees:
Definition at line 218 of file ecmult_impl.h.
Referenced by bench_ecmult_wnaf(), secp256k1_ecmult(), and test_wnaf().