|
static int | all_bytes_equal (const void *s, unsigned char value, size_t n) |
|
static void | counting_callback_fn (const char *str, void *data) |
|
static void | uncounting_illegal_callback_fn (const char *str, void *data) |
|
static void | run_xoshiro256pp_tests (void) |
|
static void | run_selftest_tests (void) |
|
static int | ecmult_gen_context_eq (const secp256k1_ecmult_gen_context *a, const secp256k1_ecmult_gen_context *b) |
|
static int | context_eq (const secp256k1_context *a, const secp256k1_context *b) |
|
static void | run_deprecated_context_flags_test (void) |
|
static void | run_ec_illegal_argument_tests (void) |
|
static void | run_static_context_tests (int use_prealloc) |
|
static void | run_proper_context_tests (int use_prealloc) |
|
static void | run_scratch_tests (void) |
|
static void | run_ctz_tests (void) |
|
static void | run_sha256_known_output_tests (void) |
|
static void | run_sha256_counter_tests (void) |
| SHA256 counter tests. More...
|
|
static void | test_sha256_eq (const secp256k1_sha256 *sha1, const secp256k1_sha256 *sha2) |
|
static void | run_hmac_sha256_tests (void) |
|
static void | run_rfc6979_hmac_sha256_tests (void) |
|
static void | run_tagged_sha256_tests (void) |
|
static uint64_t | modinv2p64 (uint64_t x) |
|
static void | mulmod256 (uint16_t *out, const uint16_t *a, const uint16_t *b, const uint16_t *m) |
|
static void | uint16_to_signed30 (secp256k1_modinv32_signed30 *out, const uint16_t *in) |
|
static void | signed30_to_uint16 (uint16_t *out, const secp256k1_modinv32_signed30 *in) |
|
static void | mutate_sign_signed30 (secp256k1_modinv32_signed30 *x) |
|
static void | test_modinv32_uint16 (uint16_t *out, const uint16_t *in, const uint16_t *mod) |
|
static int | coprime (const uint16_t *a, const uint16_t *b) |
|
static void | run_modinv_tests (void) |
|
static void | scalar_test (void) |
|
static void | run_scalar_set_b32_seckey_tests (void) |
|
static void | run_scalar_tests (void) |
|
static void | random_fe_non_square (secp256k1_fe *ns) |
|
static int | fe_equal (const secp256k1_fe *a, const secp256k1_fe *b) |
|
static void | run_field_convert (void) |
|
static void | run_field_be32_overflow (void) |
|
static int | fe_identical (const secp256k1_fe *a, const secp256k1_fe *b) |
|
static void | run_field_half (void) |
|
static void | run_field_misc (void) |
|
static void | test_fe_mul (const secp256k1_fe *a, const secp256k1_fe *b, int use_sqr) |
|
static void | run_fe_mul (void) |
|
static void | run_sqr (void) |
|
static void | test_sqrt (const secp256k1_fe *a, const secp256k1_fe *k) |
|
static void | run_sqrt (void) |
|
static void | test_inverse_scalar (secp256k1_scalar *out, const secp256k1_scalar *x, int var) |
|
static void | test_inverse_field (secp256k1_fe *out, const secp256k1_fe *x, int var) |
|
static void | run_inverse_tests (void) |
|
static void | test_heap_swap (void) |
|
static void | test_hsort_is_sorted (unsigned char *elements, size_t n, size_t len) |
|
static int | test_hsort_cmp (const void *ele1, const void *ele2, void *data) |
|
static void | test_hsort (size_t element_len) |
|
static void | run_hsort_tests (void) |
|
static int | gej_xyz_equals_gej (const secp256k1_gej *a, const secp256k1_gej *b) |
|
static void | test_ge (void) |
|
static void | test_intialized_inf (void) |
|
static void | test_add_neg_y_diff_x (void) |
|
static void | test_ge_bytes (void) |
|
static void | run_ge (void) |
|
static void | test_gej_cmov (const secp256k1_gej *a, const secp256k1_gej *b) |
|
static void | run_gej (void) |
|
static void | test_ec_combine (void) |
|
static void | run_ec_combine (void) |
|
static void | test_group_decompress (const secp256k1_fe *x) |
|
static void | run_group_decompress (void) |
|
static void | test_pre_g_table (const secp256k1_ge_storage *pre_g, size_t n) |
|
static void | run_ecmult_pre_g (void) |
|
static void | run_ecmult_chain (void) |
|
static void | test_point_times_order (const secp256k1_gej *point) |
|
static void | test_ecmult_target (const secp256k1_scalar *target, int mode) |
|
static void | run_ecmult_near_split_bound (void) |
|
static void | run_point_times_order (void) |
|
static void | ecmult_const_random_mult (void) |
|
static void | ecmult_const_commutativity (void) |
|
static void | ecmult_const_mult_zero_one (void) |
|
static void | ecmult_const_check_result (const secp256k1_ge *A, const secp256k1_scalar *q, const secp256k1_gej *res) |
|
static void | ecmult_const_edges (void) |
|
static void | ecmult_const_mult_xonly (void) |
|
static void | ecmult_const_chain_multiply (void) |
|
static void | run_ecmult_const_tests (void) |
|
static int | ecmult_multi_callback (secp256k1_scalar *sc, secp256k1_ge *pt, size_t idx, void *cbdata) |
|
static int | ecmult_multi_false_callback (secp256k1_scalar *sc, secp256k1_ge *pt, size_t idx, void *cbdata) |
|
static void | test_ecmult_multi (secp256k1_scratch *scratch, secp256k1_ecmult_multi_func ecmult_multi) |
|
static int | test_ecmult_multi_random (secp256k1_scratch *scratch) |
|
static void | test_ecmult_multi_batch_single (secp256k1_ecmult_multi_func ecmult_multi) |
|
static void | test_secp256k1_pippenger_bucket_window_inv (void) |
|
static void | test_ecmult_multi_pippenger_max_points (void) |
| Probabilistically test the function returning the maximum number of possible points for a given scratch space. More...
|
|
static void | test_ecmult_multi_batch_size_helper (void) |
|
static void | test_ecmult_multi_batching (void) |
| Run secp256k1_ecmult_multi_var with num points and a scratch space restricted to 1 <= i <= num points. More...
|
|
static void | run_ecmult_multi_tests (void) |
|
static void | test_wnaf (const secp256k1_scalar *number, int w) |
|
static void | test_fixed_wnaf (const secp256k1_scalar *number, int w) |
|
static void | test_fixed_wnaf_small_helper (int *wnaf, int *wnaf_expected, int w) |
|
static void | test_fixed_wnaf_small (void) |
|
static void | run_wnaf (void) |
|
static int | test_ecmult_accumulate_cb (secp256k1_scalar *sc, secp256k1_ge *pt, size_t idx, void *data) |
|
static void | test_ecmult_accumulate (secp256k1_sha256 *acc, const secp256k1_scalar *x, secp256k1_scratch *scratch) |
|
static void | test_ecmult_constants_2bit (void) |
|
static void | test_ecmult_constants_sha (uint32_t prefix, size_t iter, const unsigned char *expected32) |
|
static void | run_ecmult_constants (void) |
|
static void | test_ecmult_gen_blind (void) |
|
static void | test_ecmult_gen_blind_reset (void) |
|
static void | test_ecmult_gen_edge_cases (void) |
|
static void | run_ecmult_gen_blind (void) |
|
static void | test_scalar_split (const secp256k1_scalar *full) |
|
static void | run_endomorphism_tests (void) |
|
static void | ec_pubkey_parse_pointtest (const unsigned char *input, int xvalid, int yvalid) |
|
static void | run_ec_pubkey_parse_test (void) |
|
static void | run_eckey_edge_case_test (void) |
|
static void | run_eckey_negate_test (void) |
|
static void | random_sign (secp256k1_scalar *sigr, secp256k1_scalar *sigs, const secp256k1_scalar *key, const secp256k1_scalar *msg, int *recid) |
|
static void | test_ecdsa_sign_verify (void) |
|
static void | run_ecdsa_sign_verify (void) |
|
static int | precomputed_nonce_function (unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int counter) |
| Dummy nonce generation function that just uses a precomputed nonce, and fails if it is not accepted. More...
|
|
static int | nonce_function_test_fail (unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int counter) |
|
static int | nonce_function_test_retry (unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int counter) |
|
static int | is_empty_signature (const secp256k1_ecdsa_signature *sig) |
|
static void | test_ecdsa_end_to_end (void) |
|
static void | test_random_pubkeys (void) |
|
static void | run_pubkey_comparison (void) |
|
static void | test_sort_helper (secp256k1_pubkey *pk, size_t *pk_order, size_t n_pk) |
|
static void | permute (size_t *arr, size_t n) |
|
static void | test_sort_api (void) |
|
static void | test_sort (void) |
|
static void | test_sort_vectors (void) |
|
static void | run_pubkey_sort (void) |
|
static void | run_random_pubkeys (void) |
|
static void | run_ecdsa_end_to_end (void) |
|
static int | test_ecdsa_der_parse (const unsigned char *sig, size_t siglen, int certainly_der, int certainly_not_der) |
|
static void | assign_big_endian (unsigned char *ptr, size_t ptrlen, uint32_t val) |
|
static void | damage_array (unsigned char *sig, size_t *len) |
|
static void | random_ber_signature (unsigned char *sig, size_t *len, int *certainly_der, int *certainly_not_der) |
|
static void | run_ecdsa_der_parse (void) |
|
static void | test_ecdsa_edge_cases (void) |
|
static void | run_ecdsa_edge_cases (void) |
|
static void | test_ecdsa_wycheproof (void) |
| Wycheproof tests. More...
|
|
static void | run_ecdsa_wycheproof (void) |
|
static void | run_secp256k1_memczero_test (void) |
|
static void | run_secp256k1_is_zero_array_test (void) |
|
static void | run_secp256k1_byteorder_tests (void) |
|
static void | int_cmov_test (void) |
|
static void | fe_cmov_test (void) |
|
static void | fe_storage_cmov_test (void) |
|
static void | scalar_cmov_test (void) |
|
static void | ge_storage_cmov_test (void) |
|
static void | run_cmov_tests (void) |
|
int | main (int argc, char **argv) |
|