|
static void | secp256k1_ecmult_odd_multiples_table (int n, secp256k1_gej *prej, secp256k1_fe *zr, const secp256k1_gej *a) |
| Fill a table 'prej' with precomputed odd multiples of a.
|
|
static void | secp256k1_ecmult_odd_multiples_table_globalz_windowa (secp256k1_ge *pre, secp256k1_fe *globalz, const secp256k1_gej *a) |
| Fill a table 'pre' with precomputed odd multiples of a.
|
|
static void | secp256k1_ecmult_odd_multiples_table_storage_var (const int n, secp256k1_ge_storage *pre, const secp256k1_gej *a) |
|
static void | secp256k1_ecmult_context_init (secp256k1_ecmult_context *ctx) |
|
static void | secp256k1_ecmult_context_build (secp256k1_ecmult_context *ctx, void **prealloc) |
|
static void | secp256k1_ecmult_context_finalize_memcpy (secp256k1_ecmult_context *dst, const secp256k1_ecmult_context *src) |
|
static int | secp256k1_ecmult_context_is_built (const secp256k1_ecmult_context *ctx) |
|
static void | secp256k1_ecmult_context_clear (secp256k1_ecmult_context *ctx) |
|
static int | secp256k1_ecmult_wnaf (int *wnaf, int len, const secp256k1_scalar *a, int w) |
| Convert a number to WNAF notation.
|
|
static void | secp256k1_ecmult_strauss_wnaf (const secp256k1_ecmult_context *ctx, const struct secp256k1_strauss_state *state, secp256k1_gej *r, size_t num, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng) |
|
static void | secp256k1_ecmult (const secp256k1_ecmult_context *ctx, secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng) |
|
static size_t | secp256k1_strauss_scratch_size (size_t n_points) |
|
static int | secp256k1_ecmult_strauss_batch (const secp256k1_callback *error_callback, const secp256k1_ecmult_context *ctx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n_points, size_t cb_offset) |
|
static int | secp256k1_ecmult_strauss_batch_single (const secp256k1_callback *error_callback, const secp256k1_ecmult_context *actx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n) |
|
static size_t | secp256k1_strauss_max_points (const secp256k1_callback *error_callback, secp256k1_scratch *scratch) |
|
static int | secp256k1_wnaf_fixed (int *wnaf, const secp256k1_scalar *s, int w) |
| Convert a number to WNAF notation.
|
|
static int | secp256k1_ecmult_pippenger_wnaf (secp256k1_gej *buckets, int bucket_window, struct secp256k1_pippenger_state *state, secp256k1_gej *r, const secp256k1_scalar *sc, const secp256k1_ge *pt, size_t num) |
|
static int | secp256k1_pippenger_bucket_window (size_t n) |
| Returns optimal bucket_window (number of bits of a scalar represented by a set of buckets) for a given number of points.
|
|
static size_t | secp256k1_pippenger_bucket_window_inv (int bucket_window) |
| Returns the maximum optimal number of points for a bucket_window.
|
|
static SECP256K1_INLINE void | secp256k1_ecmult_endo_split (secp256k1_scalar *s1, secp256k1_scalar *s2, secp256k1_ge *p1, secp256k1_ge *p2) |
|
static size_t | secp256k1_pippenger_scratch_size (size_t n_points, int bucket_window) |
| Returns the scratch size required for a given number of points (excluding base point G) without considering alignment.
|
|
static int | secp256k1_ecmult_pippenger_batch (const secp256k1_callback *error_callback, const secp256k1_ecmult_context *ctx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n_points, size_t cb_offset) |
|
static int | secp256k1_ecmult_pippenger_batch_single (const secp256k1_callback *error_callback, const secp256k1_ecmult_context *actx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n) |
|
static size_t | secp256k1_pippenger_max_points (const secp256k1_callback *error_callback, secp256k1_scratch *scratch) |
| Returns the maximum number of points in addition to G that can be used with a given scratch space.
|
|
static int | secp256k1_ecmult_multi_simple_var (const secp256k1_ecmult_context *ctx, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n_points) |
|
static int | secp256k1_ecmult_multi_batch_size_helper (size_t *n_batches, size_t *n_batch_points, size_t max_n_batch_points, size_t n) |
|
static int | secp256k1_ecmult_multi_var (const secp256k1_callback *error_callback, const secp256k1_ecmult_context *ctx, secp256k1_scratch *scratch, secp256k1_gej *r, const secp256k1_scalar *inp_g_sc, secp256k1_ecmult_multi_callback cb, void *cbdata, size_t n) |
|
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 85 of file ecmult_impl.h.
Fill a table 'pre' with precomputed odd multiples of a.
There are two versions of this function:
- secp256k1_ecmult_odd_multiples_table_globalz_windowa which brings its resulting point set to a single constant Z denominator, stores the X and Y coordinates as ge_storage points in pre, and stores the global Z in rz. It only operates on tables sized for WINDOW_A wnaf multiples.
- secp256k1_ecmult_odd_multiples_table_storage_var, which converts its resulting point set to actually affine points, and stores those in pre. It operates on tables of any size.
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 135 of file ecmult_impl.h.