Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrib: Explain explicit header guards #940

Merged
merged 1 commit into from
May 12, 2021

Conversation

real-or-random
Copy link
Contributor

They were added in #925 and deserve a comment.

They were added in bitcoin-core#925 and deserve a comment.
@gmaxwell
Copy link
Contributor

gmaxwell commented May 6, 2021

ACK 22a9ea1

1 similar comment
@sipa
Copy link
Contributor

sipa commented May 12, 2021

ACK 22a9ea1

@sipa sipa merged commit 1e78c18 into bitcoin-core:master May 12, 2021
surinder83singh added a commit to aspectron/secp256k1-wasm that referenced this pull request Jun 2, 2021
50f33677 Merge #947: ci: Run PRs on merge result even for i686
a35fdd34 ci: Run PRs on merge result even for i686
3dc8c072 Merge #846: ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
02dcea1a ci: Make test iterations configurable and tweak for sanitizer builds
489ff5c2 tests: Treat empty SECP2561_TEST_ITERS as if it was unset
fcfcb97e ci: Simplify to use generic wrapper for QEMU, Valgrind, etc
de4157f1 ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
399722a6 Merge #941: Clean up git tree
09b3bb86 Clean up git tree
bf0ac460 Merge #930: Add ARM32/ARM64 CI
202a030f Merge #850: add `secp256k1_ec_pubkey_cmp` method
1e78c18d Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards
69394879 Merge #926: secp256k1.h: clarify that by default arguments must be != NULL
6eceec6d add `secp256k1_xonly_pubkey_cmp` method
0d9561ae add `secp256k1_ec_pubkey_cmp` method
22a9ea15 contrib: Explain explicit header guards
6c52ae87 Merge #937: Have ge_set_gej_var, gej_double_var and ge_set_all_gej_var initialize all fields of their outputs.
185a6af2 Merge #925: changed include statements without prefix 'include/'
14c9739a tests: Improve secp256k1_ge_set_all_gej_var for some infinity inputs
4a19668c tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs
3c90bdda change local lib headers to be relative for those pointing at "include/" dir
45b6468d Have secp256k1_ge_set_all_gej_var initialize all fields. Previous behaviour would not initialize r->y values in the case where infinity is passed in. Furthermore, the previous behaviour wouldn't initialize anything in the case where all inputs were infinity.
31c0f6de Have secp256k1_gej_double_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
dd6c3de3 Have secp256k1_ge_set_gej_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
d0bd2693 Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM
8bbad7a1 Add asm build to ARM32 CI
7d65ed52 Add ARM32/ARM64 CI
c8483520 Makefile.am: Don't pass a variable twice
2161f317 Makefile.am: Honor config when building gen_context
99f47c20 gen_context: Don't use external ASM because it complicates the build
98e0358d Merge #933: Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers
99e2d5be Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers.
34388af6 Merge #922: Add mingw32-w64/wine CI build
7012a188 Merge #928: Define SECP256K1_BUILD in secp256k1.c directly.
ed5a199b tests: fopen /dev/urandom in binary mode
ae9e6485 Define SECP256K1_BUILD in secp256k1.c directly.
4dc37bf8 Add mingw32-w64/wine CI build
0881633d secp256k1.h: clarify that by default arguments must be != NULL
efad3506 Merge #906: Use modified divsteps with initial delta=1/2 for constant-time
cc2c09e3 Merge #918: Clean up configuration in gen_context
07067967 add ECMULT_GEN_PREC_BITS to basic_config.h
a3aa2628 gen_context: Don't include basic-config.h
be0609fd Add unit tests for edge cases with delta=1/2 variant of divsteps
cd393ce2 Optimization: only do 59 hddivsteps per iteration instead of 62
277b224b Use modified divsteps with initial delta=1/2 for constant-time
376ca366 Fix typo in explanation
1e5d50fa Merge #889: fix uninitialized read in tests
c083cc6e Merge #903: Make argument of fe_normalizes_to_zero{_var} const
6e898534 Merge #907: changed import to use brackets <> for openssl
45044722 changed import to use brackets <> for openssl as they are not local to the project
26de4dfe Merge #831: Safegcd inverses, drop Jacobi symbols, remove libgmp
23c3fb62 Make argument of fe_normalizes_to_zero{_var} const
24ad04fc Make scalar_inverse{,_var} benchmark scale with SECP256K1_BENCH_ITERS
ebc1af70 Optimization: track f,g limb count and pass to new variable-time update_fg_var
b306935a Optimization: use formulas instead of lookup tables for cancelling g bits
9164a1b6 Optimization: special-case zero modulus limbs in modinv64
1f233b3f Remove num/gmp support
20448b8d Remove unused Jacobi symbol support
5437e7bd Remove unused scalar_sqr
aa9cc521 Improve field/scalar inverse tests
1e0e885c Make field/scalar code use the new modinv modules for inverses
436281af Move secp256k1_fe_inverse{_var} to per-impl files
aa404d53 Move secp256k1_scalar_{inverse{_var},is_even} to per-impl files
08d54964 Improve bounds checks in modinv modules
151aac00 Add tests for modinv modules
d8a92fcc Add extensive comments on the safegcd algorithm and implementation
8e415acb Add safegcd based modular inverse modules
de0a643c Add secp256k1_ctz{32,64}_var functions
99a1cfec print warnings for conditional-uninitialized
3d2cf6c5 initialize variable in tests
REVERT: 9fd06254 Merge pull request #5 from bitcoin-core/master
REVERT: 143ecc6f Fix multiset benchmarks
REVERT: d66ad94e Merge pull request #3 from kaspanet/new-schnorr
REVERT: 2a29b5c6 Merge remote-tracking branch 'upstream/master' into new-schnorr
REVERT: f09320ed Revert "Add matching Schnorr implementation "
REVERT: ee3ab072 Add matching Schnorr implementation
REVERT: 087f4bba Fix missing MIT license attribute in oldschnorr impl bitcoin-core/secp256k1#425
REVERT: 054ade68 Add multiset and oldschnorr to travis
REVERT: 2b47e2cf Rename schnorr to oldschnorr and add fixes to build system
REVERT: 604052f4 [secp256k1] Implement Schnorr signatures
REVERT: 1f46fcb2 Add Multiset/ECMH implementation
REVERT: 225587b4 Fix UB(violating alignment rules) in multiset tests
REVERT: b0e16b52 Fix docs and small code problems in multiset
REVERT: 582b1256 Add multiset serialize/parse functions
REVERT: d6dd4762 Fix some build configurations for multiset module
REVERT: 41145690 Add ECMH multiset module to libsecp256k1

git-subtree-dir: depend/secp256k1
git-subtree-split: 50f33677122fed79dedb05e8046b2fea93496201
vmta added a commit to umkoin/umkoin that referenced this pull request Jun 9, 2021
7973576f6 Merge #662: Add ecmult_gen, ecmult_const and ecmult to benchmark
8f879c288 Fix array size in bench_ecmult
2fe1b50df Add ecmult_gen, ecmult_const and ecmult to benchmark
593e6bad9 Clean up ecmult_bench to make space for more benchmarks
50f336771 Merge #947: ci: Run PRs on merge result even for i686
a35fdd347 ci: Run PRs on merge result even for i686
3dc8c072b Merge #846: ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
02dcea1ad ci: Make test iterations configurable and tweak for sanitizer builds
489ff5c20 tests: Treat empty SECP2561_TEST_ITERS as if it was unset
fcfcb97e7 ci: Simplify to use generic wrapper for QEMU, Valgrind, etc
de4157f13 ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
399722a63 Merge #941: Clean up git tree
09b3bb864 Clean up git tree
bf0ac4606 Merge #930: Add ARM32/ARM64 CI
202a030f7 Merge #850: add `secp256k1_ec_pubkey_cmp` method
1e78c18d5 Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards
69394879b Merge #926: secp256k1.h: clarify that by default arguments must be != NULL
6eceec6d5 add `secp256k1_xonly_pubkey_cmp` method
0d9561ae8 add `secp256k1_ec_pubkey_cmp` method
22a9ea154 contrib: Explain explicit header guards
6c52ae872 Merge #937: Have ge_set_gej_var, gej_double_var and ge_set_all_gej_var initialize all fields of their outputs.
185a6af22 Merge #925: changed include statements without prefix 'include/'
14c9739a1 tests: Improve secp256k1_ge_set_all_gej_var for some infinity inputs
4a19668c3 tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs
3c90bdda9 change local lib headers to be relative for those pointing at "include/" dir
45b6468d7 Have secp256k1_ge_set_all_gej_var initialize all fields. Previous behaviour would not initialize r->y values in the case where infinity is passed in. Furthermore, the previous behaviour wouldn't initialize anything in the case where all inputs were infinity.
31c0f6de4 Have secp256k1_gej_double_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
dd6c3de32 Have secp256k1_ge_set_gej_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
d0bd2693e Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM
8bbad7a18 Add asm build to ARM32 CI
7d65ed521 Add ARM32/ARM64 CI
c8483520c Makefile.am: Don't pass a variable twice
2161f3178 Makefile.am: Honor config when building gen_context
99f47c20e gen_context: Don't use external ASM because it complicates the build
98e0358d2 Merge #933: Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers
99e2d5be0 Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers.
34388af6b Merge #922: Add mingw32-w64/wine CI build
7012a188e Merge #928: Define SECP256K1_BUILD in secp256k1.c directly.
ed5a199be tests: fopen /dev/urandom in binary mode
ae9e64852 Define SECP256K1_BUILD in secp256k1.c directly.
4dc37bf81 Add mingw32-w64/wine CI build
0881633df secp256k1.h: clarify that by default arguments must be != NULL
efad3506a Merge #906: Use modified divsteps with initial delta=1/2 for constant-time
cc2c09e3a Merge #918: Clean up configuration in gen_context
07067967e add ECMULT_GEN_PREC_BITS to basic_config.h
a3aa2628c gen_context: Don't include basic-config.h
be0609fd5 Add unit tests for edge cases with delta=1/2 variant of divsteps
cd393ce22 Optimization: only do 59 hddivsteps per iteration instead of 62
277b224b6 Use modified divsteps with initial delta=1/2 for constant-time
376ca366d Fix typo in explanation
1e5d50fa9 Merge #889: fix uninitialized read in tests
99a1cfec1 print warnings for conditional-uninitialized
3d2cf6c5b initialize variable in tests

git-subtree-dir: src/secp256k1
git-subtree-split: 7973576f6e3ab27d036a09397152b124d747f4ae
jonasnick added a commit to BlockstreamResearch/secp256k1-zkp that referenced this pull request Jul 13, 2021
… Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM, 925, 937, 926, Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards, 850, 930, 941, 846, 947, 662, 950

f09497e CI: tweak cirrus.yml to prevent OOM and timeout w sanitizer/valgrind (Jonas Nick)
7226cf2 ecdsa_adaptor: fix too small buffer in tests (Jonas Nick)
b053e85 ecdsa_adaptor: fix test case with invalid signature (Jonas Nick)
d27e459 Revert "Remove unused Jacobi symbol support" (Jonas Nick)
c58c4ea ci: Add ppc64le build (Tim Ruffing)
8f879c2 Fix array size in bench_ecmult (Jonas Nick)
2fe1b50 Add ecmult_gen, ecmult_const and ecmult to benchmark (Jonas Nick)
593e6ba Clean up ecmult_bench to make space for more benchmarks (Jonas Nick)
a35fdd3 ci: Run PRs on merge result even for i686 (Tim Ruffing)
02dcea1 ci: Make test iterations configurable and tweak for sanitizer builds (Tim Ruffing)
489ff5c tests: Treat empty SECP2561_TEST_ITERS as if it was unset (Tim Ruffing)
fcfcb97 ci: Simplify to use generic wrapper for QEMU, Valgrind, etc (Tim Ruffing)
de4157f ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs (Tim Ruffing)
09b3bb8 Clean up git tree (Tim Ruffing)
8bbad7a Add asm build to ARM32 CI (Pieter Wuille)
7d65ed5 Add ARM32/ARM64 CI (Pieter Wuille)
6eceec6 add `secp256k1_xonly_pubkey_cmp` method (Andrew Poelstra)
0d9561a add `secp256k1_ec_pubkey_cmp` method (Andrew Poelstra)
22a9ea1 contrib: Explain explicit header guards (Tim Ruffing)
0881633 secp256k1.h: clarify that by default arguments must be != NULL (Jonas Nick)
14c9739 tests: Improve secp256k1_ge_set_all_gej_var for some infinity inputs (Tim Ruffing)
4a19668 tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs (Tim Ruffing)
45b6468 Have secp256k1_ge_set_all_gej_var initialize all fields. Previous behaviour would not initialize r->y values in the case where infinity is passed in. Furthermore, the previous behaviour wouldn't initialize anything in the case where all inputs were infinity. (Russell O'Connor)
31c0f6d Have secp256k1_gej_double_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in. (Russell O'Connor)
dd6c3de Have secp256k1_ge_set_gej_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in. (Russell O'Connor)
3c90bdd change local lib headers to be relative for those pointing at "include/" dir (William Bright)
c848352 Makefile.am: Don't pass a variable twice (Tim Ruffing)
2161f31 Makefile.am: Honor config when building gen_context (Tim Ruffing)
99f47c2 gen_context: Don't use external ASM because it complicates the build (Tim Ruffing)
99e2d5b Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers. (Gregory Maxwell)
ed5a199 tests: fopen /dev/urandom in binary mode (Tim Ruffing)
4dc37bf Add mingw32-w64/wine CI build (Pieter Wuille)
ae9e648 Define SECP256K1_BUILD in secp256k1.c directly. (Gregory Maxwell)
be0609f Add unit tests for edge cases with delta=1/2 variant of divsteps (Pieter Wuille)
cd393ce Optimization: only do 59 hddivsteps per iteration instead of 62 (Pieter Wuille)
277b224 Use modified divsteps with initial delta=1/2 for constant-time (Pieter Wuille)
376ca36 Fix typo in explanation (Pieter Wuille)
0706796 add ECMULT_GEN_PREC_BITS to basic_config.h (Aaron Voisine)
a3aa262 gen_context: Don't include basic-config.h (Tim Ruffing)
99a1cfe print warnings for conditional-uninitialized (PiRK)
3d2cf6c initialize variable in tests (PiRK)
23c3fb6 Make argument of fe_normalizes_to_zero{_var} const (Pieter Wuille)
4504472 changed import to use brackets <> for openssl as they are not local to the project (William Bright)
24ad04f Make scalar_inverse{,_var} benchmark scale with SECP256K1_BENCH_ITERS (Pieter Wuille)
ebc1af7 Optimization: track f,g limb count and pass to new variable-time update_fg_var (Peter Dettman)
b306935 Optimization: use formulas instead of lookup tables for cancelling g bits (Peter Dettman)
9164a1b Optimization: special-case zero modulus limbs in modinv64 (Pieter Wuille)
1f233b3 Remove num/gmp support (Pieter Wuille)
20448b8 Remove unused Jacobi symbol support (Pieter Wuille)
5437e7b Remove unused scalar_sqr (Pieter Wuille)
aa9cc52 Improve field/scalar inverse tests (Pieter Wuille)
1e0e885 Make field/scalar code use the new modinv modules for inverses (Pieter Wuille)
436281a Move secp256k1_fe_inverse{_var} to per-impl files (Pieter Wuille)
aa404d5 Move secp256k1_scalar_{inverse{_var},is_even} to per-impl files (Pieter Wuille)
08d5496 Improve bounds checks in modinv modules (Pieter Wuille)
151aac0 Add tests for modinv modules (Pieter Wuille)
d8a92fc Add extensive comments on the safegcd algorithm and implementation (Pieter Wuille)
8e415ac Add safegcd based modular inverse modules (Peter Dettman)
de0a643 Add secp256k1_ctz{32,64}_var functions (Pieter Wuille)

Pull request description:

ACKs for top commit:
  real-or-random:
    ACK f09497e

Tree-SHA512: 6cf3e96c5974e9aa17bd649fa7fdd738090ec3ab8c99e144fec397c086a24adc2ace9a5218a3c527989fc07e1d5c669027e4c895caf92d22771c8414b2a9bf35
sipa added a commit to sipa/bitcoin that referenced this pull request Jul 14, 2021
be8d9c2 Merge bitcoin-core/secp256k1#965: gen_context: Don't use any ASM
aeece44 gen_context: Don't use any ASM
7688a4f Merge bitcoin-core/secp256k1#963: "Schnorrsig API overhaul" fixups
90e8344 ci: Add C++ test
f698caa Use unsigned char consistently for byte arrays
b5b8e7b Don't declare constants twice
769528f Don't use string literals for char arrays without NUL termination
2cc3cfa Fix -Wmissing-braces warning in clang
0440945 Merge bitcoin#844: schnorrsig API overhaul
ec3aaa5 Merge bitcoin#960: tests_exhaustive: check the result of secp256k1_ecdsa_sign
a1ee83c tests_exhaustive: check the result of secp256k1_ecdsa_sign
253f90c Merge bitcoin-core/secp256k1#951: configure: replace AC_PATH_PROG to AC_CHECK_PROG
446d28d Merge bitcoin-core/secp256k1#944: Various improvements related to CFLAGS
0302138 ci: Make compiler warning into errors on CI
b924e1e build: Ensure that configure's compile checks default to -O2
7939cd5 build: List *CPPFLAGS before *CFLAGS like on the compiler command line
595e8a3 build: Enable -Wcast-align=strict warning
0725626 build: Use own variable SECP_CFLAGS instead of touching user CFLAGS
4866178 Merge bitcoin-core/secp256k1#955: Add random field multiply/square tests
75ce488 Merge bitcoin-core/secp256k1#959: tests: really test the non-var scalar inverse
41ed139 tests: really test the non-var scalar inverse
5f6ceaf schnorrsig: allow setting MSGLEN != 32 in benchmark
fdd06b7 schnorrsig: add tests for sign_custom and varlen msg verification
d8d806a schnorrsig: add extra parameter struct for sign_custom
a0c3fc1 schnorrsig: allow signing and verification of variable length msgs
5a8e499 Add secp256k1_tagged_sha256 as defined in BIP-340
b6c0b72 schnorrsig: remove noncefp args from sign; add sign_custom function
bdf19f1 Add random field multiply/square tests
8ae56e3 Merge bitcoin#879: Avoid passing out-of-bound pointers to 0-size memcpy
a4642fa configure: replace AC_PATH_PROG to AC_CHECK_PROG
1758a92 Merge bitcoin#950: ci: Add ppc64le build
c58c4ea ci: Add ppc64le build
7973576 Merge bitcoin#662: Add ecmult_gen, ecmult_const and ecmult to benchmark
8f879c2 Fix array size in bench_ecmult
2fe1b50 Add ecmult_gen, ecmult_const and ecmult to benchmark
593e6ba Clean up ecmult_bench to make space for more benchmarks
50f3367 Merge bitcoin#947: ci: Run PRs on merge result even for i686
a35fdd3 ci: Run PRs on merge result even for i686
442cee5 schnorrsig: add algolen argument to nonce_function_hardened
df3bfa1 schnorrsig: clarify result of calling nonce_function_bip340 without data
99e8614 README: mention schnorrsig module
3dc8c07 Merge bitcoin#846: ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
02dcea1 ci: Make test iterations configurable and tweak for sanitizer builds
489ff5c tests: Treat empty SECP2561_TEST_ITERS as if it was unset
fcfcb97 ci: Simplify to use generic wrapper for QEMU, Valgrind, etc
de4157f ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
399722a Merge bitcoin#941: Clean up git tree
09b3bb8 Clean up git tree
bf0ac46 Merge bitcoin#930: Add ARM32/ARM64 CI
202a030 Merge bitcoin#850: add `secp256k1_ec_pubkey_cmp` method
1e78c18 Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards
6939487 Merge bitcoin#926: secp256k1.h: clarify that by default arguments must be != NULL
6eceec6 add `secp256k1_xonly_pubkey_cmp` method
0d9561a add `secp256k1_ec_pubkey_cmp` method
22a9ea1 contrib: Explain explicit header guards
6c52ae8 Merge bitcoin#937: Have ge_set_gej_var, gej_double_var and ge_set_all_gej_var initialize all fields of their outputs.
185a6af Merge bitcoin#925: changed include statements without prefix 'include/'
14c9739 tests: Improve secp256k1_ge_set_all_gej_var for some infinity inputs
4a19668 tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs
3c90bdd change local lib headers to be relative for those pointing at "include/" dir
45b6468 Have secp256k1_ge_set_all_gej_var initialize all fields. Previous behaviour would not initialize r->y values in the case where infinity is passed in. Furthermore, the previous behaviour wouldn't initialize anything in the case where all inputs were infinity.
31c0f6d Have secp256k1_gej_double_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
dd6c3de Have secp256k1_ge_set_gej_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
d0bd269 Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM
8bbad7a Add asm build to ARM32 CI
7d65ed5 Add ARM32/ARM64 CI
c848352 Makefile.am: Don't pass a variable twice
2161f31 Makefile.am: Honor config when building gen_context
99f47c2 gen_context: Don't use external ASM because it complicates the build
98e0358 Merge bitcoin#933: Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers
99e2d5b Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers.
34388af Merge bitcoin#922: Add mingw32-w64/wine CI build
7012a18 Merge bitcoin#928: Define SECP256K1_BUILD in secp256k1.c directly.
ed5a199 tests: fopen /dev/urandom in binary mode
ae9e648 Define SECP256K1_BUILD in secp256k1.c directly.
4dc37bf Add mingw32-w64/wine CI build
0881633 secp256k1.h: clarify that by default arguments must be != NULL
9570f67 Avoid passing out-of-bound pointers to 0-size memcpy

git-subtree-dir: src/secp256k1
git-subtree-split: be8d9c2
apoelstra added a commit to apoelstra/elements that referenced this pull request Jul 28, 2021
5d2df054196 Merge BlockstreamResearch/secp256k1-zkp#120: Add MuSig Key Aggregation spec
fc26ca8ddef musig: remove unnecessary constant time normalize in combine
48f63efe683 musig: remove unnecessary branch in pubkey_tweak_add
5860b5e0fe7 musig: do not also require schnorrsig module config flag
f27fd1d5e75 musig: improve test coverage of pubkey_combine
56014e8ca01 musig: change pubkey_combine arg to array of pointers to pks
08fa02d5791 musig: add key aggregation spec draft
4a9b059b16d musig: rename Musig coefficient to KeyAgg coefficient
4bc46d836e7 musig: optimize key aggregation using const 1 for 2nd key
2310849f50f musig: compute musig coefficient by hashing key instead of index
9683c8a7eb6 musig: add static test vectors for key aggregation
9b3d7bf5361 extrakeys: add xonly_sort function
f31affd8a61 extrakeys: add hsort, in-place, iterative heapsort
d9560e0af78 Merge BlockstreamResearch/secp256k1-zkp#136: Eliminate a wrong -Wmaybe-uninitialized warning in GCC
6db00f5b2e0 Merge BlockstreamResearch/secp256k1-zkp#132: Upstream PRs 831, 907, 903, 889, 918, 906, 928, 922, 933, Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM, 925, 937, 926, Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards, 850, 930, 941, 846, 947, 662, 950
cc0b279568d Eliminate a wrong -Wmaybe-uninitialized warning in GCC
f09497ea3e0 CI: tweak cirrus.yml to prevent OOM and timeout w sanitizer/valgrind
7226cf215aa ecdsa_adaptor: fix too small buffer in tests
b053e853d4f ecdsa_adaptor: fix test case with invalid signature
91b64770c3b Merge BlockstreamResearch/secp256k1-zkp#135: sync-upstream: fix "end" parameter for specifying range
907633e2e9a sync-upstream: fix "end" parameter for specifying range
394f49fd1a6 sync-upstream: quote variables
1bb5db3d602 Merge BlockstreamResearch/secp256k1-zkp#134: sync-upstream: parse merge commits w/ and w/o repo identifier
9321d42f751 sync-upstream: parse merge commits w/ and w/o repo identifier
d27e4598610 Revert "Remove unused Jacobi symbol support"
edcacc2b2ec Merge commits '26de4dfe 6e898534 c083cc6e 1e5d50fa cc2c09e3 efad3506 7012a188 34388af6 98e0358d d0bd2693 185a6af2 6c52ae87 69394879 1e78c18d 202a030f bf0ac460 399722a6 3dc8c072 50f33677 7973576f 1758a92f ' into temp-merge-950
1758a92ffd8 Merge ElementsProject#950: ci: Add ppc64le build
c58c4ea4707 ci: Add ppc64le build
7973576f6e3 Merge ElementsProject#662: Add ecmult_gen, ecmult_const and ecmult to benchmark
8f879c2887e Fix array size in bench_ecmult
2fe1b50df16 Add ecmult_gen, ecmult_const and ecmult to benchmark
593e6bad9c5 Clean up ecmult_bench to make space for more benchmarks
50f33677122 Merge ElementsProject#947: ci: Run PRs on merge result even for i686
a35fdd3478f ci: Run PRs on merge result even for i686
3dc8c072b6d Merge ElementsProject#846: ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
02dcea1ad94 ci: Make test iterations configurable and tweak for sanitizer builds
489ff5c20a1 tests: Treat empty SECP2561_TEST_ITERS as if it was unset
fcfcb97e74b ci: Simplify to use generic wrapper for QEMU, Valgrind, etc
de4157f13ac ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
399722a63ad Merge ElementsProject#941: Clean up git tree
09b3bb8648f Clean up git tree
bf0ac460661 Merge ElementsProject#930: Add ARM32/ARM64 CI
202a030f7d1 Merge ElementsProject#850: add `secp256k1_ec_pubkey_cmp` method
1e78c18d5b8 Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards
69394879b64 Merge ElementsProject#926: secp256k1.h: clarify that by default arguments must be != NULL
6eceec6d566 add `secp256k1_xonly_pubkey_cmp` method
0d9561ae879 add `secp256k1_ec_pubkey_cmp` method
22a9ea154a2 contrib: Explain explicit header guards
6c52ae87247 Merge ElementsProject#937: Have ge_set_gej_var, gej_double_var and ge_set_all_gej_var initialize all fields of their outputs.
185a6af2279 Merge ElementsProject#925: changed include statements without prefix 'include/'
14c9739a1fb tests: Improve secp256k1_ge_set_all_gej_var for some infinity inputs
4a19668c37b tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs
3c90bdda95a change local lib headers to be relative for those pointing at "include/" dir
45b6468d7e3 Have secp256k1_ge_set_all_gej_var initialize all fields. Previous behaviour would not initialize r->y values in the case where infinity is passed in. Furthermore, the previous behaviour wouldn't initialize anything in the case where all inputs were infinity.
31c0f6de413 Have secp256k1_gej_double_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
dd6c3de3227 Have secp256k1_ge_set_gej_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
d0bd2693e30 Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM
8bbad7a18e5 Add asm build to ARM32 CI
7d65ed52142 Add ARM32/ARM64 CI
c8483520c90 Makefile.am: Don't pass a variable twice
2161f31785e Makefile.am: Honor config when building gen_context
99f47c20ec4 gen_context: Don't use external ASM because it complicates the build
98e0358d297 Merge ElementsProject#933: Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers
99e2d5be0db Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers.
34388af6b6a Merge ElementsProject#922: Add mingw32-w64/wine CI build
7012a188e6e Merge ElementsProject#928: Define SECP256K1_BUILD in secp256k1.c directly.
ed5a199bed6 tests: fopen /dev/urandom in binary mode
ae9e648526c Define SECP256K1_BUILD in secp256k1.c directly.
4dc37bf81b5 Add mingw32-w64/wine CI build
0881633dfd0 secp256k1.h: clarify that by default arguments must be != NULL
efad3506a89 Merge ElementsProject#906: Use modified divsteps with initial delta=1/2 for constant-time
cc2c09e3a78 Merge ElementsProject#918: Clean up configuration in gen_context
07067967ee9 add ECMULT_GEN_PREC_BITS to basic_config.h
a3aa2628c7b gen_context: Don't include basic-config.h
be0609fd54a Add unit tests for edge cases with delta=1/2 variant of divsteps
cd393ce2283 Optimization: only do 59 hddivsteps per iteration instead of 62
277b224b6ab Use modified divsteps with initial delta=1/2 for constant-time
376ca366db0 Fix typo in explanation
1e5d50fa93d Merge ElementsProject#889: fix uninitialized read in tests
f3708a1ecb4 Merge ElementsProject#117: Add ECDSA adaptor signatures module
5710ebacb9e Merge ElementsProject#128: Make function argument name consistent with doc
b0ffa923199 ecdsa_adaptor: add tests
6955af5ca89 ecdsa_adaptor: add ECDSA adaptor signature APIs
c083cc6e52a Merge ElementsProject#903: Make argument of fe_normalizes_to_zero{_var} const
6e898534ff4 Merge ElementsProject#907: changed import to use brackets <> for openssl
cc82ad5ab74 Make function argument name consistent with doc
4504472269d changed import to use brackets <> for openssl as they are not local to the project
26de4dfeb1f Merge ElementsProject#831: Safegcd inverses, drop Jacobi symbols, remove libgmp
b508e5dd9b1 ecdsa_adaptor: add support for proof of discrete logarithm equality
d8f336564fe ecdsa_adaptor: add nonce function and tags
654cd633f50 ecdsa_adaptor: initialize project
23c3fb629b9 Make argument of fe_normalizes_to_zero{_var} const
24ad04fc064 Make scalar_inverse{,_var} benchmark scale with SECP256K1_BENCH_ITERS
ebc1af700f9 Optimization: track f,g limb count and pass to new variable-time update_fg_var
b306935ac12 Optimization: use formulas instead of lookup tables for cancelling g bits
9164a1b6582 Optimization: special-case zero modulus limbs in modinv64
1f233b3fa05 Remove num/gmp support
fac477f822a Merge ElementsProject#126: Upstream PRs  ElementsProject#854 ElementsProject#852 ElementsProject#857 ElementsProject#858 ElementsProject#860 ElementsProject#845 ElementsProject#862 ElementsProject#875 ElementsProject#878 ElementsProject#874 ElementsProject#877 ElementsProject#880 ElementsProject#864 ElementsProject#882 ElementsProject#894 ElementsProject#891 ElementsProject#901
20448b8d09a Remove unused Jacobi symbol support
5437e7bdfbf Remove unused scalar_sqr
aa9cc521800 Improve field/scalar inverse tests
1e0e885c8ac Make field/scalar code use the new modinv modules for inverses
436281afdcb Move secp256k1_fe_inverse{_var} to per-impl files
aa404d53bef Move secp256k1_scalar_{inverse{_var},is_even} to per-impl files
08d54964e51 Improve bounds checks in modinv modules
6a7861f646f Merge ElementsProject#127: sync-upstream: Create proper links to upstream PRs
4091e619248 cirrus: increase timeout for macOS tasks
136ed8f84d9 sync-upstream: Fix output of command to reproduce
38f1e777d49 sync-upstream: Create proper links to upstream PRs
79d4c3ac681 whitelist: add SECP_INCLUDES to bench_whitelist CPPFLAGS
649bf201d85 musig: fix tests for 32-bit
151aac00d31 Add tests for modinv modules
d8a92fcc4c6 Add extensive comments on the safegcd algorithm and implementation
8e415acba25 Add safegcd based modular inverse modules
de0a643c3dc Add secp256k1_ctz{32,64}_var functions
d4ca81f48e9 Merge commits 'dc6e5c3a 2d9e7175 b61f9da5 98dac878 8c727b90 328aaef2 f2d9aeae b732701f db726782 5671e5f3 a4abaab7 659d0d47 f8c0b57e 24d1656c 3a8b47bc ebdba03c 4c3ba88c ' into temp-merge-901
4c3ba88c3a8 Merge ElementsProject#901: ci: Switch all Linux builds to Debian and more improvements
9361f360bb0 ci: Select number of parallel make jobs depending on CI environment
28eccdf8064 ci: Split output of logs into multiple sections
c7f754fe4d5 ci: Run PRs on merge result instead of on the source branch
b994a8be3cf ci: Print information about binaries using "file"
f24e122d13d ci: Switch all Linux builds to Debian
ebdba03cb56 Merge ElementsProject#891: build: Add workaround for automake 1.13 and older
3a8b47bc6d1 Merge ElementsProject#894: ctime_test: move context randomization test to the end
6da00ec6245 Merge pull request ElementsProject#124 from apoelstra/2021-02--rename-klepto
e354c5751d6 ecdsa_s2c: rename anti-klepto to anti-exfil
7d3497cdc4c ctime_test: move context randomization test to the end
99a1cfec174 print warnings for conditional-uninitialized
3d2cf6c5bd3 initialize variable in tests
f329bba2442 build: Add workaround for automake 1.13 and older
24d1656c328 Merge ElementsProject#882: Use bit ops instead of int mult for constant-time logic in gej_add_ge
e491d06b98c Use bit ops instead of int mult for constant-time logic in gej_add_ge
f8c0b57e6ba Merge ElementsProject#864: Add support for Cirrus CI
cc2a5451dc8 ci: Refactor Nix shell files
2480e55c8f3 ci: Remove support for Travis CI
2b359f1c1d8 ci: Enable simple cache for brewing valgrind on macOS
8c02e465c5a ci: Add support for Cirrus CI
659d0d47989 Merge ElementsProject#880: Add parens around ROUND_TO_ALIGN's parameter.
b6f649889ae Add parens around ROUND_TO_ALIGN's parameter. This makes the macro robust against a hypothetical ROUND_TO_ALIGN(foo ? sizeA : size B) invocation.
a4abaab7931 Merge ElementsProject#877: Add missing secp256k1_ge_set_gej_var decl.
5671e5f3fd0 Merge ElementsProject#874: Remove underscores from header defs.
db726782fa2 Merge ElementsProject#878: Remove unused secp256k1_fe_inv_all_var
b732701faa7 Merge ElementsProject#875: Avoid casting (void**) values.
75d2ae149ef Remove unused secp256k1_fe_inv_all_var
482e4a9cfce Add missing secp256k1_ge_set_gej_var decl.
27306186045 Avoid casting (void**) values. Replaced with an expression that only casts (void*) values.
fb390c5299e Remove underscores from header defs. This makes them consistent with other files and avoids reserved identifiers.
ed69ea79b42 Merge ElementsProject#98: Add contrib/sync-upstream.sh script to automate syncing PRs
7eeacd7725f Add contrib/sync-upstream.sh script to automate merging upstream PRs
f2d9aeae6d5 Merge ElementsProject#862: Autoconf improvements
328aaef22a4 Merge ElementsProject#845: Extract the secret key from a keypair
3c15130709d Improve CC_FOR_BUILD detection
47802a47624 Restructure and tidy configure.ac
252c19dfc65 Ask brew for valgrind include path
8c727b9087a Merge ElementsProject#860: fixed trivial typo
cfac088e1b2 Merge ElementsProject#119: Remove repeated schnorr flag from travis config
96c83a83dcf Remove repeated schnorr flag from travis config
d2b6740688f Merge pull request ElementsProject#118 from jonasnick/clarify-rangeproof-rewind
41d6963bc1c rangeproof: clarify rewind outlen argument
673e551f4d1 Merge ElementsProject#111: Add ECDSA sign-to-contract module
b7bc3a4aaa5 fixed typo
47efb5e39a1 ecdsa-s2c: add ctime tests
396b558273c ecdsa-s2c: add anti-klepto protocol
290dee566e1 ecdsa-s2c: add actual sign-to-contract functionality
8e46cac5b31 ecdsa-s2c: block in module
826bd04b43f add eccommit functionality
33cb3c2b1fc Add secret key extraction from keypair to constant time tests
36d9dc1e8e6 Add seckey extraction from keypair to the extrakeys tests
fc96aa73f5c Add a function to extract the secretkey from a keypair
98dac878398 Merge ElementsProject#858: Fix insecure links
07aa4c70ffb Fix insecure links
b61f9da54ef Merge ElementsProject#857: docs: fix simple typo, dependecy -> dependency
18aadf9d288 docs: fix simple typo, dependecy -> dependency
2d9e7175c6e Merge ElementsProject#852: Add sage script for generating scalar_split_lambda constants
dc6e5c3a5c4 Merge ElementsProject#854: Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation
6e85d675aaf Rename tweak to tweak32 in public API
f587f04e357 Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation
329a2e0a3f2 sage: Add script for generating scalar_split_lambda constants
f554dfc7088 sage: Reorganize files

git-subtree-dir: src/secp256k1
git-subtree-split: 5d2df0541960554be5c0ba58d86e5fa479935000
apoelstra added a commit to apoelstra/elements that referenced this pull request Jul 28, 2021
90580edcc98 Merge pull request ElementsProject#140 from apoelstra/2021-07--resync
6ad66de6802 rangeproof: add an (unnecessary) variable initialization to shut up CI
2979e4d9d46 Merge commits '8ae56e33 75ce488c 4866178d 446d28d9 253f90cd ec3aaa50 0440945f 7688a4f1 be8d9c26 ' into temp-merge-965
5d2df054196 Merge BlockstreamResearch/secp256k1-zkp#120: Add MuSig Key Aggregation spec
fc26ca8ddef musig: remove unnecessary constant time normalize in combine
48f63efe683 musig: remove unnecessary branch in pubkey_tweak_add
5860b5e0fe7 musig: do not also require schnorrsig module config flag
f27fd1d5e75 musig: improve test coverage of pubkey_combine
56014e8ca01 musig: change pubkey_combine arg to array of pointers to pks
08fa02d5791 musig: add key aggregation spec draft
4a9b059b16d musig: rename Musig coefficient to KeyAgg coefficient
4bc46d836e7 musig: optimize key aggregation using const 1 for 2nd key
2310849f50f musig: compute musig coefficient by hashing key instead of index
9683c8a7eb6 musig: add static test vectors for key aggregation
9b3d7bf5361 extrakeys: add xonly_sort function
f31affd8a61 extrakeys: add hsort, in-place, iterative heapsort
be8d9c262f4 Merge bitcoin-core/secp256k1#965: gen_context: Don't use any ASM
d9560e0af78 Merge BlockstreamResearch/secp256k1-zkp#136: Eliminate a wrong -Wmaybe-uninitialized warning in GCC
aeece445997 gen_context: Don't use any ASM
6db00f5b2e0 Merge BlockstreamResearch/secp256k1-zkp#132: Upstream PRs 831, 907, 903, 889, 918, 906, 928, 922, 933, Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM, 925, 937, 926, Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards, 850, 930, 941, 846, 947, 662, 950
cc0b279568d Eliminate a wrong -Wmaybe-uninitialized warning in GCC
f09497ea3e0 CI: tweak cirrus.yml to prevent OOM and timeout w sanitizer/valgrind
7226cf215aa ecdsa_adaptor: fix too small buffer in tests
b053e853d4f ecdsa_adaptor: fix test case with invalid signature
91b64770c3b Merge BlockstreamResearch/secp256k1-zkp#135: sync-upstream: fix "end" parameter for specifying range
907633e2e9a sync-upstream: fix "end" parameter for specifying range
394f49fd1a6 sync-upstream: quote variables
1bb5db3d602 Merge BlockstreamResearch/secp256k1-zkp#134: sync-upstream: parse merge commits w/ and w/o repo identifier
9321d42f751 sync-upstream: parse merge commits w/ and w/o repo identifier
7688a4f13a3 Merge bitcoin-core/secp256k1#963: "Schnorrsig API overhaul" fixups
90e83449b2c ci: Add C++ test
f698caaff6a Use unsigned char consistently for byte arrays
b5b8e7b7190 Don't declare constants twice
769528f3071 Don't use string literals for char arrays without NUL termination
2cc3cfa5838 Fix -Wmissing-braces warning in clang
0440945fb5c Merge ElementsProject#844: schnorrsig API overhaul
ec3aaa5014f Merge ElementsProject#960: tests_exhaustive: check the result of secp256k1_ecdsa_sign
a1ee83c6546 tests_exhaustive: check the result of secp256k1_ecdsa_sign
253f90cdeb1 Merge bitcoin-core/secp256k1#951: configure: replace AC_PATH_PROG to AC_CHECK_PROG
446d28d9de3 Merge bitcoin-core/secp256k1#944: Various improvements related to CFLAGS
0302138f750 ci: Make compiler warning into errors on CI
b924e1e605d build: Ensure that configure's compile checks default to -O2
7939cd571c7 build: List *CPPFLAGS before *CFLAGS like on the compiler command line
595e8a35d80 build: Enable -Wcast-align=strict warning
07256267ffa build: Use own variable SECP_CFLAGS instead of touching user CFLAGS
4866178dfc9 Merge bitcoin-core/secp256k1#955: Add random field multiply/square tests
75ce488c2a6 Merge bitcoin-core/secp256k1#959: tests: really test the non-var scalar inverse
41ed13942bd tests: really test the non-var scalar inverse
5f6ceafcfa4 schnorrsig: allow setting MSGLEN != 32 in benchmark
fdd06b79671 schnorrsig: add tests for sign_custom and varlen msg verification
d8d806aaf38 schnorrsig: add extra parameter struct for sign_custom
a0c3fc177f7 schnorrsig: allow signing and verification of variable length msgs
5a8e4991ad4 Add secp256k1_tagged_sha256 as defined in BIP-340
b6c0b72fb06 schnorrsig: remove noncefp args from sign; add sign_custom function
bdf19f105c6 Add random field multiply/square tests
8ae56e33e74 Merge ElementsProject#879: Avoid passing out-of-bound pointers to 0-size memcpy
a4642fa15ee configure: replace AC_PATH_PROG to AC_CHECK_PROG
d27e4598610 Revert "Remove unused Jacobi symbol support"
edcacc2b2ec Merge commits '26de4dfe 6e898534 c083cc6e 1e5d50fa cc2c09e3 efad3506 7012a188 34388af6 98e0358d d0bd2693 185a6af2 6c52ae87 69394879 1e78c18d 202a030f bf0ac460 399722a6 3dc8c072 50f33677 7973576f 1758a92f ' into temp-merge-950
1758a92ffd8 Merge ElementsProject#950: ci: Add ppc64le build
c58c4ea4707 ci: Add ppc64le build
7973576f6e3 Merge ElementsProject#662: Add ecmult_gen, ecmult_const and ecmult to benchmark
8f879c2887e Fix array size in bench_ecmult
2fe1b50df16 Add ecmult_gen, ecmult_const and ecmult to benchmark
593e6bad9c5 Clean up ecmult_bench to make space for more benchmarks
50f33677122 Merge ElementsProject#947: ci: Run PRs on merge result even for i686
a35fdd3478f ci: Run PRs on merge result even for i686
442cee5bafb schnorrsig: add algolen argument to nonce_function_hardened
df3bfa12c3b schnorrsig: clarify result of calling nonce_function_bip340 without data
99e8614812b README: mention schnorrsig module
3dc8c072b6d Merge ElementsProject#846: ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
02dcea1ad94 ci: Make test iterations configurable and tweak for sanitizer builds
489ff5c20a1 tests: Treat empty SECP2561_TEST_ITERS as if it was unset
fcfcb97e74b ci: Simplify to use generic wrapper for QEMU, Valgrind, etc
de4157f13ac ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
399722a63ad Merge ElementsProject#941: Clean up git tree
09b3bb8648f Clean up git tree
bf0ac460661 Merge ElementsProject#930: Add ARM32/ARM64 CI
202a030f7d1 Merge ElementsProject#850: add `secp256k1_ec_pubkey_cmp` method
1e78c18d5b8 Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards
69394879b64 Merge ElementsProject#926: secp256k1.h: clarify that by default arguments must be != NULL
6eceec6d566 add `secp256k1_xonly_pubkey_cmp` method
0d9561ae879 add `secp256k1_ec_pubkey_cmp` method
22a9ea154a2 contrib: Explain explicit header guards
6c52ae87247 Merge ElementsProject#937: Have ge_set_gej_var, gej_double_var and ge_set_all_gej_var initialize all fields of their outputs.
185a6af2279 Merge ElementsProject#925: changed include statements without prefix 'include/'
14c9739a1fb tests: Improve secp256k1_ge_set_all_gej_var for some infinity inputs
4a19668c37b tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs
3c90bdda95a change local lib headers to be relative for those pointing at "include/" dir
45b6468d7e3 Have secp256k1_ge_set_all_gej_var initialize all fields. Previous behaviour would not initialize r->y values in the case where infinity is passed in. Furthermore, the previous behaviour wouldn't initialize anything in the case where all inputs were infinity.
31c0f6de413 Have secp256k1_gej_double_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
dd6c3de3227 Have secp256k1_ge_set_gej_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
d0bd2693e30 Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM
8bbad7a18e5 Add asm build to ARM32 CI
7d65ed52142 Add ARM32/ARM64 CI
c8483520c90 Makefile.am: Don't pass a variable twice
2161f31785e Makefile.am: Honor config when building gen_context
99f47c20ec4 gen_context: Don't use external ASM because it complicates the build
98e0358d297 Merge ElementsProject#933: Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers
99e2d5be0db Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers.
34388af6b6a Merge ElementsProject#922: Add mingw32-w64/wine CI build
7012a188e6e Merge ElementsProject#928: Define SECP256K1_BUILD in secp256k1.c directly.
ed5a199bed6 tests: fopen /dev/urandom in binary mode
ae9e648526c Define SECP256K1_BUILD in secp256k1.c directly.
4dc37bf81b5 Add mingw32-w64/wine CI build
0881633dfd0 secp256k1.h: clarify that by default arguments must be != NULL
efad3506a89 Merge ElementsProject#906: Use modified divsteps with initial delta=1/2 for constant-time
cc2c09e3a78 Merge ElementsProject#918: Clean up configuration in gen_context
07067967ee9 add ECMULT_GEN_PREC_BITS to basic_config.h
a3aa2628c7b gen_context: Don't include basic-config.h
be0609fd54a Add unit tests for edge cases with delta=1/2 variant of divsteps
cd393ce2283 Optimization: only do 59 hddivsteps per iteration instead of 62
277b224b6ab Use modified divsteps with initial delta=1/2 for constant-time
376ca366db0 Fix typo in explanation
1e5d50fa93d Merge ElementsProject#889: fix uninitialized read in tests
f3708a1ecb4 Merge ElementsProject#117: Add ECDSA adaptor signatures module
5710ebacb9e Merge ElementsProject#128: Make function argument name consistent with doc
b0ffa923199 ecdsa_adaptor: add tests
6955af5ca89 ecdsa_adaptor: add ECDSA adaptor signature APIs
c083cc6e52a Merge ElementsProject#903: Make argument of fe_normalizes_to_zero{_var} const
6e898534ff4 Merge ElementsProject#907: changed import to use brackets <> for openssl
cc82ad5ab74 Make function argument name consistent with doc
4504472269d changed import to use brackets <> for openssl as they are not local to the project
26de4dfeb1f Merge ElementsProject#831: Safegcd inverses, drop Jacobi symbols, remove libgmp
b508e5dd9b1 ecdsa_adaptor: add support for proof of discrete logarithm equality
d8f336564fe ecdsa_adaptor: add nonce function and tags
654cd633f50 ecdsa_adaptor: initialize project
23c3fb629b9 Make argument of fe_normalizes_to_zero{_var} const
24ad04fc064 Make scalar_inverse{,_var} benchmark scale with SECP256K1_BENCH_ITERS
ebc1af700f9 Optimization: track f,g limb count and pass to new variable-time update_fg_var
b306935ac12 Optimization: use formulas instead of lookup tables for cancelling g bits
9164a1b6582 Optimization: special-case zero modulus limbs in modinv64
1f233b3fa05 Remove num/gmp support
fac477f822a Merge ElementsProject#126: Upstream PRs  ElementsProject#854 ElementsProject#852 ElementsProject#857 ElementsProject#858 ElementsProject#860 ElementsProject#845 ElementsProject#862 ElementsProject#875 ElementsProject#878 ElementsProject#874 ElementsProject#877 ElementsProject#880 ElementsProject#864 ElementsProject#882 ElementsProject#894 ElementsProject#891 ElementsProject#901
20448b8d09a Remove unused Jacobi symbol support
5437e7bdfbf Remove unused scalar_sqr
aa9cc521800 Improve field/scalar inverse tests
1e0e885c8ac Make field/scalar code use the new modinv modules for inverses
436281afdcb Move secp256k1_fe_inverse{_var} to per-impl files
aa404d53bef Move secp256k1_scalar_{inverse{_var},is_even} to per-impl files
08d54964e51 Improve bounds checks in modinv modules
6a7861f646f Merge ElementsProject#127: sync-upstream: Create proper links to upstream PRs
4091e619248 cirrus: increase timeout for macOS tasks
136ed8f84d9 sync-upstream: Fix output of command to reproduce
38f1e777d49 sync-upstream: Create proper links to upstream PRs
79d4c3ac681 whitelist: add SECP_INCLUDES to bench_whitelist CPPFLAGS
649bf201d85 musig: fix tests for 32-bit
151aac00d31 Add tests for modinv modules
d8a92fcc4c6 Add extensive comments on the safegcd algorithm and implementation
8e415acba25 Add safegcd based modular inverse modules
de0a643c3dc Add secp256k1_ctz{32,64}_var functions
d4ca81f48e9 Merge commits 'dc6e5c3a 2d9e7175 b61f9da5 98dac878 8c727b90 328aaef2 f2d9aeae b732701f db726782 5671e5f3 a4abaab7 659d0d47 f8c0b57e 24d1656c 3a8b47bc ebdba03c 4c3ba88c ' into temp-merge-901
4c3ba88c3a8 Merge ElementsProject#901: ci: Switch all Linux builds to Debian and more improvements
9361f360bb0 ci: Select number of parallel make jobs depending on CI environment
28eccdf8064 ci: Split output of logs into multiple sections
c7f754fe4d5 ci: Run PRs on merge result instead of on the source branch
b994a8be3cf ci: Print information about binaries using "file"
f24e122d13d ci: Switch all Linux builds to Debian
ebdba03cb56 Merge ElementsProject#891: build: Add workaround for automake 1.13 and older
3a8b47bc6d1 Merge ElementsProject#894: ctime_test: move context randomization test to the end
6da00ec6245 Merge pull request ElementsProject#124 from apoelstra/2021-02--rename-klepto
e354c5751d6 ecdsa_s2c: rename anti-klepto to anti-exfil
7d3497cdc4c ctime_test: move context randomization test to the end
99a1cfec174 print warnings for conditional-uninitialized
3d2cf6c5bd3 initialize variable in tests
f329bba2442 build: Add workaround for automake 1.13 and older
24d1656c328 Merge ElementsProject#882: Use bit ops instead of int mult for constant-time logic in gej_add_ge
e491d06b98c Use bit ops instead of int mult for constant-time logic in gej_add_ge
f8c0b57e6ba Merge ElementsProject#864: Add support for Cirrus CI
cc2a5451dc8 ci: Refactor Nix shell files
2480e55c8f3 ci: Remove support for Travis CI
2b359f1c1d8 ci: Enable simple cache for brewing valgrind on macOS
8c02e465c5a ci: Add support for Cirrus CI
659d0d47989 Merge ElementsProject#880: Add parens around ROUND_TO_ALIGN's parameter.
b6f649889ae Add parens around ROUND_TO_ALIGN's parameter. This makes the macro robust against a hypothetical ROUND_TO_ALIGN(foo ? sizeA : size B) invocation.
a4abaab7931 Merge ElementsProject#877: Add missing secp256k1_ge_set_gej_var decl.
5671e5f3fd0 Merge ElementsProject#874: Remove underscores from header defs.
db726782fa2 Merge ElementsProject#878: Remove unused secp256k1_fe_inv_all_var
b732701faa7 Merge ElementsProject#875: Avoid casting (void**) values.
9570f674cc7 Avoid passing out-of-bound pointers to 0-size memcpy
75d2ae149ef Remove unused secp256k1_fe_inv_all_var
482e4a9cfce Add missing secp256k1_ge_set_gej_var decl.
27306186045 Avoid casting (void**) values. Replaced with an expression that only casts (void*) values.
fb390c5299e Remove underscores from header defs. This makes them consistent with other files and avoids reserved identifiers.
ed69ea79b42 Merge ElementsProject#98: Add contrib/sync-upstream.sh script to automate syncing PRs
7eeacd7725f Add contrib/sync-upstream.sh script to automate merging upstream PRs
f2d9aeae6d5 Merge ElementsProject#862: Autoconf improvements
328aaef22a4 Merge ElementsProject#845: Extract the secret key from a keypair
3c15130709d Improve CC_FOR_BUILD detection
47802a47624 Restructure and tidy configure.ac
252c19dfc65 Ask brew for valgrind include path
8c727b9087a Merge ElementsProject#860: fixed trivial typo
cfac088e1b2 Merge ElementsProject#119: Remove repeated schnorr flag from travis config
96c83a83dcf Remove repeated schnorr flag from travis config
d2b6740688f Merge pull request ElementsProject#118 from jonasnick/clarify-rangeproof-rewind
41d6963bc1c rangeproof: clarify rewind outlen argument
673e551f4d1 Merge ElementsProject#111: Add ECDSA sign-to-contract module
b7bc3a4aaa5 fixed typo
47efb5e39a1 ecdsa-s2c: add ctime tests
396b558273c ecdsa-s2c: add anti-klepto protocol
290dee566e1 ecdsa-s2c: add actual sign-to-contract functionality
8e46cac5b31 ecdsa-s2c: block in module
826bd04b43f add eccommit functionality
33cb3c2b1fc Add secret key extraction from keypair to constant time tests
36d9dc1e8e6 Add seckey extraction from keypair to the extrakeys tests
fc96aa73f5c Add a function to extract the secretkey from a keypair
98dac878398 Merge ElementsProject#858: Fix insecure links
07aa4c70ffb Fix insecure links
b61f9da54ef Merge ElementsProject#857: docs: fix simple typo, dependecy -> dependency
18aadf9d288 docs: fix simple typo, dependecy -> dependency
2d9e7175c6e Merge ElementsProject#852: Add sage script for generating scalar_split_lambda constants
dc6e5c3a5c4 Merge ElementsProject#854: Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation
6e85d675aaf Rename tweak to tweak32 in public API
f587f04e357 Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation
329a2e0a3f2 sage: Add script for generating scalar_split_lambda constants
f554dfc7088 sage: Reorganize files

git-subtree-dir: src/secp256k1
git-subtree-split: 90580edcc98350c9df9bebee58d2f9616d801849
furszy added a commit to furszy/bitcoin-core that referenced this pull request Sep 23, 2021
5f6ceaf schnorrsig: allow setting MSGLEN != 32 in benchmark
fdd06b7 schnorrsig: add tests for sign_custom and varlen msg verification
d8d806a schnorrsig: add extra parameter struct for sign_custom
a0c3fc1 schnorrsig: allow signing and verification of variable length msgs
5a8e499 Add secp256k1_tagged_sha256 as defined in BIP-340
b6c0b72 schnorrsig: remove noncefp args from sign; add sign_custom function
442cee5 schnorrsig: add algolen argument to nonce_function_hardened
df3bfa1 schnorrsig: clarify result of calling nonce_function_bip340 without data
99e8614 README: mention schnorrsig module
3dc8c07 Merge bitcoin#846: ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
02dcea1 ci: Make test iterations configurable and tweak for sanitizer builds
489ff5c tests: Treat empty SECP2561_TEST_ITERS as if it was unset
fcfcb97 ci: Simplify to use generic wrapper for QEMU, Valgrind, etc
de4157f ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
399722a Merge bitcoin#941: Clean up git tree
09b3bb8 Clean up git tree
bf0ac46 Merge bitcoin#930: Add ARM32/ARM64 CI
202a030 Merge bitcoin#850: add `secp256k1_ec_pubkey_cmp` method
1e78c18 Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards
6939487 Merge bitcoin#926: secp256k1.h: clarify that by default arguments must be != NULL
6eceec6 add `secp256k1_xonly_pubkey_cmp` method
0d9561a add `secp256k1_ec_pubkey_cmp` method
22a9ea1 contrib: Explain explicit header guards
6c52ae8 Merge bitcoin#937: Have ge_set_gej_var, gej_double_var and ge_set_all_gej_var initialize all fields of their outputs.
185a6af Merge bitcoin#925: changed include statements without prefix 'include/'
14c9739 tests: Improve secp256k1_ge_set_all_gej_var for some infinity inputs
4a19668 tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs
3c90bdd change local lib headers to be relative for those pointing at "include/" dir
45b6468 Have secp256k1_ge_set_all_gej_var initialize all fields. Previous behaviour would not initialize r->y values in the case where infinity is passed in. Furthermore, the previous behaviour wouldn't initialize anything in the case where all inputs were infinity.
31c0f6d Have secp256k1_gej_double_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
dd6c3de Have secp256k1_ge_set_gej_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
d0bd269 Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM
8bbad7a Add asm build to ARM32 CI
7d65ed5 Add ARM32/ARM64 CI
c848352 Makefile.am: Don't pass a variable twice
2161f31 Makefile.am: Honor config when building gen_context
99f47c2 gen_context: Don't use external ASM because it complicates the build
98e0358 Merge bitcoin#933: Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers
99e2d5b Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers.
34388af Merge bitcoin#922: Add mingw32-w64/wine CI build
7012a18 Merge bitcoin#928: Define SECP256K1_BUILD in secp256k1.c directly.
ed5a199 tests: fopen /dev/urandom in binary mode
ae9e648 Define SECP256K1_BUILD in secp256k1.c directly.
4dc37bf Add mingw32-w64/wine CI build
0881633 secp256k1.h: clarify that by default arguments must be != NULL
efad350 Merge bitcoin#906: Use modified divsteps with initial delta=1/2 for constant-time
cc2c09e Merge bitcoin#918: Clean up configuration in gen_context
0706796 add ECMULT_GEN_PREC_BITS to basic_config.h
a3aa262 gen_context: Don't include basic-config.h
be0609f Add unit tests for edge cases with delta=1/2 variant of divsteps
cd393ce Optimization: only do 59 hddivsteps per iteration instead of 62
277b224 Use modified divsteps with initial delta=1/2 for constant-time
376ca36 Fix typo in explanation
1e5d50f Merge bitcoin#889: fix uninitialized read in tests
c083cc6 Merge bitcoin#903: Make argument of fe_normalizes_to_zero{_var} const
6e89853 Merge bitcoin#907: changed import to use brackets <> for openssl
4504472 changed import to use brackets <> for openssl as they are not local to the project
26de4df Merge bitcoin#831: Safegcd inverses, drop Jacobi symbols, remove libgmp
23c3fb6 Make argument of fe_normalizes_to_zero{_var} const
24ad04f Make scalar_inverse{,_var} benchmark scale with SECP256K1_BENCH_ITERS
ebc1af7 Optimization: track f,g limb count and pass to new variable-time update_fg_var
b306935 Optimization: use formulas instead of lookup tables for cancelling g bits
9164a1b Optimization: special-case zero modulus limbs in modinv64
1f233b3 Remove num/gmp support
20448b8 Remove unused Jacobi symbol support
5437e7b Remove unused scalar_sqr
aa9cc52 Improve field/scalar inverse tests
1e0e885 Make field/scalar code use the new modinv modules for inverses
436281a Move secp256k1_fe_inverse{_var} to per-impl files
aa404d5 Move secp256k1_scalar_{inverse{_var},is_even} to per-impl files
08d5496 Improve bounds checks in modinv modules
151aac0 Add tests for modinv modules
d8a92fc Add extensive comments on the safegcd algorithm and implementation
8e415ac Add safegcd based modular inverse modules
de0a643 Add secp256k1_ctz{32,64}_var functions
4c3ba88 Merge bitcoin#901: ci: Switch all Linux builds to Debian and more improvements
9361f36 ci: Select number of parallel make jobs depending on CI environment
28eccdf ci: Split output of logs into multiple sections
c7f754f ci: Run PRs on merge result instead of on the source branch
b994a8b ci: Print information about binaries using "file"
f24e122 ci: Switch all Linux builds to Debian
ebdba03 Merge bitcoin#891: build: Add workaround for automake 1.13 and older
3a8b47b Merge bitcoin#894: ctime_test: move context randomization test to the end
7d3497c ctime_test: move context randomization test to the end
99a1cfe print warnings for conditional-uninitialized
3d2cf6c initialize variable in tests
f329bba build: Add workaround for automake 1.13 and older
24d1656 Merge bitcoin#882: Use bit ops instead of int mult for constant-time logic in gej_add_ge
e491d06 Use bit ops instead of int mult for constant-time logic in gej_add_ge
f8c0b57 Merge bitcoin#864: Add support for Cirrus CI
cc2a545 ci: Refactor Nix shell files
2480e55 ci: Remove support for Travis CI
2b359f1 ci: Enable simple cache for brewing valgrind on macOS
8c02e46 ci: Add support for Cirrus CI
659d0d4 Merge bitcoin#880: Add parens around ROUND_TO_ALIGN's parameter.
b6f6498 Add parens around ROUND_TO_ALIGN's parameter. This makes the macro robust against a hypothetical ROUND_TO_ALIGN(foo ? sizeA : size B) invocation.
a4abaab Merge bitcoin#877: Add missing secp256k1_ge_set_gej_var decl.
5671e5f Merge bitcoin#874: Remove underscores from header defs.
db72678 Merge bitcoin#878: Remove unused secp256k1_fe_inv_all_var
b732701 Merge bitcoin#875: Avoid casting (void**) values.
75d2ae1 Remove unused secp256k1_fe_inv_all_var
482e4a9 Add missing secp256k1_ge_set_gej_var decl.
2730618 Avoid casting (void**) values. Replaced with an expression that only casts (void*) values.
fb390c5 Remove underscores from header defs. This makes them consistent with other files and avoids reserved identifiers.
f2d9aea Merge bitcoin#862: Autoconf improvements
328aaef Merge bitcoin#845: Extract the secret key from a keypair
3c15130 Improve CC_FOR_BUILD detection
47802a4 Restructure and tidy configure.ac
252c19d Ask brew for valgrind include path
8c727b9 Merge bitcoin#860: fixed trivial typo
b7bc3a4 fixed typo
33cb3c2 Add secret key extraction from keypair to constant time tests
36d9dc1 Add seckey extraction from keypair to the extrakeys tests
fc96aa7 Add a function to extract the secretkey from a keypair
98dac87 Merge bitcoin#858: Fix insecure links
07aa4c7 Fix insecure links
b61f9da Merge bitcoin#857: docs: fix simple typo, dependecy -> dependency
18aadf9 docs: fix simple typo, dependecy -> dependency
2d9e717 Merge bitcoin#852: Add sage script for generating scalar_split_lambda constants
dc6e5c3 Merge bitcoin#854: Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation
6e85d67 Rename tweak to tweak32 in public API
f587f04 Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation
329a2e0 sage: Add script for generating scalar_split_lambda constants
8f0c6f1 Merge bitcoin#851: make test count iteration configurable by environment variable
f4fa8d2 forbid a test iteration of 0 or less
f554dfc sage: Reorganize files
3a10696 Merge bitcoin#849: Convert Sage code to Python 3 (as used by Sage >= 9)
13c88ef Convert Sage code to Python 3 (as used by Sage >= 9)
0ce4554 make test count iteration configurable by environment variable
9e5939d Merge bitcoin#835: Don't use reserved identifiers memczero and benchmark_verify_t
d0a83f7 Merge bitcoin#839: Prevent arithmetic on NULL pointer if the scratch space is too small
903b16a Merge bitcoin#840: Return NULL early in context_preallocated_create if flags invalid
1f4dd03 Typedef (u)int128_t only when they're not provided by the compiler
3967d96 Merge bitcoin#838: Make autotools check for all the used openssl functions
3734b68 Configure echo if openssl tests are enabled
ebfa205 Return NULL early in context_preallocated_create if flags invalid
6f54e69 Merge bitcoin#841: Avoids a potentially shortening size_t to int cast in strauss_wnaf_
29a299e Run the undefined behaviour sanitizer on Travis
7506e06 Prevent arithmetic on NULL pointer if the scratch space is too small
8893f42 Avoids a potentially shortening size_t to int cast in strauss_wnaf_
e669277 Modify bitcoin_secp.m4's openssl check to call all the functions that we use in the tests/benchmarks. That way linking will fail if those symbols are missing
ac05f61 Merge bitcoin#809: Stop treating ECDH as experimental
e6e3d5d travis: add schnorrsig to valgrind and big endian platform test
353dff1 Stop treating ECDH as experimental
e89278f Don't use reserved identifiers memczero and benchmark_verify_t
c6b6b8f Merge bitcoin#830: Rip out non-endomorphism code + dependencies
c582aba Consistency improvements to the comments
63c6b71 Reorder comments/function around scalar_split_lambda
2edc514 WNAF of lambda_split output has max size 129
4232e5b Rip out non-endomorphism code
ebad841 Check correctness of lambda split without -DVERIFY
fe7fc1f Make lambda constant accessible
9d2f2b4 Add tests to exercise lambda split near bounds
9aca2f7 Add secp256k1_split_lambda_verify
acab934 Detailed comments for secp256k1_scalar_split_lambda
76ed922 Increase precision of g1 and g2
6173839 Switch to our own memcmp function
63150ab Merge bitcoin#827: Rename testrand functions to have test in name
c5257ae Merge bitcoin#821: travis: Explicitly set --with-valgrind
bb1f542 Merge bitcoin#818: Add static assertion that uint32_t is unsigned int or wider
a45c1fa Rename testrand functions to have test in name
5006895 Merge bitcoin#808: Exhaustive test improvements + exhaustive schnorrsig tests
4eecb4d travis: VALGRIND->RUN_VALGRIND to avoid confusion with WITH_VALGRIND
66a765c travis: Explicitly set --with-valgrind
d7838ba Merge bitcoin#813: Enable configuring Valgrind support
7ceb0b7 Merge bitcoin#819: Enable -Wundef warning
8b7dcdd Add exhaustive test for extrakeys and schnorrsig
08d7d89 Make pubkey parsing test whether points are in the correct subgroup
87af00b Abstract out challenge computation in schnorrsig
63e1b2a Disable output buffering in tests_exhaustive.c
39f67dd Support splitting exhaustive tests across cores
e99b26f Give exhaustive_tests count and seed cmdline inputs
49e6630 refactor: move RNG seeding to testrand
b110c10 Change exhaustive test groups so they have a point with X=1
cec7b18 Select exhaustive lambda in function of order
78f6cdf Make the curve B constant a secp256k1_fe
d7f39ae Delete gej_is_valid_var: unused outside tests
8bcd78c Make secp256k1_scalar_b32 detect overflow in scalar_low
c498366 Move exhaustive tests for recovery to module
be31791 Make group order purely compile-time in exhaustive tests
e73ff30 Enable -Wundef warning
c0041b5 Add static assertion that uint32_t is unsigned int or wider
4ad408f Merge bitcoin#782: Check if variable=yes instead of if var is set in travis.sh
412bf87 configure: Allow specifying --with[out]-valgrind explicitly
34debf7 Modify .travis.yml to explictly pass no in env vars instead of setting to nothing
a0e99fc Merge bitcoin#814: tests: Initialize random group elements fully
5738e86 tests: Initialize random group elements fully
c9939ba Merge bitcoin#812: travis: run bench_schnorrsig
a51f2af travis: run bench_schnorrsig
8ab24e8 Merge bitcoin#558: Add schnorrsig module which implements BIP-340 compliant signatures
f3733c5 Merge bitcoin#797: Fix Jacobi benchmarks and other benchmark improvements
cb5524a Add benchmark for secp256k1_ge_set_gej_var
5c6af60 Make jacobi benchmarks vary inputs
d0fdd5f Randomize the Z coordinates in bench_internal
c7a3424 Rename bench_internal variables
875d68b Merge bitcoin#699: Initialize field elements when resulting in infinity
54caf2e Merge bitcoin#799: Add fallback LE/BE for architectures with known endianness + SHA256 selftest
f431b3f valgrind_ctime_test: Add schnorrsig_sign
16ffa9d schnorrsig: Add taproot test case
8dfd53e schnorrsig: Add benchmark for sign and verify
4e43520 schnorrsig: Add BIP-340 compatible signing and verification
7332d2d schnorrsig: Add BIP-340 nonce function
7a703fd schnorrsig: Init empty experimental module
eabd9bc Allow initializing tagged sha256
6fcb5b8 extrakeys: Add keypair_xonly_tweak_add
5825446 extrakeys: Add keypair struct with create, pub and pub_xonly
f001034 Separate helper functions for pubkey_create and seckey_tweak_add
910d9c2 extrakeys: Add xonly_pubkey_tweak_add & xonly_pubkey_tweak_add_test
176bfb1 Separate helper function for ec_pubkey_tweak_add
4cd2ee4 extrakeys: Add xonly_pubkey with serialize, parse and from_pubkey
f49c989 Merge bitcoin#806: Trivial: Add test logs to gitignore
aabf00c Merge bitcoin#648: Prevent ints from wrapping around in scratch space functions
f5adab1 Merge bitcoin#805: Remove the extremely outdated TODO file.
bceefd6 Add test logs to gitignore
1c32519 Remove the extremely outdated TODO file.
47e6618 extrakeys: Init empty experimental module
3e08b02 Make the secp256k1_declassify argument constant
8bc6aef Add SHA256 selftest
670cdd3 Merge bitcoin#798: Check assumptions on integer implementation at compile time
5e5fb28 Use additional system macros to figure out endianness
7c06899 Compile-time check assumptions on integer types
02b6c87 Add support for (signed) __int128
979961c Merge bitcoin#787: Use preprocessor macros instead of autoconf to detect endianness
887bd1f Merge bitcoin#793: Make scalar/field choice depend on C-detected __int128 availability
0dccf98 Use preprocessor macros instead of autoconf to detect endianness
b2c8c42 Merge bitcoin#795: Avoid linking libcrypto in the valgrind ct test.
57d3a3c Avoid linking libcrypto in the valgrind ct test.
79f1f7a Autodetect __int128 availability on the C side
0d7727f Add SECP256K1_FE_STORAGE_CONST_GET to 5x52 field
805082d Merge bitcoin#696: Run a Travis test on s390x (big endian)
3929536 Test travis s390x (big endian)
ef37761 Change travis.sh to check if variables are equal to yes instead of not-empty. Before this, setting `VALGRIND=wat` was considered as true, and to make it evaluate as false you had to unset the variable `VALGRIND=` but not it checks if `VALGRIND=yes` and if it's not `yes` then it's evaluated to false
6034a04 Merge bitcoin#778: secp256k1_gej_double_nonzero supports infinity
f609159 Merge bitcoin#779: travis: Fix argument quoting for ./configure
9e49a9b travis: Fix argument quoting for ./configure
18d3632 secp256k1_gej_double_nonzero supports infinity
214cb3c Merge bitcoin#772: Improve constant-timeness on PowerPC
40412b1 Merge bitcoin#774: tests: Abort if malloc() fails during context cloning tests
2e1b9e0 tests: Abort if malloc() fails during context cloning tests
67a429f Suppress a harmless variable-time optimization by clang in _int_cmov
5b19633 Remove redundant "? 1 : 0" after comparisons in scalar code
3e5cfc5 Merge bitcoin#741: Remove unnecessary sign variable from wnaf_const
66bb932 Merge bitcoin#773: Fix some compile problems on weird/old compilers.
1309c03 Fix some compile problems on weird/old compilers.
2309c7d Merge bitcoin#769: Undef HAVE___INT128 in basic-config.h to fix gen_context compilation
22e578b Undef HAVE___INT128 in basic-config.h to fix gen_context compilation
3f4a5a1 Merge bitcoin#765: remove dead store in ecdsa_signature_parse_der_lax
f00d657 remove dead store in ecdsa_signature_parse_der_lax
dbd41db Merge bitcoin#759: Fix uninitialized variables in ecmult_multi test
2e7fc5b Fix uninitialized variables in ecmult_multi test
2ed54da Merge bitcoin#755: Recovery signing: add to constant time test, and eliminate non ct operators
2860950 Add tests for the cmov implementations
73596a8 Add ecdsa_sign_recoverable to the ctime tests
2876af4 Split ecdsa_sign logic into a new function and use it from ecdsa_sign and recovery
5e1c885 Merge bitcoin#754: Fix uninit values passed into cmov
f79a7ad Add valgrind uninit check to cmovs output
05d315a Merge bitcoin#752: autoconf: Use ":" instead of "dnl" as a noop
a39c2b0 Fixed UB(arithmetics on uninit values) in cmovs
3a6fd7f Merge bitcoin#750: Add macOS to the CI
5e8747a autoconf: Use ":" instead of "dnl" as a noop
71757da Explictly pass SECP256K1_BENCH_ITERS to the benchmarks in travis.sh
99bd661 Replace travis_wait with a loop printing "\a" to stdout every minute
bc818b1 Bump travis Ubuntu from xenial(16.04) to bionic(18.04)
0c5ff90 Add macOS support to travis
b6807d9 Move travis script into a standalone sh file
f39f99b Merge bitcoin#701: Make ec_ arithmetic more consistent and add documentation
37dba32 Remove unnecessary sign variable from wnaf_const
6bb0b77 Fix test_constant_wnaf for -1 and add a test for it.
39198a0 Merge bitcoin#732: Retry if r is zero during signing
59a8de8 Merge bitcoin#742: Fix typo in ecmult_const_impl.h
4e28465 Fix typo in ecmult_const_impl.h
f862b4c Merge bitcoin#740: Make recovery/main_impl.h non-executable
ffef45c Make recovery/main_impl.h non-executable
2361b37 Merge bitcoin#735: build: fix OpenSSL EC detection on macOS
3b7d26b build: add SECP_TEST_INCLUDES to bench_verify CPPFLAGS
84b5fc5 build: fix OpenSSL EC detection on macOS
37ed51a Make ecdsa_sig_sign constant-time again after reverting 25e3cfb
93d343b Revert "ecdsa_impl: replace scalar if-checks with VERIFY_CHECKs in ecdsa_sig_sign"
7e3952a Clarify documentation of tweak functions.
89853a0 Make tweak function documentation more consistent.
41fc785 Make ec_privkey functions aliases for ec_seckey_negate, ec_seckey_tweak_add and ec_seckey_mul
22911ee Rename private key to secret key in public API (with the exception of function names)
5a73f14 Mention that value is unspecified for In/Out parameters if the function returns 0
f03df0e Define valid ECDSA keys in the documentation of seckey_verify
5894e1f Return 0 if the given seckey is invalid in privkey_negate, privkey_tweak_add and privkey_tweak_mul
8f814cd Add test for boundary conditions of scalar_set_b32 with respect to overflows
3fec982 Use scalar_set_b32_seckey in ecdsa_sign, pubkey_create and seckey_verify
9ab2cbe Add scalar_set_b32_seckey which does the same as scalar_set_b32 and also returns whether it's a valid secret key
4f27e34 Merge bitcoin#728: Suppress a harmless variable-time optimization by clang in memczero
0199387 Add test for memczero()
52a0351 Suppress a harmless variable-time optimization by clang in memczero
8f78e20 Merge bitcoin#722: Context isn't freed in the ECDH benchmark
ed1b911 Merge bitcoin#700: Allow overriding default flags
85b35af Add running benchmarks regularly and under valgrind in travis
ca4906b Pass num of iters to benchmarks as variable, and define envvar
02dd5f1 free the ctx at the end of bench_ecdh
e9fccd4 Merge bitcoin#708: Constant-time behaviour test using valgrind memtest.
08fb6c4 Run valgrind_ctime_test in travis
3d23022 Constant-time behaviour test using valgrind memtest.
96d8ccb Merge bitcoin#710: Eliminate harmless non-constant time operations on secret data.
0585b8b Merge bitcoin#718: Clarify that a secp256k1_ecdh_hash_function must return 0 or 1
7b50483 Adds a declassify operation to aid constant-time analysis.
34a67c7 Eliminate harmless non-constant time operations on secret data.
ca739cb Compile with optimization flag -O2 by default instead of -O3
eb45ef3 Clarify that a secp256k1_ecdh_hash_function must return 0 or 1
856a01d Merge bitcoin#714: doc: document the length requirements of output parameter.
d72b9e2 Merge bitcoin#682: Remove Java Native Interface
4b48a43 doc: document the length requirements of output parameter.
1b4d256 Merge bitcoin#713: Docstrings
dabfea7 field: extend docstring of secp256k1_fe_normalize
dc7d8fd scalar: extend docstring of secp256k1_scalar_set_b32
074ab58 Merge bitcoin#704: README: add a section for test coverage
acb7f97 README: add a section for test coverage
227a4f2 Merge bitcoin#709: Remove secret-dependant non-constant time operation in ecmult_const.
d567b77 Clarify comments about use of rzr on ge functions and abs function.
2241ae6 Remove secret-dependant non-constant time operation in ecmult_const.
642cd06 Remove Java Native Interface
83fb1bc Remove -O2 from default CFLAGS because this would override the -O3 flag (see AC_PROG_CC in the Autoconf manual)
ecba813 Append instead of Prepend user-CFLAGS to default CFLAGS allowing the user to override default variables
613c34c Remove test in configure.ac because it doesn't have an effect
f45d897 Merge bitcoin#703: Overhaul README.md
2e759ec Overhaul README.md
d644dda Merge bitcoin#689: Remove "except in benchmarks" exception for fp math
bde2a32 Convert bench.h to fixed-point math
47a7b83 Clear field elements when writing infinity
61d1ecb Added test with additions resulting in infinity
387d723 Merge bitcoin#679: Add SECURITY.md
0db61d2 Merge bitcoin#685: Fix issue where travis does not show the ./tests seed…
a0771d1 Explicitly disable buffering for stderr in tests
fb424fb Make travis show the ./tests seed by removing stdout buffering and always cat tests.log after a travis run.
22a6031 Merge bitcoin#690: Add valgrind check to travis
544002c Merge bitcoin#678: Preventing compiler optimizations in benchmarks without a memory fence
dd98cc9 travis: Added a valgrind test without endro and enabled recovery+ecdh
b4c1382 Add valgrind check to travis
0c774d8 Merge bitcoin#688: Fix ASM setting in travis
5c5f71e Fix ASM setting in travis
e2625f8 Merge bitcoin#684: Make no-float policy explicit
bae1bea Make no-float policy explicit
78c3836 Add SECURITY.md
362bb25 Modified bench_scalar_split so it won't get optimized out
73a30c6 Added accumulators and checks on benchmarks so they won't get optimized out
770b3dc Merge bitcoin#677: Remove note about heap allocation in secp256k1_ecmult_odd_multiples_table_storage_var
b76142f Remove note about heap allocation in secp256k1_ecmult_odd_multiples_table_storage_var which was removed in 4704527
137d304 Merge bitcoin#647: Increase robustness against UB in secp256k1_scalar_cadd_bit
0d9540b Merge bitcoin#664: Remove mention of ec_privkey_export because it doesn't exist
59782c6 Remove mention of ec_privkey_export because it doesn't exist
96cd94e Merge bitcoin#337: variable sized precomputed table for signing
dcb2e3b variable signing precompute table
b4bff99 Merge bitcoin#661: Make ./configure string consistent
a467047 Make ./configure string consistent
e729cc7 Merge bitcoin#657: Fix a nit in the recovery tests
b64a2e2 Fix a nit in the recovery tests
e028aa3 Merge bitcoin#650: secp256k1/src/tests.c:  Properly handle sscanf return value
f1e11d3 Merge bitcoin#654: Fix typo (∞)
ef83281 Merge pull request bitcoin#656 from real-or-random/patch-1
556caad Fix typo in docs for _context_set_illegal_callback
0d82732 Improve VERIFY_CHECK of overflow in secp256k1_scalar_cadd_bit. This added check ensures that any curve order overflow doesn't go undetected due a uint32_t overflow.
786dfb4 Merge bitcoin#583: JNI: fix use sig array
e95f8ab Merge bitcoin#644: Avoid optimizing out a verify_check
384f556 Merge bitcoin#652: README.md: update instruction to run tests
ee56acc Merge bitcoin#651: Fix typo in secp256k1_preallocated.h
7b9b117 Merge bitcoin#640: scalar_impl.h: fix includes
d99bec2 Merge bitcoin#655: jni: Use only Guava for hex encoding and decoding
2abcf95 jni: Use only Guava for hex encoding and decoding
271582b Fix typo
60f7f2d Don't assume that ALIGNMENT > 1 in tests
ada6361 Use ROUND_TO_ALIGN in scratch_create
8ecc6ce Add check preventing rounding to alignment from wrapping around in scratch_alloc
4edaf06 Add check preventing integer multiplication wrapping around in scratch_max_allocation
ce6d438 README.md: update instruction to run tests
b1e68cb Fix typo in secp256k1_preallocated.h
a11c76c secp256k1/src/tests.c:  Properly handle sscanf return value
8fe63e5 Increase robustness against UB. Thanks to elichai2 who noted that the literal '1' is a signed integer, and that shifting a signed 32-bit integer by 31 bits causes an overflow and yields undefined behaviour. While 'scalar_low_impl''s 'secp256k1_scalar_cadd_bit' is only used for testing purposes and currently the 'bit' parameter is only 0 or 1, it is better to avoid undefined behaviour in case the used domain of 'secp256k1_scalar_cadd_bit' expands.
94ae7cb Moved a dereference so the null check will be before the dereferencing
2cb73b1 scalar_impl.h: fix includes
fa33017 Merge bitcoin#634: Add a descriptive comment for secp256k1_ecmult_const.
ee9e68c Add a descriptive comment for secp256k1_ecmult_const.
d0d738d Merge bitcoin#631: typo in comment for secp256k1_ec_pubkey_tweak_mul ()
6914c25 typo in comment for secp256k1_ec_pubkey_tweak_mul ()
e541a90 Merge bitcoin#629: Avoid calling _is_zero when _set_b32 fails.
f34b0c3 Merge bitcoin#630: Note intention of timing sidechannel freeness.
8d1563b Note intention of timing sidechannel freeness.
1669bb2 Merge bitcoin#628: Fix ability to compile tests without -DVERIFY.
ecc94ab Merge bitcoin#627: Guard memcmp in tests against mixed size inputs.
544435f Merge bitcoin#578: Avoid implementation-defined and undefined behavior when dealing with sizes
143dc6e Merge bitcoin#595: Allow to use external default callbacks
e49f799 Add missing #(un)defines to base-config.h
77defd2 Add secp256k1_ prefix to default callback functions
908bdce Include stdio.h and stdlib.h explicitly in secp256k1.c
5db782e Allow usage of external default callbacks
6095a86 Replace CHECKs for no_precomp ctx by ARG_CHECKs without a return
cd473e0 Avoid calling secp256k1_*_is_zero when secp256k1_*_set_b32 fails.
6c36de7 Merge bitcoin#600: scratch space: use single allocation
98836b1 scratch: replace frames with "checkpoint" system
7623cf2 scratch: save a couple bytes of unnecessarily-allocated memory
a7a164f scratch: rename `max_size` to `size`, document that extra will actually be allocated
5a4bc0b scratch: unify allocations
c2b028a scratch space: thread `error_callback` into all scratch space functions
0be1a4a scratch: add magic bytes to beginning of structure
92a48a7 scratch space: use single allocation
40839e2 Merge bitcoin#592: Use trivial algorithm in ecmult_multi if scratch space is small
dcf3920 Fix ability to compile tests without -DVERIFY.
a484e00 Merge bitcoin#566: Enable context creation in preallocated memory
0522caa Explain caller's obligations for preallocated memory
238305f Move _preallocated functions to separate header
695feb6 Export _preallocated functions
814cc78 Add tests for contexts in preallocated memory
ba12dd0 Check arguments of _preallocated functions
5feadde Support cloning a context into preallocated memory
c4fd5da Switch to a single malloc call
ef020de Add size constants for preallocated memory
1bf7c05 Prepare for manual memory management in preallocated memory
248bffb Guard memcmp in tests against mixed size inputs.
36698dc Merge bitcoin#596: Make WINDOW_G configurable
a61a93f Clean up ./configure help strings
2842dc5 Make WINDOW_G configurable
1a02d6c Merge bitcoin#626: Revert "Merge bitcoin#620: Install headers automatically"
662918c Revert "Merge bitcoin#620: Install headers automatically"
14c7dbd Simplify control flow in DER parsing
ec8f20b Avoid out-of-bound pointers and integer overflows in size comparisons
01ee1b3 Parse DER-enconded length into a size_t instead of an int
912680e Merge bitcoin#561: Respect LDFLAGS and #undef STATIC_PRECOMPUTATION if using basic config
91fae3a Merge bitcoin#620: Install headers automatically
5df77a0 Merge bitcoin#533: Make sure we're not using an uninitialized variable in secp256k1_wnaf_const(...)
975e51e Merge bitcoin#617: Pass scalar by reference in secp256k1_wnaf_const()
735fbde Merge bitcoin#619: Clear a copied secret key after negation
16e8615 Install headers automatically
069870d Clear a copied secret key after negation
8979ec0 Pass scalar by reference in secp256k1_wnaf_const()
84a8085 Merge bitcoin#612: Allow field_10x26_arm.s to compile for ARMv7 architecture
d4d270a Allow field_10x26_arm.s to compile for ARMv7 architecture
b19c000 Merge bitcoin#607: Use size_t shifts when computing a size_t
4d01bc2 Merge bitcoin#606: travis: Remove unused sudo:false
e6d01e9 Use size_t shifts when computing a size_t
7667532 travis: Remove unused sudo:false
248f046 Make sure we're not using an uninitialized variable in secp256k1_wnaf_const(...)
9ab96f7 Use trivial algorithm in ecmult_multi if scratch space is small
ee99f12 Merge bitcoin#599: Switch x86_64 asm to use "i" instead of "n" for immediate values.
d58bc93 Switch x86_64 asm to use "i" instead of "n" for immediate values.
05362ee Merge bitcoin#597: Add $(COMMON_LIB) to exhaustive tests to fix ARM asm build
8348386 Add $(COMMON_LIB) to exhaustive tests to fix ARM asm build
aa15154 Merge bitcoin#568: Fix integer overflow in ecmult_multi_var when n is large
2277af5 Fix integer overflow in ecmult_multi_var when n is large
dbed75d Undefine `STATIC_PRECOMPUTATION` if using the basic config
310111e Keep LDFLAGS if `--coverage`
85d0e1b Merge bitcoin#591: Make bench_internal obey secp256k1_fe_sqrt's contract wrt aliasing.
1419637 Merge bitcoin#580: Add trivial ecmult_multi algorithm which does not require a scratch space
a697d82 Add trivial ecmult_multi to the benchmark tool
bade617 Add trivial ecmult_multi algorithm. It is selected when no scratch space is given and just multiplies and adds the points.
5545e13 Merge bitcoin#584: configure: Use CFLAGS_FOR_BUILD when checking native compiler
20c5869 Merge bitcoin#516: improvements to random seed in src/tests.c
b76e45d Make bench_internal obey secp256k1_fe_sqrt's contract wrt aliasing.
870a977 Merge bitcoin#562: Make use of TAG_PUBKEY constants in secp256k1_eckey_pubkey_parse
be40c4d Fixup for C90 mixed declarations.
c71dd2c Merge bitcoin#509: Fix algorithm selection in bench_ecmult
6492bf8 Merge bitcoin#518: Summarize build options after running configure
0e9ada1 Merge bitcoin#567: Correct order of libs returned on pkg-config --libs --static libsecp2…
e96901a Merge bitcoin#587: Make randomization of a non-signing context a noop
58df8d0 Merge bitcoin#511: Portability fix for the configure scripts generated
2ebdad7 Merge bitcoin#552: Make constants static:
1c131af Merge bitcoin#551: secp256k1_fe_sqrt: Verify that the arguments don't alias.
ba698f8 Merge bitcoin#539: Assorted minor corrections
949e85b Merge bitcoin#550: Optimize secp256k1_fe_normalize_weak calls.
a34bcaa Actually pass CFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD to linker
2d5f4ce configure: Use CFLAGS_FOR_BUILD when checking native compiler
b408c6a Merge bitcoin#579: Use __GNUC_PREREQ for detecting __builtin_expect
6198375 Make randomization of a non-signing context a noop
74e2dbd JNI: fix use sig array
c663397 Use __GNUC_PREREQ for detecting __builtin_expect
3cb057f Fix possible integer overflow in DER parsing
e34ceb3 Merge bitcoin#557: Eliminate scratch memory used when generating contexts
b3bf5f9 ecmult_impl: expand comment to explain how effective affine interacts with everything
efa783f Store z-ratios in the 'x' coord they'll recover
ffd3b34 add `secp256k1_ge_set_all_gej_var` test which deals with many infinite points
84740ac ecmult_impl: save one fe_inv_var
4704527 ecmult_impl: eliminate scratch memory used when generating context
7f7a2ed ecmult_gen_impl: eliminate scratch memory used when generating context
314a61d Merge bitcoin#553: add static context object which has no capabilities
89a20a8 Correct order of libs returned on pkg-config --libs --static libsecp256k1 call.
d3cb1f9 Make use of TAG_PUBKEY constants in secp256k1_eckey_pubkey_parse
40fde61 prevent attempts to modify `secp256k1_context_no_precomp`
ed7c084 add static context object which has no capabilities
496c5b4 Make constants static: static const secp256k1_ge secp256k1_ge_const_g; static const int CURVE_B;
bf8b86c secp256k1_fe_sqrt: Verify that the arguments don't alias.
9bd89c8 Optimize secp256k1_fe_normalize_weak calls. Move secp256k1_fe_normalize_weak calls out of ECMULT_TABLE_GET_GE and ECMULT_TABLE_GET_GE_STORAGE and into secp256k1_ge_globalz_set_table_gej instead.
52ab96f clean dependendies in field_*_impl.h
deff5ed Correct math typos in field_*.h
4efb3f8 Add check that restrict pointers don't alias with all parameters.
3965027 Summarize build options in configure script
0f05173 Fix algorithm selection in bench_ecmult
8b3841c fix bug in fread() failure check
cddef0c tests: add warning message when /dev/urandom fails
270f6c8 Portability fix for the configure scripts generated

git-subtree-dir: src/secp256k1
git-subtree-split: 5f6ceaf
janus pushed a commit to BitgesellOfficial/bitgesell that referenced this pull request Nov 5, 2021
be8d9c262f Merge bitcoin-core/secp256k1#965: gen_context: Don't use any ASM
aeece44599 gen_context: Don't use any ASM
7688a4f13a Merge bitcoin-core/secp256k1#963: "Schnorrsig API overhaul" fixups
90e83449b2 ci: Add C++ test
f698caaff6 Use unsigned char consistently for byte arrays
b5b8e7b719 Don't declare constants twice
769528f307 Don't use string literals for char arrays without NUL termination
2cc3cfa583 Fix -Wmissing-braces warning in clang
0440945fb5 Merge #844: schnorrsig API overhaul
ec3aaa5014 Merge #960: tests_exhaustive: check the result of secp256k1_ecdsa_sign
a1ee83c654 tests_exhaustive: check the result of secp256k1_ecdsa_sign
253f90cdeb Merge bitcoin-core/secp256k1#951: configure: replace AC_PATH_PROG to AC_CHECK_PROG
446d28d9de Merge bitcoin-core/secp256k1#944: Various improvements related to CFLAGS
0302138f75 ci: Make compiler warning into errors on CI
b924e1e605 build: Ensure that configure's compile checks default to -O2
7939cd571c build: List *CPPFLAGS before *CFLAGS like on the compiler command line
595e8a35d8 build: Enable -Wcast-align=strict warning
07256267ff build: Use own variable SECP_CFLAGS instead of touching user CFLAGS
4866178dfc Merge bitcoin-core/secp256k1#955: Add random field multiply/square tests
75ce488c2a Merge bitcoin-core/secp256k1#959: tests: really test the non-var scalar inverse
41ed13942b tests: really test the non-var scalar inverse
5f6ceafcfa schnorrsig: allow setting MSGLEN != 32 in benchmark
fdd06b7967 schnorrsig: add tests for sign_custom and varlen msg verification
d8d806aaf3 schnorrsig: add extra parameter struct for sign_custom
a0c3fc177f schnorrsig: allow signing and verification of variable length msgs
5a8e4991ad Add secp256k1_tagged_sha256 as defined in BIP-340
b6c0b72fb0 schnorrsig: remove noncefp args from sign; add sign_custom function
bdf19f105c Add random field multiply/square tests
8ae56e33e7 Merge #879: Avoid passing out-of-bound pointers to 0-size memcpy
a4642fa15e configure: replace AC_PATH_PROG to AC_CHECK_PROG
1758a92ffd Merge #950: ci: Add ppc64le build
c58c4ea470 ci: Add ppc64le build
7973576f6e Merge #662: Add ecmult_gen, ecmult_const and ecmult to benchmark
8f879c2887 Fix array size in bench_ecmult
2fe1b50df1 Add ecmult_gen, ecmult_const and ecmult to benchmark
593e6bad9c Clean up ecmult_bench to make space for more benchmarks
50f3367712 Merge #947: ci: Run PRs on merge result even for i686
a35fdd3478 ci: Run PRs on merge result even for i686
442cee5baf schnorrsig: add algolen argument to nonce_function_hardened
df3bfa12c3 schnorrsig: clarify result of calling nonce_function_bip340 without data
99e8614812 README: mention schnorrsig module
3dc8c072b6 Merge #846: ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
02dcea1ad9 ci: Make test iterations configurable and tweak for sanitizer builds
489ff5c20a tests: Treat empty SECP2561_TEST_ITERS as if it was unset
fcfcb97e74 ci: Simplify to use generic wrapper for QEMU, Valgrind, etc
de4157f13a ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
399722a63a Merge #941: Clean up git tree
09b3bb8648 Clean up git tree
bf0ac46066 Merge #930: Add ARM32/ARM64 CI
202a030f7d Merge #850: add `secp256k1_ec_pubkey_cmp` method
1e78c18d5b Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards
69394879b6 Merge #926: secp256k1.h: clarify that by default arguments must be != NULL
6eceec6d56 add `secp256k1_xonly_pubkey_cmp` method
0d9561ae87 add `secp256k1_ec_pubkey_cmp` method
22a9ea154a contrib: Explain explicit header guards
6c52ae8724 Merge #937: Have ge_set_gej_var, gej_double_var and ge_set_all_gej_var initialize all fields of their outputs.
185a6af227 Merge #925: changed include statements without prefix 'include/'
14c9739a1f tests: Improve secp256k1_ge_set_all_gej_var for some infinity inputs
4a19668c37 tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs
3c90bdda95 change local lib headers to be relative for those pointing at "include/" dir
45b6468d7e Have secp256k1_ge_set_all_gej_var initialize all fields. Previous behaviour would not initialize r->y values in the case where infinity is passed in. Furthermore, the previous behaviour wouldn't initialize anything in the case where all inputs were infinity.
31c0f6de41 Have secp256k1_gej_double_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
dd6c3de322 Have secp256k1_ge_set_gej_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
d0bd2693e3 Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM
8bbad7a18e Add asm build to ARM32 CI
7d65ed5214 Add ARM32/ARM64 CI
c8483520c9 Makefile.am: Don't pass a variable twice
2161f31785 Makefile.am: Honor config when building gen_context
99f47c20ec gen_context: Don't use external ASM because it complicates the build
98e0358d29 Merge #933: Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers
99e2d5be0d Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers.
34388af6b6 Merge #922: Add mingw32-w64/wine CI build
7012a188e6 Merge #928: Define SECP256K1_BUILD in secp256k1.c directly.
ed5a199bed tests: fopen /dev/urandom in binary mode
ae9e648526 Define SECP256K1_BUILD in secp256k1.c directly.
4dc37bf81b Add mingw32-w64/wine CI build
0881633dfd secp256k1.h: clarify that by default arguments must be != NULL
9570f674cc Avoid passing out-of-bound pointers to 0-size memcpy

git-subtree-dir: src/secp256k1
git-subtree-split: be8d9c262f46309d9b4165b0498b71d704aba8fe
patricklodder added a commit to patricklodder/dogecoin that referenced this pull request Jul 25, 2022
44c2452fd3 Merge bitcoin-core/secp256k1#1105: Don't export symbols in static libraries
6f6cab9989 abi: Don't export symbols in static Windows libraries
485f608fa9 Merge bitcoin-core/secp256k1#1104: Fix the false positive of `SECP_64BIT_ASM_CHECK`
8b013fce51 Merge bitcoin-core/secp256k1#1056: Save negations in var-time group addition
7efc9835a9 Fix the false positive of `SECP_64BIT_ASM_CHECK`
8746600eec Merge bitcoin-core/secp256k1#1093: hash: Make code agnostic of endianness
2f984ffc45 Save negations in var-time group addition
37d36927df tests: Add tests for _read_be32 and _write_be32
912b7ccc44 Merge bitcoin-core/secp256k1#1094: doc: Clarify configure flags for optional modules
55512d30b7 doc: clean up module help text in configure.ac
d9d94a9969 doc: mention optional modules in README
616b43dd3b util: Remove endianness detection
8d89b9e6e5 hash: Make code agnostic of endianness
d0ad5814a5 Merge bitcoin-core/secp256k1#995: build: stop treating schnorrsig, extrakeys modules as experimental
1ac7e31c5b Merge bitcoin-core/secp256k1#1089: Schnorrsig API improvements
587239dbe3 Merge bitcoin-core/secp256k1#731: Change SHA256 byte counter from size_t to uint64_t
f8d9174357 Add SHA256 bit counter tests
7f09d0f311 README: mention that ARM assembly is experimental
b8f8b99f0f docs: Fix return value for functions that don't have invalid inputs
f813bb0df3 schnorrsig: Adapt example to new API
99e6568fc6 schnorrsig: Rename schnorrsig_sign to schnorsig_sign32 and deprecate
fc94a2da44 Use SECP256K1_DEPRECATED for existing deprecated API functions
3db0560606 Add SECP256K1_DEPRECATED attribute for marking API parts as deprecated
80cf4eea5f build: stop treating schnorrsig, extrakeys modules as experimental
e0508ee9db Merge bitcoin-core/secp256k1#1090: configure: Remove redundant pkg-config code
21b2ebaf74 configure: Remove redundant pkg-config code
0e5cbd01b3 Merge bitcoin-core/secp256k1#1088: configure: Use modern way to set AR
0d253d52e8 configure: Use modern way to set AR
9b514ce1d2 Add test vector for very long SHA256 messages
8e3dde1137 Simplify struct initializer for SHA256 padding
eb28464a8b Change SHA256 byte counter from size_t to uint64_t
ac83be33d0 Merge bitcoin-core/secp256k1#1079: configure: Add hidden --enable-dev-mode to enable all the stuff
e0838d663d configure: Add hidden --enable-dev-mode to enable all the stuff
fabd579dfa configure: Remove redundant code that sets _enable variables
0d4226c051 configure: Use canonical variable prefix _enable consistently
64b34979ed Merge bitcoin-core/secp256k1#748: Add usage examples
7c9502cece Add a copy of the CC0 license to the examples
42e03432e6 Add usage examples to the readme
517644eab1 Optionally compile the examples in autotools, compile+run in travis
422a7cc86a Add a ecdh shared secret example
b0cfbcc143 Add a Schnorr signing and verifying example
fee7d4bf9e Add an ECDSA signing and verifying example
1253a27756 Merge bitcoin-core/secp256k1#1033: Add _fe_half and use in _gej_add_ge and _gej_double
3ef94aa5ba Merge bitcoin-core/secp256k1#1026: ecdh: Add test computing shared_secret=basepoint with random inputs
3531a43b5b ecdh: Make generator_basepoint test depend on global iteration count
c881dd49bd ecdh: Add test computing shared_secret=basepoint with random inputs
077528317d Merge bitcoin-core/secp256k1#1074: ci: Retry brew update a few times to avoid random failures
e51ad3b737 ci: Retry `brew update` a few times to avoid random failures
b1cb969e8a ci: Revert "Attempt to make macOS builds more reliable"
5dcc6f8dbd Merge bitcoin-core/secp256k1#1069: build: Replace use of deprecated autoconf macro AC_PROG_CC_C89
59547943d6 Merge bitcoin-core/secp256k1#1072: ci: Attempt to make macOS builds more reliable
85b00a1c65 Merge bitcoin-core/secp256k1#1068: sage: Fix incompatibility with sage 9.4
ebb1beea78 sage: Ensure that constraints are always fastfracs
d8d54859ed ci: Run sage prover on CI
77cfa98dbc sage: Normalize sign of polynomial factors in prover
eae75869cf sage: Exit with non-zero status in case of failures
d9396a56da ci: Attempt to make macOS builds more reliable
e0db3f8a25 build: Replace use of deprecated autoconf macro AC_PROG_CC_C89
e848c3799c Update sage files for new formulae
d64bb5d4f3 Add fe_half tests for worst-case inputs
b54d843eac sage: Fix printing of errors
4eb8b932ff Further improve doubling formula using fe_half
557b31fac3 Doubling formula using fe_half
2cbb4b1a42 Run more iterations of run_field_misc
9cc5c257ed Add test for secp256k1_fe_half
925f78d55e Add _fe_half and use in _gej_add_ge
e108d0039c sage: Fix incompatibility with sage 9.4
d8a2463246 Merge bitcoin-core/secp256k1#899: Reduce stratch space needed by ecmult_strauss_wnaf.
0a40a4861a Merge bitcoin-core/secp256k1#1049: Faster fixed-input ecmult tests
070e772211 Faster fixed-input ecmult tests
c8aa516b57 Merge bitcoin-core/secp256k1#1064: Modulo-reduce msg32 inside RFC6979 nonce fn to match spec. Fixes #1063
b797a500ec Create a SECP256K1_ECMULT_TABLE_VERIFY macro.
a731200cc3 Replace ECMULT_TABLE_GET_GE_STORAGE macro with a function.
fe34d9f341 Eliminate input_pos state field from ecmult_strauss_wnaf.
0397d00ba0 Eliminate na_1 and na_lam state fields from ecmult_strauss_wnaf.
7ba3ffcca0 Remove the unused pre_a_lam allocations.
b3b57ad6ee Eliminate the pre_a_lam array from ecmult_strauss_wnaf.
ae7ba0f922 Remove the unused prej allocations.
e5c18892db Eliminate the prej array from ecmult_strauss_wnaf.
c9da1baad1 Move secp256k1_fe_one to field.h
45f37b6506 Modulo-reduce msg32 inside RFC6979 nonce fn to match spec. Fixes #1063.
a1102b1219 Merge bitcoin-core/secp256k1#1029: Simpler and faster ecdh skew fixup
e82144edfb Fixup skew before global Z fixup
40b624c90b Add tests for _gej_cmov
8c13a9bfe1 ECDH skews by 0 or 1
1515099433 Simpler and faster ecdh skew fixup
39a36db94a Merge bitcoin-core/secp256k1#1054: tests: Fix test whose result is implementation-defined
a310e79ee5 Merge bitcoin-core/secp256k1#1052: Use xoshiro256++ instead of RFC6979 for tests
423b6d19d3 Merge bitcoin-core/secp256k1#964: Add release-process.md
9281c9f4e1 Merge bitcoin-core/secp256k1#1053: ecmult: move `_ecmult_odd_multiples_table_globalz_windowa`
77a19750b4 Use xoshiro256++ PRNG instead of RFC6979 in tests
5f2efe684e secp256k1_testrand_int(2**N) -> secp256k1_testrand_bits(N)
05e049b73c ecmult: move `_ecmult_odd_multiples_table_globalz_windowa`
3d7cbafb5f tests: Fix test whose result is implementation-defined
3ed0d02bf7 doc: add CHANGELOG template
6f42dc16c8 doc: add release_process.md
0bd3e4243c build: set library version to 0.0.0 explicitly
b4b02fd8c4 build: change libsecp version from 0.1 to 0.1.0-pre
09971a3ffd Merge bitcoin-core/secp256k1#1047: ci: Various improvements
0b83b203e1 Merge bitcoin-core/secp256k1#1030: doc: Fix upper bounds + cleanup in field_5x52_impl.h comment
1287786c7a doc: Add comment to top of field_10x26_impl.h
58da5bd589 doc: Fix upper bounds + cleanup in field_5x52_impl.h comment
b39d431aed Merge bitcoin-core/secp256k1#1044: Add another ecmult_multi test
b4ac1a1d5f ci: Run valgrind/memcheck tasks with 2 CPUs
e70acab601 ci: Use Cirrus "greedy" flag to use idle CPU time when available
d07e30176e ci: Update brew on macOS
22382f0ea0 ci: Test different ecmult window sizes
a69df3ad24 Merge bitcoin-core/secp256k1#816: Improve checks at top of _fe_negate methods
22d25c8e0a Add another ecmult_multi test
515e7953ca Improve checks at top of _fe_negate methods
26a022a3a0 ci: Remove STATICPRECOMPUTATION
10461d8bd3 precompute_ecmult: Always compute all tables up to default WINDOW_G
be6944ade9 Merge bitcoin-core/secp256k1#1042: Follow-ups to making all tables fully static
e05da9e480 Fix c++ build
c45386d994 Cleanup preprocessor indentation in precompute{,d}_ecmult{,_gen}
19d96e15f9 Split off .c file from precomputed_ecmult.h
1a6691adae Split off .c file from precomputed_ecmult_gen.h
bb36331412 Simplify precompute_ecmult_print_*
38cd84a0cb Compute ecmult tables at runtime for tests_exhaustive
e458ec26d6 Move ecmult table computation code to separate file
fc1bf9f15f Split ecmult table computation and printing
31feab053b Rename function secp256k1_ecmult_gen_{create_prec -> compute}_table
725370c3f2 Rename ecmult_gen_prec -> ecmult_gen_compute_table
075252c1b7 Rename ecmult_static_pre_g -> precomputed_ecmult
7cf47f72bc Rename ecmult_gen_static_prec_table -> precomputed_ecmult_gen
f95b8106d0 Rename gen_ecmult_static_pre_g -> precompute_ecmult
bae77685eb Rename gen_ecmult_gen_static_prec_table -> precompute_ecmult_gen
0559fc6e41 Merge bitcoin-core/secp256k1#988: Make signing table fully static
7dfceceea6 build: Remove #undef hack for ASM in the precomputation programs
bb36fe9be0 ci: Test `make precomp`
d94a37a20c build: Remove CC_FOR_BUILD stuff
ad63bb4c29 build: Prebuild and distribute ecmult_gen table
ac49361ed0 prealloc: Get rid of manual memory management for prealloc contexts
6573c08f65 ecmult_gen: Tidy precomputed file and save space
5eba83f17c ecmult_gen: Precompute tables for all values of ECMULT_GEN_PREC_BITS
5d0dbef018 Merge bitcoin-core/secp256k1#942: Verify that secp256k1_ge_set_gej_zinv does not operate on infinity.
486205aa68 Merge bitcoin-core/secp256k1#920: Test all ecmult functions with many j*2^i combinations
fdb33dd122 refactor: Make PREC_BITS a parameter of ecmult_gen_build_prec_table
5eb519e1f6 ci: reduce TEST_ITERS in memcheck run
e2cf77328a Test ecmult functions for all i*2^j for j=0..255 and odd i=1..255.
61ae37c612 Merge bitcoin-core/secp256k1#1022: build: Windows DLL additions
4f01840b82 Merge bitcoin-core/secp256k1#1027: build: Add a check that Valgrind actually supports a host platform
6ad908aa00 Merge bitcoin-core/secp256k1#1008: bench.c: add `--help` option and ci: move env variables
592661c22f ci: move test environment variable declaration to .cirrus.yml
dcbe84b841 bench: add --help option to bench.
099bad945e Comment and check a parameter for inf in secp256k1_ecmult_const.
6c0be857f8 Verify that secp256k1_ge_set_gej_zinv does not operate on infinity. a->x and a->y should not be used if the infinity flag is set.
4900227451 Merge bitcoin-core/secp256k1#1025: build: replace backtick command substitution with $()
7c7ce872a5 build: Add a check that Valgrind actually supports a host platform
a4875e30a6 refactor: Move default callbacks to util.h
4c94c55bce doc: Remove obsolete hint for valgrind stack size
5106226991 exhaustive_tests: Fix with ecmult_gen table with custom generator
e1a76530db refactor: Make generator a parameter of ecmult_gen_create_prec_table
9ad09f6911 refactor: Rename program that generates static ecmult_gen table
8ae18f1ab3 refactor: Rename file that contains static ecmult_gen table
00d2fa116e ecmult_gen: Make code consistent with comment
3b0c2185ea ecmult_gen: Simplify ecmult_gen context after making table static
2b7c7497ef build: replace backtick command substitution with $()
49f608de47 Merge bitcoin-core/secp256k1#1004: ecmult: fix definition of STRAUSS_SCRATCH_OBJECTS
c0cd7de6d4 build: add -no-undefined to libtool LDFLAGS
fe32a79d35 build: pass win32-dll to LT_INIT
60bf8890df ecmult: fix definition of STRAUSS_SCRATCH_OBJECTS
fecf436d53 Merge bitcoin-core/secp256k1#1019: build: don't append valgrind CPPFLAGS if not installed (macOS)
2e5e4b67df Merge bitcoin-core/secp256k1#1020: doc: remove use of <0xa0> "no break space"
812ff5c747 doc: remove use of 0xa0 "no break space"
214042a170 build: don't append valgrind CPPFLAGS if not installed
e43ba02cfc refactor: Decouple table generation and ecmult_gen context
22dc2c0a0d ecmult_gen: Move table creation to new file and force static prec
793ad9016a Merge bitcoin-core/secp256k1#1010: doc: Minor fixes in safegcd_implementation.md
dc9b6853b7 doc: Minor fixes in safegcd_implementation.md
ea5e8a9c47 Merge bitcoin-core/secp256k1#1012: Fix typos
233297579d Fix typos
7006f1b97f Merge bitcoin-core/secp256k1#1011: ci: Enable -g if we set CFLAGS manually
72de1359e9 ci: Enable -g if we set CFLAGS manually
74c34e727b Merge bitcoin-core/secp256k1#1009: refactor: Use (int)&(int) in boolean context to avoid compiler warning
16d132215c refactor: Use (int)&(int) in boolean context to avoid compiler warning
c74a7b7e51 Merge bitcoin-core/secp256k1#1007: doc: Replace apoelstra's GPG key by jonasnick's GPG key
3b157c48ed doc: Suggest keys.openpgp.org as keyserver in SECURITY.md
73a7472cd0 doc: Replace apoelstra's GPG key by jonasnick's GPG key
515a5dbd02 Merge bitcoin-core/secp256k1#991: Merge all "external" benchmarks into a single bench binary
af6abcb3d0 Make bench support selecting which benchmarks to run
9f56bdf5b9 Merge bench_schnorrsig into bench
3208557ae1 Merge bench_recover into bench
855e18d8a8 Merge bench_ecdh into bench
2a7be678a6 Combine bench_sign and bench_verify into single bench
8fa41201bd Merge bitcoin-core/secp256k1#1002: Make aux_rnd32==NULL behave identical to 0x0000..00.
5324f8942d Make aux_rnd32==NULL behave identical to 0x0000..00.
21c188b3c5 Merge bitcoin-core/secp256k1#943: VERIFY_CHECK precondition for secp256k1_fe_set_int.
3e7b2ea194 Merge bitcoin-core/secp256k1#999: bench_ecmult: improve clarity of output
23e2f66726 bench: don't return 1 in have_flag() if argc = 1
96b1ad2ea9 bench_ecmult: improve clarity of output
20d791edfb Merge bitcoin-core/secp256k1#989: Shared benchmark format for command line and CSV outputs
aa1b889b61 Merge bitcoin-core/secp256k1#996: Fix G.y parity in sage code
044d956305 Fix G.y parity in sage code
b4b130678d create csv file from the benchmark output
26a255beb6 Shared benchmark format for command line and CSV outputs
9526874d14 Merge bitcoin-core/secp256k1#810: Avoid overly-wide multiplications in 5x52 field mul/sqr
920a0e5fa6 Merge bitcoin-core/secp256k1#952: Avoid computing out-of-bounds pointer.
f34b5cae03 Merge bitcoin-core/secp256k1#983: [RFC] Remove OpenSSL testing support
297ce82091 Merge bitcoin-core/secp256k1#966: Make aux_rand32 arg to secp256k1_schnorrsig_sign const
2888640132 VERIFY_CHECK precondition for secp256k1_fe_set_int.
d49011f54c Make _set_fe_int( . , 0 ) set magnitude to 0
bc08599e77 Remove OpenSSL testing support
10f9bd84f4 Merge bitcoin-core/secp256k1#987: Fix unused parameter warnings when building without VERIFY
189f6bcfef Fix unused parameter warnings when building without VERIFY
da0092bccc Merge bitcoin-core/secp256k1#986: tests: remove `secp256k1_fe_verify` from tests.c and modify `_fe_from_storage` to call `_fe_verify`
d43993724d tests: remove `secp256k1_fe_verify` from tests.c and modify `secp256k1_fe_from_storage` to call `secp256k1_fe_verify`
2a3a97c665 Merge bitcoin-core/secp256k1#976: `secp256k1_schnorrsig_sign_internal` should be static
aa5d34a8fe Merge bitcoin-core/secp256k1#783: Make the public API docs more consistent and explicit
72713872a8 Add missing static to secp256k1_schnorrsig_sign_internal
db4667d5e0 Make aux_rand32 arg to secp256k1_schnorrsig_sign const
9a5a87e0f1 Merge bitcoin-core/secp256k1#956: Replace ecmult_context with a generated static array.
20abd52c2e Add tests for pre_g tables.
6815761cf5 Remove ecmult_context.
f20dcbbad1 Correct typo.
16a3cc07e8 Generate ecmult_static_pre_g.h
8de2d86a06 Bump memory limits in advance of making the ecmult context static.
d7ec49a689 Merge bitcoin-core/secp256k1#969: ci: Fixes after Debian release
5d5c74a057 tests: Rewrite code to circument potential bug in clang
3d2f492ceb ci: Install libasan6 (instead of 5) after Debian upgrade
be8d9c262f Merge bitcoin-core/secp256k1#965: gen_context: Don't use any ASM
aeece44599 gen_context: Don't use any ASM
7688a4f13a Merge bitcoin-core/secp256k1#963: "Schnorrsig API overhaul" fixups
90e83449b2 ci: Add C++ test
adec5a1638 Add missing null check for ctx and input keys in the public API
f4edfc7581 Improve consistency for NULL arguments in the public interface
f698caaff6 Use unsigned char consistently for byte arrays
b5b8e7b719 Don't declare constants twice
769528f307 Don't use string literals for char arrays without NUL termination
2cc3cfa583 Fix -Wmissing-braces warning in clang
0440945fb5 Merge #844: schnorrsig API overhaul
ec3aaa5014 Merge #960: tests_exhaustive: check the result of secp256k1_ecdsa_sign
a1ee83c654 tests_exhaustive: check the result of secp256k1_ecdsa_sign
253f90cdeb Merge bitcoin-core/secp256k1#951: configure: replace AC_PATH_PROG to AC_CHECK_PROG
446d28d9de Merge bitcoin-core/secp256k1#944: Various improvements related to CFLAGS
0302138f75 ci: Make compiler warning into errors on CI
b924e1e605 build: Ensure that configure's compile checks default to -O2
7939cd571c build: List *CPPFLAGS before *CFLAGS like on the compiler command line
595e8a35d8 build: Enable -Wcast-align=strict warning
07256267ff build: Use own variable SECP_CFLAGS instead of touching user CFLAGS
4866178dfc Merge bitcoin-core/secp256k1#955: Add random field multiply/square tests
75ce488c2a Merge bitcoin-core/secp256k1#959: tests: really test the non-var scalar inverse
41ed13942b tests: really test the non-var scalar inverse
5f6ceafcfa schnorrsig: allow setting MSGLEN != 32 in benchmark
fdd06b7967 schnorrsig: add tests for sign_custom and varlen msg verification
d8d806aaf3 schnorrsig: add extra parameter struct for sign_custom
a0c3fc177f schnorrsig: allow signing and verification of variable length msgs
5a8e4991ad Add secp256k1_tagged_sha256 as defined in BIP-340
b6c0b72fb0 schnorrsig: remove noncefp args from sign; add sign_custom function
bdf19f105c Add random field multiply/square tests
9be7b0f083 Avoid computing out-of-bounds pointer.
8ae56e33e7 Merge #879: Avoid passing out-of-bound pointers to 0-size memcpy
a4642fa15e configure: replace AC_PATH_PROG to AC_CHECK_PROG
1758a92ffd Merge #950: ci: Add ppc64le build
c58c4ea470 ci: Add ppc64le build
7973576f6e Merge #662: Add ecmult_gen, ecmult_const and ecmult to benchmark
8f879c2887 Fix array size in bench_ecmult
2fe1b50df1 Add ecmult_gen, ecmult_const and ecmult to benchmark
593e6bad9c Clean up ecmult_bench to make space for more benchmarks
50f3367712 Merge #947: ci: Run PRs on merge result even for i686
a35fdd3478 ci: Run PRs on merge result even for i686
442cee5baf schnorrsig: add algolen argument to nonce_function_hardened
df3bfa12c3 schnorrsig: clarify result of calling nonce_function_bip340 without data
99e8614812 README: mention schnorrsig module
3dc8c072b6 Merge #846: ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
02dcea1ad9 ci: Make test iterations configurable and tweak for sanitizer builds
489ff5c20a tests: Treat empty SECP2561_TEST_ITERS as if it was unset
fcfcb97e74 ci: Simplify to use generic wrapper for QEMU, Valgrind, etc
de4157f13a ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
399722a63a Merge #941: Clean up git tree
09b3bb8648 Clean up git tree
bf0ac46066 Merge #930: Add ARM32/ARM64 CI
202a030f7d Merge #850: add `secp256k1_ec_pubkey_cmp` method
1e78c18d5b Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards
69394879b6 Merge #926: secp256k1.h: clarify that by default arguments must be != NULL
6eceec6d56 add `secp256k1_xonly_pubkey_cmp` method
0d9561ae87 add `secp256k1_ec_pubkey_cmp` method
22a9ea154a contrib: Explain explicit header guards
6c52ae8724 Merge #937: Have ge_set_gej_var, gej_double_var and ge_set_all_gej_var initialize all fields of their outputs.
185a6af227 Merge #925: changed include statements without prefix 'include/'
14c9739a1f tests: Improve secp256k1_ge_set_all_gej_var for some infinity inputs
4a19668c37 tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs
3c90bdda95 change local lib headers to be relative for those pointing at "include/" dir
45b6468d7e Have secp256k1_ge_set_all_gej_var initialize all fields. Previous behaviour would not initialize r->y values in the case where infinity is passed in. Furthermore, the previous behaviour wouldn't initialize anything in the case where all inputs were infinity.
31c0f6de41 Have secp256k1_gej_double_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
dd6c3de322 Have secp256k1_ge_set_gej_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
d0bd2693e3 Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM
8bbad7a18e Add asm build to ARM32 CI
7d65ed5214 Add ARM32/ARM64 CI
c8483520c9 Makefile.am: Don't pass a variable twice
2161f31785 Makefile.am: Honor config when building gen_context
99f47c20ec gen_context: Don't use external ASM because it complicates the build
98e0358d29 Merge #933: Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers
99e2d5be0d Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers.
34388af6b6 Merge #922: Add mingw32-w64/wine CI build
7012a188e6 Merge #928: Define SECP256K1_BUILD in secp256k1.c directly.
ed5a199bed tests: fopen /dev/urandom in binary mode
ae9e648526 Define SECP256K1_BUILD in secp256k1.c directly.
4dc37bf81b Add mingw32-w64/wine CI build
0881633dfd secp256k1.h: clarify that by default arguments must be != NULL
efad3506a8 Merge #906: Use modified divsteps with initial delta=1/2 for constant-time
cc2c09e3a7 Merge #918: Clean up configuration in gen_context
07067967ee add ECMULT_GEN_PREC_BITS to basic_config.h
a3aa2628c7 gen_context: Don't include basic-config.h
be0609fd54 Add unit tests for edge cases with delta=1/2 variant of divsteps
cd393ce228 Optimization: only do 59 hddivsteps per iteration instead of 62
277b224b6a Use modified divsteps with initial delta=1/2 for constant-time
376ca366db Fix typo in explanation
1e5d50fa93 Merge #889: fix uninitialized read in tests
c083cc6e52 Merge #903: Make argument of fe_normalizes_to_zero{_var} const
6e898534ff Merge #907: changed import to use brackets <> for openssl
4504472269 changed import to use brackets <> for openssl as they are not local to the project
26de4dfeb1 Merge #831: Safegcd inverses, drop Jacobi symbols, remove libgmp
23c3fb629b Make argument of fe_normalizes_to_zero{_var} const
24ad04fc06 Make scalar_inverse{,_var} benchmark scale with SECP256K1_BENCH_ITERS
ebc1af700f Optimization: track f,g limb count and pass to new variable-time update_fg_var
b306935ac1 Optimization: use formulas instead of lookup tables for cancelling g bits
9164a1b658 Optimization: special-case zero modulus limbs in modinv64
1f233b3fa0 Remove num/gmp support
20448b8d09 Remove unused Jacobi symbol support
5437e7bdfb Remove unused scalar_sqr
aa9cc52180 Improve field/scalar inverse tests
1e0e885c8a Make field/scalar code use the new modinv modules for inverses
436281afdc Move secp256k1_fe_inverse{_var} to per-impl files
aa404d53be Move secp256k1_scalar_{inverse{_var},is_even} to per-impl files
08d54964e5 Improve bounds checks in modinv modules
151aac00d3 Add tests for modinv modules
d8a92fcc4c Add extensive comments on the safegcd algorithm and implementation
8e415acba2 Add safegcd based modular inverse modules
de0a643c3d Add secp256k1_ctz{32,64}_var functions
4c3ba88c3a Merge #901: ci: Switch all Linux builds to Debian and more improvements
9361f360bb ci: Select number of parallel make jobs depending on CI environment
28eccdf806 ci: Split output of logs into multiple sections
c7f754fe4d ci: Run PRs on merge result instead of on the source branch
b994a8be3c ci: Print information about binaries using "file"
f24e122d13 ci: Switch all Linux builds to Debian
ebdba03cb5 Merge #891: build: Add workaround for automake 1.13 and older
3a8b47bc6d Merge #894: ctime_test: move context randomization test to the end
7d3497cdc4 ctime_test: move context randomization test to the end
99a1cfec17 print warnings for conditional-uninitialized
3d2cf6c5bd initialize variable in tests
f329bba244 build: Add workaround for automake 1.13 and older
24d1656c32 Merge #882: Use bit ops instead of int mult for constant-time logic in gej_add_ge
e491d06b98 Use bit ops instead of int mult for constant-time logic in gej_add_ge
f8c0b57e6b Merge #864: Add support for Cirrus CI
cc2a5451dc ci: Refactor Nix shell files
2480e55c8f ci: Remove support for Travis CI
2b359f1c1d ci: Enable simple cache for brewing valgrind on macOS
8c02e465c5 ci: Add support for Cirrus CI
659d0d4798 Merge #880: Add parens around ROUND_TO_ALIGN's parameter.
b6f649889a Add parens around ROUND_TO_ALIGN's parameter. This makes the macro robust against a hypothetical ROUND_TO_ALIGN(foo ? sizeA : size B) invocation.
a4abaab793 Merge #877: Add missing secp256k1_ge_set_gej_var decl.
5671e5f3fd Merge #874: Remove underscores from header defs.
db726782fa Merge #878: Remove unused secp256k1_fe_inv_all_var
b732701faa Merge #875: Avoid casting (void**) values.
9570f674cc Avoid passing out-of-bound pointers to 0-size memcpy
75d2ae149e Remove unused secp256k1_fe_inv_all_var
482e4a9cfc Add missing secp256k1_ge_set_gej_var decl.
2730618604 Avoid casting (void**) values. Replaced with an expression that only casts (void*) values.
fb390c5299 Remove underscores from header defs. This makes them consistent with other files and avoids reserved identifiers.
f2d9aeae6d Merge #862: Autoconf improvements
328aaef22a Merge #845: Extract the secret key from a keypair
3c15130709 Improve CC_FOR_BUILD detection
47802a4762 Restructure and tidy configure.ac
252c19dfc6 Ask brew for valgrind include path
8c727b9087 Merge #860: fixed trivial typo
b7bc3a4aaa fixed typo
33cb3c2b1f Add secret key extraction from keypair to constant time tests
36d9dc1e8e Add seckey extraction from keypair to the extrakeys tests
fc96aa73f5 Add a function to extract the secretkey from a keypair
98dac87839 Merge #858: Fix insecure links
07aa4c70ff Fix insecure links
b61f9da54e Merge #857: docs: fix simple typo, dependecy -> dependency
18aadf9d28 docs: fix simple typo, dependecy -> dependency
2d9e7175c6 Merge #852: Add sage script for generating scalar_split_lambda constants
dc6e5c3a5c Merge #854: Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation
6e85d675aa Rename tweak to tweak32 in public API
f587f04e35 Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation
329a2e0a3f sage: Add script for generating scalar_split_lambda constants
8f0c6f1545 Merge #851: make test count iteration configurable by environment variable
f4fa8d226a forbid a test iteration of 0 or less
f554dfc708 sage: Reorganize files
3a106966aa Merge #849: Convert Sage code to Python 3 (as used by Sage >= 9)
13c88efed0 Convert Sage code to Python 3 (as used by Sage >= 9)
0ce4554881 make test count iteration configurable by environment variable
9e5939d284 Merge #835: Don't use reserved identifiers memczero and benchmark_verify_t
d0a83f7328 Merge #839: Prevent arithmetic on NULL pointer if the scratch space is too small
903b16aa6c Merge #840: Return NULL early in context_preallocated_create if flags invalid
1f4dd03838 Typedef (u)int128_t only when they're not provided by the compiler
3967d96bf1 Merge #838: Make autotools check for all the used openssl functions
3734b68200 Configure echo if openssl tests are enabled
ebfa2058e9 Return NULL early in context_preallocated_create if flags invalid
6f54e69f03 Merge #841: Avoids a potentially shortening size_t to int cast in strauss_wnaf_
29a299e373 Run the undefined behaviour sanitizer on Travis
7506e064d7 Prevent arithmetic on NULL pointer if the scratch space is too small
8893f42438 Avoids a potentially shortening size_t to int cast in strauss_wnaf_
e6692778d3 Modify bitcoin_secp.m4's openssl check to call all the functions that we use in the tests/benchmarks. That way linking will fail if those symbols are missing
ac05f61fcf Merge #809: Stop treating ECDH as experimental
e6e3d5da2f travis: add schnorrsig to valgrind and big endian platform test
353dff156f Stop treating ECDH as experimental
e89278f211 Don't use reserved identifiers memczero and benchmark_verify_t
c6b6b8f1bb Merge #830: Rip out non-endomorphism code + dependencies
c582abade1 Consistency improvements to the comments
63c6b71616 Reorder comments/function around scalar_split_lambda
2edc514c90 WNAF of lambda_split output has max size 129
4232e5b7da Rip out non-endomorphism code
ebad8414b0 Check correctness of lambda split without -DVERIFY
fe7fc1fda8 Make lambda constant accessible
9d2f2b44d8 Add tests to exercise lambda split near bounds
9aca2f7f07 Add secp256k1_split_lambda_verify
acab934d24 Detailed comments for secp256k1_scalar_split_lambda
76ed922a5f Increase precision of g1 and g2
6173839c90 Switch to our own memcmp function
63150ab4da Merge #827: Rename testrand functions to have test in name
c5257aed0b Merge #821: travis: Explicitly set --with-valgrind
bb1f54280f Merge #818: Add static assertion that uint32_t is unsigned int or wider
a45c1fa63c Rename testrand functions to have test in name
5006895bd6 Merge #808: Exhaustive test improvements + exhaustive schnorrsig tests
4eecb4d6ef travis: VALGRIND->RUN_VALGRIND to avoid confusion with WITH_VALGRIND
66a765c775 travis: Explicitly set --with-valgrind
d7838ba6a6 Merge #813: Enable configuring Valgrind support
7ceb0b7611 Merge #819: Enable -Wundef warning
8b7dcdd955 Add exhaustive test for extrakeys and schnorrsig
08d7d89299 Make pubkey parsing test whether points are in the correct subgroup
87af00b511 Abstract out challenge computation in schnorrsig
63e1b2aa7d Disable output buffering in tests_exhaustive.c
39f67dd072 Support splitting exhaustive tests across cores
e99b26fcd5 Give exhaustive_tests count and seed cmdline inputs
49e6630bca refactor: move RNG seeding to testrand
b110c106fa Change exhaustive test groups so they have a point with X=1
cec7b18a34 Select exhaustive lambda in function of order
78f6cdfaae Make the curve B constant a secp256k1_fe
d7f39ae4b6 Delete gej_is_valid_var: unused outside tests
8bcd78cd79 Make secp256k1_scalar_b32 detect overflow in scalar_low
c498366e5b Move exhaustive tests for recovery to module
be31791543 Make group order purely compile-time in exhaustive tests
e73ff30922 Enable -Wundef warning
c0041b5cfc Add static assertion that uint32_t is unsigned int or wider
4ad408faf3 Merge #782: Check if variable=yes instead of if var is set in travis.sh
412bf874d0 configure: Allow specifying --with[out]-valgrind explicitly
34debf7a6d Modify .travis.yml to explictly pass no in env vars instead of setting to nothing
a0e99fc121 Merge #814: tests: Initialize random group elements fully
5738e8622d tests: Initialize random group elements fully
c9939ba55d Merge #812: travis: run bench_schnorrsig
a51f2af62b travis: run bench_schnorrsig
8ab24e8dad Merge #558: Add schnorrsig module which implements BIP-340 compliant signatures
f3733c5433 Merge #797: Fix Jacobi benchmarks and other benchmark improvements
b53e0cd61f Avoid overly-wide multiplications
cb5524adc5 Add benchmark for secp256k1_ge_set_gej_var
5c6af60ec5 Make jacobi benchmarks vary inputs
d0fdd5f009 Randomize the Z coordinates in bench_internal
c7a3424c5f Rename bench_internal variables
875d68b95f Merge #699: Initialize field elements when resulting in infinity
54caf2e74f Merge #799: Add fallback LE/BE for architectures with known endianness + SHA256 selftest
f431b3f28a valgrind_ctime_test: Add schnorrsig_sign
16ffa9d97c schnorrsig: Add taproot test case
8dfd53ee3f schnorrsig: Add benchmark for sign and verify
4e43520026 schnorrsig: Add BIP-340 compatible signing and verification
7332d2db6b schnorrsig: Add BIP-340 nonce function
7a703fd97d schnorrsig: Init empty experimental module
eabd9bc46a Allow initializing tagged sha256
6fcb5b845d extrakeys: Add keypair_xonly_tweak_add
58254463f9 extrakeys: Add keypair struct with create, pub and pub_xonly
f0010349b8 Separate helper functions for pubkey_create and seckey_tweak_add
910d9c284c extrakeys: Add xonly_pubkey_tweak_add & xonly_pubkey_tweak_add_test
176bfb1110 Separate helper function for ec_pubkey_tweak_add
4cd2ee474d extrakeys: Add xonly_pubkey with serialize, parse and from_pubkey
f49c9896b0 Merge #806: Trivial: Add test logs to gitignore
aabf00c155 Merge #648: Prevent ints from wrapping around in scratch space functions
f5adab16a9 Merge #805: Remove the extremely outdated TODO file.
bceefd6547 Add test logs to gitignore
1c325199d5 Remove the extremely outdated TODO file.
47e6618e11 extrakeys: Init empty experimental module
3e08b02e2a Make the secp256k1_declassify argument constant
8bc6aeffa9 Add SHA256 selftest
670cdd3f8b Merge #798: Check assumptions on integer implementation at compile time
5e5fb28b4a Use additional system macros to figure out endianness
7c068998ba Compile-time check assumptions on integer types
02b6c87b52 Add support for (signed) __int128
979961c506 Merge #787: Use preprocessor macros instead of autoconf to detect endianness
887bd1f8b6 Merge #793: Make scalar/field choice depend on C-detected __int128 availability
0dccf98a21 Use preprocessor macros instead of autoconf to detect endianness
b2c8c42cf1 Merge #795: Avoid linking libcrypto in the valgrind ct test.
57d3a3c64c Avoid linking libcrypto in the valgrind ct test.
79f1f7a4f1 Autodetect __int128 availability on the C side
0d7727f95e Add SECP256K1_FE_STORAGE_CONST_GET to 5x52 field
805082de11 Merge #696: Run a Travis test on s390x (big endian)
39295362cf Test travis s390x (big endian)
ef37761fee Change travis.sh to check if variables are equal to yes instead of not-empty. Before this, setting `VALGRIND=wat` was considered as true, and to make it evaluate as false you had to unset the variable `VALGRIND=` but not it checks if `VALGRIND=yes` and if it's not `yes` then it's evaluated to false
6034a04fb1 Merge #778: secp256k1_gej_double_nonzero supports infinity
f60915906d Merge #779: travis: Fix argument quoting for ./configure
9e49a9b255 travis: Fix argument quoting for ./configure
18d36327fd secp256k1_gej_double_nonzero supports infinity
214cb3c321 Merge #772: Improve constant-timeness on PowerPC
40412b1930 Merge #774: tests: Abort if malloc() fails during context cloning tests
2e1b9e0458 tests: Abort if malloc() fails during context cloning tests
67a429f31f Suppress a harmless variable-time optimization by clang in _int_cmov
5b196338f0 Remove redundant "? 1 : 0" after comparisons in scalar code
3e5cfc5c73 Merge #741: Remove unnecessary sign variable from wnaf_const
66bb9320c0 Merge #773: Fix some compile problems on weird/old compilers.
1309c03c45 Fix some compile problems on weird/old compilers.
2309c7dd4a Merge #769: Undef HAVE___INT128 in basic-config.h to fix gen_context compilation
22e578bb11 Undef HAVE___INT128 in basic-config.h to fix gen_context compilation
3f4a5a10e4 Merge #765: remove dead store in ecdsa_signature_parse_der_lax
f00d6575ca remove dead store in ecdsa_signature_parse_der_lax
dbd41db16a Merge #759: Fix uninitialized variables in ecmult_multi test
2e7fc5b537 Fix uninitialized variables in ecmult_multi test
2ed54da18a Merge #755: Recovery signing: add to constant time test, and eliminate non ct operators
28609507e7 Add tests for the cmov implementations
73596a85a2 Add ecdsa_sign_recoverable to the ctime tests
2876af4f8d Split ecdsa_sign logic into a new function and use it from ecdsa_sign and recovery
5e1c885efb Merge #754: Fix uninit values passed into cmov
f79a7adcf5 Add valgrind uninit check to cmovs output
05d315affe Merge #752: autoconf: Use ":" instead of "dnl" as a noop
a39c2b09de Fixed UB(arithmetics on uninit values) in cmovs
3a6fd7f636 Merge #750: Add macOS to the CI
5e8747ae2a autoconf: Use ":" instead of "dnl" as a noop
71757da5cc Explictly pass SECP256K1_BENCH_ITERS to the benchmarks in travis.sh
99bd661d71 Replace travis_wait with a loop printing "\a" to stdout every minute
bc818b160c Bump travis Ubuntu from xenial(16.04) to bionic(18.04)
0c5ff9066e Add macOS support to travis
b6807d91d8 Move travis script into a standalone sh file
f39f99be0e Merge #701: Make ec_ arithmetic more consistent and add documentation
37dba329c6 Remove unnecessary sign variable from wnaf_const
6bb0b77e15 Fix test_constant_wnaf for -1 and add a test for it.
39198a03ea Merge #732: Retry if r is zero during signing
59a8de8f64 Merge #742: Fix typo in ecmult_const_impl.h
4e284655d9 Fix typo in ecmult_const_impl.h
f862b4ca13 Merge #740: Make recovery/main_impl.h non-executable
ffef45c98a Make recovery/main_impl.h non-executable
2361b3719a Merge #735: build: fix OpenSSL EC detection on macOS
3b7d26b23c build: add SECP_TEST_INCLUDES to bench_verify CPPFLAGS
84b5fc5bc3 build: fix OpenSSL EC detection on macOS
37ed51a7ea Make ecdsa_sig_sign constant-time again after reverting 25e3cfb
93d343bfc5 Revert "ecdsa_impl: replace scalar if-checks with VERIFY_CHECKs in ecdsa_sig_sign"
7e3952ae82 Clarify documentation of tweak functions.
89853a0f2e Make tweak function documentation more consistent.
41fc785602 Make ec_privkey functions aliases for ec_seckey_negate, ec_seckey_tweak_add and ec_seckey_mul
22911ee6da Rename private key to secret key in public API (with the exception of function names)
5a73f14d6c Mention that value is unspecified for In/Out parameters if the function returns 0
f03df0e6d7 Define valid ECDSA keys in the documentation of seckey_verify
5894e1f1df Return 0 if the given seckey is invalid in privkey_negate, privkey_tweak_add and privkey_tweak_mul
8f814cddb9 Add test for boundary conditions of scalar_set_b32 with respect to overflows
3fec982608 Use scalar_set_b32_seckey in ecdsa_sign, pubkey_create and seckey_verify
9ab2cbe0eb Add scalar_set_b32_seckey which does the same as scalar_set_b32 and also returns whether it's a valid secret key
4f27e344c6 Merge #728: Suppress a harmless variable-time optimization by clang in memczero
01993878bb Add test for memczero()
52a03512c1 Suppress a harmless variable-time optimization by clang in memczero
8f78e208ad Merge #722: Context isn't freed in the ECDH benchmark
ed1b91171a Merge #700: Allow overriding default flags
85b35afa76 Add running benchmarks regularly and under valgrind in travis
ca4906b02e Pass num of iters to benchmarks as variable, and define envvar
02dd5f1bbb free the ctx at the end of bench_ecdh
e9fccd4de1 Merge #708: Constant-time behaviour test using valgrind memtest.
08fb6c4926 Run valgrind_ctime_test in travis
3d2302257f Constant-time behaviour test using valgrind memtest.
96d8ccbd16 Merge #710: Eliminate harmless non-constant time operations on secret data.
0585b8b2ee Merge #718: Clarify that a secp256k1_ecdh_hash_function must return 0 or 1
7b50483ad7 Adds a declassify operation to aid constant-time analysis.
34a67c773b Eliminate harmless non-constant time operations on secret data.
ca739cba23 Compile with optimization flag -O2 by default instead of -O3
eb45ef3384 Clarify that a secp256k1_ecdh_hash_function must return 0 or 1
856a01d6ad Merge #714: doc: document the length requirements of output parameter.
d72b9e2483 Merge #682: Remove Java Native Interface
4b48a43106 doc: document the length requirements of output parameter.
1b4d256e2e Merge #713: Docstrings
dabfea7e21 field: extend docstring of secp256k1_fe_normalize
dc7d8fd9e2 scalar: extend docstring of secp256k1_scalar_set_b32
074ab582dd Merge #704: README: add a section for test coverage
acb7f97eb8 README: add a section for test coverage
227a4f2d07 Merge #709: Remove secret-dependant non-constant time operation in ecmult_const.
d567b779fe Clarify comments about use of rzr on ge functions and abs function.
2241ae6d14 Remove secret-dependant non-constant time operation in ecmult_const.
642cd062bd Remove Java Native Interface
83fb1bcef4 Remove -O2 from default CFLAGS because this would override the -O3 flag (see AC_PROG_CC in the Autoconf manual)
ecba8138ec Append instead of Prepend user-CFLAGS to default CFLAGS allowing the user to override default variables
613c34cd86 Remove test in configure.ac because it doesn't have an effect
f45d897101 Merge #703: Overhaul README.md
2e759ec753 Overhaul README.md
d644dda5c9 Merge #689: Remove "except in benchmarks" exception for fp math
bde2a32286 Convert bench.h to fixed-point math
47a7b8382f Clear field elements when writing infinity
61d1ecb028 Added test with additions resulting in infinity
387d723c3f Merge #679: Add SECURITY.md
0db61d25c9 Merge #685: Fix issue where travis does not show the ./tests seed…
a0771d15e6 Explicitly disable buffering for stderr in tests
fb424fbba2 Make travis show the ./tests seed by removing stdout buffering and always cat tests.log after a travis run.
22a6031184 Merge #690: Add valgrind check to travis
544002c008 Merge #678: Preventing compiler optimizations in benchmarks without a memory fence
dd98cc988f travis: Added a valgrind test without endro and enabled recovery+ecdh
b4c1382a87 Add valgrind check to travis
0c774d89e6 Merge #688: Fix ASM setting in travis
5c5f71eea5 Fix ASM setting in travis
e2625f8a98 Merge #684: Make no-float policy explicit
bae1bea3c4 Make no-float policy explicit
78c3836341 Add SECURITY.md
362bb25608 Modified bench_scalar_split so it won't get optimized out
73a30c6b58 Added accumulators and checks on benchmarks so they won't get optimized out
770b3dcd6f Merge #677: Remove note about heap allocation in secp256k1_ecmult_odd_multiples_table_storage_var
b76142ff25 Remove note about heap allocation in secp256k1_ecmult_odd_multiples_table_storage_var which was removed in 47045270fa90f81205d989f7107769bce1e71c4d
137d304a6b Merge #647: Increase robustness against UB in secp256k1_scalar_cadd_bit
0d9540b13f Merge #664: Remove mention of ec_privkey_export because it doesn't exist
59782c68b4 Remove mention of ec_privkey_export because it doesn't exist
96cd94e385 Merge #337: variable sized precomputed table for signing
dcb2e3b3ff variable signing precompute table
b4bff99028 Merge #661: Make ./configure string consistent
a467047e11 Make ./configure string consistent
e729cc7f5a Merge #657: Fix a nit in the recovery tests
b64a2e2597 Fix a nit in the recovery tests
e028aa33d3 Merge #650: secp256k1/src/tests.c:  Properly handle sscanf return value
f1e11d363d Merge #654: Fix typo (∞)
ef83281c3a Merge pull request #656 from real-or-random/patch-1
556caad2ca Fix typo in docs for _context_set_illegal_callback
0d82732a9a Improve VERIFY_CHECK of overflow in secp256k1_scalar_cadd_bit. This added check ensures that any curve order overflow doesn't go undetected due a uint32_t overflow.
786dfb49f5 Merge #583: JNI: fix use sig array
e95f8ab098 Merge #644: Avoid optimizing out a verify_check
384f55606a Merge #652: README.md: update instruction to run tests
ee56accd47 Merge #651: Fix typo in secp256k1_preallocated.h
7b9b117230 Merge #640: scalar_impl.h: fix includes
d99bec2e21 Merge #655: jni: Use only Guava for hex encoding and decoding
2abcf951af jni: Use only Guava for hex encoding and decoding
271582b3b7 Fix typo
60f7f2de5d Don't assume that ALIGNMENT > 1 in tests
ada6361dec Use ROUND_TO_ALIGN in scratch_create
8ecc6ce50e Add check preventing rounding to alignment from wrapping around in scratch_alloc
4edaf06fb0 Add check preventing integer multiplication wrapping around in scratch_max_allocation
ce6d438266 README.md: update instruction to run tests
b1e68cb8e6 Fix typo in secp256k1_preallocated.h
a11c76c59a secp256k1/src/tests.c:  Properly handle sscanf return value
8fe63e5654 Increase robustness against UB. Thanks to elichai2 who noted that the literal '1' is a signed integer, and that shifting a signed 32-bit integer by 31 bits causes an overflow and yields undefined behaviour. While 'scalar_low_impl''s 'secp256k1_scalar_cadd_bit' is only used for testing purposes and currently the 'bit' parameter is only 0 or 1, it is better to avoid undefined behaviour in case the used domain of 'secp256k1_scalar_cadd_bit' expands.
94ae7cbf83 Moved a dereference so the null check will be before the dereferencing
2cb73b1064 scalar_impl.h: fix includes
fa33017135 Merge #634: Add a descriptive comment for secp256k1_ecmult_const.
ee9e68cd30 Add a descriptive comment for secp256k1_ecmult_const.
d0d738d32d Merge #631: typo in comment for secp256k1_ec_pubkey_tweak_mul ()
6914c25276 typo in comment for secp256k1_ec_pubkey_tweak_mul ()
e541a90ef6 Merge #629: Avoid calling _is_zero when _set_b32 fails.
f34b0c3f35 Merge #630: Note intention of timing sidechannel freeness.
8d1563b0ff Note intention of timing sidechannel freeness.
1669bb2865 Merge #628: Fix ability to compile tests without -DVERIFY.
ecc94abcc8 Merge #627: Guard memcmp in tests against mixed size inputs.
544435fc90 Merge #578: Avoid implementation-defined and undefined behavior when dealing with sizes
143dc6e9ee Merge #595: Allow to use external default callbacks
e49f7991c2 Add missing #(un)defines to base-config.h
77defd2c3b Add secp256k1_ prefix to default callback functions
908bdce64e Include stdio.h and stdlib.h explicitly in secp256k1.c
5db782e655 Allow usage of external default callbacks
6095a863fa Replace CHECKs for no_precomp ctx by ARG_CHECKs without a return
cd473e02c3 Avoid calling secp256k1_*_is_zero when secp256k1_*_set_b32 fails.
6c36de7a33 Merge #600: scratch space: use single allocation
98836b11f0 scratch: replace frames with "checkpoint" system
7623cf2b97 scratch: save a couple bytes of unnecessarily-allocated memory
a7a164f2c6 scratch: rename `max_size` to `size`, document that extra will actually be allocated
5a4bc0bb95 scratch: unify allocations
c2b028a281 scratch space: thread `error_callback` into all scratch space functions
0be1a4ae62 scratch: add magic bytes to beginning of structure
92a48a764d scratch space: use single allocation
40839e21b9 Merge #592: Use trivial algorithm in ecmult_multi if scratch space is small
dcf392027b Fix ability to compile tests without -DVERIFY.
a484e0008b Merge #566: Enable context creation in preallocated memory
0522caac8f Explain caller's obligations for preallocated memory
238305fdbb Move _preallocated functions to separate header
695feb6fbd Export _preallocated functions
814cc78d71 Add tests for contexts in preallocated memory
ba12dd08da Check arguments of _preallocated functions
5feadde462 Support cloning a context into preallocated memory
c4fd5dab45 Switch to a single malloc call
ef020de16f Add size constants for preallocated memory
1bf7c056ba Prepare for manual memory management in preallocated memory
248bffb052 Guard memcmp in tests against mixed size inputs.
36698dcfee Merge #596: Make WINDOW_G configurable
a61a93ff50 Clean up ./configure help strings
2842dc523e Make WINDOW_G configurable
1a02d6ce51 Merge #626: Revert "Merge #620: Install headers automatically"
662918cb29 Revert "Merge #620: Install headers automatically"
14c7dbd444 Simplify control flow in DER parsing
ec8f20babd Avoid out-of-bound pointers and integer overflows in size comparisons
01ee1b3b3c Parse DER-enconded length into a size_t instead of an int
912680ed86 Merge #561: Respect LDFLAGS and #undef STATIC_PRECOMPUTATION if using basic config
91fae3ace0 Merge #620: Install headers automatically
5df77a0eda Merge #533: Make sure we're not using an uninitialized variable in secp256k1_wnaf_const(...)
975e51e0d9 Merge #617: Pass scalar by reference in secp256k1_wnaf_const()
735fbde04e Merge #619: Clear a copied secret key after negation
16e86150d0 Install headers automatically
069870d92a Clear a copied secret key after negation
8979ec0d9a Pass scalar by reference in secp256k1_wnaf_const()
84a808598b Merge #612: Allow field_10x26_arm.s to compile for ARMv7 architecture
d4d270a59c Allow field_10x26_arm.s to compile for ARMv7 architecture
b19c000063 Merge #607: Use size_t shifts when computing a size_t
4d01bc2d9c Merge #606: travis: Remove unused sudo:false
e6d01e9347 Use size_t shifts when computing a size_t
7667532bd7 travis: Remove unused sudo:false
248f046611 Make sure we're not using an uninitialized variable in secp256k1_wnaf_const(...)
9ab96f7b12 Use trivial algorithm in ecmult_multi if scratch space is small
ee99f12f3d Merge #599: Switch x86_64 asm to use "i" instead of "n" for immediate values.
d58bc93f2c Switch x86_64 asm to use "i" instead of "n" for immediate values.
05362ee042 Merge #597: Add $(COMMON_LIB) to exhaustive tests to fix ARM asm build
83483869ac Add $(COMMON_LIB) to exhaustive tests to fix ARM asm build
aa15154a48 Merge #568: Fix integer overflow in ecmult_multi_var when n is large
2277af5ff0 Fix integer overflow in ecmult_multi_var when n is large
dbed75d969 Undefine `STATIC_PRECOMPUTATION` if using the basic config
310111e093 Keep LDFLAGS if `--coverage`
85d0e1bcce Merge #591: Make bench_internal obey secp256k1_fe_sqrt's contract wrt aliasing.
14196379ec Merge #580: Add trivial ecmult_multi algorithm which does not require a scratch space
a697d82da9 Add trivial ecmult_multi to the benchmark tool
bade617417 Add trivial ecmult_multi algorithm. It is selected when no scratch space is given and just multiplies and adds the points.
5545e13dea Merge #584: configure: Use CFLAGS_FOR_BUILD when checking native compiler
20c5869df2 Merge #516: improvements to random seed in src/tests.c
b76e45d5d6 Make bench_internal obey secp256k1_fe_sqrt's contract wrt aliasing.
870a977644 Merge #562: Make use of TAG_PUBKEY constants in secp256k1_eckey_pubkey_parse
be40c4d0b5 Fixup for C90 mixed declarations.
c71dd2c08f Merge #509: Fix algorithm selection in bench_ecmult
6492bf88cc Merge #518: Summarize build options after running configure
0e9ada1941 Merge #567: Correct order of libs returned on pkg-config --libs --static libsecp2…
e96901a4b9 Merge #587: Make randomization of a non-signing context a noop
58df8d03ad Merge #511: Portability fix for the configure scripts generated
2ebdad772a Merge #552: Make constants static:
1c131affd3 Merge #551: secp256k1_fe_sqrt: Verify that the arguments don't alias.
ba698f883b Merge #539: Assorted minor corrections
949e85b009 Merge #550: Optimize secp256k1_fe_normalize_weak calls.
a34bcaadf1 Actually pass CFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD to linker
2d5f4cebdc configure: Use CFLAGS_FOR_BUILD when checking native compiler
b408c6a8b2 Merge #579: Use __GNUC_PREREQ for detecting __builtin_expect
6198375218 Make randomization of a non-signing context a noop
74e2dbd68e JNI: fix use sig array
c663397f46 Use __GNUC_PREREQ for detecting __builtin_expect
3cb057f842 Fix possible integer overflow in DER parsing
e34ceb333b Merge #557: Eliminate scratch memory used when generating contexts
b3bf5f99a3 ecmult_impl: expand comment to explain how effective affine interacts with everything
efa783f8f0 Store z-ratios in the 'x' coord they'll recover
ffd3b346fe add `secp256k1_ge_set_all_gej_var` test which deals with many infinite points
84740acd2a ecmult_impl: save one fe_inv_var
47045270fa ecmult_impl: eliminate scratch memory used when generating context
7f7a2ed3a8 ecmult_gen_impl: eliminate scratch memory used when generating context
314a61d724 Merge #553: add static context object which has no capabilities
89a20a8945 Correct order of libs returned on pkg-config --libs --static libsecp256k1 call.
1086fda4c1 Merge #354: [ECDH API change] Support custom hash function
d3cb1f95eb Make use of TAG_PUBKEY constants in secp256k1_eckey_pubkey_parse
40fde611bd prevent attempts to modify `secp256k1_context_no_precomp`
ed7c08417a add static context object which has no capabilities
496c5b43b8 Make constants static: static const secp256k1_ge secp256k1_ge_const_g; static const int CURVE_B;
bf8b86cc07 secp256k1_fe_sqrt: Verify that the arguments don't alias.
9bd89c836b Optimize secp256k1_fe_normalize_weak calls. Move secp256k1_fe_normalize_weak calls out of ECMULT_TABLE_GET_GE and ECMULT_TABLE_GET_GE_STORAGE and into secp256k1_ge_globalz_set_table_gej instead.
52ab96fedb clean dependendies in field_*_impl.h
deff5edd42 Correct math typos in field_*.h
4efb3f8dd1 Add check that restrict pointers don't alias with all parameters.
1e6f1f5ad5 Merge #529: fix tests.c in the count == 0 case
c8fbc3c397 [ECDH API change] Allow pass arbitrary data to hash function
b00be65056 [ECDH API change] Support custom hash function
95e99f196f fix tests.c in the count == 0 case
452d8e4d2a Merge #523: scratch: add stack frame support
6fe50439ae scratch: add stack frame support
9bc2e26502 Merge #522: parameterize ecmult_const over input size
7c1b91ba4b parameterize ecmult_const over input size
dbc3ddd5e2 Merge #513: Increase sparsity of pippenger fixed window naf representation
3965027c81 Summarize build options in configure script
0f0517369c Fix algorithm selection in bench_ecmult
fb9271dcf0 Merge #510: add a couple missing `const`s to ecmult_pippenger_wnaf
cd5f6028e5 Merge #515: Fix typo
09146ae854 Merge #512: secp256k1_ec_privkey_negate - fix documentation
ec0a7b3ae3 Don't touch leading zeros in wnaf_fixed.
9e36d1bfe2 Fix bug in wnaf_fixed where the wnaf array is not completely zeroed when given a 0 scalar.
96f68a0afc Don't invert scalar in wnaf_fixed when it is even because a caller might intentionally give a scalar with many leading zeros.
8b3841c91d fix bug in fread() failure check
cddef0c0be tests: add warning message when /dev/urandom fails
9b7c47a21e Fix typo
6dbb007869 Increase sparsity of pippenger fixed window naf representation
1646ace4d5 secp256k1_ec_privkey_negate - fix documentation
270f6c80db Portability fix for the configure scripts generated
9b3ff0309d add a couple missing `const`s to ecmult_pippenger_wnaf
cd329dbc3e Merge #460: [build] Update ax_jni_include_dir.m4 macro
7f9c1a1565 Merge #498: tests: Avoid calling fclose(...) with an invalid argument
f99aa8d4d3 Merge #499: tests: Make sure we get the requested number of bytes from /dev/urandom
b549d3d5f7 Merge #472: [build] Set --enable-jni to no by default instead of auto.
d333521516 Merge #494: Support OpenSSL versions >= 1.1 for ENABLE_OPENSSL_TESTS
2ef8ea5d21 Merge #495: Add bench_ecmult to .gitignore
82a96e4587 tests: Make sure we get the requested number of bytes from /dev/urandom
5aae5b5bb2 Avoid calling fclose(...) with an invalid argument
cb32940df3 Add bench_ecmult to .gitignore
31abd3ab8d Support OpenSSL versions >= 1.1 for ENABLE_OPENSSL_TESTS
c95f6f1360 Merge #487: fix tests typo, s/changed/unchanged
fb46c83881 Merge #463: Reduce usage of hardcoded size constants
02f5001dfc Merge #490: Disambiguate bench functions and types
1f46d6089e Disambiguate bench functions and types
f54c6c5083 Merge #480: Enable benchmark building by default
c77fc08597 Merge #486: Add pippenger_wnaf for multi-multiplication
d2f9c6b5dc Use more precise pippenger bucket windows
4c950bbeaf Save some additions per window in _pippenger_wnaf
a58f543f5a Add flags for choosing algorithm in ecmult_multi benchmark
36b22c9337 Use scratch space dependent batching in ecmult_multi
355a38f113 Add pippenger_wnaf ecmult_multi
bc65aa794e Add bench_ecmult
dba5471b69 Add ecmult_multi tests
8c1c831bdb Generalize Strauss to support multiple points
548de42ecf add resizeable scratch space API
0e96cdc6b6 fix typo, s/changed/unchanged
c7680e570f Reduce usage of hardcoded size constants
6ad5cdb42a Merge #479: Get rid of reserved _t in type names
7a78f60598 Print whether we're building benchmarks
4afec9f1ae Build benchmarks by default
d1dc9dfc0a Get rid of reserved _t in type names
0b70241850 Merge #474: Fix header guards using reserved identifiers
ab1f89f00a Merge #478: Fixed multiple typos
8c7ea22d54 Fixed multiple typos
abe2d3e84b Fix header guards using reserved identifiers
57752d28b3 [build] Set --enable-jni to no by default instead of auto.
f532bdc9f7 Merge #459: Add pubkey prefix constants to include/secp256k1.h
cac7c5559d Merge #470: Fix wnaf_const documentation
768514bac0 Fix wnaf_const documentation with respect to return value and number of words set
b8c26a3990 Merge #458: Fix typo in API documentation
817fb2013a Merge #440: Fix typos
12230f90ed Merge #468: Remove redundant conditional expression
2e1ccdca0d Remove redundant conditional expression
e7daa9b3c2 [build] Tweak JNI macro to warn instead of error for JNI not found.
5b22977922 [build] Update ax_jni_include_dir.m4 macro to deal with recent versions of macOS
bc61b91aca add pubkey prefix constants to include/secp256k1.h
b0452e664b Fix typo in API documentation
84973d393a Merge #454: Remove residual parts from the schnorr expirement.
5e95bf2285 Remove residual parts from the schnorr expirement.
cbc20b8c34 Merge #452: Minor optimizations to _scalar_inverse to save 4M
4cc8f52505 Merge #437: Unroll secp256k1_fe_(get|set)_b32 to make them much faster.
465159c278 Further shorten the addition chain for scalar inversion.
a2b6b1914f Fix benchmark print_number infinite loop.
8b7680a826 Unroll secp256k1_fe_(get|set)_b32 for 10x26.
aa8499080e Unroll secp256k1_fe_(get|set)_b32 for 5x52.
cf12fa13cb Minor optimizations to _scalar_inverse to save 4M
119949232a Merge #408: Add `secp256k1_ec_pubkey_negate` and `secp256k1_ec_privkey_negate`
6af0871070 Merge #441: secp256k1_context_randomize: document.
ab31a524b4 Merge #444: test: Use checked_alloc
eda5c1a062 Merge #449: Remove executable bit from secp256k1.c
51b77ae619 Remove executable bit from secp256k1.c
5eb030ca41 test: Use checked_alloc
72d952c9c4 FIXUP: Missing "is"
70ff29b6a7 secp256k1_context_randomize: document.
4c0f32ed51 Fix typo: "Agressive" → "Aggressive"
73aca8364f Fix typo: "exectured" → "executed"
9d560f992d Merge #428: Exhaustive recovery
8e48aa60dc Add `secp256k1_ec_pubkey_negate` and `secp256k1_ec_privkey_negate`
2cee5fd4c9 exhaustive tests: add recovery module
678b0e5466 exhaustive tests: remove erroneous comment from ecdsa_sig_sign
03ff8c2d0a group_impl.h: remove unused `secp256k1_ge_set_infinity` function
a724d7296d configure: add --enable-coverage to set options for coverage analysis
b595163992 recovery: add tests to cover API misusage
6f8ae2f3c0 ecdh: test NULL-checking of arguments
25e3cfbf9b ecdsa_impl: replace scalar if-checks with VERIFY_CHECKs in ecdsa_sig_sign

git-subtree-dir: src/secp256k1
git-subtree-split: 44c2452fd387f7ca604ab42d73746e7d3a44d8a2
patricklodder added a commit to patricklodder/dogecoin that referenced this pull request Jul 28, 2022
44c2452fd3 Merge bitcoin-core/secp256k1#1105: Don't export symbols in static libraries
6f6cab9989 abi: Don't export symbols in static Windows libraries
485f608fa9 Merge bitcoin-core/secp256k1#1104: Fix the false positive of `SECP_64BIT_ASM_CHECK`
8b013fce51 Merge bitcoin-core/secp256k1#1056: Save negations in var-time group addition
7efc9835a9 Fix the false positive of `SECP_64BIT_ASM_CHECK`
8746600eec Merge bitcoin-core/secp256k1#1093: hash: Make code agnostic of endianness
2f984ffc45 Save negations in var-time group addition
37d36927df tests: Add tests for _read_be32 and _write_be32
912b7ccc44 Merge bitcoin-core/secp256k1#1094: doc: Clarify configure flags for optional modules
55512d30b7 doc: clean up module help text in configure.ac
d9d94a9969 doc: mention optional modules in README
616b43dd3b util: Remove endianness detection
8d89b9e6e5 hash: Make code agnostic of endianness
d0ad5814a5 Merge bitcoin-core/secp256k1#995: build: stop treating schnorrsig, extrakeys modules as experimental
1ac7e31c5b Merge bitcoin-core/secp256k1#1089: Schnorrsig API improvements
587239dbe3 Merge bitcoin-core/secp256k1#731: Change SHA256 byte counter from size_t to uint64_t
f8d9174357 Add SHA256 bit counter tests
7f09d0f311 README: mention that ARM assembly is experimental
b8f8b99f0f docs: Fix return value for functions that don't have invalid inputs
f813bb0df3 schnorrsig: Adapt example to new API
99e6568fc6 schnorrsig: Rename schnorrsig_sign to schnorsig_sign32 and deprecate
fc94a2da44 Use SECP256K1_DEPRECATED for existing deprecated API functions
3db0560606 Add SECP256K1_DEPRECATED attribute for marking API parts as deprecated
80cf4eea5f build: stop treating schnorrsig, extrakeys modules as experimental
e0508ee9db Merge bitcoin-core/secp256k1#1090: configure: Remove redundant pkg-config code
21b2ebaf74 configure: Remove redundant pkg-config code
0e5cbd01b3 Merge bitcoin-core/secp256k1#1088: configure: Use modern way to set AR
0d253d52e8 configure: Use modern way to set AR
9b514ce1d2 Add test vector for very long SHA256 messages
8e3dde1137 Simplify struct initializer for SHA256 padding
eb28464a8b Change SHA256 byte counter from size_t to uint64_t
ac83be33d0 Merge bitcoin-core/secp256k1#1079: configure: Add hidden --enable-dev-mode to enable all the stuff
e0838d663d configure: Add hidden --enable-dev-mode to enable all the stuff
fabd579dfa configure: Remove redundant code that sets _enable variables
0d4226c051 configure: Use canonical variable prefix _enable consistently
64b34979ed Merge bitcoin-core/secp256k1#748: Add usage examples
7c9502cece Add a copy of the CC0 license to the examples
42e03432e6 Add usage examples to the readme
517644eab1 Optionally compile the examples in autotools, compile+run in travis
422a7cc86a Add a ecdh shared secret example
b0cfbcc143 Add a Schnorr signing and verifying example
fee7d4bf9e Add an ECDSA signing and verifying example
1253a27756 Merge bitcoin-core/secp256k1#1033: Add _fe_half and use in _gej_add_ge and _gej_double
3ef94aa5ba Merge bitcoin-core/secp256k1#1026: ecdh: Add test computing shared_secret=basepoint with random inputs
3531a43b5b ecdh: Make generator_basepoint test depend on global iteration count
c881dd49bd ecdh: Add test computing shared_secret=basepoint with random inputs
077528317d Merge bitcoin-core/secp256k1#1074: ci: Retry brew update a few times to avoid random failures
e51ad3b737 ci: Retry `brew update` a few times to avoid random failures
b1cb969e8a ci: Revert "Attempt to make macOS builds more reliable"
5dcc6f8dbd Merge bitcoin-core/secp256k1#1069: build: Replace use of deprecated autoconf macro AC_PROG_CC_C89
59547943d6 Merge bitcoin-core/secp256k1#1072: ci: Attempt to make macOS builds more reliable
85b00a1c65 Merge bitcoin-core/secp256k1#1068: sage: Fix incompatibility with sage 9.4
ebb1beea78 sage: Ensure that constraints are always fastfracs
d8d54859ed ci: Run sage prover on CI
77cfa98dbc sage: Normalize sign of polynomial factors in prover
eae75869cf sage: Exit with non-zero status in case of failures
d9396a56da ci: Attempt to make macOS builds more reliable
e0db3f8a25 build: Replace use of deprecated autoconf macro AC_PROG_CC_C89
e848c3799c Update sage files for new formulae
d64bb5d4f3 Add fe_half tests for worst-case inputs
b54d843eac sage: Fix printing of errors
4eb8b932ff Further improve doubling formula using fe_half
557b31fac3 Doubling formula using fe_half
2cbb4b1a42 Run more iterations of run_field_misc
9cc5c257ed Add test for secp256k1_fe_half
925f78d55e Add _fe_half and use in _gej_add_ge
e108d0039c sage: Fix incompatibility with sage 9.4
d8a2463246 Merge bitcoin-core/secp256k1#899: Reduce stratch space needed by ecmult_strauss_wnaf.
0a40a4861a Merge bitcoin-core/secp256k1#1049: Faster fixed-input ecmult tests
070e772211 Faster fixed-input ecmult tests
c8aa516b57 Merge bitcoin-core/secp256k1#1064: Modulo-reduce msg32 inside RFC6979 nonce fn to match spec. Fixes #1063
b797a500ec Create a SECP256K1_ECMULT_TABLE_VERIFY macro.
a731200cc3 Replace ECMULT_TABLE_GET_GE_STORAGE macro with a function.
fe34d9f341 Eliminate input_pos state field from ecmult_strauss_wnaf.
0397d00ba0 Eliminate na_1 and na_lam state fields from ecmult_strauss_wnaf.
7ba3ffcca0 Remove the unused pre_a_lam allocations.
b3b57ad6ee Eliminate the pre_a_lam array from ecmult_strauss_wnaf.
ae7ba0f922 Remove the unused prej allocations.
e5c18892db Eliminate the prej array from ecmult_strauss_wnaf.
c9da1baad1 Move secp256k1_fe_one to field.h
45f37b6506 Modulo-reduce msg32 inside RFC6979 nonce fn to match spec. Fixes #1063.
a1102b1219 Merge bitcoin-core/secp256k1#1029: Simpler and faster ecdh skew fixup
e82144edfb Fixup skew before global Z fixup
40b624c90b Add tests for _gej_cmov
8c13a9bfe1 ECDH skews by 0 or 1
1515099433 Simpler and faster ecdh skew fixup
39a36db94a Merge bitcoin-core/secp256k1#1054: tests: Fix test whose result is implementation-defined
a310e79ee5 Merge bitcoin-core/secp256k1#1052: Use xoshiro256++ instead of RFC6979 for tests
423b6d19d3 Merge bitcoin-core/secp256k1#964: Add release-process.md
9281c9f4e1 Merge bitcoin-core/secp256k1#1053: ecmult: move `_ecmult_odd_multiples_table_globalz_windowa`
77a19750b4 Use xoshiro256++ PRNG instead of RFC6979 in tests
5f2efe684e secp256k1_testrand_int(2**N) -> secp256k1_testrand_bits(N)
05e049b73c ecmult: move `_ecmult_odd_multiples_table_globalz_windowa`
3d7cbafb5f tests: Fix test whose result is implementation-defined
3ed0d02bf7 doc: add CHANGELOG template
6f42dc16c8 doc: add release_process.md
0bd3e4243c build: set library version to 0.0.0 explicitly
b4b02fd8c4 build: change libsecp version from 0.1 to 0.1.0-pre
09971a3ffd Merge bitcoin-core/secp256k1#1047: ci: Various improvements
0b83b203e1 Merge bitcoin-core/secp256k1#1030: doc: Fix upper bounds + cleanup in field_5x52_impl.h comment
1287786c7a doc: Add comment to top of field_10x26_impl.h
58da5bd589 doc: Fix upper bounds + cleanup in field_5x52_impl.h comment
b39d431aed Merge bitcoin-core/secp256k1#1044: Add another ecmult_multi test
b4ac1a1d5f ci: Run valgrind/memcheck tasks with 2 CPUs
e70acab601 ci: Use Cirrus "greedy" flag to use idle CPU time when available
d07e30176e ci: Update brew on macOS
22382f0ea0 ci: Test different ecmult window sizes
a69df3ad24 Merge bitcoin-core/secp256k1#816: Improve checks at top of _fe_negate methods
22d25c8e0a Add another ecmult_multi test
515e7953ca Improve checks at top of _fe_negate methods
26a022a3a0 ci: Remove STATICPRECOMPUTATION
10461d8bd3 precompute_ecmult: Always compute all tables up to default WINDOW_G
be6944ade9 Merge bitcoin-core/secp256k1#1042: Follow-ups to making all tables fully static
e05da9e480 Fix c++ build
c45386d994 Cleanup preprocessor indentation in precompute{,d}_ecmult{,_gen}
19d96e15f9 Split off .c file from precomputed_ecmult.h
1a6691adae Split off .c file from precomputed_ecmult_gen.h
bb36331412 Simplify precompute_ecmult_print_*
38cd84a0cb Compute ecmult tables at runtime for tests_exhaustive
e458ec26d6 Move ecmult table computation code to separate file
fc1bf9f15f Split ecmult table computation and printing
31feab053b Rename function secp256k1_ecmult_gen_{create_prec -> compute}_table
725370c3f2 Rename ecmult_gen_prec -> ecmult_gen_compute_table
075252c1b7 Rename ecmult_static_pre_g -> precomputed_ecmult
7cf47f72bc Rename ecmult_gen_static_prec_table -> precomputed_ecmult_gen
f95b8106d0 Rename gen_ecmult_static_pre_g -> precompute_ecmult
bae77685eb Rename gen_ecmult_gen_static_prec_table -> precompute_ecmult_gen
0559fc6e41 Merge bitcoin-core/secp256k1#988: Make signing table fully static
7dfceceea6 build: Remove #undef hack for ASM in the precomputation programs
bb36fe9be0 ci: Test `make precomp`
d94a37a20c build: Remove CC_FOR_BUILD stuff
ad63bb4c29 build: Prebuild and distribute ecmult_gen table
ac49361ed0 prealloc: Get rid of manual memory management for prealloc contexts
6573c08f65 ecmult_gen: Tidy precomputed file and save space
5eba83f17c ecmult_gen: Precompute tables for all values of ECMULT_GEN_PREC_BITS
5d0dbef018 Merge bitcoin-core/secp256k1#942: Verify that secp256k1_ge_set_gej_zinv does not operate on infinity.
486205aa68 Merge bitcoin-core/secp256k1#920: Test all ecmult functions with many j*2^i combinations
fdb33dd122 refactor: Make PREC_BITS a parameter of ecmult_gen_build_prec_table
5eb519e1f6 ci: reduce TEST_ITERS in memcheck run
e2cf77328a Test ecmult functions for all i*2^j for j=0..255 and odd i=1..255.
61ae37c612 Merge bitcoin-core/secp256k1#1022: build: Windows DLL additions
4f01840b82 Merge bitcoin-core/secp256k1#1027: build: Add a check that Valgrind actually supports a host platform
6ad908aa00 Merge bitcoin-core/secp256k1#1008: bench.c: add `--help` option and ci: move env variables
592661c22f ci: move test environment variable declaration to .cirrus.yml
dcbe84b841 bench: add --help option to bench.
099bad945e Comment and check a parameter for inf in secp256k1_ecmult_const.
6c0be857f8 Verify that secp256k1_ge_set_gej_zinv does not operate on infinity. a->x and a->y should not be used if the infinity flag is set.
4900227451 Merge bitcoin-core/secp256k1#1025: build: replace backtick command substitution with $()
7c7ce872a5 build: Add a check that Valgrind actually supports a host platform
a4875e30a6 refactor: Move default callbacks to util.h
4c94c55bce doc: Remove obsolete hint for valgrind stack size
5106226991 exhaustive_tests: Fix with ecmult_gen table with custom generator
e1a76530db refactor: Make generator a parameter of ecmult_gen_create_prec_table
9ad09f6911 refactor: Rename program that generates static ecmult_gen table
8ae18f1ab3 refactor: Rename file that contains static ecmult_gen table
00d2fa116e ecmult_gen: Make code consistent with comment
3b0c2185ea ecmult_gen: Simplify ecmult_gen context after making table static
2b7c7497ef build: replace backtick command substitution with $()
49f608de47 Merge bitcoin-core/secp256k1#1004: ecmult: fix definition of STRAUSS_SCRATCH_OBJECTS
c0cd7de6d4 build: add -no-undefined to libtool LDFLAGS
fe32a79d35 build: pass win32-dll to LT_INIT
60bf8890df ecmult: fix definition of STRAUSS_SCRATCH_OBJECTS
fecf436d53 Merge bitcoin-core/secp256k1#1019: build: don't append valgrind CPPFLAGS if not installed (macOS)
2e5e4b67df Merge bitcoin-core/secp256k1#1020: doc: remove use of <0xa0> "no break space"
812ff5c747 doc: remove use of 0xa0 "no break space"
214042a170 build: don't append valgrind CPPFLAGS if not installed
e43ba02cfc refactor: Decouple table generation and ecmult_gen context
22dc2c0a0d ecmult_gen: Move table creation to new file and force static prec
793ad9016a Merge bitcoin-core/secp256k1#1010: doc: Minor fixes in safegcd_implementation.md
dc9b6853b7 doc: Minor fixes in safegcd_implementation.md
ea5e8a9c47 Merge bitcoin-core/secp256k1#1012: Fix typos
233297579d Fix typos
7006f1b97f Merge bitcoin-core/secp256k1#1011: ci: Enable -g if we set CFLAGS manually
72de1359e9 ci: Enable -g if we set CFLAGS manually
74c34e727b Merge bitcoin-core/secp256k1#1009: refactor: Use (int)&(int) in boolean context to avoid compiler warning
16d132215c refactor: Use (int)&(int) in boolean context to avoid compiler warning
c74a7b7e51 Merge bitcoin-core/secp256k1#1007: doc: Replace apoelstra's GPG key by jonasnick's GPG key
3b157c48ed doc: Suggest keys.openpgp.org as keyserver in SECURITY.md
73a7472cd0 doc: Replace apoelstra's GPG key by jonasnick's GPG key
515a5dbd02 Merge bitcoin-core/secp256k1#991: Merge all "external" benchmarks into a single bench binary
af6abcb3d0 Make bench support selecting which benchmarks to run
9f56bdf5b9 Merge bench_schnorrsig into bench
3208557ae1 Merge bench_recover into bench
855e18d8a8 Merge bench_ecdh into bench
2a7be678a6 Combine bench_sign and bench_verify into single bench
8fa41201bd Merge bitcoin-core/secp256k1#1002: Make aux_rnd32==NULL behave identical to 0x0000..00.
5324f8942d Make aux_rnd32==NULL behave identical to 0x0000..00.
21c188b3c5 Merge bitcoin-core/secp256k1#943: VERIFY_CHECK precondition for secp256k1_fe_set_int.
3e7b2ea194 Merge bitcoin-core/secp256k1#999: bench_ecmult: improve clarity of output
23e2f66726 bench: don't return 1 in have_flag() if argc = 1
96b1ad2ea9 bench_ecmult: improve clarity of output
20d791edfb Merge bitcoin-core/secp256k1#989: Shared benchmark format for command line and CSV outputs
aa1b889b61 Merge bitcoin-core/secp256k1#996: Fix G.y parity in sage code
044d956305 Fix G.y parity in sage code
b4b130678d create csv file from the benchmark output
26a255beb6 Shared benchmark format for command line and CSV outputs
9526874d14 Merge bitcoin-core/secp256k1#810: Avoid overly-wide multiplications in 5x52 field mul/sqr
920a0e5fa6 Merge bitcoin-core/secp256k1#952: Avoid computing out-of-bounds pointer.
f34b5cae03 Merge bitcoin-core/secp256k1#983: [RFC] Remove OpenSSL testing support
297ce82091 Merge bitcoin-core/secp256k1#966: Make aux_rand32 arg to secp256k1_schnorrsig_sign const
2888640132 VERIFY_CHECK precondition for secp256k1_fe_set_int.
d49011f54c Make _set_fe_int( . , 0 ) set magnitude to 0
bc08599e77 Remove OpenSSL testing support
10f9bd84f4 Merge bitcoin-core/secp256k1#987: Fix unused parameter warnings when building without VERIFY
189f6bcfef Fix unused parameter warnings when building without VERIFY
da0092bccc Merge bitcoin-core/secp256k1#986: tests: remove `secp256k1_fe_verify` from tests.c and modify `_fe_from_storage` to call `_fe_verify`
d43993724d tests: remove `secp256k1_fe_verify` from tests.c and modify `secp256k1_fe_from_storage` to call `secp256k1_fe_verify`
2a3a97c665 Merge bitcoin-core/secp256k1#976: `secp256k1_schnorrsig_sign_internal` should be static
aa5d34a8fe Merge bitcoin-core/secp256k1#783: Make the public API docs more consistent and explicit
72713872a8 Add missing static to secp256k1_schnorrsig_sign_internal
db4667d5e0 Make aux_rand32 arg to secp256k1_schnorrsig_sign const
9a5a87e0f1 Merge bitcoin-core/secp256k1#956: Replace ecmult_context with a generated static array.
20abd52c2e Add tests for pre_g tables.
6815761cf5 Remove ecmult_context.
f20dcbbad1 Correct typo.
16a3cc07e8 Generate ecmult_static_pre_g.h
8de2d86a06 Bump memory limits in advance of making the ecmult context static.
d7ec49a689 Merge bitcoin-core/secp256k1#969: ci: Fixes after Debian release
5d5c74a057 tests: Rewrite code to circument potential bug in clang
3d2f492ceb ci: Install libasan6 (instead of 5) after Debian upgrade
be8d9c262f Merge bitcoin-core/secp256k1#965: gen_context: Don't use any ASM
aeece44599 gen_context: Don't use any ASM
7688a4f13a Merge bitcoin-core/secp256k1#963: "Schnorrsig API overhaul" fixups
90e83449b2 ci: Add C++ test
adec5a1638 Add missing null check for ctx and input keys in the public API
f4edfc7581 Improve consistency for NULL arguments in the public interface
f698caaff6 Use unsigned char consistently for byte arrays
b5b8e7b719 Don't declare constants twice
769528f307 Don't use string literals for char arrays without NUL termination
2cc3cfa583 Fix -Wmissing-braces warning in clang
0440945fb5 Merge #844: schnorrsig API overhaul
ec3aaa5014 Merge #960: tests_exhaustive: check the result of secp256k1_ecdsa_sign
a1ee83c654 tests_exhaustive: check the result of secp256k1_ecdsa_sign
253f90cdeb Merge bitcoin-core/secp256k1#951: configure: replace AC_PATH_PROG to AC_CHECK_PROG
446d28d9de Merge bitcoin-core/secp256k1#944: Various improvements related to CFLAGS
0302138f75 ci: Make compiler warning into errors on CI
b924e1e605 build: Ensure that configure's compile checks default to -O2
7939cd571c build: List *CPPFLAGS before *CFLAGS like on the compiler command line
595e8a35d8 build: Enable -Wcast-align=strict warning
07256267ff build: Use own variable SECP_CFLAGS instead of touching user CFLAGS
4866178dfc Merge bitcoin-core/secp256k1#955: Add random field multiply/square tests
75ce488c2a Merge bitcoin-core/secp256k1#959: tests: really test the non-var scalar inverse
41ed13942b tests: really test the non-var scalar inverse
5f6ceafcfa schnorrsig: allow setting MSGLEN != 32 in benchmark
fdd06b7967 schnorrsig: add tests for sign_custom and varlen msg verification
d8d806aaf3 schnorrsig: add extra parameter struct for sign_custom
a0c3fc177f schnorrsig: allow signing and verification of variable length msgs
5a8e4991ad Add secp256k1_tagged_sha256 as defined in BIP-340
b6c0b72fb0 schnorrsig: remove noncefp args from sign; add sign_custom function
bdf19f105c Add random field multiply/square tests
9be7b0f083 Avoid computing out-of-bounds pointer.
8ae56e33e7 Merge #879: Avoid passing out-of-bound pointers to 0-size memcpy
a4642fa15e configure: replace AC_PATH_PROG to AC_CHECK_PROG
1758a92ffd Merge #950: ci: Add ppc64le build
c58c4ea470 ci: Add ppc64le build
7973576f6e Merge #662: Add ecmult_gen, ecmult_const and ecmult to benchmark
8f879c2887 Fix array size in bench_ecmult
2fe1b50df1 Add ecmult_gen, ecmult_const and ecmult to benchmark
593e6bad9c Clean up ecmult_bench to make space for more benchmarks
50f3367712 Merge #947: ci: Run PRs on merge result even for i686
a35fdd3478 ci: Run PRs on merge result even for i686
442cee5baf schnorrsig: add algolen argument to nonce_function_hardened
df3bfa12c3 schnorrsig: clarify result of calling nonce_function_bip340 without data
99e8614812 README: mention schnorrsig module
3dc8c072b6 Merge #846: ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
02dcea1ad9 ci: Make test iterations configurable and tweak for sanitizer builds
489ff5c20a tests: Treat empty SECP2561_TEST_ITERS as if it was unset
fcfcb97e74 ci: Simplify to use generic wrapper for QEMU, Valgrind, etc
de4157f13a ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
399722a63a Merge #941: Clean up git tree
09b3bb8648 Clean up git tree
bf0ac46066 Merge #930: Add ARM32/ARM64 CI
202a030f7d Merge #850: add `secp256k1_ec_pubkey_cmp` method
1e78c18d5b Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards
69394879b6 Merge #926: secp256k1.h: clarify that by default arguments must be != NULL
6eceec6d56 add `secp256k1_xonly_pubkey_cmp` method
0d9561ae87 add `secp256k1_ec_pubkey_cmp` method
22a9ea154a contrib: Explain explicit header guards
6c52ae8724 Merge #937: Have ge_set_gej_var, gej_double_var and ge_set_all_gej_var initialize all fields of their outputs.
185a6af227 Merge #925: changed include statements without prefix 'include/'
14c9739a1f tests: Improve secp256k1_ge_set_all_gej_var for some infinity inputs
4a19668c37 tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs
3c90bdda95 change local lib headers to be relative for those pointing at "include/" dir
45b6468d7e Have secp256k1_ge_set_all_gej_var initialize all fields. Previous behaviour would not initialize r->y values in the case where infinity is passed in. Furthermore, the previous behaviour wouldn't initialize anything in the case where all inputs were infinity.
31c0f6de41 Have secp256k1_gej_double_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
dd6c3de322 Have secp256k1_ge_set_gej_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
d0bd2693e3 Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM
8bbad7a18e Add asm build to ARM32 CI
7d65ed5214 Add ARM32/ARM64 CI
c8483520c9 Makefile.am: Don't pass a variable twice
2161f31785 Makefile.am: Honor config when building gen_context
99f47c20ec gen_context: Don't use external ASM because it complicates the build
98e0358d29 Merge #933: Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers
99e2d5be0d Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers.
34388af6b6 Merge #922: Add mingw32-w64/wine CI build
7012a188e6 Merge #928: Define SECP256K1_BUILD in secp256k1.c directly.
ed5a199bed tests: fopen /dev/urandom in binary mode
ae9e648526 Define SECP256K1_BUILD in secp256k1.c directly.
4dc37bf81b Add mingw32-w64/wine CI build
0881633dfd secp256k1.h: clarify that by default arguments must be != NULL
efad3506a8 Merge #906: Use modified divsteps with initial delta=1/2 for constant-time
cc2c09e3a7 Merge #918: Clean up configuration in gen_context
07067967ee add ECMULT_GEN_PREC_BITS to basic_config.h
a3aa2628c7 gen_context: Don't include basic-config.h
be0609fd54 Add unit tests for edge cases with delta=1/2 variant of divsteps
cd393ce228 Optimization: only do 59 hddivsteps per iteration instead of 62
277b224b6a Use modified divsteps with initial delta=1/2 for constant-time
376ca366db Fix typo in explanation
1e5d50fa93 Merge #889: fix uninitialized read in tests
c083cc6e52 Merge #903: Make argument of fe_normalizes_to_zero{_var} const
6e898534ff Merge #907: changed import to use brackets <> for openssl
4504472269 changed import to use brackets <> for openssl as they are not local to the project
26de4dfeb1 Merge #831: Safegcd inverses, drop Jacobi symbols, remove libgmp
23c3fb629b Make argument of fe_normalizes_to_zero{_var} const
24ad04fc06 Make scalar_inverse{,_var} benchmark scale with SECP256K1_BENCH_ITERS
ebc1af700f Optimization: track f,g limb count and pass to new variable-time update_fg_var
b306935ac1 Optimization: use formulas instead of lookup tables for cancelling g bits
9164a1b658 Optimization: special-case zero modulus limbs in modinv64
1f233b3fa0 Remove num/gmp support
20448b8d09 Remove unused Jacobi symbol support
5437e7bdfb Remove unused scalar_sqr
aa9cc52180 Improve field/scalar inverse tests
1e0e885c8a Make field/scalar code use the new modinv modules for inverses
436281afdc Move secp256k1_fe_inverse{_var} to per-impl files
aa404d53be Move secp256k1_scalar_{inverse{_var},is_even} to per-impl files
08d54964e5 Improve bounds checks in modinv modules
151aac00d3 Add tests for modinv modules
d8a92fcc4c Add extensive comments on the safegcd algorithm and implementation
8e415acba2 Add safegcd based modular inverse modules
de0a643c3d Add secp256k1_ctz{32,64}_var functions
4c3ba88c3a Merge #901: ci: Switch all Linux builds to Debian and more improvements
9361f360bb ci: Select number of parallel make jobs depending on CI environment
28eccdf806 ci: Split output of logs into multiple sections
c7f754fe4d ci: Run PRs on merge result instead of on the source branch
b994a8be3c ci: Print information about binaries using "file"
f24e122d13 ci: Switch all Linux builds to Debian
ebdba03cb5 Merge #891: build: Add workaround for automake 1.13 and older
3a8b47bc6d Merge #894: ctime_test: move context randomization test to the end
7d3497cdc4 ctime_test: move context randomization test to the end
99a1cfec17 print warnings for conditional-uninitialized
3d2cf6c5bd initialize variable in tests
f329bba244 build: Add workaround for automake 1.13 and older
24d1656c32 Merge #882: Use bit ops instead of int mult for constant-time logic in gej_add_ge
e491d06b98 Use bit ops instead of int mult for constant-time logic in gej_add_ge
f8c0b57e6b Merge #864: Add support for Cirrus CI
cc2a5451dc ci: Refactor Nix shell files
2480e55c8f ci: Remove support for Travis CI
2b359f1c1d ci: Enable simple cache for brewing valgrind on macOS
8c02e465c5 ci: Add support for Cirrus CI
659d0d4798 Merge #880: Add parens around ROUND_TO_ALIGN's parameter.
b6f649889a Add parens around ROUND_TO_ALIGN's parameter. This makes the macro robust against a hypothetical ROUND_TO_ALIGN(foo ? sizeA : size B) invocation.
a4abaab793 Merge #877: Add missing secp256k1_ge_set_gej_var decl.
5671e5f3fd Merge #874: Remove underscores from header defs.
db726782fa Merge #878: Remove unused secp256k1_fe_inv_all_var
b732701faa Merge #875: Avoid casting (void**) values.
9570f674cc Avoid passing out-of-bound pointers to 0-size memcpy
75d2ae149e Remove unused secp256k1_fe_inv_all_var
482e4a9cfc Add missing secp256k1_ge_set_gej_var decl.
2730618604 Avoid casting (void**) values. Replaced with an expression that only casts (void*) values.
fb390c5299 Remove underscores from header defs. This makes them consistent with other files and avoids reserved identifiers.
f2d9aeae6d Merge #862: Autoconf improvements
328aaef22a Merge #845: Extract the secret key from a keypair
3c15130709 Improve CC_FOR_BUILD detection
47802a4762 Restructure and tidy configure.ac
252c19dfc6 Ask brew for valgrind include path
8c727b9087 Merge #860: fixed trivial typo
b7bc3a4aaa fixed typo
33cb3c2b1f Add secret key extraction from keypair to constant time tests
36d9dc1e8e Add seckey extraction from keypair to the extrakeys tests
fc96aa73f5 Add a function to extract the secretkey from a keypair
98dac87839 Merge #858: Fix insecure links
07aa4c70ff Fix insecure links
b61f9da54e Merge #857: docs: fix simple typo, dependecy -> dependency
18aadf9d28 docs: fix simple typo, dependecy -> dependency
2d9e7175c6 Merge #852: Add sage script for generating scalar_split_lambda constants
dc6e5c3a5c Merge #854: Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation
6e85d675aa Rename tweak to tweak32 in public API
f587f04e35 Rename msg32 to msghash32 in ecdsa_sign/verify and add explanation
329a2e0a3f sage: Add script for generating scalar_split_lambda constants
8f0c6f1545 Merge #851: make test count iteration configurable by environment variable
f4fa8d226a forbid a test iteration of 0 or less
f554dfc708 sage: Reorganize files
3a106966aa Merge #849: Convert Sage code to Python 3 (as used by Sage >= 9)
13c88efed0 Convert Sage code to Python 3 (as used by Sage >= 9)
0ce4554881 make test count iteration configurable by environment variable
9e5939d284 Merge #835: Don't use reserved identifiers memczero and benchmark_verify_t
d0a83f7328 Merge #839: Prevent arithmetic on NULL pointer if the scratch space is too small
903b16aa6c Merge #840: Return NULL early in context_preallocated_create if flags invalid
1f4dd03838 Typedef (u)int128_t only when they're not provided by the compiler
3967d96bf1 Merge #838: Make autotools check for all the used openssl functions
3734b68200 Configure echo if openssl tests are enabled
ebfa2058e9 Return NULL early in context_preallocated_create if flags invalid
6f54e69f03 Merge #841: Avoids a potentially shortening size_t to int cast in strauss_wnaf_
29a299e373 Run the undefined behaviour sanitizer on Travis
7506e064d7 Prevent arithmetic on NULL pointer if the scratch space is too small
8893f42438 Avoids a potentially shortening size_t to int cast in strauss_wnaf_
e6692778d3 Modify bitcoin_secp.m4's openssl check to call all the functions that we use in the tests/benchmarks. That way linking will fail if those symbols are missing
ac05f61fcf Merge #809: Stop treating ECDH as experimental
e6e3d5da2f travis: add schnorrsig to valgrind and big endian platform test
353dff156f Stop treating ECDH as experimental
e89278f211 Don't use reserved identifiers memczero and benchmark_verify_t
c6b6b8f1bb Merge #830: Rip out non-endomorphism code + dependencies
c582abade1 Consistency improvements to the comments
63c6b71616 Reorder comments/function around scalar_split_lambda
2edc514c90 WNAF of lambda_split output has max size 129
4232e5b7da Rip out non-endomorphism code
ebad8414b0 Check correctness of lambda split without -DVERIFY
fe7fc1fda8 Make lambda constant accessible
9d2f2b44d8 Add tests to exercise lambda split near bounds
9aca2f7f07 Add secp256k1_split_lambda_verify
acab934d24 Detailed comments for secp256k1_scalar_split_lambda
76ed922a5f Increase precision of g1 and g2
6173839c90 Switch to our own memcmp function
63150ab4da Merge #827: Rename testrand functions to have test in name
c5257aed0b Merge #821: travis: Explicitly set --with-valgrind
bb1f54280f Merge #818: Add static assertion that uint32_t is unsigned int or wider
a45c1fa63c Rename testrand functions to have test in name
5006895bd6 Merge #808: Exhaustive test improvements + exhaustive schnorrsig tests
4eecb4d6ef travis: VALGRIND->RUN_VALGRIND to avoid confusion with WITH_VALGRIND
66a765c775 travis: Explicitly set --with-valgrind
d7838ba6a6 Merge #813: Enable configuring Valgrind support
7ceb0b7611 Merge #819: Enable -Wundef warning
8b7dcdd955 Add exhaustive test for extrakeys and schnorrsig
08d7d89299 Make pubkey parsing test whether points are in the correct subgroup
87af00b511 Abstract out challenge computation in schnorrsig
63e1b2aa7d Disable output buffering in tests_exhaustive.c
39f67dd072 Support splitting exhaustive tests across cores
e99b26fcd5 Give exhaustive_tests count and seed cmdline inputs
49e6630bca refactor: move RNG seeding to testrand
b110c106fa Change exhaustive test groups so they have a point with X=1
cec7b18a34 Select exhaustive lambda in function of order
78f6cdfaae Make the curve B constant a secp256k1_fe
d7f39ae4b6 Delete gej_is_valid_var: unused outside tests
8bcd78cd79 Make secp256k1_scalar_b32 detect overflow in scalar_low
c498366e5b Move exhaustive tests for recovery to module
be31791543 Make group order purely compile-time in exhaustive tests
e73ff30922 Enable -Wundef warning
c0041b5cfc Add static assertion that uint32_t is unsigned int or wider
4ad408faf3 Merge #782: Check if variable=yes instead of if var is set in travis.sh
412bf874d0 configure: Allow specifying --with[out]-valgrind explicitly
34debf7a6d Modify .travis.yml to explictly pass no in env vars instead of setting to nothing
a0e99fc121 Merge #814: tests: Initialize random group elements fully
5738e8622d tests: Initialize random group elements fully
c9939ba55d Merge #812: travis: run bench_schnorrsig
a51f2af62b travis: run bench_schnorrsig
8ab24e8dad Merge #558: Add schnorrsig module which implements BIP-340 compliant signatures
f3733c5433 Merge #797: Fix Jacobi benchmarks and other benchmark improvements
b53e0cd61f Avoid overly-wide multiplications
cb5524adc5 Add benchmark for secp256k1_ge_set_gej_var
5c6af60ec5 Make jacobi benchmarks vary inputs
d0fdd5f009 Randomize the Z coordinates in bench_internal
c7a3424c5f Rename bench_internal variables
875d68b95f Merge #699: Initialize field elements when resulting in infinity
54caf2e74f Merge #799: Add fallback LE/BE for architectures with known endianness + SHA256 selftest
f431b3f28a valgrind_ctime_test: Add schnorrsig_sign
16ffa9d97c schnorrsig: Add taproot test case
8dfd53ee3f schnorrsig: Add benchmark for sign and verify
4e43520026 schnorrsig: Add BIP-340 compatible signing and verification
7332d2db6b schnorrsig: Add BIP-340 nonce function
7a703fd97d schnorrsig: Init empty experimental module
eabd9bc46a Allow initializing tagged sha256
6fcb5b845d extrakeys: Add keypair_xonly_tweak_add
58254463f9 extrakeys: Add keypair struct with create, pub and pub_xonly
f0010349b8 Separate helper functions for pubkey_create and seckey_tweak_add
910d9c284c extrakeys: Add xonly_pubkey_tweak_add & xonly_pubkey_tweak_add_test
176bfb1110 Separate helper function for ec_pubkey_tweak_add
4cd2ee474d extrakeys: Add xonly_pubkey with serialize, parse and from_pubkey
f49c9896b0 Merge #806: Trivial: Add test logs to gitignore
aabf00c155 Merge #648: Prevent ints from wrapping around in scratch space functions
f5adab16a9 Merge #805: Remove the extremely outdated TODO file.
bceefd6547 Add test logs to gitignore
1c325199d5 Remove the extremely outdated TODO file.
47e6618e11 extrakeys: Init empty experimental module
3e08b02e2a Make the secp256k1_declassify argument constant
8bc6aeffa9 Add SHA256 selftest
670cdd3f8b Merge #798: Check assumptions on integer implementation at compile time
5e5fb28b4a Use additional system macros to figure out endianness
7c068998ba Compile-time check assumptions on integer types
02b6c87b52 Add support for (signed) __int128
979961c506 Merge #787: Use preprocessor macros instead of autoconf to detect endianness
887bd1f8b6 Merge #793: Make scalar/field choice depend on C-detected __int128 availability
0dccf98a21 Use preprocessor macros instead of autoconf to detect endianness
b2c8c42cf1 Merge #795: Avoid linking libcrypto in the valgrind ct test.
57d3a3c64c Avoid linking libcrypto in the valgrind ct test.
79f1f7a4f1 Autodetect __int128 availability on the C side
0d7727f95e Add SECP256K1_FE_STORAGE_CONST_GET to 5x52 field
805082de11 Merge #696: Run a Travis test on s390x (big endian)
39295362cf Test travis s390x (big endian)
ef37761fee Change travis.sh to check if variables are equal to yes instead of not-empty. Before this, setting `VALGRIND=wat` was considered as true, and to make it evaluate as false you had to unset the variable `VALGRIND=` but not it checks if `VALGRIND=yes` and if it's not `yes` then it's evaluated to false
6034a04fb1 Merge #778: secp256k1_gej_double_nonzero supports infinity
f60915906d Merge #779: travis: Fix argument quoting for ./configure
9e49a9b255 travis: Fix argument quoting for ./configure
18d36327fd secp256k1_gej_double_nonzero supports infinity
214cb3c321 Merge #772: Improve constant-timeness on PowerPC
40412b1930 Merge #774: tests: Abort if malloc() fails during context cloning tests
2e1b9e0458 tests: Abort if malloc() fails during context cloning tests
67a429f31f Suppress a harmless variable-time optimization by clang in _int_cmov
5b196338f0 Remove redundant "? 1 : 0" after comparisons in scalar code
3e5cfc5c73 Merge #741: Remove unnecessary sign variable from wnaf_const
66bb9320c0 Merge #773: Fix some compile problems on weird/old compilers.
1309c03c45 Fix some compile problems on weird/old compilers.
2309c7dd4a Merge #769: Undef HAVE___INT128 in basic-config.h to fix gen_context compilation
22e578bb11 Undef HAVE___INT128 in basic-config.h to fix gen_context compilation
3f4a5a10e4 Merge #765: remove dead store in ecdsa_signature_parse_der_lax
f00d6575ca remove dead store in ecdsa_signature_parse_der_lax
dbd41db16a Merge #759: Fix uninitialized variables in ecmult_multi test
2e7fc5b537 Fix uninitialized variables in ecmult_multi test
2ed54da18a Merge #755: Recovery signing: add to constant time test, and eliminate non ct operators
28609507e7 Add tests for the cmov implementations
73596a85a2 Add ecdsa_sign_recoverable to the ctime tests
2876af4f8d Split ecdsa_sign logic into a new function and use it from ecdsa_sign and recovery
5e1c885efb Merge #754: Fix uninit values passed into cmov
f79a7adcf5 Add valgrind uninit check to cmovs output
05d315affe Merge #752: autoconf: Use ":" instead of "dnl" as a noop
a39c2b09de Fixed UB(arithmetics on uninit values) in cmovs
3a6fd7f636 Merge #750: Add macOS to the CI
5e8747ae2a autoconf: Use ":" instead of "dnl" as a noop
71757da5cc Explictly pass SECP256K1_BENCH_ITERS to the benchmarks in travis.sh
99bd661d71 Replace travis_wait with a loop printing "\a" to stdout every minute
bc818b160c Bump travis Ubuntu from xenial(16.04) to bionic(18.04)
0c5ff9066e Add macOS support to travis
b6807d91d8 Move travis script into a standalone sh file
f39f99be0e Merge #701: Make ec_ arithmetic more consistent and add documentation
37dba329c6 Remove unnecessary sign variable from wnaf_const
6bb0b77e15 Fix test_constant_wnaf for -1 and add a test for it.
39198a03ea Merge #732: Retry if r is zero during signing
59a8de8f64 Merge #742: Fix typo in ecmult_const_impl.h
4e284655d9 Fix typo in ecmult_const_impl.h
f862b4ca13 Merge #740: Make recovery/main_impl.h non-executable
ffef45c98a Make recovery/main_impl.h non-executable
2361b3719a Merge #735: build: fix OpenSSL EC detection on macOS
3b7d26b23c build: add SECP_TEST_INCLUDES to bench_verify CPPFLAGS
84b5fc5bc3 build: fix OpenSSL EC detection on macOS
37ed51a7ea Make ecdsa_sig_sign constant-time again after reverting 25e3cfb
93d343bfc5 Revert "ecdsa_impl: replace scalar if-checks with VERIFY_CHECKs in ecdsa_sig_sign"
7e3952ae82 Clarify documentation of tweak functions.
89853a0f2e Make tweak function documentation more consistent.
41fc785602 Make ec_privkey functions aliases for ec_seckey_negate, ec_seckey_tweak_add and ec_seckey_mul
22911ee6da Rename private key to secret key in public API (with the exception of function names)
5a73f14d6c Mention that value is unspecified for In/Out parameters if the function returns 0
f03df0e6d7 Define valid ECDSA keys in the documentation of seckey_verify
5894e1f1df Return 0 if the given seckey is invalid in privkey_negate, privkey_tweak_add and privkey_tweak_mul
8f814cddb9 Add test for boundary conditions of scalar_set_b32 with respect to overflows
3fec982608 Use scalar_set_b32_seckey in ecdsa_sign, pubkey_create and seckey_verify
9ab2cbe0eb Add scalar_set_b32_seckey which does the same as scalar_set_b32 and also returns whether it's a valid secret key
4f27e344c6 Merge #728: Suppress a harmless variable-time optimization by clang in memczero
01993878bb Add test for memczero()
52a03512c1 Suppress a harmless variable-time optimization by clang in memczero
8f78e208ad Merge #722: Context isn't freed in the ECDH benchmark
ed1b91171a Merge #700: Allow overriding default flags
85b35afa76 Add running benchmarks regularly and under valgrind in travis
ca4906b02e Pass num of iters to benchmarks as variable, and define envvar
02dd5f1bbb free the ctx at the end of bench_ecdh
e9fccd4de1 Merge #708: Constant-time behaviour test using valgrind memtest.
08fb6c4926 Run valgrind_ctime_test in travis
3d2302257f Constant-time behaviour test using valgrind memtest.
96d8ccbd16 Merge #710: Eliminate harmless non-constant time operations on secret data.
0585b8b2ee Merge #718: Clarify that a secp256k1_ecdh_hash_function must return 0 or 1
7b50483ad7 Adds a declassify operation to aid constant-time analysis.
34a67c773b Eliminate harmless non-constant time operations on secret data.
ca739cba23 Compile with optimization flag -O2 by default instead of -O3
eb45ef3384 Clarify that a secp256k1_ecdh_hash_function must return 0 or 1
856a01d6ad Merge #714: doc: document the length requirements of output parameter.
d72b9e2483 Merge #682: Remove Java Native Interface
4b48a43106 doc: document the length requirements of output parameter.
1b4d256e2e Merge #713: Docstrings
dabfea7e21 field: extend docstring of secp256k1_fe_normalize
dc7d8fd9e2 scalar: extend docstring of secp256k1_scalar_set_b32
074ab582dd Merge #704: README: add a section for test coverage
acb7f97eb8 README: add a section for test coverage
227a4f2d07 Merge #709: Remove secret-dependant non-constant time operation in ecmult_const.
d567b779fe Clarify comments about use of rzr on ge functions and abs function.
2241ae6d14 Remove secret-dependant non-constant time operation in ecmult_const.
642cd062bd Remove Java Native Interface
83fb1bcef4 Remove -O2 from default CFLAGS because this would override the -O3 flag (see AC_PROG_CC in the Autoconf manual)
ecba8138ec Append instead of Prepend user-CFLAGS to default CFLAGS allowing the user to override default variables
613c34cd86 Remove test in configure.ac because it doesn't have an effect
f45d897101 Merge #703: Overhaul README.md
2e759ec753 Overhaul README.md
d644dda5c9 Merge #689: Remove "except in benchmarks" exception for fp math
bde2a32286 Convert bench.h to fixed-point math
47a7b8382f Clear field elements when writing infinity
61d1ecb028 Added test with additions resulting in infinity
387d723c3f Merge #679: Add SECURITY.md
0db61d25c9 Merge #685: Fix issue where travis does not show the ./tests seed…
a0771d15e6 Explicitly disable buffering for stderr in tests
fb424fbba2 Make travis show the ./tests seed by removing stdout buffering and always cat tests.log after a travis run.
22a6031184 Merge #690: Add valgrind check to travis
544002c008 Merge #678: Preventing compiler optimizations in benchmarks without a memory fence
dd98cc988f travis: Added a valgrind test without endro and enabled recovery+ecdh
b4c1382a87 Add valgrind check to travis
0c774d89e6 Merge #688: Fix ASM setting in travis
5c5f71eea5 Fix ASM setting in travis
e2625f8a98 Merge #684: Make no-float policy explicit
bae1bea3c4 Make no-float policy explicit
78c3836341 Add SECURITY.md
362bb25608 Modified bench_scalar_split so it won't get optimized out
73a30c6b58 Added accumulators and checks on benchmarks so they won't get optimized out
770b3dcd6f Merge #677: Remove note about heap allocation in secp256k1_ecmult_odd_multiples_table_storage_var
b76142ff25 Remove note about heap allocation in secp256k1_ecmult_odd_multiples_table_storage_var which was removed in 47045270fa90f81205d989f7107769bce1e71c4d
137d304a6b Merge #647: Increase robustness against UB in secp256k1_scalar_cadd_bit
0d9540b13f Merge #664: Remove mention of ec_privkey_export because it doesn't exist
59782c68b4 Remove mention of ec_privkey_export because it doesn't exist
96cd94e385 Merge #337: variable sized precomputed table for signing
dcb2e3b3ff variable signing precompute table
b4bff99028 Merge #661: Make ./configure string consistent
a467047e11 Make ./configure string consistent
e729cc7f5a Merge #657: Fix a nit in the recovery tests
b64a2e2597 Fix a nit in the recovery tests
e028aa33d3 Merge #650: secp256k1/src/tests.c:  Properly handle sscanf return value
f1e11d363d Merge #654: Fix typo (∞)
ef83281c3a Merge pull request #656 from real-or-random/patch-1
556caad2ca Fix typo in docs for _context_set_illegal_callback
0d82732a9a Improve VERIFY_CHECK of overflow in secp256k1_scalar_cadd_bit. This added check ensures that any curve order overflow doesn't go undetected due a uint32_t overflow.
786dfb49f5 Merge #583: JNI: fix use sig array
e95f8ab098 Merge #644: Avoid optimizing out a verify_check
384f55606a Merge #652: README.md: update instruction to run tests
ee56accd47 Merge #651: Fix typo in secp256k1_preallocated.h
7b9b117230 Merge #640: scalar_impl.h: fix includes
d99bec2e21 Merge #655: jni: Use only Guava for hex encoding and decoding
2abcf951af jni: Use only Guava for hex encoding and decoding
271582b3b7 Fix typo
60f7f2de5d Don't assume that ALIGNMENT > 1 in tests
ada6361dec Use ROUND_TO_ALIGN in scratch_create
8ecc6ce50e Add check preventing rounding to alignment from wrapping around in scratch_alloc
4edaf06fb0 Add check preventing integer multiplication wrapping around in scratch_max_allocation
ce6d438266 README.md: update instruction to run tests
b1e68cb8e6 Fix typo in secp256k1_preallocated.h
a11c76c59a secp256k1/src/tests.c:  Properly handle sscanf return value
8fe63e5654 Increase robustness against UB. Thanks to elichai2 who noted that the literal '1' is a signed integer, and that shifting a signed 32-bit integer by 31 bits causes an overflow and yields undefined behaviour. While 'scalar_low_impl''s 'secp256k1_scalar_cadd_bit' is only used for testing purposes and currently the 'bit' parameter is only 0 or 1, it is better to avoid undefined behaviour in case the used domain of 'secp256k1_scalar_cadd_bit' expands.
94ae7cbf83 Moved a dereference so the null check will be before the dereferencing
2cb73b1064 scalar_impl.h: fix includes
fa33017135 Merge #634: Add a descriptive comment for secp256k1_ecmult_const.
ee9e68cd30 Add a descriptive comment for secp256k1_ecmult_const.
d0d738d32d Merge #631: typo in comment for secp256k1_ec_pubkey_tweak_mul ()
6914c25276 typo in comment for secp256k1_ec_pubkey_tweak_mul ()
e541a90ef6 Merge #629: Avoid calling _is_zero when _set_b32 fails.
f34b0c3f35 Merge #630: Note intention of timing sidechannel freeness.
8d1563b0ff Note intention of timing sidechannel freeness.
1669bb2865 Merge #628: Fix ability to compile tests without -DVERIFY.
ecc94abcc8 Merge #627: Guard memcmp in tests against mixed size inputs.
544435fc90 Merge #578: Avoid implementation-defined and undefined behavior when dealing with sizes
143dc6e9ee Merge #595: Allow to use external default callbacks
e49f7991c2 Add missing #(un)defines to base-config.h
77defd2c3b Add secp256k1_ prefix to default callback functions
908bdce64e Include stdio.h and stdlib.h explicitly in secp256k1.c
5db782e655 Allow usage of external default callbacks
6095a863fa Replace CHECKs for no_precomp ctx by ARG_CHECKs without a return
cd473e02c3 Avoid calling secp256k1_*_is_zero when secp256k1_*_set_b32 fails.
6c36de7a33 Merge #600: scratch space: use single allocation
98836b11f0 scratch: replace frames with "checkpoint" system
7623cf2b97 scratch: save a couple bytes of unnecessarily-allocated memory
a7a164f2c6 scratch: rename `max_size` to `size`, document that extra will actually be allocated
5a4bc0bb95 scratch: unify allocations
c2b028a281 scratch space: thread `error_callback` into all scratch space functions
0be1a4ae62 scratch: add magic bytes to beginning of structure
92a48a764d scratch space: use single allocation
40839e21b9 Merge #592: Use trivial algorithm in ecmult_multi if scratch space is small
dcf392027b Fix ability to compile tests without -DVERIFY.
a484e0008b Merge #566: Enable context creation in preallocated memory
0522caac8f Explain caller's obligations for preallocated memory
238305fdbb Move _preallocated functions to separate header
695feb6fbd Export _preallocated functions
814cc78d71 Add tests for contexts in preallocated memory
ba12dd08da Check arguments of _preallocated functions
5feadde462 Support cloning a context into preallocated memory
c4fd5dab45 Switch to a single malloc call
ef020de16f Add size constants for preallocated memory
1bf7c056ba Prepare for manual memory management in preallocated memory
248bffb052 Guard memcmp in tests against mixed size inputs.
36698dcfee Merge #596: Make WINDOW_G configurable
a61a93ff50 Clean up ./configure help strings
2842dc523e Make WINDOW_G configurable
1a02d6ce51 Merge #626: Revert "Merge #620: Install headers automatically"
662918cb29 Revert "Merge #620: Install headers automatically"
14c7dbd444 Simplify control flow in DER parsing
ec8f20babd Avoid out-of-bound pointers and integer overflows in size comparisons
01ee1b3b3c Parse DER-enconded length into a size_t instead of an int
912680ed86 Merge #561: Respect LDFLAGS and #undef STATIC_PRECOMPUTATION if using basic config
91fae3ace0 Merge #620: Install headers automatically
5df77a0eda Merge #533: Make sure we're not using an uninitialized variable in secp256k1_wnaf_const(...)
975e51e0d9 Merge #617: Pass scalar by reference in secp256k1_wnaf_const()
735fbde04e Merge #619: Clear a copied secret key after negation
16e86150d0 Install headers automatically
069870d92a Clear a copied secret key after negation
8979ec0d9a Pass scalar by reference in secp256k1_wnaf_const()
84a808598b Merge #612: Allow field_10x26_arm.s to compile for ARMv7 architecture
d4d270a59c Allow field_10x26_arm.s to compile for ARMv7 architecture
b19c000063 Merge #607: Use size_t shifts when computing a size_t
4d01bc2d9c Merge #606: travis: Remove unused sudo:false
e6d01e9347 Use size_t shifts when computing a size_t
7667532bd7 travis: Remove unused sudo:false
248f046611 Make sure we're not using an uninitialized variable in secp256k1_wnaf_const(...)
9ab96f7b12 Use trivial algorithm in ecmult_multi if scratch space is small
ee99f12f3d Merge #599: Switch x86_64 asm to use "i" instead of "n" for immediate values.
d58bc93f2c Switch x86_64 asm to use "i" instead of "n" for immediate values.
05362ee042 Merge #597: Add $(COMMON_LIB) to exhaustive tests to fix ARM asm build
83483869ac Add $(COMMON_LIB) to exhaustive tests to fix ARM asm build
aa15154a48 Merge #568: Fix integer overflow in ecmult_multi_var when n is large
2277af5ff0 Fix integer overflow in ecmult_multi_var when n is large
dbed75d969 Undefine `STATIC_PRECOMPUTATION` if using the basic config
310111e093 Keep LDFLAGS if `--coverage`
85d0e1bcce Merge #591: Make bench_internal obey secp256k1_fe_sqrt's contract wrt aliasing.
14196379ec Merge #580: Add trivial ecmult_multi algorithm which does not require a scratch space
a697d82da9 Add trivial ecmult_multi to the benchmark tool
bade617417 Add trivial ecmult_multi algorithm. It is selected when no scratch space is given and just multiplies and adds the points.
5545e13dea Merge #584: configure: Use CFLAGS_FOR_BUILD when checking native compiler
20c5869df2 Merge #516: improvements to random seed in src/tests.c
b76e45d5d6 Make bench_internal obey secp256k1_fe_sqrt's contract wrt aliasing.
870a977644 Merge #562: Make use of TAG_PUBKEY constants in secp256k1_eckey_pubkey_parse
be40c4d0b5 Fixup for C90 mixed declarations.
c71dd2c08f Merge #509: Fix algorithm selection in bench_ecmult
6492bf88cc Merge #518: Summarize build options after running configure
0e9ada1941 Merge #567: Correct order of libs returned on pkg-config --libs --static libsecp2…
e96901a4b9 Merge #587: Make randomization of a non-signing context a noop
58df8d03ad Merge #511: Portability fix for the configure scripts generated
2ebdad772a Merge #552: Make constants static:
1c131affd3 Merge #551: secp256k1_fe_sqrt: Verify that the arguments don't alias.
ba698f883b Merge #539: Assorted minor corrections
949e85b009 Merge #550: Optimize secp256k1_fe_normalize_weak calls.
a34bcaadf1 Actually pass CFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD to linker
2d5f4cebdc configure: Use CFLAGS_FOR_BUILD when checking native compiler
b408c6a8b2 Merge #579: Use __GNUC_PREREQ for detecting __builtin_expect
6198375218 Make randomization of a non-signing context a noop
74e2dbd68e JNI: fix use sig array
c663397f46 Use __GNUC_PREREQ for detecting __builtin_expect
3cb057f842 Fix possible integer overflow in DER parsing
e34ceb333b Merge #557: Eliminate scratch memory used when generating contexts
b3bf5f99a3 ecmult_impl: expand comment to explain how effective affine interacts with everything
efa783f8f0 Store z-ratios in the 'x' coord they'll recover
ffd3b346fe add `secp256k1_ge_set_all_gej_var` test which deals with many infinite points
84740acd2a ecmult_impl: save one fe_inv_var
47045270fa ecmult_impl: eliminate scratch memory used when generating context
7f7a2ed3a8 ecmult_gen_impl: eliminate scratch memory used when generating context
314a61d724 Merge #553: add static context object which has no capabilities
89a20a8945 Correct order of libs returned on pkg-config --libs --static libsecp256k1 call.
1086fda4c1 Merge #354: [ECDH API change] Support custom hash function
d3cb1f95eb Make use of TAG_PUBKEY constants in secp256k1_eckey_pubkey_parse
40fde611bd prevent attempts to modify `secp256k1_context_no_precomp`
ed7c08417a add static context object which has no capabilities
496c5b43b8 Make constants static: static const secp256k1_ge secp256k1_ge_const_g; static const int CURVE_B;
bf8b86cc07 secp256k1_fe_sqrt: Verify that the arguments don't alias.
9bd89c836b Optimize secp256k1_fe_normalize_weak calls. Move secp256k1_fe_normalize_weak calls out of ECMULT_TABLE_GET_GE and ECMULT_TABLE_GET_GE_STORAGE and into secp256k1_ge_globalz_set_table_gej instead.
52ab96fedb clean dependendies in field_*_impl.h
deff5edd42 Correct math typos in field_*.h
4efb3f8dd1 Add check that restrict pointers don't alias with all parameters.
1e6f1f5ad5 Merge #529: fix tests.c in the count == 0 case
c8fbc3c397 [ECDH API change] Allow pass arbitrary data to hash function
b00be65056 [ECDH API change] Support custom hash function
95e99f196f fix tests.c in the count == 0 case
452d8e4d2a Merge #523: scratch: add stack frame support
6fe50439ae scratch: add stack frame support
9bc2e26502 Merge #522: parameterize ecmult_const over input size
7c1b91ba4b parameterize ecmult_const over input size
dbc3ddd5e2 Merge #513: Increase sparsity of pippenger fixed window naf representation
3965027c81 Summarize build options in configure script
0f0517369c Fix algorithm selection in bench_ecmult
fb9271dcf0 Merge #510: add a couple missing `const`s to ecmult_pippenger_wnaf
cd5f6028e5 Merge #515: Fix typo
09146ae854 Merge #512: secp256k1_ec_privkey_negate - fix documentation
ec0a7b3ae3 Don't touch leading zeros in wnaf_fixed.
9e36d1bfe2 Fix bug in wnaf_fixed where the wnaf array is not completely zeroed when given a 0 scalar.
96f68a0afc Don't invert scalar in wnaf_fixed when it is even because a caller might intentionally give a scalar with many leading zeros.
8b3841c91d fix bug in fread() failure check
cddef0c0be tests: add warning message when /dev/urandom fails
9b7c47a21e Fix typo
6dbb007869 Increase sparsity of pippenger fixed window naf representation
1646ace4d5 secp256k1_ec_privkey_negate - fix documentation
270f6c80db Portability fix for the configure scripts generated
9b3ff0309d add a couple missing `const`s to ecmult_pippenger_wnaf
cd329dbc3e Merge #460: [build] Update ax_jni_include_dir.m4 macro
7f9c1a1565 Merge #498: tests: Avoid calling fclose(...) with an invalid argument
f99aa8d4d3 Merge #499: tests: Make sure we get the requested number of bytes from /dev/urandom
b549d3d5f7 Merge #472: [build] Set --enable-jni to no by default instead of auto.
d333521516 Merge #494: Support OpenSSL versions >= 1.1 for ENABLE_OPENSSL_TESTS
2ef8ea5d21 Merge #495: Add bench_ecmult to .gitignore
82a96e4587 tests: Make sure we get the requested number of bytes from /dev/urandom
5aae5b5bb2 Avoid calling fclose(...) with an invalid argument
cb32940df3 Add bench_ecmult to .gitignore
31abd3ab8d Support OpenSSL versions >= 1.1 for ENABLE_OPENSSL_TESTS
c95f6f1360 Merge #487: fix tests typo, s/changed/unchanged
fb46c83881 Merge #463: Reduce usage of hardcoded size constants
02f5001dfc Merge #490: Disambiguate bench functions and types
1f46d6089e Disambiguate bench functions and types
f54c6c5083 Merge #480: Enable benchmark building by default
c77fc08597 Merge #486: Add pippenger_wnaf for multi-multiplication
d2f9c6b5dc Use more precise pippenger bucket windows
4c950bbeaf Save some additions per window in _pippenger_wnaf
a58f543f5a Add flags for choosing algorithm in ecmult_multi benchmark
36b22c9337 Use scratch space dependent batching in ecmult_multi
355a38f113 Add pippenger_wnaf ecmult_multi
bc65aa794e Add bench_ecmult
dba5471b69 Add ecmult_multi tests
8c1c831bdb Generalize Strauss to support multiple points
548de42ecf add resizeable scratch space API
0e96cdc6b6 fix typo, s/changed/unchanged
c7680e570f Reduce usage of hardcoded size constants
6ad5cdb42a Merge #479: Get rid of reserved _t in type names
7a78f60598 Print whether we're building benchmarks
4afec9f1ae Build benchmarks by default
d1dc9dfc0a Get rid of reserved _t in type names
0b70241850 Merge #474: Fix header guards using reserved identifiers
ab1f89f00a Merge #478: Fixed multiple typos
8c7ea22d54 Fixed multiple typos
abe2d3e84b Fix header guards using reserved identifiers
57752d28b3 [build] Set --enable-jni to no by default instead of auto.
f532bdc9f7 Merge #459: Add pubkey prefix constants to include/secp256k1.h
cac7c5559d Merge #470: Fix wnaf_const documentation
768514bac0 Fix wnaf_const documentation with respect to return value and number of words set
b8c26a3990 Merge #458: Fix typo in API documentation
817fb2013a Merge #440: Fix typos
12230f90ed Merge #468: Remove redundant conditional expression
2e1ccdca0d Remove redundant conditional expression
e7daa9b3c2 [build] Tweak JNI macro to warn instead of error for JNI not found.
5b22977922 [build] Update ax_jni_include_dir.m4 macro to deal with recent versions of macOS
bc61b91aca add pubkey prefix constants to include/secp256k1.h
b0452e664b Fix typo in API documentation
84973d393a Merge #454: Remove residual parts from the schnorr expirement.
5e95bf2285 Remove residual parts from the schnorr expirement.
cbc20b8c34 Merge #452: Minor optimizations to _scalar_inverse to save 4M
4cc8f52505 Merge #437: Unroll secp256k1_fe_(get|set)_b32 to make them much faster.
465159c278 Further shorten the addition chain for scalar inversion.
a2b6b1914f Fix benchmark print_number infinite loop.
8b7680a826 Unroll secp256k1_fe_(get|set)_b32 for 10x26.
aa8499080e Unroll secp256k1_fe_(get|set)_b32 for 5x52.
cf12fa13cb Minor optimizations to _scalar_inverse to save 4M
119949232a Merge #408: Add `secp256k1_ec_pubkey_negate` and `secp256k1_ec_privkey_negate`
6af0871070 Merge #441: secp256k1_context_randomize: document.
ab31a524b4 Merge #444: test: Use checked_alloc
eda5c1a062 Merge #449: Remove executable bit from secp256k1.c
51b77ae619 Remove executable bit from secp256k1.c
5eb030ca41 test: Use checked_alloc
72d952c9c4 FIXUP: Missing "is"
70ff29b6a7 secp256k1_context_randomize: document.
4c0f32ed51 Fix typo: "Agressive" → "Aggressive"
73aca8364f Fix typo: "exectured" → "executed"
9d560f992d Merge #428: Exhaustive recovery
8e48aa60dc Add `secp256k1_ec_pubkey_negate` and `secp256k1_ec_privkey_negate`
2cee5fd4c9 exhaustive tests: add recovery module
678b0e5466 exhaustive tests: remove erroneous comment from ecdsa_sig_sign
03ff8c2d0a group_impl.h: remove unused `secp256k1_ge_set_infinity` function
a724d7296d configure: add --enable-coverage to set options for coverage analysis
b595163992 recovery: add tests to cover API misusage
6f8ae2f3c0 ecdh: test NULL-checking of arguments
25e3cfbf9b ecdsa_impl: replace scalar if-checks with VERIFY_CHECKs in ecdsa_sig_sign

git-subtree-dir: src/secp256k1
git-subtree-split: 44c2452fd387f7ca604ab42d73746e7d3a44d8a2
str4d added a commit to str4d/zcash that referenced this pull request Sep 27, 2022
1758a92ffd Merge zcash#950: ci: Add ppc64le build
c58c4ea470 ci: Add ppc64le build
7973576f6e Merge zcash#662: Add ecmult_gen, ecmult_const and ecmult to benchmark
8f879c2887 Fix array size in bench_ecmult
2fe1b50df1 Add ecmult_gen, ecmult_const and ecmult to benchmark
593e6bad9c Clean up ecmult_bench to make space for more benchmarks
50f3367712 Merge zcash#947: ci: Run PRs on merge result even for i686
a35fdd3478 ci: Run PRs on merge result even for i686
3dc8c072b6 Merge zcash#846: ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
02dcea1ad9 ci: Make test iterations configurable and tweak for sanitizer builds
489ff5c20a tests: Treat empty SECP2561_TEST_ITERS as if it was unset
fcfcb97e74 ci: Simplify to use generic wrapper for QEMU, Valgrind, etc
de4157f13a ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs
399722a63a Merge zcash#941: Clean up git tree
09b3bb8648 Clean up git tree
bf0ac46066 Merge zcash#930: Add ARM32/ARM64 CI
202a030f7d Merge zcash#850: add `secp256k1_ec_pubkey_cmp` method
1e78c18d5b Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards
69394879b6 Merge zcash#926: secp256k1.h: clarify that by default arguments must be != NULL
6eceec6d56 add `secp256k1_xonly_pubkey_cmp` method
0d9561ae87 add `secp256k1_ec_pubkey_cmp` method
22a9ea154a contrib: Explain explicit header guards
6c52ae8724 Merge zcash#937: Have ge_set_gej_var, gej_double_var and ge_set_all_gej_var initialize all fields of their outputs.
185a6af227 Merge zcash#925: changed include statements without prefix 'include/'
14c9739a1f tests: Improve secp256k1_ge_set_all_gej_var for some infinity inputs
4a19668c37 tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs
3c90bdda95 change local lib headers to be relative for those pointing at "include/" dir
45b6468d7e Have secp256k1_ge_set_all_gej_var initialize all fields. Previous behaviour would not initialize r->y values in the case where infinity is passed in. Furthermore, the previous behaviour wouldn't initialize anything in the case where all inputs were infinity.
31c0f6de41 Have secp256k1_gej_double_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
dd6c3de322 Have secp256k1_ge_set_gej_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
d0bd2693e3 Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM
8bbad7a18e Add asm build to ARM32 CI
7d65ed5214 Add ARM32/ARM64 CI
c8483520c9 Makefile.am: Don't pass a variable twice
2161f31785 Makefile.am: Honor config when building gen_context
99f47c20ec gen_context: Don't use external ASM because it complicates the build
98e0358d29 Merge zcash#933: Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers
99e2d5be0d Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers.
34388af6b6 Merge zcash#922: Add mingw32-w64/wine CI build
7012a188e6 Merge zcash#928: Define SECP256K1_BUILD in secp256k1.c directly.
ed5a199bed tests: fopen /dev/urandom in binary mode
ae9e648526 Define SECP256K1_BUILD in secp256k1.c directly.
4dc37bf81b Add mingw32-w64/wine CI build
0881633dfd secp256k1.h: clarify that by default arguments must be != NULL

git-subtree-dir: src/secp256k1
git-subtree-split: 1758a92ffd896af533b142707e9892ea6e15e5db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants