![]() |
Bitcoin Core 31.1.0
P2P Digital Currency
|
Go to the source code of this file.
Macros | |
| #define | ECMULT_WINDOW_SIZE 15 |
| #define | ECMULT_TABLE_SIZE(w) |
| The number of entries a table with precomputed multiples needs to have. | |
Typedefs | |
| typedef int | secp256k1_ecmult_multi_callback(secp256k1_scalar *sc, secp256k1_ge *pt, size_t idx, void *data) |
Functions | |
| static void | secp256k1_ecmult (secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng) |
| Double multiply: R = na*A + ng*G. | |
| static int | secp256k1_ecmult_multi_var (const secp256k1_callback *error_callback, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n) |
| Multi-multiply: R = inp_g_sc * G + sum_i ni * Ai. | |
| #define ECMULT_TABLE_SIZE | ( | w | ) |
| typedef int secp256k1_ecmult_multi_callback(secp256k1_scalar *sc, secp256k1_ge *pt, size_t idx, void *data) |
|
static |
Double multiply: R = na*A + ng*G.
|
static |
Multi-multiply: R = inp_g_sc * G + sum_i ni * Ai.
Chooses the right algorithm for a given number of points and scratch space size. Resets and overwrites the given scratch space. If the points do not fit in the scratch space the algorithm is repeatedly run with batches of points. If no scratch space is given then a simple algorithm is used that simply multiplies the points with the corresponding scalars and adds them up. Returns: 1 on success (including when inp_g_sc is NULL and n is 0) 0 if there is not enough scratch space for a single point or callback returns 0