-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Don't export symbols in static libraries #1105
Conversation
libtool takes care of building both object versions, we just need to pick the right one to export symbols.
In case it's not obvious because a It's a libtool convention.
|
Re-scoping to Windows only for this PR. |
You have angered the CI gods. |
Yeah, this might take some exploring. I pushed
Converting to a draft while I poke around. |
Not sure what other changes made compilation on CI fail but Concept ACK 6f6cab9. This should be entirely harmless. |
Concept ACK |
Concept ACK. |
Thanks for having a look. Agreed the first commit (the one that's there now) is correct and I'll leave the non-Windows side alone for now. I may follow-up with a PR for an escape-hatch define for non-Windows static libs if we need one for Core, but only if it turns out to actually be necessary. Sorry for the noise, marking as ready for review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 6f6cab9
utACK 6f6cab9 |
This makes sense (also for non-windows platforms, but i guess we'll get to that later). |
44c2452 Merge bitcoin-core/secp256k1#1105: Don't export symbols in static libraries 6f6cab9 abi: Don't export symbols in static Windows libraries 485f608 Merge bitcoin-core/secp256k1#1104: Fix the false positive of `SECP_64BIT_ASM_CHECK` 8b013fc Merge bitcoin-core/secp256k1#1056: Save negations in var-time group addition 7efc983 Fix the false positive of `SECP_64BIT_ASM_CHECK` 2f984ff Save negations in var-time group addition git-subtree-dir: src/secp256k1 git-subtree-split: 44c2452
44c2452 Merge bitcoin-core/secp256k1#1105: Don't export symbols in static libraries 6f6cab9 abi: Don't export symbols in static Windows libraries 485f608 Merge bitcoin-core/secp256k1#1104: Fix the false positive of `SECP_64BIT_ASM_CHECK` 8b013fc Merge bitcoin-core/secp256k1#1056: Save negations in var-time group addition 7efc983 Fix the false positive of `SECP_64BIT_ASM_CHECK` 2f984ff Save negations in var-time group addition git-subtree-dir: src/secp256k1 git-subtree-split: 44c2452
44c2452 Merge bitcoin-core/secp256k1#1105: Don't export symbols in static libraries 6f6cab9 abi: Don't export symbols in static Windows libraries 485f608 Merge bitcoin-core/secp256k1#1104: Fix the false positive of `SECP_64BIT_ASM_CHECK` 8b013fc Merge bitcoin-core/secp256k1#1056: Save negations in var-time group addition 7efc983 Fix the false positive of `SECP_64BIT_ASM_CHECK` 2f984ff Save negations in var-time group addition git-subtree-dir: src/secp256k1 git-subtree-split: 44c2452
… upstream secp256k1 changes c41bfd1 Squashed 'src/secp256k1/' changes from 8746600ee..44c2452fd (fanquake) fbae8c5 compat: Consolidate mingw-w64 ASLR workaround for upstream libsecp changes (fanquake) Pull request description: #18702 added a work around for `bitcoin-cli.exe`, to fix ASLR on Windows. ASLR was functioning for the rest of our binaries, mostly by accident, because: > [All other Windows binaries that we distribute (bitcoind, bitcoin-qt, bitcoin-wallet, bitcoin-tx and test_bitcoin) do not suffer this issue, and currently having working ASLR. This is due to them exporting (inadvertent or not) libsecp256k1 symbols, and, as a result, the .reloc section is not stripped by ld.](bitcoin/bitcoin#18702) Upstream, libsecp256k1 has recently made a change to [no-longer export symbols in static libraries](bitcoin-core/secp256k1#1105) (see related discussion in #25008). This would mean that on the next subtree update, anyone building using an older binutils (< 2.36) would be (silently) producing Windows binaries with non-functioning ASLR. Our release binaries would not be affected, as in our Guix environment we currently use binutils 2.37. To prevent users building with older binutils from silently losing ASLR on Windows, this PR applies our work around (export `main`) to the rest of our binaries, and updates the associated documentation to mention the affected binutils versions, so we know when it can be dropped. I've included both the libsecp256k1 subtree update, and the ASLR related changes in this PR. Happy to split the changes up if reviewers would prefer. Guix Build (x86_64): ```bash 24fa1053fa3d310c4274f0700ac36f3c6e5b4486dc7f1aa7b2a5ded6937cf2b6 guix-build-913b1f2a5eb2/output/aarch64-linux-gnu/SHA256SUMS.part 96c4150f93c1356dc02f3d383699bcd856da7f769344606324fdc111fbfa8031 guix-build-913b1f2a5eb2/output/aarch64-linux-gnu/bitcoin-913b1f2a5eb2-aarch64-linux-gnu-debug.tar.gz 5e4adcaddf20a33cd4803e5a10f9a0653bcd40b1dfc7b680a741a17047103948 guix-build-913b1f2a5eb2/output/aarch64-linux-gnu/bitcoin-913b1f2a5eb2-aarch64-linux-gnu.tar.gz adfdac8fef797b13d845c13ab682611d0cc49a9772c2bd40f7aa6dbb1b4f11a8 guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/SHA256SUMS.part d51849bf907eecb168066a208b702314779fc12ae6fcaa8b5c2c3497e91820b9 guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/bitcoin-913b1f2a5eb2-arm-linux-gnueabihf-debug.tar.gz ca33ebed13316410d6d79e2db06f9bce8839fbc7216a5bc01a06745b2e470c2e guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/bitcoin-913b1f2a5eb2-arm-linux-gnueabihf.tar.gz 799fd15fa1e53d773a5ce391b7059920b54680591ee76bdc56bc7485a12d2af6 guix-build-913b1f2a5eb2/output/arm64-apple-darwin/SHA256SUMS.part 0122eb5fdd4cce7077ee1a2bba8c5bd3557c1d3f12f2f2aad7216de33bea213e guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin-unsigned.dmg 3a630cc96bf9a43cbb89976aabdddb7a9069f74320277a499f3bbb96526d9c5d guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin-unsigned.tar.gz e2530bab501750fd3d60776ba077bc4a8b145cc95e3a77105d86b388a1d961e1 guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin.tar.gz f8fbc07221bd21f996dc29c65725740e9c2bfc9365367c806601f12b8e2d2691 guix-build-913b1f2a5eb2/output/dist-archive/bitcoin-913b1f2a5eb2.tar.gz fdbc8224d774f2428f037e65d9ac5728613cddee4ddcf6f1d144421cb1f37b3b guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/SHA256SUMS.part c1098cba38aee264ee7de82be3d5f8c1ec2c915c30763292fa9b6dc37aba8de8 guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64-linux-gnu-debug.tar.gz 567b8bf896a79e2f1b4961ec4f6c3501e414822f84f6fb40c9e3546e67ab08ff guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64-linux-gnu.tar.gz cbd7713550c5922ee28e0915b0425dc702bb299ad6809ff60e389604f4da3a31 guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/SHA256SUMS.part e50fa6e370602a956942703ab349808c01e7365a00faead941d9e6be3800c65c guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64le-linux-gnu-debug.tar.gz 2380fbdf6916769783a0e6c7848fb8d3b3cb5c44c26817009a8481e815098e3a guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64le-linux-gnu.tar.gz a0fecb7b0d0a93aa15825572a0e1284f4776a5808f9f5eda7b2ddddaf2457fb2 guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/SHA256SUMS.part 14fe505f06de009b50c2b4ce0e0430ba09fa66385ff50aa90f9ed0b03a321e61 guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/bitcoin-913b1f2a5eb2-riscv64-linux-gnu-debug.tar.gz 98a70df9a6851d5221d8f8404f9656048ecf7cac2c9dffd2b6a55107783a60ad guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/bitcoin-913b1f2a5eb2-riscv64-linux-gnu.tar.gz decb20f8de61e3eeda7e8f6fefcbaf56593c37d989672c6e7e2cd5c8e982c342 guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/SHA256SUMS.part e14275e1bbbe54179fb68b50ed7c72de4c7ebc5b442c7793daf9974be523e8da guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin-unsigned.dmg 6bb2d9f6c8123156b0e11b73f67f4e4e780e6bccb739e600f4e9b06b29aa3832 guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin-unsigned.tar.gz 1f0fab16e32e4c9892b272edf43beb8e5de60bf8a04f41744809dc2a31b4f1b9 guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin.tar.gz 3d7e45c7189a8855ea8a0d498dcd4d3189aa01c528eac194300cdb59f79471f2 guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/SHA256SUMS.part 87b75a47a620dbd8ccf20768a3d82adf0b797ad86b7384cca62a7cf489b7a74c guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/bitcoin-913b1f2a5eb2-x86_64-linux-gnu-debug.tar.gz 7e06af11bcef3ba6fd48501a09fbac86746537bad063f36caf39cd6bb857d3a8 guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/bitcoin-913b1f2a5eb2-x86_64-linux-gnu.tar.gz c9ca794f7307df6f891008d92997719be95794f4670d018d0275f2a6c580d160 guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/SHA256SUMS.part 7eb1551cdafc0a44e5b5fcea703c6eeb6fc0bca601b57ab52d1e5e62db3ccffc guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-debug.zip 8ef87c85c520aef150f4c11a9082e8a0b1ac74c5b6f4fcdceb9e734eb8106bca guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-setup-unsigned.exe c5886ab3d6303bf8c946e4aafcfdfb5ee7dc9fbb50c34dfc5224db2f1f3b2a44 guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-unsigned.tar.gz f473902cea9e763b98ad69c5dcfaa990430f9b0f777112af5f1d289492d8cefe guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64.zip ``` Guix Build (arm64): ```bash a175ce0055b206fe7b2752fa5ae33eed0f31236f7b37bbb530425532d88007c2 guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/SHA256SUMS.part 1ab5d59685593eedbb59b5284d81cce568a6c9c900303f97c69e8194cb5bb7f5 guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/bitcoin-913b1f2a5eb2-arm-linux-gnueabihf-debug.tar.gz 8d1b48d38b8af696b929ac077ba7e3dabb7c565862409b2f35db2217ab9bdb06 guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/bitcoin-913b1f2a5eb2-arm-linux-gnueabihf.tar.gz 90230652cb39e2707ac79569899183dc1ff5d08c059e7a01d0c65144251679b5 guix-build-913b1f2a5eb2/output/arm64-apple-darwin/SHA256SUMS.part 2b86da5e1ccebf348478ca69463d1be09c0f563ffa370ee5170c82ba706a7577 guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin-unsigned.dmg 648e968dbf3af3bf8a79d714f4395091058e2ff4294b202a0dc9b5e0092b4732 guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin-unsigned.tar.gz bebe7ed21e4f74866ca99be31839beff01eac57afbaa2878f5c6637f0239c631 guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin.tar.gz f8fbc07221bd21f996dc29c65725740e9c2bfc9365367c806601f12b8e2d2691 guix-build-913b1f2a5eb2/output/dist-archive/bitcoin-913b1f2a5eb2.tar.gz 87156fe1fb397eaa1d1f15c36f2677b6aeb32eefac02202b2735f7d3165fceb1 guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/SHA256SUMS.part 5f06e885564780d7dce78cc8cbb21b8dd5addba8b90bb2b8a7f03e946b6ed633 guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64-linux-gnu-debug.tar.gz 95b9c0a7d82e7055c99d013fa183abf654caf14539c5ec9cfe785838f45747fc guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64-linux-gnu.tar.gz 8da6f0fb2bdc492f96ee70ca323787521e7fce7ebe2b9adb43b7b6ae56ff1916 guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/SHA256SUMS.part a60623ac5bb76b3eae3129b4f32fe7287e526e043bd2e58f80ce5fccf91ef20c guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64le-linux-gnu-debug.tar.gz c9bbdca3c41c3783d57734e0fda875a6353bbf8fec8c8e61f037259acaad28cd guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64le-linux-gnu.tar.gz 5f76aef2eed312153b60712450b4376b4965c2b0c86d2ddfc0b7f3d23fb31eee guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/SHA256SUMS.part 40ad7ca605bb75e153a481a455b344f27d9c0b713f1312fc2a7703116508a127 guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/bitcoin-913b1f2a5eb2-riscv64-linux-gnu-debug.tar.gz 6031d28d6405f03b685884fdee6c2cc2126afffdc867ab743ca0c9cfcad81ac2 guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/bitcoin-913b1f2a5eb2-riscv64-linux-gnu.tar.gz decb20f8de61e3eeda7e8f6fefcbaf56593c37d989672c6e7e2cd5c8e982c342 guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/SHA256SUMS.part e14275e1bbbe54179fb68b50ed7c72de4c7ebc5b442c7793daf9974be523e8da guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin-unsigned.dmg 6bb2d9f6c8123156b0e11b73f67f4e4e780e6bccb739e600f4e9b06b29aa3832 guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin-unsigned.tar.gz 1f0fab16e32e4c9892b272edf43beb8e5de60bf8a04f41744809dc2a31b4f1b9 guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin.tar.gz b90d8c7252fd42809ac9bf8c7e5cf9c9207f7412314e9e6904ee2e51222bc8c5 guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/SHA256SUMS.part b6cbcd305a9b6b8dcc6be71703745835c9e3e7652a3f3b18e7018f5ddb0fc26d guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/bitcoin-913b1f2a5eb2-x86_64-linux-gnu-debug.tar.gz 6da0cf8fedd9c285926c132102d1e8f9d6fde7e0ecdac3ba159a3464fc2e98c0 guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/bitcoin-913b1f2a5eb2-x86_64-linux-gnu.tar.gz 30d2b25cdfce03edc2bfb8d39dcdcc6636ed3637cc0176f43f715dc795ab929e guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/SHA256SUMS.part 6028017fabcddac50857667d63da979b04a6dc331a26715f875e2db96b8935d7 guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-debug.zip 8ef87c85c520aef150f4c11a9082e8a0b1ac74c5b6f4fcdceb9e734eb8106bca guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-setup-unsigned.exe c5886ab3d6303bf8c946e4aafcfdfb5ee7dc9fbb50c34dfc5224db2f1f3b2a44 guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-unsigned.tar.gz 4af0477e156b9a0c6fa1754ba7446b8c6c021075531aa4051980e47fa586e196 guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64.zip ``` Symbol exporting as of this PR (`bitcoind.exe`): ```bash Export Table: DLL name: bitcoind.exe Ordinal base: 1 Ordinal RVA Name 1 0xa09670 main ``` Symbol exporting in the 23.0 bins (`bitcoind.exe`): ```bash Export Table: DLL name: bitcoind.exe Ordinal base: 1 Ordinal RVA Name 1 0x5569f0 secp256k1_context_clone 2 0x556890 secp256k1_context_create 3 0x556bd0 secp256k1_context_destroy 4 0xa12710 secp256k1_context_no_precomp 5 0x556900 secp256k1_context_preallocated_clone 6 0x556740 secp256k1_context_preallocated_clone_size 7 0x556750 secp256k1_context_preallocated_create 8 0x556ae0 secp256k1_context_preallocated_destroy 9 0x556710 secp256k1_context_preallocated_size 10 0x5589c0 secp256k1_context_randomize 11 0x556c80 secp256k1_context_set_error_callback 12 0x556c20 secp256k1_context_set_illegal_callback 13 0x558260 secp256k1_ec_privkey_negate 14 0x5584e0 secp256k1_ec_privkey_tweak_add 15 0x558730 secp256k1_ec_privkey_tweak_mul 16 0x5572a0 secp256k1_ec_pubkey_cmp 17 0x5589f0 secp256k1_ec_pubkey_combine 18 0x557f40 secp256k1_ec_pubkey_create 19 0x558270 secp256k1_ec_pubkey_negate 20 0x556dc0 secp256k1_ec_pubkey_parse 21 0x5570d0 secp256k1_ec_pubkey_serialize 22 0x5584f0 secp256k1_ec_pubkey_tweak_add 23 0x558740 secp256k1_ec_pubkey_tweak_mul 24 0x558100 secp256k1_ec_seckey_negate 25 0x5583a0 secp256k1_ec_seckey_tweak_add 26 0x5585f0 secp256k1_ec_seckey_tweak_mul 27 0x557ed0 secp256k1_ec_seckey_verify 28 0x559120 secp256k1_ecdsa_recover 29 0x558f50 secp256k1_ecdsa_recoverable_signature_convert 30 0x558d00 secp256k1_ecdsa_recoverable_signature_parse_compact 31 0x558e70 secp256k1_ecdsa_recoverable_signature_serialize_compact 32 0x557da0 secp256k1_ecdsa_sign 33 0x558fe0 secp256k1_ecdsa_sign_recoverable 34 0x557ab0 secp256k1_ecdsa_signature_normalize 35 0x557540 secp256k1_ecdsa_signature_parse_compact 36 0x5573b0 secp256k1_ecdsa_signature_parse_der 37 0x557a10 secp256k1_ecdsa_signature_serialize_compact 38 0x557660 secp256k1_ecdsa_signature_serialize_der 39 0x557bf0 secp256k1_ecdsa_verify 40 0x5598a0 secp256k1_keypair_create 41 0x559af0 secp256k1_keypair_pub 42 0x559a60 secp256k1_keypair_sec 43 0x559bc0 secp256k1_keypair_xonly_pub 44 0x559d20 secp256k1_keypair_xonly_tweak_add 45 0xa9e0c0 secp256k1_nonce_function_bip340 46 0xa9e0e0 secp256k1_nonce_function_default 47 0xa9e0e8 secp256k1_nonce_function_rfc6979 48 0x559f00 secp256k1_schnorrsig_sign 49 0x559f30 secp256k1_schnorrsig_sign_custom 50 0x559fd0 secp256k1_schnorrsig_verify 51 0x556ce0 secp256k1_scratch_space_create 52 0x556d50 secp256k1_scratch_space_destroy 53 0x558c20 secp256k1_tagged_sha256 54 0x559470 secp256k1_xonly_pubkey_cmp 55 0x559530 secp256k1_xonly_pubkey_from_pubkey 56 0x559290 secp256k1_xonly_pubkey_parse 57 0x5593a0 secp256k1_xonly_pubkey_serialize 58 0x559650 secp256k1_xonly_pubkey_tweak_add 59 0x559780 secp256k1_xonly_pubkey_tweak_add_check ``` ACKs for top commit: laanwj: Code review ACK 913b1f2 theuni: ACK 913b1f2 Tree-SHA512: d3811c5731fab05bb68af72b7af231de8505b026bd1b2cd710e3e60386e793c2743412529142aa9893893f9d24c6e94dbac48ea59451bf55ae637d2e75e2b0a9
…m secp256k1 changes c41bfd1 Squashed 'src/secp256k1/' changes from 8746600..44c2452 (fanquake) fbae8c5 compat: Consolidate mingw-w64 ASLR workaround for upstream libsecp changes (fanquake) Pull request description: bitcoin#18702 added a work around for `bitcoin-cli.exe`, to fix ASLR on Windows. ASLR was functioning for the rest of our binaries, mostly by accident, because: > [All other Windows binaries that we distribute (bitcoind, bitcoin-qt, bitcoin-wallet, bitcoin-tx and test_bitcoin) do not suffer this issue, and currently having working ASLR. This is due to them exporting (inadvertent or not) libsecp256k1 symbols, and, as a result, the .reloc section is not stripped by ld.](bitcoin#18702) Upstream, libsecp256k1 has recently made a change to [no-longer export symbols in static libraries](bitcoin-core/secp256k1#1105) (see related discussion in bitcoin#25008). This would mean that on the next subtree update, anyone building using an older binutils (< 2.36) would be (silently) producing Windows binaries with non-functioning ASLR. Our release binaries would not be affected, as in our Guix environment we currently use binutils 2.37. To prevent users building with older binutils from silently losing ASLR on Windows, this PR applies our work around (export `main`) to the rest of our binaries, and updates the associated documentation to mention the affected binutils versions, so we know when it can be dropped. I've included both the libsecp256k1 subtree update, and the ASLR related changes in this PR. Happy to split the changes up if reviewers would prefer. Guix Build (x86_64): ```bash 24fa1053fa3d310c4274f0700ac36f3c6e5b4486dc7f1aa7b2a5ded6937cf2b6 guix-build-913b1f2a5eb2/output/aarch64-linux-gnu/SHA256SUMS.part 96c4150f93c1356dc02f3d383699bcd856da7f769344606324fdc111fbfa8031 guix-build-913b1f2a5eb2/output/aarch64-linux-gnu/bitcoin-913b1f2a5eb2-aarch64-linux-gnu-debug.tar.gz 5e4adcaddf20a33cd4803e5a10f9a0653bcd40b1dfc7b680a741a17047103948 guix-build-913b1f2a5eb2/output/aarch64-linux-gnu/bitcoin-913b1f2a5eb2-aarch64-linux-gnu.tar.gz adfdac8fef797b13d845c13ab682611d0cc49a9772c2bd40f7aa6dbb1b4f11a8 guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/SHA256SUMS.part d51849bf907eecb168066a208b702314779fc12ae6fcaa8b5c2c3497e91820b9 guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/bitcoin-913b1f2a5eb2-arm-linux-gnueabihf-debug.tar.gz ca33ebed13316410d6d79e2db06f9bce8839fbc7216a5bc01a06745b2e470c2e guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/bitcoin-913b1f2a5eb2-arm-linux-gnueabihf.tar.gz 799fd15fa1e53d773a5ce391b7059920b54680591ee76bdc56bc7485a12d2af6 guix-build-913b1f2a5eb2/output/arm64-apple-darwin/SHA256SUMS.part 0122eb5fdd4cce7077ee1a2bba8c5bd3557c1d3f12f2f2aad7216de33bea213e guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin-unsigned.dmg 3a630cc96bf9a43cbb89976aabdddb7a9069f74320277a499f3bbb96526d9c5d guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin-unsigned.tar.gz e2530bab501750fd3d60776ba077bc4a8b145cc95e3a77105d86b388a1d961e1 guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin.tar.gz f8fbc07221bd21f996dc29c65725740e9c2bfc9365367c806601f12b8e2d2691 guix-build-913b1f2a5eb2/output/dist-archive/bitcoin-913b1f2a5eb2.tar.gz fdbc8224d774f2428f037e65d9ac5728613cddee4ddcf6f1d144421cb1f37b3b guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/SHA256SUMS.part c1098cba38aee264ee7de82be3d5f8c1ec2c915c30763292fa9b6dc37aba8de8 guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64-linux-gnu-debug.tar.gz 567b8bf896a79e2f1b4961ec4f6c3501e414822f84f6fb40c9e3546e67ab08ff guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64-linux-gnu.tar.gz cbd7713550c5922ee28e0915b0425dc702bb299ad6809ff60e389604f4da3a31 guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/SHA256SUMS.part e50fa6e370602a956942703ab349808c01e7365a00faead941d9e6be3800c65c guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64le-linux-gnu-debug.tar.gz 2380fbdf6916769783a0e6c7848fb8d3b3cb5c44c26817009a8481e815098e3a guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64le-linux-gnu.tar.gz a0fecb7b0d0a93aa15825572a0e1284f4776a5808f9f5eda7b2ddddaf2457fb2 guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/SHA256SUMS.part 14fe505f06de009b50c2b4ce0e0430ba09fa66385ff50aa90f9ed0b03a321e61 guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/bitcoin-913b1f2a5eb2-riscv64-linux-gnu-debug.tar.gz 98a70df9a6851d5221d8f8404f9656048ecf7cac2c9dffd2b6a55107783a60ad guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/bitcoin-913b1f2a5eb2-riscv64-linux-gnu.tar.gz decb20f8de61e3eeda7e8f6fefcbaf56593c37d989672c6e7e2cd5c8e982c342 guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/SHA256SUMS.part e14275e1bbbe54179fb68b50ed7c72de4c7ebc5b442c7793daf9974be523e8da guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin-unsigned.dmg 6bb2d9f6c8123156b0e11b73f67f4e4e780e6bccb739e600f4e9b06b29aa3832 guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin-unsigned.tar.gz 1f0fab16e32e4c9892b272edf43beb8e5de60bf8a04f41744809dc2a31b4f1b9 guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin.tar.gz 3d7e45c7189a8855ea8a0d498dcd4d3189aa01c528eac194300cdb59f79471f2 guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/SHA256SUMS.part 87b75a47a620dbd8ccf20768a3d82adf0b797ad86b7384cca62a7cf489b7a74c guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/bitcoin-913b1f2a5eb2-x86_64-linux-gnu-debug.tar.gz 7e06af11bcef3ba6fd48501a09fbac86746537bad063f36caf39cd6bb857d3a8 guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/bitcoin-913b1f2a5eb2-x86_64-linux-gnu.tar.gz c9ca794f7307df6f891008d92997719be95794f4670d018d0275f2a6c580d160 guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/SHA256SUMS.part 7eb1551cdafc0a44e5b5fcea703c6eeb6fc0bca601b57ab52d1e5e62db3ccffc guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-debug.zip 8ef87c85c520aef150f4c11a9082e8a0b1ac74c5b6f4fcdceb9e734eb8106bca guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-setup-unsigned.exe c5886ab3d6303bf8c946e4aafcfdfb5ee7dc9fbb50c34dfc5224db2f1f3b2a44 guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-unsigned.tar.gz f473902cea9e763b98ad69c5dcfaa990430f9b0f777112af5f1d289492d8cefe guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64.zip ``` Guix Build (arm64): ```bash a175ce0055b206fe7b2752fa5ae33eed0f31236f7b37bbb530425532d88007c2 guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/SHA256SUMS.part 1ab5d59685593eedbb59b5284d81cce568a6c9c900303f97c69e8194cb5bb7f5 guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/bitcoin-913b1f2a5eb2-arm-linux-gnueabihf-debug.tar.gz 8d1b48d38b8af696b929ac077ba7e3dabb7c565862409b2f35db2217ab9bdb06 guix-build-913b1f2a5eb2/output/arm-linux-gnueabihf/bitcoin-913b1f2a5eb2-arm-linux-gnueabihf.tar.gz 90230652cb39e2707ac79569899183dc1ff5d08c059e7a01d0c65144251679b5 guix-build-913b1f2a5eb2/output/arm64-apple-darwin/SHA256SUMS.part 2b86da5e1ccebf348478ca69463d1be09c0f563ffa370ee5170c82ba706a7577 guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin-unsigned.dmg 648e968dbf3af3bf8a79d714f4395091058e2ff4294b202a0dc9b5e0092b4732 guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin-unsigned.tar.gz bebe7ed21e4f74866ca99be31839beff01eac57afbaa2878f5c6637f0239c631 guix-build-913b1f2a5eb2/output/arm64-apple-darwin/bitcoin-913b1f2a5eb2-arm64-apple-darwin.tar.gz f8fbc07221bd21f996dc29c65725740e9c2bfc9365367c806601f12b8e2d2691 guix-build-913b1f2a5eb2/output/dist-archive/bitcoin-913b1f2a5eb2.tar.gz 87156fe1fb397eaa1d1f15c36f2677b6aeb32eefac02202b2735f7d3165fceb1 guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/SHA256SUMS.part 5f06e885564780d7dce78cc8cbb21b8dd5addba8b90bb2b8a7f03e946b6ed633 guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64-linux-gnu-debug.tar.gz 95b9c0a7d82e7055c99d013fa183abf654caf14539c5ec9cfe785838f45747fc guix-build-913b1f2a5eb2/output/powerpc64-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64-linux-gnu.tar.gz 8da6f0fb2bdc492f96ee70ca323787521e7fce7ebe2b9adb43b7b6ae56ff1916 guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/SHA256SUMS.part a60623ac5bb76b3eae3129b4f32fe7287e526e043bd2e58f80ce5fccf91ef20c guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64le-linux-gnu-debug.tar.gz c9bbdca3c41c3783d57734e0fda875a6353bbf8fec8c8e61f037259acaad28cd guix-build-913b1f2a5eb2/output/powerpc64le-linux-gnu/bitcoin-913b1f2a5eb2-powerpc64le-linux-gnu.tar.gz 5f76aef2eed312153b60712450b4376b4965c2b0c86d2ddfc0b7f3d23fb31eee guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/SHA256SUMS.part 40ad7ca605bb75e153a481a455b344f27d9c0b713f1312fc2a7703116508a127 guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/bitcoin-913b1f2a5eb2-riscv64-linux-gnu-debug.tar.gz 6031d28d6405f03b685884fdee6c2cc2126afffdc867ab743ca0c9cfcad81ac2 guix-build-913b1f2a5eb2/output/riscv64-linux-gnu/bitcoin-913b1f2a5eb2-riscv64-linux-gnu.tar.gz decb20f8de61e3eeda7e8f6fefcbaf56593c37d989672c6e7e2cd5c8e982c342 guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/SHA256SUMS.part e14275e1bbbe54179fb68b50ed7c72de4c7ebc5b442c7793daf9974be523e8da guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin-unsigned.dmg 6bb2d9f6c8123156b0e11b73f67f4e4e780e6bccb739e600f4e9b06b29aa3832 guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin-unsigned.tar.gz 1f0fab16e32e4c9892b272edf43beb8e5de60bf8a04f41744809dc2a31b4f1b9 guix-build-913b1f2a5eb2/output/x86_64-apple-darwin/bitcoin-913b1f2a5eb2-x86_64-apple-darwin.tar.gz b90d8c7252fd42809ac9bf8c7e5cf9c9207f7412314e9e6904ee2e51222bc8c5 guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/SHA256SUMS.part b6cbcd305a9b6b8dcc6be71703745835c9e3e7652a3f3b18e7018f5ddb0fc26d guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/bitcoin-913b1f2a5eb2-x86_64-linux-gnu-debug.tar.gz 6da0cf8fedd9c285926c132102d1e8f9d6fde7e0ecdac3ba159a3464fc2e98c0 guix-build-913b1f2a5eb2/output/x86_64-linux-gnu/bitcoin-913b1f2a5eb2-x86_64-linux-gnu.tar.gz 30d2b25cdfce03edc2bfb8d39dcdcc6636ed3637cc0176f43f715dc795ab929e guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/SHA256SUMS.part 6028017fabcddac50857667d63da979b04a6dc331a26715f875e2db96b8935d7 guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-debug.zip 8ef87c85c520aef150f4c11a9082e8a0b1ac74c5b6f4fcdceb9e734eb8106bca guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-setup-unsigned.exe c5886ab3d6303bf8c946e4aafcfdfb5ee7dc9fbb50c34dfc5224db2f1f3b2a44 guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64-unsigned.tar.gz 4af0477e156b9a0c6fa1754ba7446b8c6c021075531aa4051980e47fa586e196 guix-build-913b1f2a5eb2/output/x86_64-w64-mingw32/bitcoin-913b1f2a5eb2-win64.zip ``` Symbol exporting as of this PR (`bitcoind.exe`): ```bash Export Table: DLL name: bitcoind.exe Ordinal base: 1 Ordinal RVA Name 1 0xa09670 main ``` Symbol exporting in the 23.0 bins (`bitcoind.exe`): ```bash Export Table: DLL name: bitcoind.exe Ordinal base: 1 Ordinal RVA Name 1 0x5569f0 secp256k1_context_clone 2 0x556890 secp256k1_context_create 3 0x556bd0 secp256k1_context_destroy 4 0xa12710 secp256k1_context_no_precomp 5 0x556900 secp256k1_context_preallocated_clone 6 0x556740 secp256k1_context_preallocated_clone_size 7 0x556750 secp256k1_context_preallocated_create 8 0x556ae0 secp256k1_context_preallocated_destroy 9 0x556710 secp256k1_context_preallocated_size 10 0x5589c0 secp256k1_context_randomize 11 0x556c80 secp256k1_context_set_error_callback 12 0x556c20 secp256k1_context_set_illegal_callback 13 0x558260 secp256k1_ec_privkey_negate 14 0x5584e0 secp256k1_ec_privkey_tweak_add 15 0x558730 secp256k1_ec_privkey_tweak_mul 16 0x5572a0 secp256k1_ec_pubkey_cmp 17 0x5589f0 secp256k1_ec_pubkey_combine 18 0x557f40 secp256k1_ec_pubkey_create 19 0x558270 secp256k1_ec_pubkey_negate 20 0x556dc0 secp256k1_ec_pubkey_parse 21 0x5570d0 secp256k1_ec_pubkey_serialize 22 0x5584f0 secp256k1_ec_pubkey_tweak_add 23 0x558740 secp256k1_ec_pubkey_tweak_mul 24 0x558100 secp256k1_ec_seckey_negate 25 0x5583a0 secp256k1_ec_seckey_tweak_add 26 0x5585f0 secp256k1_ec_seckey_tweak_mul 27 0x557ed0 secp256k1_ec_seckey_verify 28 0x559120 secp256k1_ecdsa_recover 29 0x558f50 secp256k1_ecdsa_recoverable_signature_convert 30 0x558d00 secp256k1_ecdsa_recoverable_signature_parse_compact 31 0x558e70 secp256k1_ecdsa_recoverable_signature_serialize_compact 32 0x557da0 secp256k1_ecdsa_sign 33 0x558fe0 secp256k1_ecdsa_sign_recoverable 34 0x557ab0 secp256k1_ecdsa_signature_normalize 35 0x557540 secp256k1_ecdsa_signature_parse_compact 36 0x5573b0 secp256k1_ecdsa_signature_parse_der 37 0x557a10 secp256k1_ecdsa_signature_serialize_compact 38 0x557660 secp256k1_ecdsa_signature_serialize_der 39 0x557bf0 secp256k1_ecdsa_verify 40 0x5598a0 secp256k1_keypair_create 41 0x559af0 secp256k1_keypair_pub 42 0x559a60 secp256k1_keypair_sec 43 0x559bc0 secp256k1_keypair_xonly_pub 44 0x559d20 secp256k1_keypair_xonly_tweak_add 45 0xa9e0c0 secp256k1_nonce_function_bip340 46 0xa9e0e0 secp256k1_nonce_function_default 47 0xa9e0e8 secp256k1_nonce_function_rfc6979 48 0x559f00 secp256k1_schnorrsig_sign 49 0x559f30 secp256k1_schnorrsig_sign_custom 50 0x559fd0 secp256k1_schnorrsig_verify 51 0x556ce0 secp256k1_scratch_space_create 52 0x556d50 secp256k1_scratch_space_destroy 53 0x558c20 secp256k1_tagged_sha256 54 0x559470 secp256k1_xonly_pubkey_cmp 55 0x559530 secp256k1_xonly_pubkey_from_pubkey 56 0x559290 secp256k1_xonly_pubkey_parse 57 0x5593a0 secp256k1_xonly_pubkey_serialize 58 0x559650 secp256k1_xonly_pubkey_tweak_add 59 0x559780 secp256k1_xonly_pubkey_tweak_add_check ``` ACKs for top commit: laanwj: Code review ACK 913b1f2 theuni: ACK 913b1f2 Tree-SHA512: d3811c5731fab05bb68af72b7af231de8505b026bd1b2cd710e3e60386e793c2743412529142aa9893893f9d24c6e94dbac48ea59451bf55ae637d2e75e2b0a9
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
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
44c2452fd Merge bitcoin-core/secp256k1#1105: Don't export symbols in static libraries 6f6cab998 abi: Don't export symbols in static Windows libraries 485f608fa Merge bitcoin-core/secp256k1#1104: Fix the false positive of `SECP_64BIT_ASM_CHECK` 8b013fce5 Merge bitcoin-core/secp256k1#1056: Save negations in var-time group addition 7efc9835a Fix the false positive of `SECP_64BIT_ASM_CHECK` 2f984ffc4 Save negations in var-time group addition git-subtree-dir: src/secp256k1 git-subtree-split: 44c2452fd387f7ca604ab42d73746e7d3a44d8a2
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` 2f984ffc45 Save negations in var-time group addition git-subtree-dir: src/secp256k1 git-subtree-split: 44c2452fd387f7ca604ab42d73746e7d3a44d8a2
60556c9f4 Merge bitcoin-core/secp256k1#1337: ci: Fix error D8037 in `cl.exe` (attempt 2) db29bf220 ci: Remove quirk that runs dummy command after wineserver c7db4942b ci: Fix error D8037 in `cl.exe` 7dae11586 Revert "ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe" bf29f8d0a Merge bitcoin-core/secp256k1#1334: fix input range comment for `secp256k1_fe_add_int` 605e07e36 fix input range comment for `secp256k1_fe_add_int` debf3e5c0 Merge bitcoin-core/secp256k1#1330: refactor: take use of `secp256k1_scalar_{zero,one}` constants d75dc59b5 Merge bitcoin-core/secp256k1#1333: test: Warn if both `VERIFY` and `COVERAGE` are defined ade5b3670 tests: add checks for scalar constants `secp256k1_scalar_{zero,one}` e83801f5d test: Warn if both `VERIFY` and `COVERAGE` are defined 654246c63 refactor: take use of `secp256k1_scalar_{zero,one}` constants 908e02d59 Merge bitcoin-core/secp256k1#1328: build: Bump MSVC warning level up to W3 1549db0ca build: Level up MSVC warnings 20a5da5fb Merge bitcoin-core/secp256k1#1310: Refine release process ad8460329 release process: clarify change log updates 6348bc7ee release process: fix process for maintenance release 79fa50b08 release process: mention targeted release schedule 165206789 release process: add sanity checks 09df0bfb2 Merge bitcoin-core/secp256k1#1327: ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe 27504d5c9 ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe d373a7215 Merge bitcoin-core/secp256k1#1316: Do not invoke fe_is_zero on failed set_b32_limit 6433175ff Do not invoke fe_is_zero on failed set_b32_limit 5f7903c73 Merge bitcoin-core/secp256k1#1318: build: Enable -DVERIFY for precomputation binaries e9e4526a4 Merge bitcoin-core/secp256k1#1317: Make fe_cmov take max of magnitudes 5768b5022 build: Enable -DVERIFY for precomputation binaries 31b4bbee1 Make fe_cmov take max of magnitudes 83186db34 Merge bitcoin-core/secp256k1#1314: release cleanup: bump version after 0.3.2 95448ef2f release cleanup: bump version after 0.3.2 acf5c55ae Merge bitcoin-core/secp256k1#1312: release: Prepare for 0.3.2 d490ca204 release: Prepare for 0.3.2 3e3d125b8 Merge bitcoin-core/secp256k1#1309: changelog: Catch up e8295d07a Merge bitcoin-core/secp256k1#1311: Revert "Remove unused scratch space from API" 697e1ccf4 changelog: Catch up 3ad1027a4 Revert "Remove unused scratch space from API" 76b43f344 changelog: Add entry for #1303 7d4f86d24 Merge bitcoin-core/secp256k1#1307: Mark more assembly outputs as early clobber b54a0672e Merge bitcoin-core/secp256k1#1304: build: Rename arm to arm32 and check if it's really supported c6bb29b30 build: Rename `64bit` to `x86_64` 8c9ae37a5 Add release note 03246457a autotools: Add `SECP_ARM32_ASM_CHECK` macro ed4ba238e cmake: Add `check_arm32_assembly` function 350b4bd6e Mark stack variables as early clobber for technical correctness 0c729ba70 Bugfix: mark outputs as early clobber in scalar x86_64 asm 3353d3c75 Merge bitcoin-core/secp256k1#1207: Split fe_set_b32 into reducing and normalizing variants 5b3260229 Split fe_set_b32 into reducing and normalizing variants 006ddc1f4 Merge bitcoin-core/secp256k1#1306: build: Make tests work with external default callbacks 1907f0f16 build: Make tests work with external default callbacks fb3a80636 Merge bitcoin-core/secp256k1#1133: schnorrsig: Add test vectors for variable-length messages cd54ac7c1 schnorrsig: Improve docs of schnorrsig_sign_custom 28687b031 schnorrsig: Add BIP340 varlen test vectors 97a98bed1 schnorrsig: Refactor test vector code to allow varlen messages ab5a91712 Merge bitcoin-core/secp256k1#1303: ct: Use more volatile 9eb6934f6 Merge bitcoin-core/secp256k1#1305: Remove unused scratch space from API 073d98a07 Merge bitcoin-core/secp256k1#1292: refactor: Make 64-bit shift explicit 17fa21733 ct: Be cautious and use volatile trick in more "conditional" paths 5fb336f9c ct: Use volatile trick in scalar_cond_negate 712e7f872 Remove unused scratch space from API 54d34b6c2 Merge bitcoin-core/secp256k1#1300: Avoid normalize conditional on VERIFY c63ec88eb Merge bitcoin-core/secp256k1#1066: Abstract out and merge all the magnitude/normalized logic 7fc642fa2 Simplify secp256k1_fe_{impl_,}verify 4e176ad5b Abstract out verify logic for fe_is_square_var 4371f9834 Abstract out verify logic for fe_add_int 89e324c6b Abstract out verify logic for fe_half 283cd80ab Abstract out verify logic for fe_get_bounds d5aa2f035 Abstract out verify logic for fe_inv{,_var} 316764607 Abstract out verify logic for fe_from_storage 76d31e504 Abstract out verify logic for fe_to_storage 1e6894bdd Abstract out verify logic for fe_cmov be82bd8e0 Improve comments/checks for fe_sqrt 6ab35082e Abstract out verify logic for fe_sqr 4c25f6efb Abstract out verify logic for fe_mul e179e651c Abstract out verify logic for fe_add 7e7ad7ff5 Abstract out verify logic for fe_mul_int 65d82a344 Abstract out verify logic for fe_negate 144670893 Abstract out verify logic for fe_get_b32 f7a7666ae Abstract out verify logic for fe_set_b32 ce4d2093e Abstract out verify logic for fe_cmp_var 7d7d43c6d Improve comments/check for fe_equal{,_var} c5e788d67 Abstract out verify logic for fe_is_odd d3f3fe861 Abstract out verify logic for fe_is_zero c701d9a47 Abstract out verify logic for fe_clear 19a2bfeee Abstract out verify logic for fe_set_int 864f9db49 Abstract out verify logic for fe_normalizes_to_zero{,_var} 6c3137112 Abstract out verify logic for fe_normalize_var e28b51f52 Abstract out verify logic for fe_normalize_weak b6b6f9cb9 Abstract out verify logic for fe_normalize 7fa519555 Bugfix: correct SECP256K1_FE_CONST mag/norm fields e5cf4bf3f build: Rename `arm` to `arm32` b29566c51 Merge magnitude/normalized fields, move/improve comments 97c63b903 Avoid normalize conditional on VERIFY 341cc1972 Merge bitcoin-core/secp256k1#1299: Infinity handling: ecmult_const(infinity) works, and group verification bbc834467 Avoid secp256k1_ge_set_gej_zinv with uninitialized z 0a2e0b2ae Make secp256k1_{fe,ge,gej}_verify work as no-op if non-VERIFY f20266722 Add invariant checking to group elements a18821d5b Always initialize output coordinates in secp256k1_ge_set_gej 3086cb90a Expose secp256k1_fe_verify to other modules a0e696fd4 Make secp256k1_ecmult_const handle infinity 24c768ae0 Merge bitcoin-core/secp256k1#1301: Avoid using bench_verify_data as bench_sign_data; merge them 2e65f1fdb Avoid using bench_verify_data as bench_sign_data; merge them 1cf15ebd9 Merge bitcoin-core/secp256k1#1296: docs: complete interface description for `secp256k1_schnorrsig_sign_custom` 149c41cee docs: complete interface description for `secp256k1_schnorrsig_sign_custom` f30c74866 Merge bitcoin-core/secp256k1#1270: cmake: Fix library ABI versioning d1e48e547 refactor: Make 64-bit shift explicit b2e29e43d ci: Treat all compiler warnings as errors in "Windows (VS 2022)" task 3c8183885 Merge bitcoin-core/secp256k1#1289: cmake: Use full signature of `add_test()` command 755629bc0 cmake: Use full signature of `add_test()` command bef448f9a cmake: Fix library ABI versioning 4b0f711d4 Merge bitcoin-core/secp256k1#1277: autotools: Clean up after adding Wycheproof 222ecaf66 Merge bitcoin-core/secp256k1#1284: cmake: Some improvements using `PROJECT_IS_TOP_LEVEL` variable 71f746c05 cmake: Include `include` directory for subtree builds 024a40948 Merge bitcoin-core/secp256k1#1240: cmake: Improve and document compiler flag checks a8d059f76 cmake, doc: Document compiler flags 6ece1507c cmake, refactor: Rename `try_add_compile_option` to `try_append_cflags` 19516ed3e cmake: Use `add_compile_options()` in `try_add_compile_option()` 4b84f4bf0 Merge bitcoin-core/secp256k1#1239: cmake: Bugfix and other improvements after bumping CMake up to 3.13 596b336ff Merge bitcoin-core/secp256k1#1234: cmake: Add dev-mode 6b7e5b717 Merge bitcoin-core/secp256k1#1275: build: Fix C4005 "macro redefinition" MSVC warnings in examples 1c8953671 Merge bitcoin-core/secp256k1#1286: tests: remove extra semicolon in macro c4062d6b5 debug: move helper for printing buffers into util.h 7e977b3c5 autotools: Take VPATH builds into account when generating testvectors 2418d3260 autotools: Create src/wycheproof dir before creating file in it 8764034ed autotools: Make all "pregenerated" targets .PHONY e1b9ce881 autotools: Use same conventions for all pregenerated files 3858bad2c tests: remove extra semicolon in macro 1f33bb2b1 Merge bitcoin-core/secp256k1#1205: field: Improve docs +tests of secp256k1_fe_set_b32 162da73e9 tests: Add debug helper for printing buffers e9fd3dff7 field: Improve docs and tests of secp256k1_fe_set_b32 f6bef03c0 Merge bitcoin-core/secp256k1#1283: Get rid of secp256k1_fe_const_b 5431b9dec cmake: Make `SECP256K1_INSTALL` default depend on `PROJECT_IS_TOP_LEVEL` 5ec1333d4 Merge bitcoin-core/secp256k1#1285: bench: Make sys/time.h a system include 68b16a166 bench: Make sys/time.h a system include 162608cc9 cmake: Emulate `PROJECT_IS_TOP_LEVEL` for CMake<3.21 69e1ec033 Get rid of secp256k1_fe_const_b ce5ba9e24 gitignore: Add CMakeUserPresets.json 0a446a312 cmake: Add dev-mode CMake preset a6f4bcf6e Merge bitcoin-core/secp256k1#1231: Move `SECP256K1_INLINE` macro definition out from `include/secp256k1.h` a273d74b2 cmake: Improve version comparison 6a58b483e cmake: Use `if(... IN_LIST ...)` command 2445808c0 cmake: Use dedicated `GENERATOR_IS_MULTI_CONFIG` property 9f8703ef1 cmake: Use dedicated `CMAKE_HOST_APPLE` variable 8c2017035 cmake: Use recommended `add_compile_definitions` command 04d4cc071 cmake: Add `DESCRIPTION` and `HOMEPAGE_URL` options to `project` command 8a8b6536e cmake: Use `SameMinorVersion` compatibility mode 5b0444a3b Merge bitcoin-core/secp256k1#1263: cmake: Make installation optional 47ac3d63c cmake: Make installation optional 2e035af25 Merge bitcoin-core/secp256k1#1273: build: Make `SECP_VALGRIND_CHECK` preserve `CPPFLAGS` 5be353d65 Merge bitcoin-core/secp256k1#1279: tests: lint wycheproof's python script 08f4b1632 autotools: Move code around to tidy Makefile 04bf3f677 Merge bitcoin-core/secp256k1#1230: Build: allow static or shared but not both 9ce9984f3 Merge bitcoin-core/secp256k1#1265: Remove bits argument from secp256k1_wnaf_const{_xonly} 566faa17d Merge bitcoin-core/secp256k1#1267: doc: clarify process for patch releases ef49a11d2 build: allow static or shared but not both 35ada3b95 tests: lint wycheproof's python script 4258c54f4 Merge bitcoin-core/secp256k1#1276: autotools: Don't regenerate Wycheproof header automatically 529b54d92 autotools: Move Wycheproof header from EXTRA_DIST to noinst_HEADERS 06c67dea9 autotools: Don't regenerate Wycheproof header automatically dc0657c76 build: Fix C4005 "macro redefinition" MSVC warnings in examples 1ecb94ebe build: Make `SECP_VALGRIND_CHECK` preserve `CPPFLAGS` 3bab71cf0 Merge bitcoin-core/secp256k1#1268: release cleanup: bump version after 0.3.1 656c6ea8d release cleanup: bump version after 0.3.1 346a053d4 Merge bitcoin-core/secp256k1#1269: changelog: Fix link 6a37b2a5e changelog: Fix link ec98fcedd Merge bitcoin-core/secp256k1#1266: release: Prepare for 0.3.1 1b6fb5593 doc: clarify process for patch releases 898e1c676 release: Prepare for 0.3.1 1d9a13fc2 changelog: Remove inconsistent newlines 0e091669a changelog: Catch up in preparation of 0.3.1 7b7503dac Merge bitcoin-core/secp256k1#1245: tests: Add Wycheproof ECDSA vectors a575339c0 Remove bits argument from secp256k1_wnaf_const (always 256) 145078c41 Merge bitcoin-core/secp256k1#1118: Add x-only ecmult_const version with x specified as n/d e5de45460 tests: Add Wycheproof ECDSA vectors 0f8642079 Add exhaustive tests for ecmult_const_xonly 4485926ac Add x-only ecmult_const version for x=n/d a0f4644f7 Merge bitcoin-core/secp256k1#1252: Make position of * in pointer declarations in include/ consistent 4e682626a Merge bitcoin-core/secp256k1#1226: Add CMake instructions to release process 2d51a454f Merge bitcoin-core/secp256k1#1257: ct: Use volatile "trick" in all fe/scalar cmov implementations 4a496a36f ct: Use volatile "trick" in all fe/scalar cmov implementations 3d1f430f9 Make position of * in pointer declarations in include/ consistent 2bca0a5cb Merge bitcoin-core/secp256k1#1241: build: Improve `SECP_TRY_APPEND_DEFAULT_CFLAGS` macro afd8b23b2 Merge bitcoin-core/secp256k1#1244: Suppress `-Wunused-parameter` when building for coverage analysis 1d8f36751 Merge bitcoin-core/secp256k1#1250: No need to subtract 1 before doing a right shift 3e43041be No need to subtract 1 before doing a right shift 3addb4c1e build: Improve `SECP_TRY_APPEND_DEFAULT_CFLAGS` macro 0c07c8283 Add CMake instructions to release process 464a9115b Merge bitcoin-core/secp256k1#1242: Set ARM ASM symbol visibility to `hidden` f16a709fd Merge bitcoin-core/secp256k1#1247: Apply Checks only in VERIFY mode. 70be3cade Merge bitcoin-core/secp256k1#1246: Typo 4ebd82852 Apply Checks only in VERIFY mode. d1e7ca192 Typo 36b0adf1b build: remove warning until it's reproducible 5bb03c291 Replace `SECP256K1_ECMULT_TABLE_VERIFY` macro by a function 9c8c4f443 Merge bitcoin-core/secp256k1#1238: build: bump CMake minimum requirement to 3.13 0cf2fb91e Merge bitcoin-core/secp256k1#1243: build: Ensure no optimization when building for coverage analysis fd2a40864 Set ARM ASM symbol visibility to `hidden` 4429a8c21 Suppress `-Wunused-parameter` when building for coverage analysis 8e79c7ed1 build: Ensure no optimization when building for coverage analysis 96dd06251 build: bump CMake minimum requirement to 3.13 427bc3cdc Merge bitcoin-core/secp256k1#1236: Update comment for secp256k1_modinv32_inv256 647f0a5cb Update comment for secp256k1_modinv32_inv256 8e142ca41 Move `SECP256K1_INLINE` macro definition out from `include/secp256k1.h` 77445898a Remove `SECP256K1_INLINE` usage from examples 565820945 Merge bitcoin-core/secp256k1#1228: release cleanup: bump version after 0.3.0 bdf39000b Merge bitcoin-core/secp256k1#1223: release: prepare for 0.3.0 28e63f7ea release cleanup: bump version after 0.3.0 b40adf236 release: prepare for 0.3.0 90b513aad Merge bitcoin-core/secp256k1#1229: cmake: Rename project to "libsecp256k1" 8be82d436 cmake: Rename project to "libsecp256k1" ef4f8bd02 Merge bitcoin-core/secp256k1#1227: readme: Use correct build type in CMake/Windows build instructions 756b61d45 readme: Use correct build type in CMake/Windows build instructions 3295aa149 Merge bitcoin-core/secp256k1#1225: changelog: Add entry for CMake 92098d84c changelog: Add entry for CMake df323b5c1 Merge bitcoin-core/secp256k1#1113: build: Add CMake-based build system e1eb33724 ci: Add "x86_64: Windows (VS 2022)" task 10602b003 cmake: Export config files 5468d7096 build: Add CMake-based build system 6048e6c03 Merge bitcoin-core/secp256k1#1222: Remove redundant checks. eb8749fcd Merge bitcoin-core/secp256k1#1221: Update Changelog 5d8f53e31 Remove redudent checks. 9d1b458d5 Merge bitcoin-core/secp256k1#1217: Add secp256k1_fe_add_int function d232112fa Update Changelog 8962fc95b Merge bitcoin-core/secp256k1#1218: Update overflow check 2ef1c9b38 Update overflow check 575731878 Merge bitcoin-core/secp256k1#1212: Prevent dead-store elimination when clearing secrets in examples b081f7e4c Add secp256k1_fe_add_int function 5660c1375 prevent optimization in algorithms 09b1d466d Merge bitcoin-core/secp256k1#979: Native jacobi symbol algorithm ce3cfc78a doc: Describe Jacobi calculation in safegcd_implementation.md 6be01036c Add secp256k1_fe_is_square_var function 1de2a01c2 Native jacobi symbol algorithm 04c6c1b18 Make secp256k1_modinv64_det_check_pow2 support abs val 5fffb2c7a Make secp256k1_i128_check_pow2 support -(2^n) cbd255593 Merge bitcoin-core/secp256k1#1209: build: Add SECP256K1_API_VAR to fix importing variables from DLLs 1b21aa517 Merge bitcoin-core/secp256k1#1078: group: Save a normalize_to_zero in gej_add_ge e4330341b ci: Shutdown wineserver whenever CI script exits 9a5a611a2 build: Suppress stupid MSVC linker warning 739c53b19 examples: Extend sig examples by call that uses static context 914276e4d build: Add SECP256K1_API_VAR to fix importing variables from DLLs 1cca7c174 Merge bitcoin-core/secp256k1#1206: build: Add -Wreserved-identifier supported by clang 8c7e0fc1d build: Add -Wreserved-identifier supported by clang ca92a35d0 field: Simplify code in secp256k1_fe_set_b32 d93f62e36 field: Verify field element even after secp256k1_fe_set_b32 fails 8ebe5c520 Merge bitcoin-core/secp256k1#1201: ci: Do not set git's `user.{email,name}` config options 5596ec5c2 Merge bitcoin-core/secp256k1#1203: Do not link `bench` and `ctime_tests` to `COMMON_LIB` ef39721cc Do not link `bench` and `ctime_tests` to `COMMON_LIB` 9b60e3148 ci: Do not set git's `user.{email,name}` config options e1817a6f5 Merge bitcoin-core/secp256k1#1199: ci: Minor improvements inspired by Bitcoin Core 1bff20058 Merge bitcoin-core/secp256k1#1200: Drop no longer used Autoheader macros 9b7d18669 Drop no longer used Autoheader macros c2415866c ci: Don't fetch git history 0ecf31885 ci: Use remote pull/merge ref instead of local git merge 2b77240b3 Merge bitcoin-core/secp256k1#1172: benchmarks: fix bench_scalar_split eb6bebaee scalar: restrict split_lambda args, improve doc and VERIFY_CHECKs 7f49aa7f2 ci: add test job with -DVERIFY 620ba3d74 benchmarks: fix bench_scalar_split 5fbff5d34 Merge bitcoin-core/secp256k1#1170: contexts: Forbid destroying, cloning and randomizing the static context 233822d84 Merge bitcoin-core/secp256k1#1195: ctime_tests: improve output when CHECKMEM_RUNNING is not defined ad7433b14 Merge bitcoin-core/secp256k1#1196: Drop no longer used variables from the build system e39d954f1 tests: Add CHECK_ILLEGAL(_VOID) macros and use in static ctx tests 2cd4e3c0a Drop no longer used `SECP_{LIBS,INCLUDE}` variables 613626f94 Drop no longer used `SECP_TEST_{LIBS,INCLUDE}` variables 61841fc9e contexts: Forbid randomizing secp256k1_context_static 4b6df5e33 contexts: Forbid cloning/destroying secp256k1_context_static b1579cf5f Merge bitcoin-core/secp256k1#1194: Ensure safety of ctz_debruijn implementation. 8f51229e0 ctime_tests: improve output when CHECKMEM_RUNNING is not defined d6ff738d5 Ensure safety of ctz_debruijn implementation. a01a7d86d Merge bitcoin-core/secp256k1#1192: Switch to exhaustive groups with small B coefficient a7a7bfaf3 Merge bitcoin-core/secp256k1#1190: Make all non-API functions (except main) static f29a32709 Merge bitcoin-core/secp256k1#1169: Add support for msan instead of valgrind (for memcheck and ctime test) ff8edf89e Merge bitcoin-core/secp256k1#1193: Add `noverify_tests` to `.gitignore` ce60785b2 Introduce SECP256K1_B macro for curve b coefficient 4934aa799 Switch to exhaustive groups with small B coefficient d4a6b58df Add `noverify_tests` to `.gitignore` 88e80722d Merge bitcoin-core/secp256k1#1160: Makefile: add `-I$(top_srcdir)/{include,src}` to `CPPFLAGS` for precomputed 0f088ec11 Rename CTIMETEST -> CTIMETESTS 74b026f05 Add runtime checking for DECLASSIFY flag 5e2e6fcfc Run ctime test in Linux MSan CI job 18974061a Make ctime tests building configurable 5048be17e Rename valgrind_ctime_test -> ctime_tests 6eed6c18d Update error messages to suggest msan as well 8e11f89a6 Add support for msan integration to checkmem.h 8dc64079e Add compile-time error to valgrind_ctime_test 0db05a770 Abstract interactions with valgrind behind new checkmem.h 4f1a54e41 Move valgrind CPPFLAGS into SECP_CONFIG_DEFINES cc3b8a4f4 Merge bitcoin-core/secp256k1#1187: refactor: Rename global variables in tests 9a93f48f5 refactor: Rename STTC to STATIC_CTX in tests 3385a2648 refactor: Rename global variables to uppercase in tests e03ef8655 Make all non-API functions (except main) static cbe41ac13 Merge bitcoin-core/secp256k1#1188: tests: Add noverify_tests which is like tests but without VERIFY 203760023 tests: Add noverify_tests which is like tests but without VERIFY e862c4af0 Makefile: add -I$(top_srcdir)/src to CPPFLAGS for precomputed 0eb300041 Merge bitcoin-core/secp256k1#1186: tests: Tidy context tests 39e8f0e3d refactor: Separate run_context_tests into static vs proper contexts a4a09379b tests: Clean up and improve run_context_tests() further fc90bb569 refactor: Tidy up main() f32a36f62 tests: Don't use global context for context tests ce4f936c4 tests: Tidy run_context_tests() by extracting functions 18e0db30c tests: Don't recreate global context in scratch space test b19806122 tests: Use global copy of secp256k1_context_static instead of clone 2a39ac162 Merge bitcoin-core/secp256k1#1185: Drop `SECP_CONFIG_DEFINES` from examples 2f9ca284e Drop `SECP_CONFIG_DEFINES` from examples 31ed5386e Merge bitcoin-core/secp256k1#1183: Bugfix: pass SECP_CONFIG_DEFINES to bench compilation c0a555b2a Bugfix: pass SECP_CONFIG_DEFINES to bench compilation 01b819a8c Merge bitcoin-core/secp256k1#1158: Add a secp256k1_i128_to_u64 function. eacad90f6 Merge bitcoin-core/secp256k1#1171: Change ARG_CHECK_NO_RETURN to ARG_CHECK_VOID which returns (void) 3f57b9f77 Merge bitcoin-core/secp256k1#1177: Some improvements to the changelog c30b889f1 Clarify that the ABI-incompatible versions are earlier 881fc33d0 Consistency in naming of modules 665ba77e7 Merge bitcoin-core/secp256k1#1178: Drop `src/libsecp256k1-config.h` 75d7b7f5b Merge bitcoin-core/secp256k1#1154: ci: set -u in cirrus.sh to treat unset variables as an error 7a7468820 ci: add missing CFLAGS & CPPFLAGS variable to print_environment c2e0fdade ci: set -u in cirrus.sh to treat unset variables as an error 9c5a4d21b Do not define unused `HAVE_VALGRIND` macro ad8647f54 Drop no longer relevant files from `.gitignore` b627ba705 Remove dependency on `src/libsecp256k1-config.h` 9ecf8149a Reduce font size in changelog 2dc133a67 Add more changelog entries ac233e181 Add links to diffs to changelog cee8223ef Mention semantic versioning in changelog 9a8d65f07 Merge bitcoin-core/secp256k1#1174: release cleanup: bump version after 0.2.0 02ebc290f release cleanup: bump version after 0.2.0 b6b360efa doc: improve message of cleanup commit 21ffe4b22 Merge bitcoin-core/secp256k1#1055: Prepare initial release e025ccdf7 release: prepare for initial release 0.2.0 6d1784a2e build: add missing files to EXTRA_DIST 8c949f56d Merge bitcoin-core/secp256k1#1173: Don't use compute credits for now 13bf1b6b3 changelog: make order of change types match keepachangelog.com b1f992a55 doc: improve release process 7e5b22684 Don't use compute credits for now a49e0940a docs: Fix typo 2551cdac9 tests: Fix code formatting c635c1bfd Change ARG_CHECK_NO_RETURN to ARG_CHECK_VOID which returns (void) cf66f2357 refactor: Add helper function secp256k1_context_is_proper() ad39e2dc4 build: change package version to 0.1.0-dev 5c789dcd7 Merge bitcoin-core/secp256k1#1168: Replace deprecated context flags with NONE in benchmarks and tests d6dc0f4ae tests: Switch to NONE contexts in module tests 0c8a5cadd tests: Switch to NONE contexts in tests.c 86540e9e1 tests: add test for deprecated flags and rm them from run_context caa0ad631 group: add gej_eq_var 37ba744f5 tests: Switch to NONE contexts in exhaustive and ctime tests 8d7a9a8ed benchmarks: Switch to NONE contexts 90618e926 doc: move CHANGELOG from doc/ to root directory e3f84777e Merge bitcoin-core/secp256k1#1126: API cleanup with respect to contexts 4386a2306 examples: Switch to NONE contexts 7289b51d3 docs: Use doxygen style if and only if comment is user-facing e7d0185c9 docs: Get rid of "initialized for signing" terminology 06126364a docs: Tidy and improve docs about contexts and randomization e02d6862b selftest: Expose in public API e383fbfa6 selftest: Rename internal function to make name available for API d2c6d48de tests: Use new name of static context 53796d2b2 contexts: Rename static context 72fedf8a6 docs: Improve docs for static context 316ac7625 contexts: Deprecate all context flags except SECP256K1_CONTEXT_NONE 477f02c4d Merge bitcoin-core/secp256k1#1165: gitignore: Add *.sage.py files autogenerated by sage [skip ci] 092be61c5 gitignore: Add *.sage.py files autogenerated by sage 1a553ee8b docs: Change signature "validation" to "verification" ee7341fba docs: Never require a verification context 751c4354d Merge bitcoin-core/secp256k1#1152: Update macOS image for CI 2286f8090 Merge bitcoin-core/secp256k1#993: Enable non-experimental modules by default d21647520 test secp256k1_i128_to_i64 4bc429019 Add a secp256k1_i128_to_u64 function. e40fd277b Merge bitcoin-core/secp256k1#1156: Followups to int128_struct arithmetic 99bd33559 Make int128 overflow test use secp256k1_[ui]128_mul a8494b02b Use compute credits for macOS jobs 3afce0af7 Avoid signed overflow in MSVC AMR64 secp256k1_mul128 c0ae48c99 Update macOS image for CI 9b5f589d3 Heuristically decide whether to use int128_struct 63ff064d2 int128: Add test override for testing __(u)mulh on MSVC X64 f2b7e8876 Add int128 randomized tests 6138d73be Merge bitcoin-core/secp256k1#1155: Add MSan CI jobs ddf2b2910 Merge bitcoin-core/secp256k1#1000: Synthetic int128 type. 86e3b38a4 Merge bitcoin-core/secp256k1#1149: Remove usage of CHECK from non-test file 00a42b91b Add MSan CI job 44916ae91 Merge bitcoin-core/secp256k1#1147: ci: print env to allow reproducing the job outside of CI c2ee9175e Merge bitcoin-core/secp256k1#1146: ci: prevent "-v/--version: not found" irrelevant error e13fae487 Merge bitcoin-core/secp256k1#1150: ci: always cat test_env.log a340d9500 ci: add int128_struct tests dceaa1f57 int128: Tidy #includes of int128.h and int128_impl.h 2914bccbc Simulated int128 type. 6a965b6b9 Remove usage of CHECK from non-test file 5c9f1a5c3 ci: always cat all logs_snippets 49ae84359 ci: mostly prevent "-v/--version: not found" irrelevant error 4e54c0315 ci: print env to allow reproducing the job outside of CI a43e982bc Merge bitcoin-core/secp256k1#1144: Cleanup `.gitignore` file f5039cb66 Cleanup `.gitignore` file 798727ae1 Revert "Add test logs to gitignore" 41e8704b4 build: Enable some modules by default 694ce8fb2 Merge bitcoin-core/secp256k1#1131: readme: Misc improvements 88b00897e readme: Fix line break 78f5296da readme: Sell "no runtime dependencies" ef48f088a readme: Add IRC channel 9f8a13dc8 Merge bitcoin-core/secp256k1#1128: configure: Remove pkgconfig macros again (reintroduced by mismerge) cabe085bb configure: Remove pkgconfig macros again (reintroduced by mismerge) 3efeb9da2 Merge bitcoin-core/secp256k1#1121: config: Set preprocessor defaults for ECMULT_* config values 6a873cc4a Merge bitcoin-core/secp256k1#1122: tests: Randomize the context with probability 15/16 instead of 1/4 17065f48a tests: Randomize the context with probability 15/16 instead of 1/4 c27ae4514 config: Remove basic-config.h da6514a04 config: Introduce DEBUG_CONFIG macro for debug output of config 63a3565e9 Merge bitcoin-core/secp256k1#1120: ecmult_gen: Skip RNG when creating blinding if no seed is available d0cf55e13 config: Set preprocessor defaults for ECMULT_* config values 55f8bc99d ecmult_gen: Improve comments about projective blinding 7a8695580 ecmult_gen: Simplify code (no observable change) 4cc0b1b66 ecmult_gen: Skip RNG when creating blinding if no seed is available af65d30cc Merge bitcoin-core/secp256k1#1116: build: Fix #include "..." paths to get rid of further -I arguments 40a3473a9 build: Fix #include "..." paths to get rid of further -I arguments 43756da81 Merge bitcoin-core/secp256k1#1115: Fix sepc256k1 -> secp256k1 typo in group.h 069aba812 Fix sepc256k1 -> secp256k1 typo in group.h accadc94d Merge bitcoin-core/secp256k1#1114: `_scratch_destroy`: move `VERIFY_CHECK` after invalid scrach space check cd4703333 Merge bitcoin-core/secp256k1#1084: ci: Add MSVC builds 1827c9bf2 scratch_destroy: move VERIFY_CHECK after invalid scrach space check 49e2acd92 configure: Improve rationale for WERROR_CFLAGS 8dc4b0334 ci: Add a C++ job that compiles the public headers without -fpermissive 51f296a46 ci: Run persistent wineserver to speed up wine 3fb3269c2 ci: Add 32-bit MinGW64 build 9efc2e522 ci: Add MSVC builds 2be6ba0fe configure: Convince autotools to work with MSVC's archiver lib.exe bd81f4140 schnorrsig bench: Suppress a stupid warning in MSVC 44c2452fd Merge bitcoin-core/secp256k1#1105: Don't export symbols in static libraries 6f6cab998 abi: Don't export symbols in static Windows libraries 485f608fa Merge bitcoin-core/secp256k1#1104: Fix the false positive of `SECP_64BIT_ASM_CHECK` 8b013fce5 Merge bitcoin-core/secp256k1#1056: Save negations in var-time group addition 7efc9835a Fix the false positive of `SECP_64BIT_ASM_CHECK` 8746600ee Merge bitcoin-core/secp256k1#1093: hash: Make code agnostic of endianness 2f984ffc4 Save negations in var-time group addition 37d36927d tests: Add tests for _read_be32 and _write_be32 912b7ccc4 Merge bitcoin-core/secp256k1#1094: doc: Clarify configure flags for optional modules 55512d30b doc: clean up module help text in configure.ac d9d94a996 doc: mention optional modules in README 616b43dd3 util: Remove endianness detection 8d89b9e6e hash: Make code agnostic of endianness d0ad5814a Merge bitcoin-core/secp256k1#995: build: stop treating schnorrsig, extrakeys modules as experimental 1ac7e31c5 Merge bitcoin-core/secp256k1#1089: Schnorrsig API improvements 587239dbe Merge bitcoin-core/secp256k1#731: Change SHA256 byte counter from size_t to uint64_t f8d917435 Add SHA256 bit counter tests 7f09d0f31 README: mention that ARM assembly is experimental b8f8b99f0 docs: Fix return value for functions that don't have invalid inputs f813bb0df schnorrsig: Adapt example to new API 99e6568fc schnorrsig: Rename schnorrsig_sign to schnorsig_sign32 and deprecate fc94a2da4 Use SECP256K1_DEPRECATED for existing deprecated API functions 3db056060 Add SECP256K1_DEPRECATED attribute for marking API parts as deprecated 09f3d71c5 configure: Add a few CFLAGS for MSVC 3b4f3d0d4 build: Reject C++ compilers in the preprocessor 1cc094141 configure: Don't abort if the compiler does not define __STDC__ 80cf4eea5 build: stop treating schnorrsig, extrakeys modules as experimental e0508ee9d Merge bitcoin-core/secp256k1#1090: configure: Remove redundant pkg-config code 21b2ebaf7 configure: Remove redundant pkg-config code cca8cbbac configure: Output message when checking for valgrind 1a6be5745 bench: Make benchmarks compile on MSVC 0e5cbd01b Merge bitcoin-core/secp256k1#1088: configure: Use modern way to set AR 0d253d52e configure: Use modern way to set AR 9b514ce1d Add test vector for very long SHA256 messages 8e3dde113 Simplify struct initializer for SHA256 padding eb28464a8 Change SHA256 byte counter from size_t to uint64_t ac83be33d Merge bitcoin-core/secp256k1#1079: configure: Add hidden --enable-dev-mode to enable all the stuff e089eecc1 group: Further simply gej_add_ge e0838d663 configure: Add hidden --enable-dev-mode to enable all the stuff fabd579df configure: Remove redundant code that sets _enable variables 0d4226c05 configure: Use canonical variable prefix _enable consistently 64b34979e Merge bitcoin-core/secp256k1#748: Add usage examples 7c9502cec Add a copy of the CC0 license to the examples 42e03432e Add usage examples to the readme 517644eab Optionally compile the examples in autotools, compile+run in travis 422a7cc86 Add a ecdh shared secret example b0cfbcc14 Add a Schnorr signing and verifying example fee7d4bf9 Add an ECDSA signing and verifying example ac71020eb group: Save a normalize_to_zero in gej_add_ge 1253a2775 Merge bitcoin-core/secp256k1#1033: Add _fe_half and use in _gej_add_ge and _gej_double 3ef94aa5b Merge bitcoin-core/secp256k1#1026: ecdh: Add test computing shared_secret=basepoint with random inputs 3531a43b5 ecdh: Make generator_basepoint test depend on global iteration count c881dd49b ecdh: Add test computing shared_secret=basepoint with random inputs 077528317 Merge bitcoin-core/secp256k1#1074: ci: Retry brew update a few times to avoid random failures e51ad3b73 ci: Retry `brew update` a few times to avoid random failures b1cb969e8 ci: Revert "Attempt to make macOS builds more reliable" 5dcc6f8db Merge bitcoin-core/secp256k1#1069: build: Replace use of deprecated autoconf macro AC_PROG_CC_C89 59547943d Merge bitcoin-core/secp256k1#1072: ci: Attempt to make macOS builds more reliable 85b00a1c6 Merge bitcoin-core/secp256k1#1068: sage: Fix incompatibility with sage 9.4 ebb1beea7 sage: Ensure that constraints are always fastfracs d8d54859e ci: Run sage prover on CI 77cfa98db sage: Normalize sign of polynomial factors in prover eae75869c sage: Exit with non-zero status in case of failures d9396a56d ci: Attempt to make macOS builds more reliable e0db3f8a2 build: Replace use of deprecated autoconf macro AC_PROG_CC_C89 e848c3799 Update sage files for new formulae d64bb5d4f Add fe_half tests for worst-case inputs b54d843ea sage: Fix printing of errors 4eb8b932f Further improve doubling formula using fe_half 557b31fac Doubling formula using fe_half 2cbb4b1a4 Run more iterations of run_field_misc 9cc5c257e Add test for secp256k1_fe_half 925f78d55 Add _fe_half and use in _gej_add_ge e108d0039 sage: Fix incompatibility with sage 9.4 d8a246324 Merge bitcoin-core/secp256k1#899: Reduce stratch space needed by ecmult_strauss_wnaf. 0a40a4861 Merge bitcoin-core/secp256k1#1049: Faster fixed-input ecmult tests 070e77221 Faster fixed-input ecmult tests c8aa516b5 Merge bitcoin-core/secp256k1#1064: Modulo-reduce msg32 inside RFC6979 nonce fn to match spec. Fixes #1063 b797a500e Create a SECP256K1_ECMULT_TABLE_VERIFY macro. a731200cc Replace ECMULT_TABLE_GET_GE_STORAGE macro with a function. fe34d9f34 Eliminate input_pos state field from ecmult_strauss_wnaf. 0397d00ba Eliminate na_1 and na_lam state fields from ecmult_strauss_wnaf. 7ba3ffcca Remove the unused pre_a_lam allocations. b3b57ad6e Eliminate the pre_a_lam array from ecmult_strauss_wnaf. ae7ba0f92 Remove the unused prej allocations. e5c18892d Eliminate the prej array from ecmult_strauss_wnaf. c9da1baad Move secp256k1_fe_one to field.h 45f37b650 Modulo-reduce msg32 inside RFC6979 nonce fn to match spec. Fixes #1063. a1102b121 Merge bitcoin-core/secp256k1#1029: Simpler and faster ecdh skew fixup e82144edf Fixup skew before global Z fixup 40b624c90 Add tests for _gej_cmov 8c13a9bfe ECDH skews by 0 or 1 151509943 Simpler and faster ecdh skew fixup 39a36db94 Merge bitcoin-core/secp256k1#1054: tests: Fix test whose result is implementation-defined a310e79ee Merge bitcoin-core/secp256k1#1052: Use xoshiro256++ instead of RFC6979 for tests 423b6d19d Merge bitcoin-core/secp256k1#964: Add release-process.md 9281c9f4e Merge bitcoin-core/secp256k1#1053: ecmult: move `_ecmult_odd_multiples_table_globalz_windowa` 77a19750b Use xoshiro256++ PRNG instead of RFC6979 in tests 5f2efe684 secp256k1_testrand_int(2**N) -> secp256k1_testrand_bits(N) 05e049b73 ecmult: move `_ecmult_odd_multiples_table_globalz_windowa` 3d7cbafb5 tests: Fix test whose result is implementation-defined 3ed0d02bf doc: add CHANGELOG template 6f42dc16c doc: add release_process.md 0bd3e4243 build: set library version to 0.0.0 explicitly b4b02fd8c build: change libsecp version from 0.1 to 0.1.0-pre 09971a3ff Merge bitcoin-core/secp256k1#1047: ci: Various improvements 0b83b203e Merge bitcoin-core/secp256k1#1030: doc: Fix upper bounds + cleanup in field_5x52_impl.h comment 1287786c7 doc: Add comment to top of field_10x26_impl.h 58da5bd58 doc: Fix upper bounds + cleanup in field_5x52_impl.h comment b39d431ae Merge bitcoin-core/secp256k1#1044: Add another ecmult_multi test b4ac1a1d5 ci: Run valgrind/memcheck tasks with 2 CPUs e70acab60 ci: Use Cirrus "greedy" flag to use idle CPU time when available d07e30176 ci: Update brew on macOS 22382f0ea ci: Test different ecmult window sizes a69df3ad2 Merge bitcoin-core/secp256k1#816: Improve checks at top of _fe_negate methods 22d25c8e0 Add another ecmult_multi test 515e7953c Improve checks at top of _fe_negate methods 26a022a3a ci: Remove STATICPRECOMPUTATION 10461d8bd precompute_ecmult: Always compute all tables up to default WINDOW_G be6944ade Merge bitcoin-core/secp256k1#1042: Follow-ups to making all tables fully static e05da9e48 Fix c++ build c45386d99 Cleanup preprocessor indentation in precompute{,d}_ecmult{,_gen} 19d96e15f Split off .c file from precomputed_ecmult.h 1a6691ada Split off .c file from precomputed_ecmult_gen.h bb3633141 Simplify precompute_ecmult_print_* 38cd84a0c Compute ecmult tables at runtime for tests_exhaustive e458ec26d Move ecmult table computation code to separate file fc1bf9f15 Split ecmult table computation and printing 31feab053 Rename function secp256k1_ecmult_gen_{create_prec -> compute}_table 725370c3f Rename ecmult_gen_prec -> ecmult_gen_compute_table 075252c1b Rename ecmult_static_pre_g -> precomputed_ecmult 7cf47f72b Rename ecmult_gen_static_prec_table -> precomputed_ecmult_gen f95b8106d Rename gen_ecmult_static_pre_g -> precompute_ecmult bae77685e Rename gen_ecmult_gen_static_prec_table -> precompute_ecmult_gen 0559fc6e4 Merge bitcoin-core/secp256k1#988: Make signing table fully static 7dfceceea build: Remove #undef hack for ASM in the precomputation programs bb36fe9be ci: Test `make precomp` d94a37a20 build: Remove CC_FOR_BUILD stuff ad63bb4c2 build: Prebuild and distribute ecmult_gen table ac49361ed prealloc: Get rid of manual memory management for prealloc contexts 6573c08f6 ecmult_gen: Tidy precomputed file and save space 5eba83f17 ecmult_gen: Precompute tables for all values of ECMULT_GEN_PREC_BITS 5d0dbef01 Merge bitcoin-core/secp256k1#942: Verify that secp256k1_ge_set_gej_zinv does not operate on infinity. 486205aa6 Merge bitcoin-core/secp256k1#920: Test all ecmult functions with many j*2^i combinations fdb33dd12 refactor: Make PREC_BITS a parameter of ecmult_gen_build_prec_table 5eb519e1f ci: reduce TEST_ITERS in memcheck run e2cf77328 Test ecmult functions for all i*2^j for j=0..255 and odd i=1..255. 61ae37c61 Merge bitcoin-core/secp256k1#1022: build: Windows DLL additions 4f01840b8 Merge bitcoin-core/secp256k1#1027: build: Add a check that Valgrind actually supports a host platform 6ad908aa0 Merge bitcoin-core/secp256k1#1008: bench.c: add `--help` option and ci: move env variables 592661c22 ci: move test environment variable declaration to .cirrus.yml dcbe84b84 bench: add --help option to bench. 099bad945 Comment and check a parameter for inf in secp256k1_ecmult_const. 6c0be857f 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. 490022745 Merge bitcoin-core/secp256k1#1025: build: replace backtick command substitution with $() 7c7ce872a build: Add a check that Valgrind actually supports a host platform a4875e30a refactor: Move default callbacks to util.h 4c94c55bc doc: Remove obsolete hint for valgrind stack size 510622699 exhaustive_tests: Fix with ecmult_gen table with custom generator e1a76530d refactor: Make generator a parameter of ecmult_gen_create_prec_table 9ad09f691 refactor: Rename program that generates static ecmult_gen table 8ae18f1ab refactor: Rename file that contains static ecmult_gen table 00d2fa116 ecmult_gen: Make code consistent with comment 3b0c2185e ecmult_gen: Simplify ecmult_gen context after making table static 2b7c7497e build: replace backtick command substitution with $() 49f608de4 Merge bitcoin-core/secp256k1#1004: ecmult: fix definition of STRAUSS_SCRATCH_OBJECTS c0cd7de6d build: add -no-undefined to libtool LDFLAGS fe32a79d3 build: pass win32-dll to LT_INIT 60bf8890d ecmult: fix definition of STRAUSS_SCRATCH_OBJECTS fecf436d5 Merge bitcoin-core/secp256k1#1019: build: don't append valgrind CPPFLAGS if not installed (macOS) 2e5e4b67d Merge bitcoin-core/secp256k1#1020: doc: remove use of <0xa0> "no break space" 812ff5c74 doc: remove use of 0xa0 "no break space" 214042a17 build: don't append valgrind CPPFLAGS if not installed e43ba02cf refactor: Decouple table generation and ecmult_gen context 22dc2c0a0 ecmult_gen: Move table creation to new file and force static prec 793ad9016 Merge bitcoin-core/secp256k1#1010: doc: Minor fixes in safegcd_implementation.md dc9b6853b doc: Minor fixes in safegcd_implementation.md ea5e8a9c4 Merge bitcoin-core/secp256k1#1012: Fix typos 233297579 Fix typos 7006f1b97 Merge bitcoin-core/secp256k1#1011: ci: Enable -g if we set CFLAGS manually 72de1359e ci: Enable -g if we set CFLAGS manually 74c34e727 Merge bitcoin-core/secp256k1#1009: refactor: Use (int)&(int) in boolean context to avoid compiler warning 16d132215 refactor: Use (int)&(int) in boolean context to avoid compiler warning c74a7b7e5 Merge bitcoin-core/secp256k1#1007: doc: Replace apoelstra's GPG key by jonasnick's GPG key 3b157c48e doc: Suggest keys.openpgp.org as keyserver in SECURITY.md 73a7472cd doc: Replace apoelstra's GPG key by jonasnick's GPG key 515a5dbd0 Merge bitcoin-core/secp256k1#991: Merge all "external" benchmarks into a single bench binary af6abcb3d Make bench support selecting which benchmarks to run 9f56bdf5b Merge bench_schnorrsig into bench 3208557ae Merge bench_recover into bench 855e18d8a Merge bench_ecdh into bench 2a7be678a Combine bench_sign and bench_verify into single bench 8fa41201b Merge bitcoin-core/secp256k1#1002: Make aux_rnd32==NULL behave identical to 0x0000..00. 5324f8942 Make aux_rnd32==NULL behave identical to 0x0000..00. 21c188b3c Merge bitcoin-core/secp256k1#943: VERIFY_CHECK precondition for secp256k1_fe_set_int. 3e7b2ea19 Merge bitcoin-core/secp256k1#999: bench_ecmult: improve clarity of output 23e2f6672 bench: don't return 1 in have_flag() if argc = 1 96b1ad2ea bench_ecmult: improve clarity of output 20d791edf Merge bitcoin-core/secp256k1#989: Shared benchmark format for command line and CSV outputs aa1b889b6 Merge bitcoin-core/secp256k1#996: Fix G.y parity in sage code 044d95630 Fix G.y parity in sage code b4b130678 create csv file from the benchmark output 26a255beb Shared benchmark format for command line and CSV outputs 9526874d1 Merge bitcoin-core/secp256k1#810: Avoid overly-wide multiplications in 5x52 field mul/sqr 920a0e5fa Merge bitcoin-core/secp256k1#952: Avoid computing out-of-bounds pointer. f34b5cae0 Merge bitcoin-core/secp256k1#983: [RFC] Remove OpenSSL testing support 297ce8209 Merge bitcoin-core/secp256k1#966: Make aux_rand32 arg to secp256k1_schnorrsig_sign const 288864013 VERIFY_CHECK precondition for secp256k1_fe_set_int. d49011f54 Make _set_fe_int( . , 0 ) set magnitude to 0 bc08599e7 Remove OpenSSL testing support 10f9bd84f Merge bitcoin-core/secp256k1#987: Fix unused parameter warnings when building without VERIFY 189f6bcfe Fix unused parameter warnings when building without VERIFY da0092bcc Merge bitcoin-core/secp256k1#986: tests: remove `secp256k1_fe_verify` from tests.c and modify `_fe_from_storage` to call `_fe_verify` d43993724 tests: remove `secp256k1_fe_verify` from tests.c and modify `secp256k1_fe_from_storage` to call `secp256k1_fe_verify` 2a3a97c66 Merge bitcoin-core/secp256k1#976: `secp256k1_schnorrsig_sign_internal` should be static aa5d34a8f Merge bitcoin-core/secp256k1#783: Make the public API docs more consistent and explicit 72713872a Add missing static to secp256k1_schnorrsig_sign_internal db4667d5e Make aux_rand32 arg to secp256k1_schnorrsig_sign const 9a5a87e0f Merge bitcoin-core/secp256k1#956: Replace ecmult_context with a generated static array. 20abd52c2 Add tests for pre_g tables. 6815761cf Remove ecmult_context. f20dcbbad Correct typo. 16a3cc07e Generate ecmult_static_pre_g.h 8de2d86a0 Bump memory limits in advance of making the ecmult context static. d7ec49a68 Merge bitcoin-core/secp256k1#969: ci: Fixes after Debian release 5d5c74a05 tests: Rewrite code to circument potential bug in clang 3d2f492ce ci: Install libasan6 (instead of 5) after Debian upgrade be8d9c262 Merge bitcoin-core/secp256k1#965: gen_context: Don't use any ASM aeece4459 gen_context: Don't use any ASM 7688a4f13 Merge bitcoin-core/secp256k1#963: "Schnorrsig API overhaul" fixups 90e83449b ci: Add C++ test adec5a163 Add missing null check for ctx and input keys in the public API f4edfc758 Improve consistency for NULL arguments in the public interface f698caaff Use unsigned char consistently for byte arrays b5b8e7b71 Don't declare constants twice 769528f30 Don't use string literals for char arrays without NUL termination 2cc3cfa58 Fix -Wmissing-braces warning in clang 0440945fb Merge #844: schnorrsig API overhaul ec3aaa501 Merge #960: tests_exhaustive: check the result of secp256k1_ecdsa_sign a1ee83c65 tests_exhaustive: check the result of secp256k1_ecdsa_sign 253f90cde Merge bitcoin-core/secp256k1#951: configure: replace AC_PATH_PROG to AC_CHECK_PROG 446d28d9d Merge bitcoin-core/secp256k1#944: Various improvements related to CFLAGS 0302138f7 ci: Make compiler warning into errors on CI b924e1e60 build: Ensure that configure's compile checks default to -O2 7939cd571 build: List *CPPFLAGS before *CFLAGS like on the compiler command line 595e8a35d build: Enable -Wcast-align=strict warning 07256267f build: Use own variable SECP_CFLAGS instead of touching user CFLAGS 4866178df Merge bitcoin-core/secp256k1#955: Add random field multiply/square tests 75ce488c2 Merge bitcoin-core/secp256k1#959: tests: really test the non-var scalar inverse 41ed13942 tests: really test the non-var scalar inverse 5f6ceafcf schnorrsig: allow setting MSGLEN != 32 in benchmark fdd06b796 schnorrsig: add tests for sign_custom and varlen msg verification d8d806aaf schnorrsig: add extra parameter struct for sign_custom a0c3fc177 schnorrsig: allow signing and verification of variable length msgs 5a8e4991a Add secp256k1_tagged_sha256 as defined in BIP-340 b6c0b72fb schnorrsig: remove noncefp args from sign; add sign_custom function bdf19f105 Add random field multiply/square tests 9be7b0f08 Avoid computing out-of-bounds pointer. a4642fa15 configure: replace AC_PATH_PROG to AC_CHECK_PROG 442cee5ba schnorrsig: add algolen argument to nonce_function_hardened df3bfa12c schnorrsig: clarify result of calling nonce_function_bip340 without data 99e861481 README: mention schnorrsig module b53e0cd61 Avoid overly-wide multiplications git-subtree-dir: src/secp256k1 git-subtree-split: 60556c9f49a9384efd7f16b734820ae19108f053
0fa84f869 Merge bitcoin-core/secp256k1#1358: tests: introduce helper for non-zero `random_fe_test()` results 5a95a268b tests: introduce helper for non-zero `random_fe_test` results 304421d57 tests: refactor: remove duplicate function `random_field_element_test` 3aef6ab8e Merge bitcoin-core/secp256k1#1345: field: Static-assert that int args affecting magnitude are constant 4494a369b Merge bitcoin-core/secp256k1#1357: tests: refactor: take use of `secp256k1_ge_x_on_curve_var` 799f4eec2 Merge bitcoin-core/secp256k1#1356: ci: Adjust Docker image to Debian 12 "bookworm" c862a9fb4 ci: Adjust Docker image to Debian 12 "bookworm" a1782098a ci: Force DWARF v4 for Clang when Valgrind tests are expected 7d8d5c86d tests: refactor: take use of `secp256k1_ge_x_on_curve_var` 8a7273465 Help the compiler prove that a loop is entered fd491ea1b Merge bitcoin-core/secp256k1#1355: Fix a typo in the error message ac43613d2 Merge bitcoin-core/secp256k1#1354: Add ellswift to CHANGELOG 67887ae65 Fix a typo in the error message 926dd3e96 Merge bitcoin-core/secp256k1#1295: abi: Use dllexport for mingw builds 10836832e Merge bitcoin-core/secp256k1#1336: Use `__shiftright128` intrinsic in `secp256k1_u128_rshift` on MSVC 7c7467ab7 Refer to ellswift.md in API docs c32ffd8d8 Add ellswift to CHANGELOG 3c1a0fd37 Merge bitcoin-core/secp256k1#1347: field: Document return value of fe_sqrt() 705ce7ed8 Merge bitcoin-core/secp256k1#1129: ElligatorSwift + integrated x-only DH 0702ecb06 Merge bitcoin-core/secp256k1#1338: Drop no longer needed `#include "../include/secp256k1.h"` 577913745 field: Document return value of fe_sqrt() 90e360acc Add doc/ellswift.md with ElligatorSwift explanation 4f091847c Add ellswift testing to CI 1bcea8c57 Add benchmarks for ellswift module 2d1d41acf Add ctime tests for ellswift module df633cdeb Add _prefix and _bip324 ellswift_xdh hash functions 9695deb35 Add tests for ellswift module c47917bbd Add ellswift module implementing ElligatorSwift 79e5b2a8b Add functions to test if X coordinate is valid a597a5a9c Add benchmark for key generation 30574f22e Merge bitcoin-core/secp256k1#1349: Normalize ge produced from secp256k1_pubkey_load 45c5ca767 Merge bitcoin-core/secp256k1#1350: scalar: introduce and use `secp256k1_{read,write}_be64` helpers f1652528b Normalize ge produced from secp256k1_pubkey_load 7067ee54b tests: add tests for `secp256k1_{read,write}_be64` 740528caa scalar: use newly introduced `secp256k1_{read,write}_be64` helpers (4x64 impl.) be8ff3a02 field: Static-assert that int args affecting magnitude are constant 67214f5f7 Merge bitcoin-core/secp256k1#1339: scalar: refactor: use `secp256k1_{read,write}_be32` helpers cb1a59275 Merge bitcoin-core/secp256k1#1341: docs: correct `pubkey` param descriptions for `secp256k1_keypair_{xonly_,}pub` f3644287b docs: correct `pubkey` param descriptions for `secp256k1_keypair_{xonly_,}pub` 887183e7d scalar: use `secp256k1_{read,write}_be32` helpers (4x64 impl.) 52b84238d scalar: use `secp256k1_{read,write}_be32` helpers (8x32 impl.) e449af687 Drop no longer needed `#include "../include/secp256k1.h"` 5b7bf2e9d Use `__shiftright128` intrinsic in `secp256k1_u128_rshift` on MSVC 60556c9f4 Merge bitcoin-core/secp256k1#1337: ci: Fix error D8037 in `cl.exe` (attempt 2) db29bf220 ci: Remove quirk that runs dummy command after wineserver c7db4942b ci: Fix error D8037 in `cl.exe` 7dae11586 Revert "ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe" bf29f8d0a Merge bitcoin-core/secp256k1#1334: fix input range comment for `secp256k1_fe_add_int` 605e07e36 fix input range comment for `secp256k1_fe_add_int` debf3e5c0 Merge bitcoin-core/secp256k1#1330: refactor: take use of `secp256k1_scalar_{zero,one}` constants d75dc59b5 Merge bitcoin-core/secp256k1#1333: test: Warn if both `VERIFY` and `COVERAGE` are defined ade5b3670 tests: add checks for scalar constants `secp256k1_scalar_{zero,one}` e83801f5d test: Warn if both `VERIFY` and `COVERAGE` are defined 654246c63 refactor: take use of `secp256k1_scalar_{zero,one}` constants 908e02d59 Merge bitcoin-core/secp256k1#1328: build: Bump MSVC warning level up to W3 1549db0ca build: Level up MSVC warnings 20a5da5fb Merge bitcoin-core/secp256k1#1310: Refine release process ad8460329 release process: clarify change log updates 6348bc7ee release process: fix process for maintenance release 79fa50b08 release process: mention targeted release schedule 165206789 release process: add sanity checks 09df0bfb2 Merge bitcoin-core/secp256k1#1327: ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe 27504d5c9 ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe d373a7215 Merge bitcoin-core/secp256k1#1316: Do not invoke fe_is_zero on failed set_b32_limit 6433175ff Do not invoke fe_is_zero on failed set_b32_limit 5f7903c73 Merge bitcoin-core/secp256k1#1318: build: Enable -DVERIFY for precomputation binaries e9e4526a4 Merge bitcoin-core/secp256k1#1317: Make fe_cmov take max of magnitudes 5768b5022 build: Enable -DVERIFY for precomputation binaries 31b4bbee1 Make fe_cmov take max of magnitudes 83186db34 Merge bitcoin-core/secp256k1#1314: release cleanup: bump version after 0.3.2 95448ef2f release cleanup: bump version after 0.3.2 acf5c55ae Merge bitcoin-core/secp256k1#1312: release: Prepare for 0.3.2 d490ca204 release: Prepare for 0.3.2 3e3d125b8 Merge bitcoin-core/secp256k1#1309: changelog: Catch up e8295d07a Merge bitcoin-core/secp256k1#1311: Revert "Remove unused scratch space from API" 697e1ccf4 changelog: Catch up 3ad1027a4 Revert "Remove unused scratch space from API" 76b43f344 changelog: Add entry for #1303 7d4f86d24 Merge bitcoin-core/secp256k1#1307: Mark more assembly outputs as early clobber b54a0672e Merge bitcoin-core/secp256k1#1304: build: Rename arm to arm32 and check if it's really supported c6bb29b30 build: Rename `64bit` to `x86_64` 8c9ae37a5 Add release note 03246457a autotools: Add `SECP_ARM32_ASM_CHECK` macro ed4ba238e cmake: Add `check_arm32_assembly` function 350b4bd6e Mark stack variables as early clobber for technical correctness 0c729ba70 Bugfix: mark outputs as early clobber in scalar x86_64 asm 3353d3c75 Merge bitcoin-core/secp256k1#1207: Split fe_set_b32 into reducing and normalizing variants 5b3260229 Split fe_set_b32 into reducing and normalizing variants 006ddc1f4 Merge bitcoin-core/secp256k1#1306: build: Make tests work with external default callbacks 1907f0f16 build: Make tests work with external default callbacks fb3a80636 Merge bitcoin-core/secp256k1#1133: schnorrsig: Add test vectors for variable-length messages cd54ac7c1 schnorrsig: Improve docs of schnorrsig_sign_custom 28687b031 schnorrsig: Add BIP340 varlen test vectors 97a98bed1 schnorrsig: Refactor test vector code to allow varlen messages ab5a91712 Merge bitcoin-core/secp256k1#1303: ct: Use more volatile 9eb6934f6 Merge bitcoin-core/secp256k1#1305: Remove unused scratch space from API 073d98a07 Merge bitcoin-core/secp256k1#1292: refactor: Make 64-bit shift explicit 17fa21733 ct: Be cautious and use volatile trick in more "conditional" paths 5fb336f9c ct: Use volatile trick in scalar_cond_negate 712e7f872 Remove unused scratch space from API 54d34b6c2 Merge bitcoin-core/secp256k1#1300: Avoid normalize conditional on VERIFY c63ec88eb Merge bitcoin-core/secp256k1#1066: Abstract out and merge all the magnitude/normalized logic 7fc642fa2 Simplify secp256k1_fe_{impl_,}verify 4e176ad5b Abstract out verify logic for fe_is_square_var 4371f9834 Abstract out verify logic for fe_add_int 89e324c6b Abstract out verify logic for fe_half 283cd80ab Abstract out verify logic for fe_get_bounds d5aa2f035 Abstract out verify logic for fe_inv{,_var} 316764607 Abstract out verify logic for fe_from_storage 76d31e504 Abstract out verify logic for fe_to_storage 1e6894bdd Abstract out verify logic for fe_cmov be82bd8e0 Improve comments/checks for fe_sqrt 6ab35082e Abstract out verify logic for fe_sqr 4c25f6efb Abstract out verify logic for fe_mul e179e651c Abstract out verify logic for fe_add 7e7ad7ff5 Abstract out verify logic for fe_mul_int 65d82a344 Abstract out verify logic for fe_negate 144670893 Abstract out verify logic for fe_get_b32 f7a7666ae Abstract out verify logic for fe_set_b32 ce4d2093e Abstract out verify logic for fe_cmp_var 7d7d43c6d Improve comments/check for fe_equal{,_var} c5e788d67 Abstract out verify logic for fe_is_odd d3f3fe861 Abstract out verify logic for fe_is_zero c701d9a47 Abstract out verify logic for fe_clear 19a2bfeee Abstract out verify logic for fe_set_int 864f9db49 Abstract out verify logic for fe_normalizes_to_zero{,_var} 6c3137112 Abstract out verify logic for fe_normalize_var e28b51f52 Abstract out verify logic for fe_normalize_weak b6b6f9cb9 Abstract out verify logic for fe_normalize 7fa519555 Bugfix: correct SECP256K1_FE_CONST mag/norm fields e5cf4bf3f build: Rename `arm` to `arm32` b29566c51 Merge magnitude/normalized fields, move/improve comments 97c63b903 Avoid normalize conditional on VERIFY 341cc1972 Merge bitcoin-core/secp256k1#1299: Infinity handling: ecmult_const(infinity) works, and group verification bbc834467 Avoid secp256k1_ge_set_gej_zinv with uninitialized z 0a2e0b2ae Make secp256k1_{fe,ge,gej}_verify work as no-op if non-VERIFY f20266722 Add invariant checking to group elements a18821d5b Always initialize output coordinates in secp256k1_ge_set_gej 3086cb90a Expose secp256k1_fe_verify to other modules a0e696fd4 Make secp256k1_ecmult_const handle infinity 24c768ae0 Merge bitcoin-core/secp256k1#1301: Avoid using bench_verify_data as bench_sign_data; merge them 2e65f1fdb Avoid using bench_verify_data as bench_sign_data; merge them 1cf15ebd9 Merge bitcoin-core/secp256k1#1296: docs: complete interface description for `secp256k1_schnorrsig_sign_custom` bc7c8db17 abi: Use dllexport for mingw builds 149c41cee docs: complete interface description for `secp256k1_schnorrsig_sign_custom` f30c74866 Merge bitcoin-core/secp256k1#1270: cmake: Fix library ABI versioning d1e48e547 refactor: Make 64-bit shift explicit b2e29e43d ci: Treat all compiler warnings as errors in "Windows (VS 2022)" task 3c8183885 Merge bitcoin-core/secp256k1#1289: cmake: Use full signature of `add_test()` command 755629bc0 cmake: Use full signature of `add_test()` command bef448f9a cmake: Fix library ABI versioning 4b0f711d4 Merge bitcoin-core/secp256k1#1277: autotools: Clean up after adding Wycheproof 222ecaf66 Merge bitcoin-core/secp256k1#1284: cmake: Some improvements using `PROJECT_IS_TOP_LEVEL` variable 71f746c05 cmake: Include `include` directory for subtree builds 024a40948 Merge bitcoin-core/secp256k1#1240: cmake: Improve and document compiler flag checks a8d059f76 cmake, doc: Document compiler flags 6ece1507c cmake, refactor: Rename `try_add_compile_option` to `try_append_cflags` 19516ed3e cmake: Use `add_compile_options()` in `try_add_compile_option()` 4b84f4bf0 Merge bitcoin-core/secp256k1#1239: cmake: Bugfix and other improvements after bumping CMake up to 3.13 596b336ff Merge bitcoin-core/secp256k1#1234: cmake: Add dev-mode 6b7e5b717 Merge bitcoin-core/secp256k1#1275: build: Fix C4005 "macro redefinition" MSVC warnings in examples 1c8953671 Merge bitcoin-core/secp256k1#1286: tests: remove extra semicolon in macro c4062d6b5 debug: move helper for printing buffers into util.h 7e977b3c5 autotools: Take VPATH builds into account when generating testvectors 2418d3260 autotools: Create src/wycheproof dir before creating file in it 8764034ed autotools: Make all "pregenerated" targets .PHONY e1b9ce881 autotools: Use same conventions for all pregenerated files 3858bad2c tests: remove extra semicolon in macro 1f33bb2b1 Merge bitcoin-core/secp256k1#1205: field: Improve docs +tests of secp256k1_fe_set_b32 162da73e9 tests: Add debug helper for printing buffers e9fd3dff7 field: Improve docs and tests of secp256k1_fe_set_b32 f6bef03c0 Merge bitcoin-core/secp256k1#1283: Get rid of secp256k1_fe_const_b 5431b9dec cmake: Make `SECP256K1_INSTALL` default depend on `PROJECT_IS_TOP_LEVEL` 5ec1333d4 Merge bitcoin-core/secp256k1#1285: bench: Make sys/time.h a system include 68b16a166 bench: Make sys/time.h a system include 162608cc9 cmake: Emulate `PROJECT_IS_TOP_LEVEL` for CMake<3.21 69e1ec033 Get rid of secp256k1_fe_const_b ce5ba9e24 gitignore: Add CMakeUserPresets.json 0a446a312 cmake: Add dev-mode CMake preset a6f4bcf6e Merge bitcoin-core/secp256k1#1231: Move `SECP256K1_INLINE` macro definition out from `include/secp256k1.h` a273d74b2 cmake: Improve version comparison 6a58b483e cmake: Use `if(... IN_LIST ...)` command 2445808c0 cmake: Use dedicated `GENERATOR_IS_MULTI_CONFIG` property 9f8703ef1 cmake: Use dedicated `CMAKE_HOST_APPLE` variable 8c2017035 cmake: Use recommended `add_compile_definitions` command 04d4cc071 cmake: Add `DESCRIPTION` and `HOMEPAGE_URL` options to `project` command 8a8b6536e cmake: Use `SameMinorVersion` compatibility mode 5b0444a3b Merge bitcoin-core/secp256k1#1263: cmake: Make installation optional 47ac3d63c cmake: Make installation optional 2e035af25 Merge bitcoin-core/secp256k1#1273: build: Make `SECP_VALGRIND_CHECK` preserve `CPPFLAGS` 5be353d65 Merge bitcoin-core/secp256k1#1279: tests: lint wycheproof's python script 08f4b1632 autotools: Move code around to tidy Makefile 04bf3f677 Merge bitcoin-core/secp256k1#1230: Build: allow static or shared but not both 9ce9984f3 Merge bitcoin-core/secp256k1#1265: Remove bits argument from secp256k1_wnaf_const{_xonly} 566faa17d Merge bitcoin-core/secp256k1#1267: doc: clarify process for patch releases ef49a11d2 build: allow static or shared but not both 35ada3b95 tests: lint wycheproof's python script 4258c54f4 Merge bitcoin-core/secp256k1#1276: autotools: Don't regenerate Wycheproof header automatically 529b54d92 autotools: Move Wycheproof header from EXTRA_DIST to noinst_HEADERS 06c67dea9 autotools: Don't regenerate Wycheproof header automatically dc0657c76 build: Fix C4005 "macro redefinition" MSVC warnings in examples 1ecb94ebe build: Make `SECP_VALGRIND_CHECK` preserve `CPPFLAGS` 3bab71cf0 Merge bitcoin-core/secp256k1#1268: release cleanup: bump version after 0.3.1 656c6ea8d release cleanup: bump version after 0.3.1 346a053d4 Merge bitcoin-core/secp256k1#1269: changelog: Fix link 6a37b2a5e changelog: Fix link ec98fcedd Merge bitcoin-core/secp256k1#1266: release: Prepare for 0.3.1 1b6fb5593 doc: clarify process for patch releases 898e1c676 release: Prepare for 0.3.1 1d9a13fc2 changelog: Remove inconsistent newlines 0e091669a changelog: Catch up in preparation of 0.3.1 7b7503dac Merge bitcoin-core/secp256k1#1245: tests: Add Wycheproof ECDSA vectors a575339c0 Remove bits argument from secp256k1_wnaf_const (always 256) 145078c41 Merge bitcoin-core/secp256k1#1118: Add x-only ecmult_const version with x specified as n/d e5de45460 tests: Add Wycheproof ECDSA vectors 0f8642079 Add exhaustive tests for ecmult_const_xonly 4485926ac Add x-only ecmult_const version for x=n/d a0f4644f7 Merge bitcoin-core/secp256k1#1252: Make position of * in pointer declarations in include/ consistent 4e682626a Merge bitcoin-core/secp256k1#1226: Add CMake instructions to release process 2d51a454f Merge bitcoin-core/secp256k1#1257: ct: Use volatile "trick" in all fe/scalar cmov implementations 4a496a36f ct: Use volatile "trick" in all fe/scalar cmov implementations 3d1f430f9 Make position of * in pointer declarations in include/ consistent 2bca0a5cb Merge bitcoin-core/secp256k1#1241: build: Improve `SECP_TRY_APPEND_DEFAULT_CFLAGS` macro afd8b23b2 Merge bitcoin-core/secp256k1#1244: Suppress `-Wunused-parameter` when building for coverage analysis 1d8f36751 Merge bitcoin-core/secp256k1#1250: No need to subtract 1 before doing a right shift 3e43041be No need to subtract 1 before doing a right shift 3addb4c1e build: Improve `SECP_TRY_APPEND_DEFAULT_CFLAGS` macro 0c07c8283 Add CMake instructions to release process 464a9115b Merge bitcoin-core/secp256k1#1242: Set ARM ASM symbol visibility to `hidden` f16a709fd Merge bitcoin-core/secp256k1#1247: Apply Checks only in VERIFY mode. 70be3cade Merge bitcoin-core/secp256k1#1246: Typo 4ebd82852 Apply Checks only in VERIFY mode. d1e7ca192 Typo 36b0adf1b build: remove warning until it's reproducible 5bb03c291 Replace `SECP256K1_ECMULT_TABLE_VERIFY` macro by a function 9c8c4f443 Merge bitcoin-core/secp256k1#1238: build: bump CMake minimum requirement to 3.13 0cf2fb91e Merge bitcoin-core/secp256k1#1243: build: Ensure no optimization when building for coverage analysis fd2a40864 Set ARM ASM symbol visibility to `hidden` 4429a8c21 Suppress `-Wunused-parameter` when building for coverage analysis 8e79c7ed1 build: Ensure no optimization when building for coverage analysis 96dd06251 build: bump CMake minimum requirement to 3.13 427bc3cdc Merge bitcoin-core/secp256k1#1236: Update comment for secp256k1_modinv32_inv256 647f0a5cb Update comment for secp256k1_modinv32_inv256 8e142ca41 Move `SECP256K1_INLINE` macro definition out from `include/secp256k1.h` 77445898a Remove `SECP256K1_INLINE` usage from examples 565820945 Merge bitcoin-core/secp256k1#1228: release cleanup: bump version after 0.3.0 bdf39000b Merge bitcoin-core/secp256k1#1223: release: prepare for 0.3.0 28e63f7ea release cleanup: bump version after 0.3.0 b40adf236 release: prepare for 0.3.0 90b513aad Merge bitcoin-core/secp256k1#1229: cmake: Rename project to "libsecp256k1" 8be82d436 cmake: Rename project to "libsecp256k1" ef4f8bd02 Merge bitcoin-core/secp256k1#1227: readme: Use correct build type in CMake/Windows build instructions 756b61d45 readme: Use correct build type in CMake/Windows build instructions 3295aa149 Merge bitcoin-core/secp256k1#1225: changelog: Add entry for CMake 92098d84c changelog: Add entry for CMake df323b5c1 Merge bitcoin-core/secp256k1#1113: build: Add CMake-based build system e1eb33724 ci: Add "x86_64: Windows (VS 2022)" task 10602b003 cmake: Export config files 5468d7096 build: Add CMake-based build system 6048e6c03 Merge bitcoin-core/secp256k1#1222: Remove redundant checks. eb8749fcd Merge bitcoin-core/secp256k1#1221: Update Changelog 5d8f53e31 Remove redudent checks. 9d1b458d5 Merge bitcoin-core/secp256k1#1217: Add secp256k1_fe_add_int function d232112fa Update Changelog 8962fc95b Merge bitcoin-core/secp256k1#1218: Update overflow check 2ef1c9b38 Update overflow check 575731878 Merge bitcoin-core/secp256k1#1212: Prevent dead-store elimination when clearing secrets in examples b081f7e4c Add secp256k1_fe_add_int function 5660c1375 prevent optimization in algorithms 09b1d466d Merge bitcoin-core/secp256k1#979: Native jacobi symbol algorithm ce3cfc78a doc: Describe Jacobi calculation in safegcd_implementation.md 6be01036c Add secp256k1_fe_is_square_var function 1de2a01c2 Native jacobi symbol algorithm 04c6c1b18 Make secp256k1_modinv64_det_check_pow2 support abs val 5fffb2c7a Make secp256k1_i128_check_pow2 support -(2^n) cbd255593 Merge bitcoin-core/secp256k1#1209: build: Add SECP256K1_API_VAR to fix importing variables from DLLs 1b21aa517 Merge bitcoin-core/secp256k1#1078: group: Save a normalize_to_zero in gej_add_ge e4330341b ci: Shutdown wineserver whenever CI script exits 9a5a611a2 build: Suppress stupid MSVC linker warning 739c53b19 examples: Extend sig examples by call that uses static context 914276e4d build: Add SECP256K1_API_VAR to fix importing variables from DLLs 1cca7c174 Merge bitcoin-core/secp256k1#1206: build: Add -Wreserved-identifier supported by clang 8c7e0fc1d build: Add -Wreserved-identifier supported by clang ca92a35d0 field: Simplify code in secp256k1_fe_set_b32 d93f62e36 field: Verify field element even after secp256k1_fe_set_b32 fails 8ebe5c520 Merge bitcoin-core/secp256k1#1201: ci: Do not set git's `user.{email,name}` config options 5596ec5c2 Merge bitcoin-core/secp256k1#1203: Do not link `bench` and `ctime_tests` to `COMMON_LIB` ef39721cc Do not link `bench` and `ctime_tests` to `COMMON_LIB` 9b60e3148 ci: Do not set git's `user.{email,name}` config options e1817a6f5 Merge bitcoin-core/secp256k1#1199: ci: Minor improvements inspired by Bitcoin Core 1bff20058 Merge bitcoin-core/secp256k1#1200: Drop no longer used Autoheader macros 9b7d18669 Drop no longer used Autoheader macros c2415866c ci: Don't fetch git history 0ecf31885 ci: Use remote pull/merge ref instead of local git merge 2b77240b3 Merge bitcoin-core/secp256k1#1172: benchmarks: fix bench_scalar_split eb6bebaee scalar: restrict split_lambda args, improve doc and VERIFY_CHECKs 7f49aa7f2 ci: add test job with -DVERIFY 620ba3d74 benchmarks: fix bench_scalar_split 5fbff5d34 Merge bitcoin-core/secp256k1#1170: contexts: Forbid destroying, cloning and randomizing the static context 233822d84 Merge bitcoin-core/secp256k1#1195: ctime_tests: improve output when CHECKMEM_RUNNING is not defined ad7433b14 Merge bitcoin-core/secp256k1#1196: Drop no longer used variables from the build system e39d954f1 tests: Add CHECK_ILLEGAL(_VOID) macros and use in static ctx tests 2cd4e3c0a Drop no longer used `SECP_{LIBS,INCLUDE}` variables 613626f94 Drop no longer used `SECP_TEST_{LIBS,INCLUDE}` variables 61841fc9e contexts: Forbid randomizing secp256k1_context_static 4b6df5e33 contexts: Forbid cloning/destroying secp256k1_context_static b1579cf5f Merge bitcoin-core/secp256k1#1194: Ensure safety of ctz_debruijn implementation. 8f51229e0 ctime_tests: improve output when CHECKMEM_RUNNING is not defined d6ff738d5 Ensure safety of ctz_debruijn implementation. a01a7d86d Merge bitcoin-core/secp256k1#1192: Switch to exhaustive groups with small B coefficient a7a7bfaf3 Merge bitcoin-core/secp256k1#1190: Make all non-API functions (except main) static f29a32709 Merge bitcoin-core/secp256k1#1169: Add support for msan instead of valgrind (for memcheck and ctime test) ff8edf89e Merge bitcoin-core/secp256k1#1193: Add `noverify_tests` to `.gitignore` ce60785b2 Introduce SECP256K1_B macro for curve b coefficient 4934aa799 Switch to exhaustive groups with small B coefficient d4a6b58df Add `noverify_tests` to `.gitignore` 88e80722d Merge bitcoin-core/secp256k1#1160: Makefile: add `-I$(top_srcdir)/{include,src}` to `CPPFLAGS` for precomputed 0f088ec11 Rename CTIMETEST -> CTIMETESTS 74b026f05 Add runtime checking for DECLASSIFY flag 5e2e6fcfc Run ctime test in Linux MSan CI job 18974061a Make ctime tests building configurable 5048be17e Rename valgrind_ctime_test -> ctime_tests 6eed6c18d Update error messages to suggest msan as well 8e11f89a6 Add support for msan integration to checkmem.h 8dc64079e Add compile-time error to valgrind_ctime_test 0db05a770 Abstract interactions with valgrind behind new checkmem.h 4f1a54e41 Move valgrind CPPFLAGS into SECP_CONFIG_DEFINES cc3b8a4f4 Merge bitcoin-core/secp256k1#1187: refactor: Rename global variables in tests 9a93f48f5 refactor: Rename STTC to STATIC_CTX in tests 3385a2648 refactor: Rename global variables to uppercase in tests e03ef8655 Make all non-API functions (except main) static cbe41ac13 Merge bitcoin-core/secp256k1#1188: tests: Add noverify_tests which is like tests but without VERIFY 203760023 tests: Add noverify_tests which is like tests but without VERIFY e862c4af0 Makefile: add -I$(top_srcdir)/src to CPPFLAGS for precomputed 0eb300041 Merge bitcoin-core/secp256k1#1186: tests: Tidy context tests 39e8f0e3d refactor: Separate run_context_tests into static vs proper contexts a4a09379b tests: Clean up and improve run_context_tests() further fc90bb569 refactor: Tidy up main() f32a36f62 tests: Don't use global context for context tests ce4f936c4 tests: Tidy run_context_tests() by extracting functions 18e0db30c tests: Don't recreate global context in scratch space test b19806122 tests: Use global copy of secp256k1_context_static instead of clone 2a39ac162 Merge bitcoin-core/secp256k1#1185: Drop `SECP_CONFIG_DEFINES` from examples 2f9ca284e Drop `SECP_CONFIG_DEFINES` from examples 31ed5386e Merge bitcoin-core/secp256k1#1183: Bugfix: pass SECP_CONFIG_DEFINES to bench compilation c0a555b2a Bugfix: pass SECP_CONFIG_DEFINES to bench compilation 01b819a8c Merge bitcoin-core/secp256k1#1158: Add a secp256k1_i128_to_u64 function. eacad90f6 Merge bitcoin-core/secp256k1#1171: Change ARG_CHECK_NO_RETURN to ARG_CHECK_VOID which returns (void) 3f57b9f77 Merge bitcoin-core/secp256k1#1177: Some improvements to the changelog c30b889f1 Clarify that the ABI-incompatible versions are earlier 881fc33d0 Consistency in naming of modules 665ba77e7 Merge bitcoin-core/secp256k1#1178: Drop `src/libsecp256k1-config.h` 75d7b7f5b Merge bitcoin-core/secp256k1#1154: ci: set -u in cirrus.sh to treat unset variables as an error 7a7468820 ci: add missing CFLAGS & CPPFLAGS variable to print_environment c2e0fdade ci: set -u in cirrus.sh to treat unset variables as an error 9c5a4d21b Do not define unused `HAVE_VALGRIND` macro ad8647f54 Drop no longer relevant files from `.gitignore` b627ba705 Remove dependency on `src/libsecp256k1-config.h` 9ecf8149a Reduce font size in changelog 2dc133a67 Add more changelog entries ac233e181 Add links to diffs to changelog cee8223ef Mention semantic versioning in changelog 9a8d65f07 Merge bitcoin-core/secp256k1#1174: release cleanup: bump version after 0.2.0 02ebc290f release cleanup: bump version after 0.2.0 b6b360efa doc: improve message of cleanup commit 21ffe4b22 Merge bitcoin-core/secp256k1#1055: Prepare initial release e025ccdf7 release: prepare for initial release 0.2.0 6d1784a2e build: add missing files to EXTRA_DIST 8c949f56d Merge bitcoin-core/secp256k1#1173: Don't use compute credits for now 13bf1b6b3 changelog: make order of change types match keepachangelog.com b1f992a55 doc: improve release process 7e5b22684 Don't use compute credits for now a49e0940a docs: Fix typo 2551cdac9 tests: Fix code formatting c635c1bfd Change ARG_CHECK_NO_RETURN to ARG_CHECK_VOID which returns (void) cf66f2357 refactor: Add helper function secp256k1_context_is_proper() ad39e2dc4 build: change package version to 0.1.0-dev 5c789dcd7 Merge bitcoin-core/secp256k1#1168: Replace deprecated context flags with NONE in benchmarks and tests d6dc0f4ae tests: Switch to NONE contexts in module tests 0c8a5cadd tests: Switch to NONE contexts in tests.c 86540e9e1 tests: add test for deprecated flags and rm them from run_context caa0ad631 group: add gej_eq_var 37ba744f5 tests: Switch to NONE contexts in exhaustive and ctime tests 8d7a9a8ed benchmarks: Switch to NONE contexts 90618e926 doc: move CHANGELOG from doc/ to root directory e3f84777e Merge bitcoin-core/secp256k1#1126: API cleanup with respect to contexts 4386a2306 examples: Switch to NONE contexts 7289b51d3 docs: Use doxygen style if and only if comment is user-facing e7d0185c9 docs: Get rid of "initialized for signing" terminology 06126364a docs: Tidy and improve docs about contexts and randomization e02d6862b selftest: Expose in public API e383fbfa6 selftest: Rename internal function to make name available for API d2c6d48de tests: Use new name of static context 53796d2b2 contexts: Rename static context 72fedf8a6 docs: Improve docs for static context 316ac7625 contexts: Deprecate all context flags except SECP256K1_CONTEXT_NONE 477f02c4d Merge bitcoin-core/secp256k1#1165: gitignore: Add *.sage.py files autogenerated by sage [skip ci] 092be61c5 gitignore: Add *.sage.py files autogenerated by sage 1a553ee8b docs: Change signature "validation" to "verification" ee7341fba docs: Never require a verification context 751c4354d Merge bitcoin-core/secp256k1#1152: Update macOS image for CI 2286f8090 Merge bitcoin-core/secp256k1#993: Enable non-experimental modules by default d21647520 test secp256k1_i128_to_i64 4bc429019 Add a secp256k1_i128_to_u64 function. e40fd277b Merge bitcoin-core/secp256k1#1156: Followups to int128_struct arithmetic 99bd33559 Make int128 overflow test use secp256k1_[ui]128_mul a8494b02b Use compute credits for macOS jobs 3afce0af7 Avoid signed overflow in MSVC AMR64 secp256k1_mul128 c0ae48c99 Update macOS image for CI 9b5f589d3 Heuristically decide whether to use int128_struct 63ff064d2 int128: Add test override for testing __(u)mulh on MSVC X64 f2b7e8876 Add int128 randomized tests 6138d73be Merge bitcoin-core/secp256k1#1155: Add MSan CI jobs ddf2b2910 Merge bitcoin-core/secp256k1#1000: Synthetic int128 type. 86e3b38a4 Merge bitcoin-core/secp256k1#1149: Remove usage of CHECK from non-test file 00a42b91b Add MSan CI job 44916ae91 Merge bitcoin-core/secp256k1#1147: ci: print env to allow reproducing the job outside of CI c2ee9175e Merge bitcoin-core/secp256k1#1146: ci: prevent "-v/--version: not found" irrelevant error e13fae487 Merge bitcoin-core/secp256k1#1150: ci: always cat test_env.log a340d9500 ci: add int128_struct tests dceaa1f57 int128: Tidy #includes of int128.h and int128_impl.h 2914bccbc Simulated int128 type. 6a965b6b9 Remove usage of CHECK from non-test file 5c9f1a5c3 ci: always cat all logs_snippets 49ae84359 ci: mostly prevent "-v/--version: not found" irrelevant error 4e54c0315 ci: print env to allow reproducing the job outside of CI a43e982bc Merge bitcoin-core/secp256k1#1144: Cleanup `.gitignore` file f5039cb66 Cleanup `.gitignore` file 798727ae1 Revert "Add test logs to gitignore" 41e8704b4 build: Enable some modules by default 694ce8fb2 Merge bitcoin-core/secp256k1#1131: readme: Misc improvements 88b00897e readme: Fix line break 78f5296da readme: Sell "no runtime dependencies" ef48f088a readme: Add IRC channel 9f8a13dc8 Merge bitcoin-core/secp256k1#1128: configure: Remove pkgconfig macros again (reintroduced by mismerge) cabe085bb configure: Remove pkgconfig macros again (reintroduced by mismerge) 3efeb9da2 Merge bitcoin-core/secp256k1#1121: config: Set preprocessor defaults for ECMULT_* config values 6a873cc4a Merge bitcoin-core/secp256k1#1122: tests: Randomize the context with probability 15/16 instead of 1/4 17065f48a tests: Randomize the context with probability 15/16 instead of 1/4 c27ae4514 config: Remove basic-config.h da6514a04 config: Introduce DEBUG_CONFIG macro for debug output of config 63a3565e9 Merge bitcoin-core/secp256k1#1120: ecmult_gen: Skip RNG when creating blinding if no seed is available d0cf55e13 config: Set preprocessor defaults for ECMULT_* config values 55f8bc99d ecmult_gen: Improve comments about projective blinding 7a8695580 ecmult_gen: Simplify code (no observable change) 4cc0b1b66 ecmult_gen: Skip RNG when creating blinding if no seed is available af65d30cc Merge bitcoin-core/secp256k1#1116: build: Fix #include "..." paths to get rid of further -I arguments 40a3473a9 build: Fix #include "..." paths to get rid of further -I arguments 43756da81 Merge bitcoin-core/secp256k1#1115: Fix sepc256k1 -> secp256k1 typo in group.h 069aba812 Fix sepc256k1 -> secp256k1 typo in group.h accadc94d Merge bitcoin-core/secp256k1#1114: `_scratch_destroy`: move `VERIFY_CHECK` after invalid scrach space check cd4703333 Merge bitcoin-core/secp256k1#1084: ci: Add MSVC builds 1827c9bf2 scratch_destroy: move VERIFY_CHECK after invalid scrach space check 49e2acd92 configure: Improve rationale for WERROR_CFLAGS 8dc4b0334 ci: Add a C++ job that compiles the public headers without -fpermissive 51f296a46 ci: Run persistent wineserver to speed up wine 3fb3269c2 ci: Add 32-bit MinGW64 build 9efc2e522 ci: Add MSVC builds 2be6ba0fe configure: Convince autotools to work with MSVC's archiver lib.exe bd81f4140 schnorrsig bench: Suppress a stupid warning in MSVC 44c2452fd Merge bitcoin-core/secp256k1#1105: Don't export symbols in static libraries 6f6cab998 abi: Don't export symbols in static Windows libraries 485f608fa Merge bitcoin-core/secp256k1#1104: Fix the false positive of `SECP_64BIT_ASM_CHECK` 8b013fce5 Merge bitcoin-core/secp256k1#1056: Save negations in var-time group addition 7efc9835a Fix the false positive of `SECP_64BIT_ASM_CHECK` 8746600ee Merge bitcoin-core/secp256k1#1093: hash: Make code agnostic of endianness 2f984ffc4 Save negations in var-time group addition 37d36927d tests: Add tests for _read_be32 and _write_be32 912b7ccc4 Merge bitcoin-core/secp256k1#1094: doc: Clarify configure flags for optional modules 55512d30b doc: clean up module help text in configure.ac d9d94a996 doc: mention optional modules in README 616b43dd3 util: Remove endianness detection 8d89b9e6e hash: Make code agnostic of endianness d0ad5814a Merge bitcoin-core/secp256k1#995: build: stop treating schnorrsig, extrakeys modules as experimental 1ac7e31c5 Merge bitcoin-core/secp256k1#1089: Schnorrsig API improvements 587239dbe Merge bitcoin-core/secp256k1#731: Change SHA256 byte counter from size_t to uint64_t f8d917435 Add SHA256 bit counter tests 7f09d0f31 README: mention that ARM assembly is experimental b8f8b99f0 docs: Fix return value for functions that don't have invalid inputs f813bb0df schnorrsig: Adapt example to new API 99e6568fc schnorrsig: Rename schnorrsig_sign to schnorsig_sign32 and deprecate fc94a2da4 Use SECP256K1_DEPRECATED for existing deprecated API functions 3db056060 Add SECP256K1_DEPRECATED attribute for marking API parts as deprecated 09f3d71c5 configure: Add a few CFLAGS for MSVC 3b4f3d0d4 build: Reject C++ compilers in the preprocessor 1cc094141 configure: Don't abort if the compiler does not define __STDC__ 80cf4eea5 build: stop treating schnorrsig, extrakeys modules as experimental e0508ee9d Merge bitcoin-core/secp256k1#1090: configure: Remove redundant pkg-config code 21b2ebaf7 configure: Remove redundant pkg-config code cca8cbbac configure: Output message when checking for valgrind 1a6be5745 bench: Make benchmarks compile on MSVC 0e5cbd01b Merge bitcoin-core/secp256k1#1088: configure: Use modern way to set AR 0d253d52e configure: Use modern way to set AR 9b514ce1d Add test vector for very long SHA256 messages 8e3dde113 Simplify struct initializer for SHA256 padding eb28464a8 Change SHA256 byte counter from size_t to uint64_t ac83be33d Merge bitcoin-core/secp256k1#1079: configure: Add hidden --enable-dev-mode to enable all the stuff e089eecc1 group: Further simply gej_add_ge e0838d663 configure: Add hidden --enable-dev-mode to enable all the stuff fabd579df configure: Remove redundant code that sets _enable variables 0d4226c05 configure: Use canonical variable prefix _enable consistently 64b34979e Merge bitcoin-core/secp256k1#748: Add usage examples 7c9502cec Add a copy of the CC0 license to the examples 42e03432e Add usage examples to the readme 517644eab Optionally compile the examples in autotools, compile+run in travis 422a7cc86 Add a ecdh shared secret example b0cfbcc14 Add a Schnorr signing and verifying example fee7d4bf9 Add an ECDSA signing and verifying example ac71020eb group: Save a normalize_to_zero in gej_add_ge 1253a2775 Merge bitcoin-core/secp256k1#1033: Add _fe_half and use in _gej_add_ge and _gej_double 3ef94aa5b Merge bitcoin-core/secp256k1#1026: ecdh: Add test computing shared_secret=basepoint with random inputs 3531a43b5 ecdh: Make generator_basepoint test depend on global iteration count c881dd49b ecdh: Add test computing shared_secret=basepoint with random inputs 077528317 Merge bitcoin-core/secp256k1#1074: ci: Retry brew update a few times to avoid random failures e51ad3b73 ci: Retry `brew update` a few times to avoid random failures b1cb969e8 ci: Revert "Attempt to make macOS builds more reliable" 5dcc6f8db Merge bitcoin-core/secp256k1#1069: build: Replace use of deprecated autoconf macro AC_PROG_CC_C89 59547943d Merge bitcoin-core/secp256k1#1072: ci: Attempt to make macOS builds more reliable 85b00a1c6 Merge bitcoin-core/secp256k1#1068: sage: Fix incompatibility with sage 9.4 ebb1beea7 sage: Ensure that constraints are always fastfracs d8d54859e ci: Run sage prover on CI 77cfa98db sage: Normalize sign of polynomial factors in prover eae75869c sage: Exit with non-zero status in case of failures d9396a56d ci: Attempt to make macOS builds more reliable e0db3f8a2 build: Replace use of deprecated autoconf macro AC_PROG_CC_C89 e848c3799 Update sage files for new formulae d64bb5d4f Add fe_half tests for worst-case inputs b54d843ea sage: Fix printing of errors 4eb8b932f Further improve doubling formula using fe_half 557b31fac Doubling formula using fe_half 2cbb4b1a4 Run more iterations of run_field_misc 9cc5c257e Add test for secp256k1_fe_half 925f78d55 Add _fe_half and use in _gej_add_ge e108d0039 sage: Fix incompatibility with sage 9.4 d8a246324 Merge bitcoin-core/secp256k1#899: Reduce stratch space needed by ecmult_strauss_wnaf. 0a40a4861 Merge bitcoin-core/secp256k1#1049: Faster fixed-input ecmult tests 070e77221 Faster fixed-input ecmult tests c8aa516b5 Merge bitcoin-core/secp256k1#1064: Modulo-reduce msg32 inside RFC6979 nonce fn to match spec. Fixes #1063 b797a500e Create a SECP256K1_ECMULT_TABLE_VERIFY macro. a731200cc Replace ECMULT_TABLE_GET_GE_STORAGE macro with a function. fe34d9f34 Eliminate input_pos state field from ecmult_strauss_wnaf. 0397d00ba Eliminate na_1 and na_lam state fields from ecmult_strauss_wnaf. 7ba3ffcca Remove the unused pre_a_lam allocations. b3b57ad6e Eliminate the pre_a_lam array from ecmult_strauss_wnaf. ae7ba0f92 Remove the unused prej allocations. e5c18892d Eliminate the prej array from ecmult_strauss_wnaf. c9da1baad Move secp256k1_fe_one to field.h 45f37b650 Modulo-reduce msg32 inside RFC6979 nonce fn to match spec. Fixes #1063. a1102b121 Merge bitcoin-core/secp256k1#1029: Simpler and faster ecdh skew fixup e82144edf Fixup skew before global Z fixup 40b624c90 Add tests for _gej_cmov 8c13a9bfe ECDH skews by 0 or 1 151509943 Simpler and faster ecdh skew fixup 39a36db94 Merge bitcoin-core/secp256k1#1054: tests: Fix test whose result is implementation-defined a310e79ee Merge bitcoin-core/secp256k1#1052: Use xoshiro256++ instead of RFC6979 for tests 423b6d19d Merge bitcoin-core/secp256k1#964: Add release-process.md 9281c9f4e Merge bitcoin-core/secp256k1#1053: ecmult: move `_ecmult_odd_multiples_table_globalz_windowa` 77a19750b Use xoshiro256++ PRNG instead of RFC6979 in tests 5f2efe684 secp256k1_testrand_int(2**N) -> secp256k1_testrand_bits(N) 05e049b73 ecmult: move `_ecmult_odd_multiples_table_globalz_windowa` 3d7cbafb5 tests: Fix test whose result is implementation-defined 3ed0d02bf doc: add CHANGELOG template 6f42dc16c doc: add release_process.md 0bd3e4243 build: set library version to 0.0.0 explicitly b4b02fd8c build: change libsecp version from 0.1 to 0.1.0-pre 09971a3ff Merge bitcoin-core/secp256k1#1047: ci: Various improvements 0b83b203e Merge bitcoin-core/secp256k1#1030: doc: Fix upper bounds + cleanup in field_5x52_impl.h comment 1287786c7 doc: Add comment to top of field_10x26_impl.h 58da5bd58 doc: Fix upper bounds + cleanup in field_5x52_impl.h comment b39d431ae Merge bitcoin-core/secp256k1#1044: Add another ecmult_multi test b4ac1a1d5 ci: Run valgrind/memcheck tasks with 2 CPUs e70acab60 ci: Use Cirrus "greedy" flag to use idle CPU time when available d07e30176 ci: Update brew on macOS 22382f0ea ci: Test different ecmult window sizes a69df3ad2 Merge bitcoin-core/secp256k1#816: Improve checks at top of _fe_negate methods 22d25c8e0 Add another ecmult_multi test 515e7953c Improve checks at top of _fe_negate methods 26a022a3a ci: Remove STATICPRECOMPUTATION 10461d8bd precompute_ecmult: Always compute all tables up to default WINDOW_G be6944ade Merge bitcoin-core/secp256k1#1042: Follow-ups to making all tables fully static e05da9e48 Fix c++ build c45386d99 Cleanup preprocessor indentation in precompute{,d}_ecmult{,_gen} 19d96e15f Split off .c file from precomputed_ecmult.h 1a6691ada Split off .c file from precomputed_ecmult_gen.h bb3633141 Simplify precompute_ecmult_print_* 38cd84a0c Compute ecmult tables at runtime for tests_exhaustive e458ec26d Move ecmult table computation code to separate file fc1bf9f15 Split ecmult table computation and printing 31feab053 Rename function secp256k1_ecmult_gen_{create_prec -> compute}_table 725370c3f Rename ecmult_gen_prec -> ecmult_gen_compute_table 075252c1b Rename ecmult_static_pre_g -> precomputed_ecmult 7cf47f72b Rename ecmult_gen_static_prec_table -> precomputed_ecmult_gen f95b8106d Rename gen_ecmult_static_pre_g -> precompute_ecmult bae77685e Rename gen_ecmult_gen_static_prec_table -> precompute_ecmult_gen 0559fc6e4 Merge bitcoin-core/secp256k1#988: Make signing table fully static 7dfceceea build: Remove #undef hack for ASM in the precomputation programs bb36fe9be ci: Test `make precomp` d94a37a20 build: Remove CC_FOR_BUILD stuff ad63bb4c2 build: Prebuild and distribute ecmult_gen table ac49361ed prealloc: Get rid of manual memory management for prealloc contexts 6573c08f6 ecmult_gen: Tidy precomputed file and save space 5eba83f17 ecmult_gen: Precompute tables for all values of ECMULT_GEN_PREC_BITS 5d0dbef01 Merge bitcoin-core/secp256k1#942: Verify that secp256k1_ge_set_gej_zinv does not operate on infinity. 486205aa6 Merge bitcoin-core/secp256k1#920: Test all ecmult functions with many j*2^i combinations fdb33dd12 refactor: Make PREC_BITS a parameter of ecmult_gen_build_prec_table 5eb519e1f ci: reduce TEST_ITERS in memcheck run e2cf77328 Test ecmult functions for all i*2^j for j=0..255 and odd i=1..255. 61ae37c61 Merge bitcoin-core/secp256k1#1022: build: Windows DLL additions 4f01840b8 Merge bitcoin-core/secp256k1#1027: build: Add a check that Valgrind actually supports a host platform 6ad908aa0 Merge bitcoin-core/secp256k1#1008: bench.c: add `--help` option and ci: move env variables 592661c22 ci: move test environment variable declaration to .cirrus.yml dcbe84b84 bench: add --help option to bench. 099bad945 Comment and check a parameter for inf in secp256k1_ecmult_const. 6c0be857f 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. 490022745 Merge bitcoin-core/secp256k1#1025: build: replace backtick command substitution with $() 7c7ce872a build: Add a check that Valgrind actually supports a host platform a4875e30a refactor: Move default callbacks to util.h 4c94c55bc doc: Remove obsolete hint for valgrind stack size 510622699 exhaustive_tests: Fix with ecmult_gen table with custom generator e1a76530d refactor: Make generator a parameter of ecmult_gen_create_prec_table 9ad09f691 refactor: Rename program that generates static ecmult_gen table 8ae18f1ab refactor: Rename file that contains static ecmult_gen table 00d2fa116 ecmult_gen: Make code consistent with comment 3b0c2185e ecmult_gen: Simplify ecmult_gen context after making table static 2b7c7497e build: replace backtick command substitution with $() 49f608de4 Merge bitcoin-core/secp256k1#1004: ecmult: fix definition of STRAUSS_SCRATCH_OBJECTS c0cd7de6d build: add -no-undefined to libtool LDFLAGS fe32a79d3 build: pass win32-dll to LT_INIT 60bf8890d ecmult: fix definition of STRAUSS_SCRATCH_OBJECTS fecf436d5 Merge bitcoin-core/secp256k1#1019: build: don't append valgrind CPPFLAGS if not installed (macOS) 2e5e4b67d Merge bitcoin-core/secp256k1#1020: doc: remove use of <0xa0> "no break space" 812ff5c74 doc: remove use of 0xa0 "no break space" 214042a17 build: don't append valgrind CPPFLAGS if not installed e43ba02cf refactor: Decouple table generation and ecmult_gen context 22dc2c0a0 ecmult_gen: Move table creation to new file and force static prec 793ad9016 Merge bitcoin-core/secp256k1#1010: doc: Minor fixes in safegcd_implementation.md dc9b6853b doc: Minor fixes in safegcd_implementation.md ea5e8a9c4 Merge bitcoin-core/secp256k1#1012: Fix typos 233297579 Fix typos 7006f1b97 Merge bitcoin-core/secp256k1#1011: ci: Enable -g if we set CFLAGS manually 72de1359e ci: Enable -g if we set CFLAGS manually 74c34e727 Merge bitcoin-core/secp256k1#1009: refactor: Use (int)&(int) in boolean context to avoid compiler warning 16d132215 refactor: Use (int)&(int) in boolean context to avoid compiler warning c74a7b7e5 Merge bitcoin-core/secp256k1#1007: doc: Replace apoelstra's GPG key by jonasnick's GPG key 3b157c48e doc: Suggest keys.openpgp.org as keyserver in SECURITY.md 73a7472cd doc: Replace apoelstra's GPG key by jonasnick's GPG key 515a5dbd0 Merge bitcoin-core/secp256k1#991: Merge all "external" benchmarks into a single bench binary af6abcb3d Make bench support selecting which benchmarks to run 9f56bdf5b Merge bench_schnorrsig into bench 3208557ae Merge bench_recover into bench 855e18d8a Merge bench_ecdh into bench 2a7be678a Combine bench_sign and bench_verify into single bench 8fa41201b Merge bitcoin-core/secp256k1#1002: Make aux_rnd32==NULL behave identical to 0x0000..00. 5324f8942 Make aux_rnd32==NULL behave identical to 0x0000..00. 21c188b3c Merge bitcoin-core/secp256k1#943: VERIFY_CHECK precondition for secp256k1_fe_set_int. 3e7b2ea19 Merge bitcoin-core/secp256k1#999: bench_ecmult: improve clarity of output 23e2f6672 bench: don't return 1 in have_flag() if argc = 1 96b1ad2ea bench_ecmult: improve clarity of output 20d791edf Merge bitcoin-core/secp256k1#989: Shared benchmark format for command line and CSV outputs aa1b889b6 Merge bitcoin-core/secp256k1#996: Fix G.y parity in sage code 044d95630 Fix G.y parity in sage code b4b130678 create csv file from the benchmark output 26a255beb Shared benchmark format for command line and CSV outputs 9526874d1 Merge bitcoin-core/secp256k1#810: Avoid overly-wide multiplications in 5x52 field mul/sqr 920a0e5fa Merge bitcoin-core/secp256k1#952: Avoid computing out-of-bounds pointer. f34b5cae0 Merge bitcoin-core/secp256k1#983: [RFC] Remove OpenSSL testing support 297ce8209 Merge bitcoin-core/secp256k1#966: Make aux_rand32 arg to secp256k1_schnorrsig_sign const 288864013 VERIFY_CHECK precondition for secp256k1_fe_set_int. d49011f54 Make _set_fe_int( . , 0 ) set magnitude to 0 bc08599e7 Remove OpenSSL testing support 10f9bd84f Merge bitcoin-core/secp256k1#987: Fix unused parameter warnings when building without VERIFY 189f6bcfe Fix unused parameter warnings when building without VERIFY da0092bcc Merge bitcoin-core/secp256k1#986: tests: remove `secp256k1_fe_verify` from tests.c and modify `_fe_from_storage` to call `_fe_verify` d43993724 tests: remove `secp256k1_fe_verify` from tests.c and modify `secp256k1_fe_from_storage` to call `secp256k1_fe_verify` 2a3a97c66 Merge bitcoin-core/secp256k1#976: `secp256k1_schnorrsig_sign_internal` should be static aa5d34a8f Merge bitcoin-core/secp256k1#783: Make the public API docs more consistent and explicit 72713872a Add missing static to secp256k1_schnorrsig_sign_internal db4667d5e Make aux_rand32 arg to secp256k1_schnorrsig_sign const 9a5a87e0f Merge bitcoin-core/secp256k1#956: Replace ecmult_context with a generated static array. 20abd52c2 Add tests for pre_g tables. 6815761cf Remove ecmult_context. f20dcbbad Correct typo. 16a3cc07e Generate ecmult_static_pre_g.h 8de2d86a0 Bump memory limits in advance of making the ecmult context static. d7ec49a68 Merge bitcoin-core/secp256k1#969: ci: Fixes after Debian release 5d5c74a05 tests: Rewrite code to circument potential bug in clang 3d2f492ce ci: Install libasan6 (instead of 5) after Debian upgrade be8d9c262 Merge bitcoin-core/secp256k1#965: gen_context: Don't use any ASM aeece4459 gen_context: Don't use any ASM 7688a4f13 Merge bitcoin-core/secp256k1#963: "Schnorrsig API overhaul" fixups 90e83449b ci: Add C++ test adec5a163 Add missing null check for ctx and input keys in the public API f4edfc758 Improve consistency for NULL arguments in the public interface f698caaff Use unsigned char consistently for byte arrays b5b8e7b71 Don't declare constants twice 769528f30 Don't use string literals for char arrays without NUL termination 2cc3cfa58 Fix -Wmissing-braces warning in clang 0440945fb Merge #844: schnorrsig API overhaul ec3aaa501 Merge #960: tests_exhaustive: check the result of secp256k1_ecdsa_sign a1ee83c65 tests_exhaustive: check the result of secp256k1_ecdsa_sign 253f90cde Merge bitcoin-core/secp256k1#951: configure: replace AC_PATH_PROG to AC_CHECK_PROG 446d28d9d Merge bitcoin-core/secp256k1#944: Various improvements related to CFLAGS 0302138f7 ci: Make compiler warning into errors on CI b924e1e60 build: Ensure that configure's compile checks default to -O2 7939cd571 build: List *CPPFLAGS before *CFLAGS like on the compiler command line 595e8a35d build: Enable -Wcast-align=strict warning 07256267f build: Use own variable SECP_CFLAGS instead of touching user CFLAGS 4866178df Merge bitcoin-core/secp256k1#955: Add random field multiply/square tests 75ce488c2 Merge bitcoin-core/secp256k1#959: tests: really test the non-var scalar inverse 41ed13942 tests: really test the non-var scalar inverse 5f6ceafcf schnorrsig: allow setting MSGLEN != 32 in benchmark fdd06b796 schnorrsig: add tests for sign_custom and varlen msg verification d8d806aaf schnorrsig: add extra parameter struct for sign_custom a0c3fc177 schnorrsig: allow signing and verification of variable length msgs 5a8e4991a Add secp256k1_tagged_sha256 as defined in BIP-340 b6c0b72fb schnorrsig: remove noncefp args from sign; add sign_custom function bdf19f105 Add random field multiply/square tests 9be7b0f08 Avoid computing out-of-bounds pointer. a4642fa15 configure: replace AC_PATH_PROG to AC_CHECK_PROG 442cee5ba schnorrsig: add algolen argument to nonce_function_hardened df3bfa12c schnorrsig: clarify result of calling nonce_function_bip340 without data 99e861481 README: mention schnorrsig module b53e0cd61 Avoid overly-wide multiplications git-subtree-dir: src/secp256k1 git-subtree-split: 0fa84f869d51e1b71113d81fcd518ebcee08709a
b911b3cbd5 Merge BlockstreamResearch/secp256k1-zkp#265: bppp: Fix test for invalid sign byte again 5bf57590bf bppp: Fix test for invalid sign byte again b2ccc8d9fd Merge BlockstreamResearch/secp256k1-zkp#260: Finish sync to upstream 395e65e9f1 Merge branch 'master' into sync-upstream 394e09ee84 musig: change test vector generation code shebang from python to python3 aa3edea119 scalar: Remove unused secp256k1_scalar_chacha20 167194bede rangeproof: Use util functions for writing big endian 82777bba34 bppp: Fix test for invalid sign byte 54b37db953 build: Fix linkage of extra binaries in -zkp modules 9e96a2e9d8 hsort tests: Don't call secp256k1_testrand_int(0) 80187089ff Merge commits '4494a369 3aef6ab8 0fa84f86 249c81ea 7966aee3 fb758fe8 3fc1de5c 0aacf643 9e6d1b0e 332af315 afd7eb4a c9ebca95 cc557575 0f7657d5 907a6721 b40e2d30 c545fdc3 2bd5f3e6 0e00fc7d c734c642 26392da2 ' into temp-merge-1386 50e20fa7d4 Merge BlockstreamResearch/secp256k1-zkp#257: Upstream PRs 1314, 1317, 1318, 1316, 1327, 1310, 1328, 1333, 1330, 1334, 1337, 1341, 1339, 1350, 1349, 1338, 1129, 1347, 1336, 1295, 1354, 1355, 1356 525b661f83 bppp/build: Fix linkage of benchmark 4c70cc9bf5 Suppress wrong/buggy warning in MSVC <19.33 579999b425 scalar: adjust muladd2 to new int128 interface b160486766 ecdsa_adaptor: add missing include 74d9073414 Merge commits '83186db3 e9e4526a 5f7903c7 d373a721 09df0bfb 20a5da5f 908e02d5 d75dc59b debf3e5c bf29f8d0 60556c9f cb1a5927 67214f5f 45c5ca76 30574f22 0702ecb0 705ce7ed 3c1a0fd3 10836832 926dd3e9 ac43613d fd491ea1 799f4eec ' into temp-merge-1356 26392da2fb Merge bitcoin-core/secp256k1#1386: ci: print $ELLSWIFT in cirrus.sh 4692478853 ci: print $ELLSWIFT in cirrus.sh c734c64278 Merge bitcoin-core/secp256k1#1384: build: enable ellswift module via SECP_CONFIG_DEFINES 78ca880788 build: enable ellswift module via SECP_CONFIG_DEFINES 0e00fc7d10 Merge bitcoin-core/secp256k1#1383: util: remove unused checked_realloc b097a466c1 util: remove unused checked_realloc e593ed5685 musig: ensure point_load output is normalized 7a07f3d33f Merge commits '3bab71cf 4258c54f 566faa17 9ce9984f 04bf3f67 5be353d6 2e035af2 5b0444a3 a6f4bcf6 5ec1333d f6bef03c 1f33bb2b 1c895367 6b7e5b71 596b336f 4b84f4bf 024a4094 222ecaf6 4b0f711d 3c818388 f30c7486 1cf15ebd 24c768ae 341cc197 c63ec88e 54d34b6c 073d98a0 9eb6934f ab5a9171 fb3a8063 006ddc1f 3353d3c7 b54a0672 7d4f86d2 e8295d07 3e3d125b acf5c55a ' into temp-merge-1312 2bd5f3e618 Merge bitcoin-core/secp256k1#1382: refactor: Drop unused cast a9a5c24de2 Merge commits '56582094 427bc3cd 0cf2fb91 9c8c4f44 70be3cad f16a709f 464a9115 1d8f3675 afd8b23b 2bca0a5c 2d51a454 4e682626 a0f4644f 145078c4 7b7503da ec98fced 346a053d ' into temp-merge-1269 4f8c5bd761 refactor: Drop unused cast bfeae121fb Merge BlockstreamResearch/secp256k1-zkp#255: musig: change test vector generation code shebang from python to python3 ea478beec6 musig: change test vector generation code shebang from python to python3 d47e4d40ca Merge BlockstreamResearch/secp256k1-zkp#252: Upstream PRs 1113, 1225, 1227, 1229, 1223 dc733595b0 Merge commits 'df323b5c 3295aa14 ef4f8bd0 90b513aa bdf39000 ' into temp-merge-1223 3937cefce6 Merge BlockstreamResearch/secp256k1-zkp#249: Upstream PRs 1160, 1193, 1169, 1190, 1192, 1194, 1196, 1195, 1170, 1172, 1200, 1199, 1203, 1201, 1206, 1078, 1209, 979, 1212, 1218, 1217, 1221, 1222 897c765a49 Merge BlockstreamResearch/secp256k1-zkp#251: Update sync-upstream with master 53bc63f9f9 Merge BlockstreamResearch/secp256k1-zkp#245: scalar: Remove unused secp256k1_scalar_chacha20 860360eed4 scalar: Remove unused secp256k1_scalar_chacha20 3970a7292a rangeproof: Use util functions for writing big endian afe7e649ee Merge BlockstreamResearch/secp256k1-zkp#248: bppp: Fix and improve test for invalid sign byte 1a6d93f8b6 Merge BlockstreamResearch/secp256k1-zkp#250: ci: Always define EXPERIMENTAL variable 3372993060 bppp: Fix test for invalid sign byte 7e9193666f ci: Always define EXPERIMENTAL variable 0d540ec942 Merge commits '88e80722 ff8edf89 f29a3270 a7a7bfaf a01a7d86 b1579cf5 ad7433b1 233822d8 5fbff5d3 2b77240b 1bff2005 e1817a6f 5596ec5c 8ebe5c52 1cca7c17 1b21aa51 cbd25559 09b1d466 57573187 8962fc95 9d1b458d eb8749fc 6048e6c0 ' into temp-merge-1222 7aa9887128 Merge pull request ElementsProject#246 from jonasnick/temp-merge-1187 304fc88557 Merge commits '9a8d65f0 75d7b7f5 665ba77e 3f57b9f7 eacad90f 01b819a8 31ed5386 2a39ac16 0eb30004 cbe41ac1 cc3b8a4f ' into temp-merge-1187 58e27bc2d2 Merge BlockstreamResearch/secp256k1-zkp#244: sync-upstream.sh: Add "git show --remerge-diff" tip c545fdc374 Merge bitcoin-core/secp256k1#1298: Remove randomness tests 0a99156871 sync-upstream.sh: Add "git show --remerge-diff" tip 6c54db1987 Merge commits '2286f809 751c4354 477f02c4 e3f84777 5c789dcd 8c949f56 21ffe4b2 ' into temp-merge-1055 30fc9d6551 Merge BlockstreamResearch/secp256k1-zkp#242: sync-upstream.sh: Fix position of "-b" option in reproduce command 9b6a1c384d sync-upstream.sh: Fix position of "-b" option in reproduce command b40e2d30b7 Merge bitcoin-core/secp256k1#1378: ellswift: fix probabilistic test failure when swapping sides e996d076da Merge commits '44916ae9 86e3b38a ddf2b291 6138d73b e40fd277 ' into temp-merge-1156 533571d6cf Merge BlockstreamResearch/secp256k1-zkp#239: sync-upstream: allows providing the local branch via cli 05b207e969 sync-upstream: allows providing the local branch via cli 64717a7b16 Merge commits '8b013fce 485f608f 44c2452f cd470333 accadc94 43756da8 af65d30c 63a3565e 6a873cc4 3efeb9da 9f8a13dc 694ce8fb a43e982b e13fae48 c2ee9175 ' into temp-merge-1146 9a981068ce Merge commits '8b013fce 485f608f 44c2452f cd470333 accadc94 43756da8 ' into temp-merge-1115 c424e2fb43 ellswift: fix probabilistic test failure when swapping sides 907a67212e Merge bitcoin-core/secp256k1#1313: ci: Test on development snapshots of GCC and Clang 0f7657d59c Merge bitcoin-core/secp256k1#1366: field: Use `restrict` consistently in fe_sqrt cc55757552 Merge bitcoin-core/secp256k1#1340: clean up in-comment Sage code (refer to secp256k1_params.sage, update to Python3) 600c5adcd5 clean up in-comment Sage code (refer to secp256k1_params.sage, update to Python3) 981e5be38c ci: Fix typo in comment e9e9648219 ci: Reduce number of macOS tasks from 28 to 8 609093b387 ci: Add x86_64 Linux tasks for gcc and clang snapshots 1deecaaf3b ci: Install development snapshots of gcc and clang b79ba8aa4c field: Use `restrict` consistently in fe_sqrt c9ebca95f9 Merge bitcoin-core/secp256k1#1363: doc: minor ellswift.md updates afd7eb4a55 Merge bitcoin-core/secp256k1#1371: Add exhaustive tests for ellswift (with create+decode roundtrip) 2792119278 Add exhaustive test for ellswift (create+decode roundtrip) c7d900ffd1 doc: minor ellswift.md updates 332af315fc Merge bitcoin-core/secp256k1#1344: group: save normalize_weak calls in `secp256k1_ge_is_valid_var`/`secp256k1_gej_eq_x_var` 9e6d1b0e9b Merge bitcoin-core/secp256k1#1367: build: Improvements to symbol visibility logic on Windows (attempt 3) 0aacf64352 Merge bitcoin-core/secp256k1#1370: Corrected some typos b6b9834e8d small fixes 07c0e8b82e group: remove unneeded normalize_weak in `secp256k1_gej_eq_x_var` 3fc1de5c55 Merge bitcoin-core/secp256k1#1364: Avoid `-Wmaybe-uninitialized` when compiling with `gcc -O1` fb758fe8d6 Merge bitcoin-core/secp256k1#1323: tweak_add: fix API doc for tweak=0 c6cd2b15a0 ci: Add task for static library on Windows + CMake 020bf69a44 build: Add extensive docs on visibility issues 0196e8ade1 build: Introduce `SECP256k1_DLL_EXPORT` macro 9f1b1904a3 refactor: Replace `SECP256K1_API_VAR` with `SECP256K1_API` ae9db95cea build: Introduce `SECP256K1_STATIC` macro for Windows users 7966aee31d Merge bitcoin-core/secp256k1#1369: ci: Print commit in Windows container a7bec34231 ci: Print commit in Windows container 249c81eaa3 Merge bitcoin-core/secp256k1#1368: ci: Drop manual checkout of merge commit 98579e297b ci: Drop manual checkout of merge commit 5b9f37f136 ci: Add `CFLAGS: -O1` to task matrix a6ca76cdf2 Avoid `-Wmaybe-uninitialized` when compiling with `gcc -O1` 0fa84f869d Merge bitcoin-core/secp256k1#1358: tests: introduce helper for non-zero `random_fe_test()` results 5a95a268b9 tests: introduce helper for non-zero `random_fe_test` results 304421d57b tests: refactor: remove duplicate function `random_field_element_test` 3aef6ab8e1 Merge bitcoin-core/secp256k1#1345: field: Static-assert that int args affecting magnitude are constant 4494a369b6 Merge bitcoin-core/secp256k1#1357: tests: refactor: take use of `secp256k1_ge_x_on_curve_var` 799f4eec27 Merge bitcoin-core/secp256k1#1356: ci: Adjust Docker image to Debian 12 "bookworm" c862a9fb49 ci: Adjust Docker image to Debian 12 "bookworm" a1782098a9 ci: Force DWARF v4 for Clang when Valgrind tests are expected 7d8d5c86df tests: refactor: take use of `secp256k1_ge_x_on_curve_var` 8a7273465b Help the compiler prove that a loop is entered fd491ea1bb Merge bitcoin-core/secp256k1#1355: Fix a typo in the error message ac43613d25 Merge bitcoin-core/secp256k1#1354: Add ellswift to CHANGELOG 67887ae65c Fix a typo in the error message 926dd3e962 Merge bitcoin-core/secp256k1#1295: abi: Use dllexport for mingw builds 10836832e7 Merge bitcoin-core/secp256k1#1336: Use `__shiftright128` intrinsic in `secp256k1_u128_rshift` on MSVC 7c7467ab7f Refer to ellswift.md in API docs c32ffd8d8c Add ellswift to CHANGELOG 3c1a0fd37f Merge bitcoin-core/secp256k1#1347: field: Document return value of fe_sqrt() 705ce7ed8c Merge bitcoin-core/secp256k1#1129: ElligatorSwift + integrated x-only DH 0702ecb061 Merge bitcoin-core/secp256k1#1338: Drop no longer needed `#include "../include/secp256k1.h"` 5779137457 field: Document return value of fe_sqrt() 90e360acc2 Add doc/ellswift.md with ElligatorSwift explanation 4f091847c2 Add ellswift testing to CI 1bcea8c57f Add benchmarks for ellswift module 2d1d41acf8 Add ctime tests for ellswift module df633cdeba Add _prefix and _bip324 ellswift_xdh hash functions 9695deb351 Add tests for ellswift module c47917bbd6 Add ellswift module implementing ElligatorSwift 79e5b2a8b8 Add functions to test if X coordinate is valid a597a5a9ce Add benchmark for key generation 30574f22ea Merge bitcoin-core/secp256k1#1349: Normalize ge produced from secp256k1_pubkey_load 45c5ca7675 Merge bitcoin-core/secp256k1#1350: scalar: introduce and use `secp256k1_{read,write}_be64` helpers f1652528be Normalize ge produced from secp256k1_pubkey_load 7067ee54b4 tests: add tests for `secp256k1_{read,write}_be64` 740528caad scalar: use newly introduced `secp256k1_{read,write}_be64` helpers (4x64 impl.) be8ff3a02a field: Static-assert that int args affecting magnitude are constant efa76c4bf7 group: remove unneeded normalize_weak in `secp256k1_ge_is_valid_var` 67214f5f7d Merge bitcoin-core/secp256k1#1339: scalar: refactor: use `secp256k1_{read,write}_be32` helpers cb1a59275c Merge bitcoin-core/secp256k1#1341: docs: correct `pubkey` param descriptions for `secp256k1_keypair_{xonly_,}pub` f3644287b1 docs: correct `pubkey` param descriptions for `secp256k1_keypair_{xonly_,}pub` 887183e7de scalar: use `secp256k1_{read,write}_be32` helpers (4x64 impl.) 52b84238de scalar: use `secp256k1_{read,write}_be32` helpers (8x32 impl.) e449af6872 Drop no longer needed `#include "../include/secp256k1.h"` 5b7bf2e9d4 Use `__shiftright128` intrinsic in `secp256k1_u128_rshift` on MSVC 60556c9f49 Merge bitcoin-core/secp256k1#1337: ci: Fix error D8037 in `cl.exe` (attempt 2) db29bf220c ci: Remove quirk that runs dummy command after wineserver c7db4942b3 ci: Fix error D8037 in `cl.exe` 7dae115861 Revert "ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe" bf29f8d0a6 Merge bitcoin-core/secp256k1#1334: fix input range comment for `secp256k1_fe_add_int` 605e07e365 fix input range comment for `secp256k1_fe_add_int` debf3e5c08 Merge bitcoin-core/secp256k1#1330: refactor: take use of `secp256k1_scalar_{zero,one}` constants d75dc59b58 Merge bitcoin-core/secp256k1#1333: test: Warn if both `VERIFY` and `COVERAGE` are defined ade5b36701 tests: add checks for scalar constants `secp256k1_scalar_{zero,one}` e83801f5db test: Warn if both `VERIFY` and `COVERAGE` are defined 654246c635 refactor: take use of `secp256k1_scalar_{zero,one}` constants 908e02d596 Merge bitcoin-core/secp256k1#1328: build: Bump MSVC warning level up to W3 1549db0ca5 build: Level up MSVC warnings 20a5da5fb1 Merge bitcoin-core/secp256k1#1310: Refine release process 05873bb6b1 tweak_add: fix API doc for tweak=0 ad84603297 release process: clarify change log updates 6348bc7eee release process: fix process for maintenance release 79fa50b082 release process: mention targeted release schedule 165206789b release process: add sanity checks 09df0bfb23 Merge bitcoin-core/secp256k1#1327: ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe 27504d5c94 ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe d373a7215b Merge bitcoin-core/secp256k1#1316: Do not invoke fe_is_zero on failed set_b32_limit 6433175ffe Do not invoke fe_is_zero on failed set_b32_limit 5f7903c73c Merge bitcoin-core/secp256k1#1318: build: Enable -DVERIFY for precomputation binaries e9e4526a4e Merge bitcoin-core/secp256k1#1317: Make fe_cmov take max of magnitudes 5768b50229 build: Enable -DVERIFY for precomputation binaries 31b4bbee1e Make fe_cmov take max of magnitudes ff33018fe7 Merge BlockstreamResearch/secp256k1-zkp#232: Backports from libsecp256k1 v0.3.2 39407c3f59 Mark stack variables as early clobber for technical correctness 56a5d41429 Bugfix: mark outputs as early clobber in scalar x86_64 asm c8c0f55a11 ct: Be cautious and use volatile trick in more "conditional" paths 3e94289966 ct: Use volatile trick in scalar_cond_negate 83186db34a Merge bitcoin-core/secp256k1#1314: release cleanup: bump version after 0.3.2 95448ef2f8 release cleanup: bump version after 0.3.2 acf5c55ae6 Merge bitcoin-core/secp256k1#1312: release: Prepare for 0.3.2 d490ca2046 release: Prepare for 0.3.2 3e3d125b83 Merge bitcoin-core/secp256k1#1309: changelog: Catch up e8295d07ab Merge bitcoin-core/secp256k1#1311: Revert "Remove unused scratch space from API" 697e1ccf4a changelog: Catch up 3ad1027a40 Revert "Remove unused scratch space from API" 76b43f3443 changelog: Add entry for ElementsProject#1303 7d4f86d242 Merge bitcoin-core/secp256k1#1307: Mark more assembly outputs as early clobber b54a0672ef Merge bitcoin-core/secp256k1#1304: build: Rename arm to arm32 and check if it's really supported c6bb29b303 build: Rename `64bit` to `x86_64` 8c9ae37a5a Add release note edcba04c28 Merge BlockstreamResearch/secp256k1-zkp#231: musig: add note about missing verification to partial_sign to doc 03246457a8 autotools: Add `SECP_ARM32_ASM_CHECK` macro ed4ba238e2 cmake: Add `check_arm32_assembly` function 350b4bd6e6 Mark stack variables as early clobber for technical correctness 0c729ba70d Bugfix: mark outputs as early clobber in scalar x86_64 asm 3353d3c753 Merge bitcoin-core/secp256k1#1207: Split fe_set_b32 into reducing and normalizing variants 4ab4ec38a0 musig: add note about missing verification to partial_sign to doc f50ad76004 musig: update version number of BIP 5b32602295 Split fe_set_b32 into reducing and normalizing variants 006ddc1f42 Merge bitcoin-core/secp256k1#1306: build: Make tests work with external default callbacks 1907f0f166 build: Make tests work with external default callbacks fb3a806365 Merge bitcoin-core/secp256k1#1133: schnorrsig: Add test vectors for variable-length messages cd54ac7c1c schnorrsig: Improve docs of schnorrsig_sign_custom 28687b0312 schnorrsig: Add BIP340 varlen test vectors 97a98bed1e schnorrsig: Refactor test vector code to allow varlen messages ab5a917128 Merge bitcoin-core/secp256k1#1303: ct: Use more volatile 9eb6934f69 Merge bitcoin-core/secp256k1#1305: Remove unused scratch space from API 073d98a076 Merge bitcoin-core/secp256k1#1292: refactor: Make 64-bit shift explicit 17fa21733a ct: Be cautious and use volatile trick in more "conditional" paths 5fb336f9ce ct: Use volatile trick in scalar_cond_negate 712e7f8722 Remove unused scratch space from API 54d34b6c24 Merge bitcoin-core/secp256k1#1300: Avoid normalize conditional on VERIFY c63ec88ebf Merge bitcoin-core/secp256k1#1066: Abstract out and merge all the magnitude/normalized logic 7fc642fa25 Simplify secp256k1_fe_{impl_,}verify 4e176ad5b9 Abstract out verify logic for fe_is_square_var 4371f98346 Abstract out verify logic for fe_add_int 89e324c6b9 Abstract out verify logic for fe_half 283cd80ab4 Abstract out verify logic for fe_get_bounds d5aa2f0358 Abstract out verify logic for fe_inv{,_var} 3167646072 Abstract out verify logic for fe_from_storage 76d31e5047 Abstract out verify logic for fe_to_storage 1e6894bdd7 Abstract out verify logic for fe_cmov be82bd8e03 Improve comments/checks for fe_sqrt 6ab35082ef Abstract out verify logic for fe_sqr 4c25f6efbd Abstract out verify logic for fe_mul e179e651cb Abstract out verify logic for fe_add 7e7ad7ff57 Abstract out verify logic for fe_mul_int 65d82a3445 Abstract out verify logic for fe_negate 144670893e Abstract out verify logic for fe_get_b32 f7a7666aeb Abstract out verify logic for fe_set_b32 ce4d2093e8 Abstract out verify logic for fe_cmp_var 7d7d43c6dd Improve comments/check for fe_equal{,_var} c5e788d672 Abstract out verify logic for fe_is_odd d3f3fe8616 Abstract out verify logic for fe_is_zero c701d9a471 Abstract out verify logic for fe_clear 19a2bfeeea Abstract out verify logic for fe_set_int 864f9db491 Abstract out verify logic for fe_normalizes_to_zero{,_var} 6c31371120 Abstract out verify logic for fe_normalize_var e28b51f522 Abstract out verify logic for fe_normalize_weak b6b6f9cb97 Abstract out verify logic for fe_normalize 7fa5195559 Bugfix: correct SECP256K1_FE_CONST mag/norm fields e5cf4bf3ff build: Rename `arm` to `arm32` b29566c51b Merge magnitude/normalized fields, move/improve comments 97c63b9039 Avoid normalize conditional on VERIFY 341cc19726 Merge bitcoin-core/secp256k1#1299: Infinity handling: ecmult_const(infinity) works, and group verification 6ec3731e8c Simplify test PRNG implementation bbc834467c Avoid secp256k1_ge_set_gej_zinv with uninitialized z 0a2e0b2ae4 Make secp256k1_{fe,ge,gej}_verify work as no-op if non-VERIFY f20266722a Add invariant checking to group elements a18821d5b1 Always initialize output coordinates in secp256k1_ge_set_gej 3086cb90ac Expose secp256k1_fe_verify to other modules a0e696fd4d Make secp256k1_ecmult_const handle infinity 24c768ae09 Merge bitcoin-core/secp256k1#1301: Avoid using bench_verify_data as bench_sign_data; merge them 2e65f1fdbc Avoid using bench_verify_data as bench_sign_data; merge them fb5bfa4eed Add static test vector for Xoshiro256++ 1cf15ebd94 Merge bitcoin-core/secp256k1#1296: docs: complete interface description for `secp256k1_schnorrsig_sign_custom` 4eab2c2fd8 Merge BlockstreamResearch/secp256k1-zkp#230: norm arg: add prove test vectors 723e8ca8f7 Remove randomness tests bc7c8db179 abi: Use dllexport for mingw builds 149c41cee1 docs: complete interface description for `secp256k1_schnorrsig_sign_custom` f30c74866b Merge bitcoin-core/secp256k1#1270: cmake: Fix library ABI versioning d1e48e5474 refactor: Make 64-bit shift explicit b2e29e43d0 ci: Treat all compiler warnings as errors in "Windows (VS 2022)" task 3c81838856 Merge bitcoin-core/secp256k1#1289: cmake: Use full signature of `add_test()` command 755629bc03 cmake: Use full signature of `add_test()` command bef448f9af cmake: Fix library ABI versioning 4b0f711d46 Merge bitcoin-core/secp256k1#1277: autotools: Clean up after adding Wycheproof 222ecaf661 Merge bitcoin-core/secp256k1#1284: cmake: Some improvements using `PROJECT_IS_TOP_LEVEL` variable 71f746c057 cmake: Include `include` directory for subtree builds 024a409484 Merge bitcoin-core/secp256k1#1240: cmake: Improve and document compiler flag checks a8d059f76c cmake, doc: Document compiler flags 6ece1507cb cmake, refactor: Rename `try_add_compile_option` to `try_append_cflags` 19516ed3e9 cmake: Use `add_compile_options()` in `try_add_compile_option()` 4b84f4bf0f Merge bitcoin-core/secp256k1#1239: cmake: Bugfix and other improvements after bumping CMake up to 3.13 596b336ff6 Merge bitcoin-core/secp256k1#1234: cmake: Add dev-mode 6b7e5b717d Merge bitcoin-core/secp256k1#1275: build: Fix C4005 "macro redefinition" MSVC warnings in examples 1c89536718 Merge bitcoin-core/secp256k1#1286: tests: remove extra semicolon in macro c4062d6b5d debug: move helper for printing buffers into util.h f3126fdfec norm arg: remove prove edge tests which are now covered by vectors 847ed9ecb2 norm arg: add verification to prove vectors 7e977b3c50 autotools: Take VPATH builds into account when generating testvectors 2418d3260a autotools: Create src/wycheproof dir before creating file in it 8764034ed5 autotools: Make all "pregenerated" targets .PHONY e1b9ce8811 autotools: Use same conventions for all pregenerated files cf797ed2a4 norm arg: add prove test vectors 095c1e749c norm arg: add prove_const to tests ce18267b66 Merge BlockstreamResearch/secp256k1-zkp#229: musig: Fix nits left open in ElementsProject#211 78ed0e09ca Merge BlockstreamResearch/secp256k1-zkp#227: Use relative #include paths and tidy header guards (as in upstream) 3858bad2c6 tests: remove extra semicolon in macro 1f33bb2b1c Merge bitcoin-core/secp256k1#1205: field: Improve docs +tests of secp256k1_fe_set_b32 e7fc61ff16 Merge BlockstreamResearch/secp256k1-zkp#228: Simple dedicated -zkp README 162da73e9a tests: Add debug helper for printing buffers e9fd3dff76 field: Improve docs and tests of secp256k1_fe_set_b32 a0b51afc01 musig: VERIFY_CHECK preconditions of _musig_keyaggcoef_internal() da7702844e extrakeys: Clarify comparison order of compare/sort functions f6bef03c0a Merge bitcoin-core/secp256k1#1283: Get rid of secp256k1_fe_const_b 5431b9decd cmake: Make `SECP256K1_INSTALL` default depend on `PROJECT_IS_TOP_LEVEL` 5ec1333d4f Merge bitcoin-core/secp256k1#1285: bench: Make sys/time.h a system include 4d9d8f92d4 Simple dedicated -zkp README e444d24bca Fix include guards: No _ prefix/suffix but _H suffix (as in upstream) 0eea7d97ab Use relative #include paths in tests (as in upstream) c690d6df70 Use relative #include paths in benchmarks (as in upstream) c565827c1a Use relative #include paths in ctime_test (as in upstream) 4eca406f4c Use relative #include paths in library (as in upstream) 68b16a1662 bench: Make sys/time.h a system include 162608cc98 cmake: Emulate `PROJECT_IS_TOP_LEVEL` for CMake<3.21 69e1ec0331 Get rid of secp256k1_fe_const_b bf7bf8a64f norm arg: split norm_arg_zero into prove_edge and verify_zero_len a70c4d4a8a norm arg: add test vector for |n| = 0 f5e4b16f0f norm arg: add test vector for sign bit malleability c0de361fc5 norm arg: allow X and R to be the point at infinity f22834f202 norm arg: add verify vector for n = [0], l = [0] d8e7f3763b musig: move ge_{serialize,parse}_ext to module-independent file 050d9b2912 Merge BlockstreamResearch/secp256k1-zkp#226: bppp: align terminology with paper ce5ba9e24d gitignore: Add CMakeUserPresets.json 0a446a312f cmake: Add dev-mode CMake preset a6f4bcf6e1 Merge bitcoin-core/secp256k1#1231: Move `SECP256K1_INLINE` macro definition out from `include/secp256k1.h` a273d74b2e cmake: Improve version comparison 6a58b483ef cmake: Use `if(... IN_LIST ...)` command 2445808c02 cmake: Use dedicated `GENERATOR_IS_MULTI_CONFIG` property 9f8703ef17 cmake: Use dedicated `CMAKE_HOST_APPLE` variable 8c2017035a cmake: Use recommended `add_compile_definitions` command 04d4cc071a cmake: Add `DESCRIPTION` and `HOMEPAGE_URL` options to `project` command 8a8b6536ef cmake: Use `SameMinorVersion` compatibility mode 5b0444a3b5 Merge bitcoin-core/secp256k1#1263: cmake: Make installation optional 47ac3d63cd cmake: Make installation optional 2e035af251 Merge bitcoin-core/secp256k1#1273: build: Make `SECP_VALGRIND_CHECK` preserve `CPPFLAGS` 5be353d658 Merge bitcoin-core/secp256k1#1279: tests: lint wycheproof's python script 08f4b1632d autotools: Move code around to tidy Makefile 2c63d17c1e bppp: align terminology with paper (gamma) dbf2e4d3e1 bppp: align terminology with paper (mu, rho) 04bf3f6778 Merge bitcoin-core/secp256k1#1230: Build: allow static or shared but not both 9ce9984f32 Merge bitcoin-core/secp256k1#1265: Remove bits argument from secp256k1_wnaf_const{_xonly} 566faa17d3 Merge bitcoin-core/secp256k1#1267: doc: clarify process for patch releases ef49a11d29 build: allow static or shared but not both f4dd0419aa Merge BlockstreamResearch/secp256k1-zkp#225: sync-upstream: Use --autostash to handle uncommitted changes 35ada3b954 tests: lint wycheproof's python script 4258c54f4e Merge bitcoin-core/secp256k1#1276: autotools: Don't regenerate Wycheproof header automatically 529b54d922 autotools: Move Wycheproof header from EXTRA_DIST to noinst_HEADERS 06c67dea9f autotools: Don't regenerate Wycheproof header automatically dc0657c762 build: Fix C4005 "macro redefinition" MSVC warnings in examples 1ecb94ebe9 build: Make `SECP_VALGRIND_CHECK` preserve `CPPFLAGS` 13c438cdee sync-upstream: Use --autostash to handle uncommitted changes 6ec1ff6040 Merge BlockstreamResearch/secp256k1-zkp#224: Backport of "ct: Use volatile "trick" in all fe/scalar cmov implementations" 96f4853850 ct: Use volatile "trick" in all fe/scalar cmov implementations 3bab71cf05 Merge bitcoin-core/secp256k1#1268: release cleanup: bump version after 0.3.1 656c6ea8d8 release cleanup: bump version after 0.3.1 346a053d4c Merge bitcoin-core/secp256k1#1269: changelog: Fix link 6a37b2a5ea changelog: Fix link ec98fcedd5 Merge bitcoin-core/secp256k1#1266: release: Prepare for 0.3.1 1b6fb5593c doc: clarify process for patch releases 898e1c676e release: Prepare for 0.3.1 1d9a13fc26 changelog: Remove inconsistent newlines 0e091669a1 changelog: Catch up in preparation of 0.3.1 7b7503dac5 Merge bitcoin-core/secp256k1#1245: tests: Add Wycheproof ECDSA vectors a575339c02 Remove bits argument from secp256k1_wnaf_const (always 256) 145078c418 Merge bitcoin-core/secp256k1#1118: Add x-only ecmult_const version with x specified as n/d e5de454609 tests: Add Wycheproof ECDSA vectors 0f8642079b Add exhaustive tests for ecmult_const_xonly 4485926ace Add x-only ecmult_const version for x=n/d a0f4644f7e Merge bitcoin-core/secp256k1#1252: Make position of * in pointer declarations in include/ consistent 4e682626a3 Merge bitcoin-core/secp256k1#1226: Add CMake instructions to release process 2d51a454fc Merge bitcoin-core/secp256k1#1257: ct: Use volatile "trick" in all fe/scalar cmov implementations 4a496a36fb ct: Use volatile "trick" in all fe/scalar cmov implementations 3d1f430f9f Make position of * in pointer declarations in include/ consistent 2bca0a5cbf Merge bitcoin-core/secp256k1#1241: build: Improve `SECP_TRY_APPEND_DEFAULT_CFLAGS` macro afd8b23b27 Merge bitcoin-core/secp256k1#1244: Suppress `-Wunused-parameter` when building for coverage analysis 1d8f367515 Merge bitcoin-core/secp256k1#1250: No need to subtract 1 before doing a right shift 3e43041be6 No need to subtract 1 before doing a right shift 3addb4c1e8 build: Improve `SECP_TRY_APPEND_DEFAULT_CFLAGS` macro 0c07c82834 Add CMake instructions to release process 464a9115b4 Merge bitcoin-core/secp256k1#1242: Set ARM ASM symbol visibility to `hidden` f16a709fd6 Merge bitcoin-core/secp256k1#1247: Apply Checks only in VERIFY mode. 70be3cade5 Merge bitcoin-core/secp256k1#1246: Typo 4ebd82852d Apply Checks only in VERIFY mode. d1e7ca192d Typo 36b0adf1b9 build: remove warning until it's reproducible 5bb03c2911 Replace `SECP256K1_ECMULT_TABLE_VERIFY` macro by a function 9c8c4f443c Merge bitcoin-core/secp256k1#1238: build: bump CMake minimum requirement to 3.13 0cf2fb91ef Merge bitcoin-core/secp256k1#1243: build: Ensure no optimization when building for coverage analysis fd2a408647 Set ARM ASM symbol visibility to `hidden` 4429a8c218 Suppress `-Wunused-parameter` when building for coverage analysis 8e79c7ed11 build: Ensure no optimization when building for coverage analysis 96dd062511 build: bump CMake minimum requirement to 3.13 427bc3cdcf Merge bitcoin-core/secp256k1#1236: Update comment for secp256k1_modinv32_inv256 647f0a5cb1 Update comment for secp256k1_modinv32_inv256 8e142ca410 Move `SECP256K1_INLINE` macro definition out from `include/secp256k1.h` 77445898a5 Remove `SECP256K1_INLINE` usage from examples 5658209459 Merge bitcoin-core/secp256k1#1228: release cleanup: bump version after 0.3.0 bdf39000b9 Merge bitcoin-core/secp256k1#1223: release: prepare for 0.3.0 28e63f7ea7 release cleanup: bump version after 0.3.0 b40adf2360 release: prepare for 0.3.0 90b513aada Merge bitcoin-core/secp256k1#1229: cmake: Rename project to "libsecp256k1" 8be82d4362 cmake: Rename project to "libsecp256k1" ef4f8bd025 Merge bitcoin-core/secp256k1#1227: readme: Use correct build type in CMake/Windows build instructions 756b61d451 readme: Use correct build type in CMake/Windows build instructions 3295aa149b Merge bitcoin-core/secp256k1#1225: changelog: Add entry for CMake 92098d84cf changelog: Add entry for CMake df323b5c14 Merge bitcoin-core/secp256k1#1113: build: Add CMake-based build system e1eb33724c ci: Add "x86_64: Windows (VS 2022)" task 10602b0030 cmake: Export config files 5468d70964 build: Add CMake-based build system 6048e6c03e Merge bitcoin-core/secp256k1#1222: Remove redundant checks. eb8749fcd0 Merge bitcoin-core/secp256k1#1221: Update Changelog 5d8f53e312 Remove redudent checks. 9d1b458d5f Merge bitcoin-core/secp256k1#1217: Add secp256k1_fe_add_int function d232112fa7 Update Changelog 8962fc95bb Merge bitcoin-core/secp256k1#1218: Update overflow check 2ef1c9b387 Update overflow check 1d25608900 Merge BlockstreamResearch/secp256k1-zkp#223: musig: Update to BIP v1.0.0-rc.4 (Check pubnonce in NonceGen vectors) d23c23e24d musig: Update to BIP v1.0.0-rc.4 (Check pubnonce in NonceGen vectors) c4862f6869 Merge BlockstreamResearch/secp256k1-zkp#215: musig: include pubkey in secnonce and compare when signing a1ec2bb67b musig: add test for signing with wrong secnonce for a keypair bd57a017aa musig: include pubkey in secnonce and compare when signing 5757318782 Merge bitcoin-core/secp256k1#1212: Prevent dead-store elimination when clearing secrets in examples b081f7e4cb Add secp256k1_fe_add_int function 4f57024d86 Merge BlockstreamResearch/secp256k1-zkp#211: Update musig module to BIP MuSig2 v1.0.0-rc.3 5660c13755 prevent optimization in algorithms 09b1d466db Merge bitcoin-core/secp256k1#979: Native jacobi symbol algorithm ce3cfc78a6 doc: Describe Jacobi calculation in safegcd_implementation.md 6be01036c8 Add secp256k1_fe_is_square_var function 1de2a01c2b Native jacobi symbol algorithm 04c6c1b181 Make secp256k1_modinv64_det_check_pow2 support abs val 5fffb2c7af Make secp256k1_i128_check_pow2 support -(2^n) 8ec6d111c8 Merge BlockstreamResearch/secp256k1-zkp#205: Bulletproofs++: Norm argument cbd2555934 Merge bitcoin-core/secp256k1#1209: build: Add SECP256K1_API_VAR to fix importing variables from DLLs 1b21aa5175 Merge bitcoin-core/secp256k1#1078: group: Save a normalize_to_zero in gej_add_ge d7fb25c8ca Make sure that bppp_log2 isn't called with value 0 e5a01d12c6 Rename buletproof_pp* to bppp* c983186872 transcript: add tests 73edc75528 norm arg: add verification vectors 13ad32e814 norm arg: add tests for zero length and zero vectors 34c4847a6a ci: add bulletproofs 2574516483 Add testcases for bulletproofs++ norm arugment 46c7391154 Add norm argument verify API b43dd83b43 musig: add missing static keyword to function 068e6a036a musig: add test vectors from BIP MuSig 36621d13be musig: update to BIP v1.0.0-rc.2 "Add ''pk'' arg to ''NonceGen''" d717a4980b musig: update to BIP v0.8 "Switch from X-only to plain pk inputs." 304f1bc96d extrakeys: add pubkey_sort test vectors from BIP MuSig2 ae89051547 extrakeys: replace xonly_sort with pubkey_sort 98242fcdd9 extrakeys: add secp256k1_pubkey_cmp 73d5b6654d musig: update to BIP v0.7.0 (NonceGen) 060887e9d7 musig: update to BIP v0.5.1 "Rename ordinary tweaking to plain" d9145455bb Add bulletproofs++ norm argument prove API 8638f0e0ce Add internal BP++ commit API 412f8f66a0 Add utility functions required in norm argument 420353d7da Add utilities for log2 17417d44f3 Add utilities from uncompressed Bulletproofs PR 48563c8c79 bulletproofs: add API functionality to generate a large set of generators 048f9f8642 bulletproofs: add new empty module 6162d577fe generator: cleanups in Pedersen/generator code e4330341bd ci: Shutdown wineserver whenever CI script exits 9a5a611a21 build: Suppress stupid MSVC linker warning 739c53b19a examples: Extend sig examples by call that uses static context 914276e4d2 build: Add SECP256K1_API_VAR to fix importing variables from DLLs 1cca7c1744 Merge bitcoin-core/secp256k1#1206: build: Add -Wreserved-identifier supported by clang 8c7e0fc1de build: Add -Wreserved-identifier supported by clang ca92a35d01 field: Simplify code in secp256k1_fe_set_b32 d93f62e369 field: Verify field element even after secp256k1_fe_set_b32 fails 8ebe5c5205 Merge bitcoin-core/secp256k1#1201: ci: Do not set git's `user.{email,name}` config options 5596ec5c2c Merge bitcoin-core/secp256k1#1203: Do not link `bench` and `ctime_tests` to `COMMON_LIB` ef39721ccc Do not link `bench` and `ctime_tests` to `COMMON_LIB` 9b60e3148d ci: Do not set git's `user.{email,name}` config options e1817a6f54 Merge bitcoin-core/secp256k1#1199: ci: Minor improvements inspired by Bitcoin Core 1bff200588 Merge bitcoin-core/secp256k1#1200: Drop no longer used Autoheader macros 9b7d18669d Drop no longer used Autoheader macros c2415866c7 ci: Don't fetch git history 0ecf318851 ci: Use remote pull/merge ref instead of local git merge 0a6006989f Revert "Remove unused scalar_sqr" 87373f5145 MOVE ONLY: move Pedersen commitment stuff to generator module from rangeproof module b1f1675375 Merge BlockstreamResearch/secp256k1-zkp#214: sync-upstream: Fix $REPRODUCE_COMMAND for "select" cbe2815633 musig: update to BIP v0.4 "Allow the output of NonceAgg to be inf" 206017d67d musig: update to BIP v0.3 (NonceGen) d800dd55db musig: remove test vectors a58c7d29bd Merge BlockstreamResearch/secp256k1-zkp#213: Update macOS image for CI e04c660b11 sync-upstream: Fix $REPRODUCE_COMMAND for "select" 3b2c675955 Update macOS image for CI 2b77240b3b Merge bitcoin-core/secp256k1#1172: benchmarks: fix bench_scalar_split eb6bebaee3 scalar: restrict split_lambda args, improve doc and VERIFY_CHECKs 7f49aa7f2d ci: add test job with -DVERIFY 620ba3d74b benchmarks: fix bench_scalar_split 5fbff5d348 Merge bitcoin-core/secp256k1#1170: contexts: Forbid destroying, cloning and randomizing the static context 233822d849 Merge bitcoin-core/secp256k1#1195: ctime_tests: improve output when CHECKMEM_RUNNING is not defined ad7433b140 Merge bitcoin-core/secp256k1#1196: Drop no longer used variables from the build system e39d954f11 tests: Add CHECK_ILLEGAL(_VOID) macros and use in static ctx tests 2cd4e3c0a9 Drop no longer used `SECP_{LIBS,INCLUDE}` variables 613626f94c Drop no longer used `SECP_TEST_{LIBS,INCLUDE}` variables 61841fc9ee contexts: Forbid randomizing secp256k1_context_static 4b6df5e33e contexts: Forbid cloning/destroying secp256k1_context_static b1579cf5fb Merge bitcoin-core/secp256k1#1194: Ensure safety of ctz_debruijn implementation. 8f51229e03 ctime_tests: improve output when CHECKMEM_RUNNING is not defined d6ff738d5b Ensure safety of ctz_debruijn implementation. a01a7d86dc Merge bitcoin-core/secp256k1#1192: Switch to exhaustive groups with small B coefficient a7a7bfaf3d Merge bitcoin-core/secp256k1#1190: Make all non-API functions (except main) static f29a327092 Merge bitcoin-core/secp256k1#1169: Add support for msan instead of valgrind (for memcheck and ctime test) ff8edf89e2 Merge bitcoin-core/secp256k1#1193: Add `noverify_tests` to `.gitignore` ce60785b26 Introduce SECP256K1_B macro for curve b coefficient 4934aa7995 Switch to exhaustive groups with small B coefficient d4a6b58df7 Add `noverify_tests` to `.gitignore` 88e80722d2 Merge bitcoin-core/secp256k1#1160: Makefile: add `-I$(top_srcdir)/{include,src}` to `CPPFLAGS` for precomputed 0f088ec112 Rename CTIMETEST -> CTIMETESTS 74b026f05d Add runtime checking for DECLASSIFY flag 5e2e6fcfc0 Run ctime test in Linux MSan CI job 18974061a3 Make ctime tests building configurable 5048be17e9 Rename valgrind_ctime_test -> ctime_tests 6eed6c18de Update error messages to suggest msan as well 8e11f89a68 Add support for msan integration to checkmem.h 8dc64079eb Add compile-time error to valgrind_ctime_test 0db05a770e Abstract interactions with valgrind behind new checkmem.h 4f1a54e41d Move valgrind CPPFLAGS into SECP_CONFIG_DEFINES cc3b8a4f40 Merge bitcoin-core/secp256k1#1187: refactor: Rename global variables in tests 9a93f48f50 refactor: Rename STTC to STATIC_CTX in tests 3385a2648d refactor: Rename global variables to uppercase in tests e03ef86559 Make all non-API functions (except main) static cbe41ac138 Merge bitcoin-core/secp256k1#1188: tests: Add noverify_tests which is like tests but without VERIFY 203760023c tests: Add noverify_tests which is like tests but without VERIFY e862c4af0c Makefile: add -I$(top_srcdir)/src to CPPFLAGS for precomputed 0eb3000417 Merge bitcoin-core/secp256k1#1186: tests: Tidy context tests 39e8f0e3d7 refactor: Separate run_context_tests into static vs proper contexts a4a09379b1 tests: Clean up and improve run_context_tests() further fc90bb5695 refactor: Tidy up main() f32a36f620 tests: Don't use global context for context tests ce4f936c4f tests: Tidy run_context_tests() by extracting functions 18e0db30cb tests: Don't recreate global context in scratch space test b19806122e tests: Use global copy of secp256k1_context_static instead of clone 2a39ac162e Merge bitcoin-core/secp256k1#1185: Drop `SECP_CONFIG_DEFINES` from examples 2f9ca284e2 Drop `SECP_CONFIG_DEFINES` from examples 31ed5386e8 Merge bitcoin-core/secp256k1#1183: Bugfix: pass SECP_CONFIG_DEFINES to bench compilation c0a555b2ae Bugfix: pass SECP_CONFIG_DEFINES to bench compilation 01b819a8c7 Merge bitcoin-core/secp256k1#1158: Add a secp256k1_i128_to_u64 function. eacad90f69 Merge bitcoin-core/secp256k1#1171: Change ARG_CHECK_NO_RETURN to ARG_CHECK_VOID which returns (void) 3f57b9f774 Merge bitcoin-core/secp256k1#1177: Some improvements to the changelog c30b889f17 Clarify that the ABI-incompatible versions are earlier 881fc33d0c Consistency in naming of modules 665ba77e79 Merge bitcoin-core/secp256k1#1178: Drop `src/libsecp256k1-config.h` 75d7b7f5ba Merge bitcoin-core/secp256k1#1154: ci: set -u in cirrus.sh to treat unset variables as an error 7a74688201 ci: add missing CFLAGS & CPPFLAGS variable to print_environment c2e0fdadeb ci: set -u in cirrus.sh to treat unset variables as an error 9c5a4d21bb Do not define unused `HAVE_VALGRIND` macro ad8647f548 Drop no longer relevant files from `.gitignore` b627ba7050 Remove dependency on `src/libsecp256k1-config.h` 9ecf8149a1 Reduce font size in changelog 2dc133a67f Add more changelog entries ac233e181a Add links to diffs to changelog cee8223ef6 Mention semantic versioning in changelog 9a8d65f07f Merge bitcoin-core/secp256k1#1174: release cleanup: bump version after 0.2.0 02ebc290f7 release cleanup: bump version after 0.2.0 b6b360efaf doc: improve message of cleanup commit 21ffe4b22a Merge bitcoin-core/secp256k1#1055: Prepare initial release e025ccdf74 release: prepare for initial release 0.2.0 6d1784a2e2 build: add missing files to EXTRA_DIST 8c949f56da Merge bitcoin-core/secp256k1#1173: Don't use compute credits for now 13bf1b6b32 changelog: make order of change types match keepachangelog.com b1f992a552 doc: improve release process 7e5b22684f Don't use compute credits for now a49e0940ad docs: Fix typo 2551cdac90 tests: Fix code formatting c635c1bfd5 Change ARG_CHECK_NO_RETURN to ARG_CHECK_VOID which returns (void) cf66f2357c refactor: Add helper function secp256k1_context_is_proper() ad39e2dc41 build: change package version to 0.1.0-dev 5c789dcd73 Merge bitcoin-core/secp256k1#1168: Replace deprecated context flags with NONE in benchmarks and tests d6dc0f4ae3 tests: Switch to NONE contexts in module tests 0c8a5caddd tests: Switch to NONE contexts in tests.c 86540e9e1f tests: add test for deprecated flags and rm them from run_context caa0ad631e group: add gej_eq_var 37ba744f5b tests: Switch to NONE contexts in exhaustive and ctime tests 8d7a9a8eda benchmarks: Switch to NONE contexts 90618e9263 doc: move CHANGELOG from doc/ to root directory e3f84777eb Merge bitcoin-core/secp256k1#1126: API cleanup with respect to contexts 4386a2306c examples: Switch to NONE contexts 7289b51d31 docs: Use doxygen style if and only if comment is user-facing e7d0185c90 docs: Get rid of "initialized for signing" terminology 06126364ad docs: Tidy and improve docs about contexts and randomization e02d6862bd selftest: Expose in public API e383fbfa66 selftest: Rename internal function to make name available for API d2c6d48de3 tests: Use new name of static context 53796d2b24 contexts: Rename static context 72fedf8a6c docs: Improve docs for static context 316ac7625a contexts: Deprecate all context flags except SECP256K1_CONTEXT_NONE 477f02c4de Merge bitcoin-core/secp256k1#1165: gitignore: Add *.sage.py files autogenerated by sage [skip ci] 092be61c5e gitignore: Add *.sage.py files autogenerated by sage 1a553ee8be docs: Change signature "validation" to "verification" ee7341fbac docs: Never require a verification context 751c4354d5 Merge bitcoin-core/secp256k1#1152: Update macOS image for CI 2286f80902 Merge bitcoin-core/secp256k1#993: Enable non-experimental modules by default d216475205 test secp256k1_i128_to_i64 4bc429019d Add a secp256k1_i128_to_u64 function. e40fd277b7 Merge bitcoin-core/secp256k1#1156: Followups to int128_struct arithmetic 99bd335599 Make int128 overflow test use secp256k1_[ui]128_mul a8494b02bf Use compute credits for macOS jobs 3afce0af7c Avoid signed overflow in MSVC AMR64 secp256k1_mul128 c0ae48c995 Update macOS image for CI 9b5f589d30 Heuristically decide whether to use int128_struct 63ff064d2f int128: Add test override for testing __(u)mulh on MSVC X64 f2b7e88768 Add int128 randomized tests 6138d73be4 Merge bitcoin-core/secp256k1#1155: Add MSan CI jobs ddf2b2910e Merge bitcoin-core/secp256k1#1000: Synthetic int128 type. 86e3b38a4a Merge bitcoin-core/secp256k1#1149: Remove usage of CHECK from non-test file 00a42b91b3 Add MSan CI job 44916ae915 Merge bitcoin-core/secp256k1#1147: ci: print env to allow reproducing the job outside of CI c2ee9175e9 Merge bitcoin-core/secp256k1#1146: ci: prevent "-v/--version: not found" irrelevant error e13fae487e Merge bitcoin-core/secp256k1#1150: ci: always cat test_env.log a340d9500a ci: add int128_struct tests dceaa1f579 int128: Tidy #includes of int128.h and int128_impl.h 2914bccbc0 Simulated int128 type. 6a965b6b98 Remove usage of CHECK from non-test file 5c9f1a5c37 ci: always cat all logs_snippets 49ae843592 ci: mostly prevent "-v/--version: not found" irrelevant error 4e54c03153 ci: print env to allow reproducing the job outside of CI a43e982bca Merge bitcoin-core/secp256k1#1144: Cleanup `.gitignore` file f5039cb66c Cleanup `.gitignore` file 798727ae1e Revert "Add test logs to gitignore" d22774e248 Merge BlockstreamResearch/secp256k1-zkp#203: MuSig doc fixes dd83e72d52 Add ordinary tweak info d26100cab2 Exclude nonce_process from pre-processing steps b7607f93f2 Fix reference to xonly_tweak_add f7e9a8544f Merge BlockstreamResearch/secp256k1-zkp#201: rangeproof: add secp256k1_rangeproof_max_size function to estimate rangeproof size 6b6ced9839 rangeproof: add more max_size tests 34876ecb5f rangeproof: add more static test vectors 310e517061 rangeproof: add a bunch more testing f1410cb67a rangeproof: add secp256k1_rangeproof_max_size function to estimate rangeproof size c137ddbdff Merge BlockstreamResearch/secp256k1-zkp#200: build: automatically enable module dependencies 0202d839fb Merge BlockstreamResearch/secp256k1-zkp#199: surjectionproof: make sure that n_used_pubkeys > 0 in generate 5ac8fb035e surjectionproof: make sure that n_used_pubkeys > 0 in generate 7ff446df8b Merge BlockstreamResearch/secp256k1-zkp#198: rangeproof: add a test for all-zero blinding factors 5a40f3d99b replace memcmp with secp256k1_memcmp_var throughout the codebase 92820d944b rangeproof: add a test for all-zero blinding factors 171b294a1c build: improve error message if --enable-experimental is missed 58ab152bb4 build: move all output concerning enabled modules at single place 1493113e61 build: automatically enable module dependencies 4fd7e1eabd Merge BlockstreamResearch/secp256k1-zkp#197: fix include paths in all the -zkp modules 347f96d94a fix include paths in all the -zkp modules 41e8704b48 build: Enable some modules by default 694ce8fb2d Merge bitcoin-core/secp256k1#1131: readme: Misc improvements 88b00897e7 readme: Fix line break 78f5296da4 readme: Sell "no runtime dependencies" ef48f088ad readme: Add IRC channel d1d6e47c17 Merge BlockstreamResearch/secp256k1-zkp#196: surjectionproof: fail to generate proofs when an input equals the output d1175d265d surjectionproof: use secp256k1_memcmp_var rather than bare memcmp bf18ff5a8c surjectionproof: fix generation to fail when any input == the output 4ff6e4274d surjectionproof: add test for existing behavior on input=output proofs 9f8a13dc8e Merge bitcoin-core/secp256k1#1128: configure: Remove pkgconfig macros again (reintroduced by mismerge) cabe085bb4 configure: Remove pkgconfig macros again (reintroduced by mismerge) 71a206fa5b Merge BlockstreamResearch/secp256k1-zkp#194: extrakeys: rename swap/swap64 to fix OpenBSD 7.1 compilation db648478c3 extrakeys: rename swap/swap64 to fix OpenBSD 7.1 compilation 3efeb9da21 Merge bitcoin-core/secp256k1#1121: config: Set preprocessor defaults for ECMULT_* config values 6a873cc4a9 Merge bitcoin-core/secp256k1#1122: tests: Randomize the context with probability 15/16 instead of 1/4 17065f48ae tests: Randomize the context with probability 15/16 instead of 1/4 c27ae45144 config: Remove basic-config.h da6514a04a config: Introduce DEBUG_CONFIG macro for debug output of config 63a3565e97 Merge bitcoin-core/secp256k1#1120: ecmult_gen: Skip RNG when creating blinding if no seed is available d0cf55e13a config: Set preprocessor defaults for ECMULT_* config values 55f8bc99dc ecmult_gen: Improve comments about projective blinding 7a86955800 ecmult_gen: Simplify code (no observable change) 4cc0b1b669 ecmult_gen: Skip RNG when creating blinding if no seed is available af65d30cc8 Merge bitcoin-core/secp256k1#1116: build: Fix #include "..." paths to get rid of further -I arguments 40a3473a9d build: Fix #include "..." paths to get rid of further -I arguments 43756da819 Merge bitcoin-core/secp256k1#1115: Fix sepc256k1 -> secp256k1 typo in group.h 069aba8125 Fix sepc256k1 -> secp256k1 typo in group.h accadc94df Merge bitcoin-core/secp256k1#1114: `_scratch_destroy`: move `VERIFY_CHECK` after invalid scrach space check cd47033335 Merge bitcoin-core/secp256k1#1084: ci: Add MSVC builds 1827c9bf2b scratch_destroy: move VERIFY_CHECK after invalid scrach space check 49e2acd927 configure: Improve rationale for WERROR_CFLAGS 8dc4b03341 ci: Add a C++ job that compiles the public headers without -fpermissive 51f296a46c ci: Run persistent wineserver to speed up wine 3fb3269c22 ci: Add 32-bit MinGW64 build 9efc2e5221 ci: Add MSVC builds 2be6ba0fed configure: Convince autotools to work with MSVC's archiver lib.exe bd81f4140a schnorrsig bench: Suppress a stupid warning in MSVC 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` 2f984ffc45 Save negations in var-time group addition 09f3d71c51 configure: Add a few CFLAGS for MSVC 3b4f3d0d46 build: Reject C++ compilers in the preprocessor 1cc0941414 configure: Don't abort if the compiler does not define __STDC__ cca8cbbac8 configure: Output message when checking for valgrind 1a6be5745f bench: Make benchmarks compile on MSVC e089eecc1e group: Further simply gej_add_ge ac71020ebe group: Save a normalize_to_zero in gej_add_ge git-subtree-dir: src/secp256k1 git-subtree-split: b911b3cbd5814aed69d97144eb3093fa806d3a7f
b2ccc8d9fd Merge BlockstreamResearch/secp256k1-zkp#260: Finish sync to upstream 395e65e9f1 Merge branch 'master' into sync-upstream 394e09ee84 musig: change test vector generation code shebang from python to python3 aa3edea119 scalar: Remove unused secp256k1_scalar_chacha20 167194bede rangeproof: Use util functions for writing big endian 82777bba34 bppp: Fix test for invalid sign byte 54b37db953 build: Fix linkage of extra binaries in -zkp modules 9e96a2e9d8 hsort tests: Don't call secp256k1_testrand_int(0) 80187089ff Merge commits '4494a369 3aef6ab8 0fa84f86 249c81ea 7966aee3 fb758fe8 3fc1de5c 0aacf643 9e6d1b0e 332af315 afd7eb4a c9ebca95 cc557575 0f7657d5 907a6721 b40e2d30 c545fdc3 2bd5f3e6 0e00fc7d c734c642 26392da2 ' into temp-merge-1386 50e20fa7d4 Merge BlockstreamResearch/secp256k1-zkp#257: Upstream PRs 1314, 1317, 1318, 1316, 1327, 1310, 1328, 1333, 1330, 1334, 1337, 1341, 1339, 1350, 1349, 1338, 1129, 1347, 1336, 1295, 1354, 1355, 1356 525b661f83 bppp/build: Fix linkage of benchmark 4c70cc9bf5 Suppress wrong/buggy warning in MSVC <19.33 579999b425 scalar: adjust muladd2 to new int128 interface b160486766 ecdsa_adaptor: add missing include 74d9073414 Merge commits '83186db3 e9e4526a 5f7903c7 d373a721 09df0bfb 20a5da5f 908e02d5 d75dc59b debf3e5c bf29f8d0 60556c9f cb1a5927 67214f5f 45c5ca76 30574f22 0702ecb0 705ce7ed 3c1a0fd3 10836832 926dd3e9 ac43613d fd491ea1 799f4eec ' into temp-merge-1356 26392da2fb Merge bitcoin-core/secp256k1#1386: ci: print $ELLSWIFT in cirrus.sh 4692478853 ci: print $ELLSWIFT in cirrus.sh c734c64278 Merge bitcoin-core/secp256k1#1384: build: enable ellswift module via SECP_CONFIG_DEFINES 78ca880788 build: enable ellswift module via SECP_CONFIG_DEFINES 0e00fc7d10 Merge bitcoin-core/secp256k1#1383: util: remove unused checked_realloc b097a466c1 util: remove unused checked_realloc e593ed5685 musig: ensure point_load output is normalized 7a07f3d33f Merge commits '3bab71cf 4258c54f 566faa17 9ce9984f 04bf3f67 5be353d6 2e035af2 5b0444a3 a6f4bcf6 5ec1333d f6bef03c 1f33bb2b 1c895367 6b7e5b71 596b336f 4b84f4bf 024a4094 222ecaf6 4b0f711d 3c818388 f30c7486 1cf15ebd 24c768ae 341cc197 c63ec88e 54d34b6c 073d98a0 9eb6934f ab5a9171 fb3a8063 006ddc1f 3353d3c7 b54a0672 7d4f86d2 e8295d07 3e3d125b acf5c55a ' into temp-merge-1312 2bd5f3e618 Merge bitcoin-core/secp256k1#1382: refactor: Drop unused cast a9a5c24de2 Merge commits '56582094 427bc3cd 0cf2fb91 9c8c4f44 70be3cad f16a709f 464a9115 1d8f3675 afd8b23b 2bca0a5c 2d51a454 4e682626 a0f4644f 145078c4 7b7503da ec98fced 346a053d ' into temp-merge-1269 4f8c5bd761 refactor: Drop unused cast bfeae121fb Merge BlockstreamResearch/secp256k1-zkp#255: musig: change test vector generation code shebang from python to python3 ea478beec6 musig: change test vector generation code shebang from python to python3 d47e4d40ca Merge BlockstreamResearch/secp256k1-zkp#252: Upstream PRs 1113, 1225, 1227, 1229, 1223 dc733595b0 Merge commits 'df323b5c 3295aa14 ef4f8bd0 90b513aa bdf39000 ' into temp-merge-1223 3937cefce6 Merge BlockstreamResearch/secp256k1-zkp#249: Upstream PRs 1160, 1193, 1169, 1190, 1192, 1194, 1196, 1195, 1170, 1172, 1200, 1199, 1203, 1201, 1206, 1078, 1209, 979, 1212, 1218, 1217, 1221, 1222 897c765a49 Merge BlockstreamResearch/secp256k1-zkp#251: Update sync-upstream with master 53bc63f9f9 Merge BlockstreamResearch/secp256k1-zkp#245: scalar: Remove unused secp256k1_scalar_chacha20 860360eed4 scalar: Remove unused secp256k1_scalar_chacha20 3970a7292a rangeproof: Use util functions for writing big endian afe7e649ee Merge BlockstreamResearch/secp256k1-zkp#248: bppp: Fix and improve test for invalid sign byte 1a6d93f8b6 Merge BlockstreamResearch/secp256k1-zkp#250: ci: Always define EXPERIMENTAL variable 3372993060 bppp: Fix test for invalid sign byte 7e9193666f ci: Always define EXPERIMENTAL variable 0d540ec942 Merge commits '88e80722 ff8edf89 f29a3270 a7a7bfaf a01a7d86 b1579cf5 ad7433b1 233822d8 5fbff5d3 2b77240b 1bff2005 e1817a6f 5596ec5c 8ebe5c52 1cca7c17 1b21aa51 cbd25559 09b1d466 57573187 8962fc95 9d1b458d eb8749fc 6048e6c0 ' into temp-merge-1222 7aa9887128 Merge pull request ElementsProject#246 from jonasnick/temp-merge-1187 304fc88557 Merge commits '9a8d65f0 75d7b7f5 665ba77e 3f57b9f7 eacad90f 01b819a8 31ed5386 2a39ac16 0eb30004 cbe41ac1 cc3b8a4f ' into temp-merge-1187 58e27bc2d2 Merge BlockstreamResearch/secp256k1-zkp#244: sync-upstream.sh: Add "git show --remerge-diff" tip c545fdc374 Merge bitcoin-core/secp256k1#1298: Remove randomness tests 0a99156871 sync-upstream.sh: Add "git show --remerge-diff" tip 6c54db1987 Merge commits '2286f809 751c4354 477f02c4 e3f84777 5c789dcd 8c949f56 21ffe4b2 ' into temp-merge-1055 30fc9d6551 Merge BlockstreamResearch/secp256k1-zkp#242: sync-upstream.sh: Fix position of "-b" option in reproduce command 9b6a1c384d sync-upstream.sh: Fix position of "-b" option in reproduce command b40e2d30b7 Merge bitcoin-core/secp256k1#1378: ellswift: fix probabilistic test failure when swapping sides e996d076da Merge commits '44916ae9 86e3b38a ddf2b291 6138d73b e40fd277 ' into temp-merge-1156 533571d6cf Merge BlockstreamResearch/secp256k1-zkp#239: sync-upstream: allows providing the local branch via cli 05b207e969 sync-upstream: allows providing the local branch via cli 64717a7b16 Merge commits '8b013fce 485f608f 44c2452f cd470333 accadc94 43756da8 af65d30c 63a3565e 6a873cc4 3efeb9da 9f8a13dc 694ce8fb a43e982b e13fae48 c2ee9175 ' into temp-merge-1146 9a981068ce Merge commits '8b013fce 485f608f 44c2452f cd470333 accadc94 43756da8 ' into temp-merge-1115 c424e2fb43 ellswift: fix probabilistic test failure when swapping sides 907a67212e Merge bitcoin-core/secp256k1#1313: ci: Test on development snapshots of GCC and Clang 0f7657d59c Merge bitcoin-core/secp256k1#1366: field: Use `restrict` consistently in fe_sqrt cc55757552 Merge bitcoin-core/secp256k1#1340: clean up in-comment Sage code (refer to secp256k1_params.sage, update to Python3) 600c5adcd5 clean up in-comment Sage code (refer to secp256k1_params.sage, update to Python3) 981e5be38c ci: Fix typo in comment e9e9648219 ci: Reduce number of macOS tasks from 28 to 8 609093b387 ci: Add x86_64 Linux tasks for gcc and clang snapshots 1deecaaf3b ci: Install development snapshots of gcc and clang b79ba8aa4c field: Use `restrict` consistently in fe_sqrt c9ebca95f9 Merge bitcoin-core/secp256k1#1363: doc: minor ellswift.md updates afd7eb4a55 Merge bitcoin-core/secp256k1#1371: Add exhaustive tests for ellswift (with create+decode roundtrip) 2792119278 Add exhaustive test for ellswift (create+decode roundtrip) c7d900ffd1 doc: minor ellswift.md updates 332af315fc Merge bitcoin-core/secp256k1#1344: group: save normalize_weak calls in `secp256k1_ge_is_valid_var`/`secp256k1_gej_eq_x_var` 9e6d1b0e9b Merge bitcoin-core/secp256k1#1367: build: Improvements to symbol visibility logic on Windows (attempt 3) 0aacf64352 Merge bitcoin-core/secp256k1#1370: Corrected some typos b6b9834e8d small fixes 07c0e8b82e group: remove unneeded normalize_weak in `secp256k1_gej_eq_x_var` 3fc1de5c55 Merge bitcoin-core/secp256k1#1364: Avoid `-Wmaybe-uninitialized` when compiling with `gcc -O1` fb758fe8d6 Merge bitcoin-core/secp256k1#1323: tweak_add: fix API doc for tweak=0 c6cd2b15a0 ci: Add task for static library on Windows + CMake 020bf69a44 build: Add extensive docs on visibility issues 0196e8ade1 build: Introduce `SECP256k1_DLL_EXPORT` macro 9f1b1904a3 refactor: Replace `SECP256K1_API_VAR` with `SECP256K1_API` ae9db95cea build: Introduce `SECP256K1_STATIC` macro for Windows users 7966aee31d Merge bitcoin-core/secp256k1#1369: ci: Print commit in Windows container a7bec34231 ci: Print commit in Windows container 249c81eaa3 Merge bitcoin-core/secp256k1#1368: ci: Drop manual checkout of merge commit 98579e297b ci: Drop manual checkout of merge commit 5b9f37f136 ci: Add `CFLAGS: -O1` to task matrix a6ca76cdf2 Avoid `-Wmaybe-uninitialized` when compiling with `gcc -O1` 0fa84f869d Merge bitcoin-core/secp256k1#1358: tests: introduce helper for non-zero `random_fe_test()` results 5a95a268b9 tests: introduce helper for non-zero `random_fe_test` results 304421d57b tests: refactor: remove duplicate function `random_field_element_test` 3aef6ab8e1 Merge bitcoin-core/secp256k1#1345: field: Static-assert that int args affecting magnitude are constant 4494a369b6 Merge bitcoin-core/secp256k1#1357: tests: refactor: take use of `secp256k1_ge_x_on_curve_var` 799f4eec27 Merge bitcoin-core/secp256k1#1356: ci: Adjust Docker image to Debian 12 "bookworm" c862a9fb49 ci: Adjust Docker image to Debian 12 "bookworm" a1782098a9 ci: Force DWARF v4 for Clang when Valgrind tests are expected 7d8d5c86df tests: refactor: take use of `secp256k1_ge_x_on_curve_var` 8a7273465b Help the compiler prove that a loop is entered fd491ea1bb Merge bitcoin-core/secp256k1#1355: Fix a typo in the error message ac43613d25 Merge bitcoin-core/secp256k1#1354: Add ellswift to CHANGELOG 67887ae65c Fix a typo in the error message 926dd3e962 Merge bitcoin-core/secp256k1#1295: abi: Use dllexport for mingw builds 10836832e7 Merge bitcoin-core/secp256k1#1336: Use `__shiftright128` intrinsic in `secp256k1_u128_rshift` on MSVC 7c7467ab7f Refer to ellswift.md in API docs c32ffd8d8c Add ellswift to CHANGELOG 3c1a0fd37f Merge bitcoin-core/secp256k1#1347: field: Document return value of fe_sqrt() 705ce7ed8c Merge bitcoin-core/secp256k1#1129: ElligatorSwift + integrated x-only DH 0702ecb061 Merge bitcoin-core/secp256k1#1338: Drop no longer needed `#include "../include/secp256k1.h"` 5779137457 field: Document return value of fe_sqrt() 90e360acc2 Add doc/ellswift.md with ElligatorSwift explanation 4f091847c2 Add ellswift testing to CI 1bcea8c57f Add benchmarks for ellswift module 2d1d41acf8 Add ctime tests for ellswift module df633cdeba Add _prefix and _bip324 ellswift_xdh hash functions 9695deb351 Add tests for ellswift module c47917bbd6 Add ellswift module implementing ElligatorSwift 79e5b2a8b8 Add functions to test if X coordinate is valid a597a5a9ce Add benchmark for key generation 30574f22ea Merge bitcoin-core/secp256k1#1349: Normalize ge produced from secp256k1_pubkey_load 45c5ca7675 Merge bitcoin-core/secp256k1#1350: scalar: introduce and use `secp256k1_{read,write}_be64` helpers f1652528be Normalize ge produced from secp256k1_pubkey_load 7067ee54b4 tests: add tests for `secp256k1_{read,write}_be64` 740528caad scalar: use newly introduced `secp256k1_{read,write}_be64` helpers (4x64 impl.) be8ff3a02a field: Static-assert that int args affecting magnitude are constant efa76c4bf7 group: remove unneeded normalize_weak in `secp256k1_ge_is_valid_var` 67214f5f7d Merge bitcoin-core/secp256k1#1339: scalar: refactor: use `secp256k1_{read,write}_be32` helpers cb1a59275c Merge bitcoin-core/secp256k1#1341: docs: correct `pubkey` param descriptions for `secp256k1_keypair_{xonly_,}pub` f3644287b1 docs: correct `pubkey` param descriptions for `secp256k1_keypair_{xonly_,}pub` 887183e7de scalar: use `secp256k1_{read,write}_be32` helpers (4x64 impl.) 52b84238de scalar: use `secp256k1_{read,write}_be32` helpers (8x32 impl.) e449af6872 Drop no longer needed `#include "../include/secp256k1.h"` 5b7bf2e9d4 Use `__shiftright128` intrinsic in `secp256k1_u128_rshift` on MSVC 60556c9f49 Merge bitcoin-core/secp256k1#1337: ci: Fix error D8037 in `cl.exe` (attempt 2) db29bf220c ci: Remove quirk that runs dummy command after wineserver c7db4942b3 ci: Fix error D8037 in `cl.exe` 7dae115861 Revert "ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe" bf29f8d0a6 Merge bitcoin-core/secp256k1#1334: fix input range comment for `secp256k1_fe_add_int` 605e07e365 fix input range comment for `secp256k1_fe_add_int` debf3e5c08 Merge bitcoin-core/secp256k1#1330: refactor: take use of `secp256k1_scalar_{zero,one}` constants d75dc59b58 Merge bitcoin-core/secp256k1#1333: test: Warn if both `VERIFY` and `COVERAGE` are defined ade5b36701 tests: add checks for scalar constants `secp256k1_scalar_{zero,one}` e83801f5db test: Warn if both `VERIFY` and `COVERAGE` are defined 654246c635 refactor: take use of `secp256k1_scalar_{zero,one}` constants 908e02d596 Merge bitcoin-core/secp256k1#1328: build: Bump MSVC warning level up to W3 1549db0ca5 build: Level up MSVC warnings 20a5da5fb1 Merge bitcoin-core/secp256k1#1310: Refine release process 05873bb6b1 tweak_add: fix API doc for tweak=0 ad84603297 release process: clarify change log updates 6348bc7eee release process: fix process for maintenance release 79fa50b082 release process: mention targeted release schedule 165206789b release process: add sanity checks 09df0bfb23 Merge bitcoin-core/secp256k1#1327: ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe 27504d5c94 ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe d373a7215b Merge bitcoin-core/secp256k1#1316: Do not invoke fe_is_zero on failed set_b32_limit 6433175ffe Do not invoke fe_is_zero on failed set_b32_limit 5f7903c73c Merge bitcoin-core/secp256k1#1318: build: Enable -DVERIFY for precomputation binaries e9e4526a4e Merge bitcoin-core/secp256k1#1317: Make fe_cmov take max of magnitudes 5768b50229 build: Enable -DVERIFY for precomputation binaries 31b4bbee1e Make fe_cmov take max of magnitudes ff33018fe7 Merge BlockstreamResearch/secp256k1-zkp#232: Backports from libsecp256k1 v0.3.2 39407c3f59 Mark stack variables as early clobber for technical correctness 56a5d41429 Bugfix: mark outputs as early clobber in scalar x86_64 asm c8c0f55a11 ct: Be cautious and use volatile trick in more "conditional" paths 3e94289966 ct: Use volatile trick in scalar_cond_negate 83186db34a Merge bitcoin-core/secp256k1#1314: release cleanup: bump version after 0.3.2 95448ef2f8 release cleanup: bump version after 0.3.2 acf5c55ae6 Merge bitcoin-core/secp256k1#1312: release: Prepare for 0.3.2 d490ca2046 release: Prepare for 0.3.2 3e3d125b83 Merge bitcoin-core/secp256k1#1309: changelog: Catch up e8295d07ab Merge bitcoin-core/secp256k1#1311: Revert "Remove unused scratch space from API" 697e1ccf4a changelog: Catch up 3ad1027a40 Revert "Remove unused scratch space from API" 76b43f3443 changelog: Add entry for ElementsProject#1303 7d4f86d242 Merge bitcoin-core/secp256k1#1307: Mark more assembly outputs as early clobber b54a0672ef Merge bitcoin-core/secp256k1#1304: build: Rename arm to arm32 and check if it's really supported c6bb29b303 build: Rename `64bit` to `x86_64` 8c9ae37a5a Add release note edcba04c28 Merge BlockstreamResearch/secp256k1-zkp#231: musig: add note about missing verification to partial_sign to doc 03246457a8 autotools: Add `SECP_ARM32_ASM_CHECK` macro ed4ba238e2 cmake: Add `check_arm32_assembly` function 350b4bd6e6 Mark stack variables as early clobber for technical correctness 0c729ba70d Bugfix: mark outputs as early clobber in scalar x86_64 asm 3353d3c753 Merge bitcoin-core/secp256k1#1207: Split fe_set_b32 into reducing and normalizing variants 4ab4ec38a0 musig: add note about missing verification to partial_sign to doc f50ad76004 musig: update version number of BIP 5b32602295 Split fe_set_b32 into reducing and normalizing variants 006ddc1f42 Merge bitcoin-core/secp256k1#1306: build: Make tests work with external default callbacks 1907f0f166 build: Make tests work with external default callbacks fb3a806365 Merge bitcoin-core/secp256k1#1133: schnorrsig: Add test vectors for variable-length messages cd54ac7c1c schnorrsig: Improve docs of schnorrsig_sign_custom 28687b0312 schnorrsig: Add BIP340 varlen test vectors 97a98bed1e schnorrsig: Refactor test vector code to allow varlen messages ab5a917128 Merge bitcoin-core/secp256k1#1303: ct: Use more volatile 9eb6934f69 Merge bitcoin-core/secp256k1#1305: Remove unused scratch space from API 073d98a076 Merge bitcoin-core/secp256k1#1292: refactor: Make 64-bit shift explicit 17fa21733a ct: Be cautious and use volatile trick in more "conditional" paths 5fb336f9ce ct: Use volatile trick in scalar_cond_negate 712e7f8722 Remove unused scratch space from API 54d34b6c24 Merge bitcoin-core/secp256k1#1300: Avoid normalize conditional on VERIFY c63ec88ebf Merge bitcoin-core/secp256k1#1066: Abstract out and merge all the magnitude/normalized logic 7fc642fa25 Simplify secp256k1_fe_{impl_,}verify 4e176ad5b9 Abstract out verify logic for fe_is_square_var 4371f98346 Abstract out verify logic for fe_add_int 89e324c6b9 Abstract out verify logic for fe_half 283cd80ab4 Abstract out verify logic for fe_get_bounds d5aa2f0358 Abstract out verify logic for fe_inv{,_var} 3167646072 Abstract out verify logic for fe_from_storage 76d31e5047 Abstract out verify logic for fe_to_storage 1e6894bdd7 Abstract out verify logic for fe_cmov be82bd8e03 Improve comments/checks for fe_sqrt 6ab35082ef Abstract out verify logic for fe_sqr 4c25f6efbd Abstract out verify logic for fe_mul e179e651cb Abstract out verify logic for fe_add 7e7ad7ff57 Abstract out verify logic for fe_mul_int 65d82a3445 Abstract out verify logic for fe_negate 144670893e Abstract out verify logic for fe_get_b32 f7a7666aeb Abstract out verify logic for fe_set_b32 ce4d2093e8 Abstract out verify logic for fe_cmp_var 7d7d43c6dd Improve comments/check for fe_equal{,_var} c5e788d672 Abstract out verify logic for fe_is_odd d3f3fe8616 Abstract out verify logic for fe_is_zero c701d9a471 Abstract out verify logic for fe_clear 19a2bfeeea Abstract out verify logic for fe_set_int 864f9db491 Abstract out verify logic for fe_normalizes_to_zero{,_var} 6c31371120 Abstract out verify logic for fe_normalize_var e28b51f522 Abstract out verify logic for fe_normalize_weak b6b6f9cb97 Abstract out verify logic for fe_normalize 7fa5195559 Bugfix: correct SECP256K1_FE_CONST mag/norm fields e5cf4bf3ff build: Rename `arm` to `arm32` b29566c51b Merge magnitude/normalized fields, move/improve comments 97c63b9039 Avoid normalize conditional on VERIFY 341cc19726 Merge bitcoin-core/secp256k1#1299: Infinity handling: ecmult_const(infinity) works, and group verification 6ec3731e8c Simplify test PRNG implementation bbc834467c Avoid secp256k1_ge_set_gej_zinv with uninitialized z 0a2e0b2ae4 Make secp256k1_{fe,ge,gej}_verify work as no-op if non-VERIFY f20266722a Add invariant checking to group elements a18821d5b1 Always initialize output coordinates in secp256k1_ge_set_gej 3086cb90ac Expose secp256k1_fe_verify to other modules a0e696fd4d Make secp256k1_ecmult_const handle infinity 24c768ae09 Merge bitcoin-core/secp256k1#1301: Avoid using bench_verify_data as bench_sign_data; merge them 2e65f1fdbc Avoid using bench_verify_data as bench_sign_data; merge them fb5bfa4eed Add static test vector for Xoshiro256++ 1cf15ebd94 Merge bitcoin-core/secp256k1#1296: docs: complete interface description for `secp256k1_schnorrsig_sign_custom` 4eab2c2fd8 Merge BlockstreamResearch/secp256k1-zkp#230: norm arg: add prove test vectors 723e8ca8f7 Remove randomness tests bc7c8db179 abi: Use dllexport for mingw builds 149c41cee1 docs: complete interface description for `secp256k1_schnorrsig_sign_custom` f30c74866b Merge bitcoin-core/secp256k1#1270: cmake: Fix library ABI versioning d1e48e5474 refactor: Make 64-bit shift explicit b2e29e43d0 ci: Treat all compiler warnings as errors in "Windows (VS 2022)" task 3c81838856 Merge bitcoin-core/secp256k1#1289: cmake: Use full signature of `add_test()` command 755629bc03 cmake: Use full signature of `add_test()` command bef448f9af cmake: Fix library ABI versioning 4b0f711d46 Merge bitcoin-core/secp256k1#1277: autotools: Clean up after adding Wycheproof 222ecaf661 Merge bitcoin-core/secp256k1#1284: cmake: Some improvements using `PROJECT_IS_TOP_LEVEL` variable 71f746c057 cmake: Include `include` directory for subtree builds 024a409484 Merge bitcoin-core/secp256k1#1240: cmake: Improve and document compiler flag checks a8d059f76c cmake, doc: Document compiler flags 6ece1507cb cmake, refactor: Rename `try_add_compile_option` to `try_append_cflags` 19516ed3e9 cmake: Use `add_compile_options()` in `try_add_compile_option()` 4b84f4bf0f Merge bitcoin-core/secp256k1#1239: cmake: Bugfix and other improvements after bumping CMake up to 3.13 596b336ff6 Merge bitcoin-core/secp256k1#1234: cmake: Add dev-mode 6b7e5b717d Merge bitcoin-core/secp256k1#1275: build: Fix C4005 "macro redefinition" MSVC warnings in examples 1c89536718 Merge bitcoin-core/secp256k1#1286: tests: remove extra semicolon in macro c4062d6b5d debug: move helper for printing buffers into util.h f3126fdfec norm arg: remove prove edge tests which are now covered by vectors 847ed9ecb2 norm arg: add verification to prove vectors 7e977b3c50 autotools: Take VPATH builds into account when generating testvectors 2418d3260a autotools: Create src/wycheproof dir before creating file in it 8764034ed5 autotools: Make all "pregenerated" targets .PHONY e1b9ce8811 autotools: Use same conventions for all pregenerated files cf797ed2a4 norm arg: add prove test vectors 095c1e749c norm arg: add prove_const to tests ce18267b66 Merge BlockstreamResearch/secp256k1-zkp#229: musig: Fix nits left open in ElementsProject#211 78ed0e09ca Merge BlockstreamResearch/secp256k1-zkp#227: Use relative #include paths and tidy header guards (as in upstream) 3858bad2c6 tests: remove extra semicolon in macro 1f33bb2b1c Merge bitcoin-core/secp256k1#1205: field: Improve docs +tests of secp256k1_fe_set_b32 e7fc61ff16 Merge BlockstreamResearch/secp256k1-zkp#228: Simple dedicated -zkp README 162da73e9a tests: Add debug helper for printing buffers e9fd3dff76 field: Improve docs and tests of secp256k1_fe_set_b32 a0b51afc01 musig: VERIFY_CHECK preconditions of _musig_keyaggcoef_internal() da7702844e extrakeys: Clarify comparison order of compare/sort functions f6bef03c0a Merge bitcoin-core/secp256k1#1283: Get rid of secp256k1_fe_const_b 5431b9decd cmake: Make `SECP256K1_INSTALL` default depend on `PROJECT_IS_TOP_LEVEL` 5ec1333d4f Merge bitcoin-core/secp256k1#1285: bench: Make sys/time.h a system include 4d9d8f92d4 Simple dedicated -zkp README e444d24bca Fix include guards: No _ prefix/suffix but _H suffix (as in upstream) 0eea7d97ab Use relative #include paths in tests (as in upstream) c690d6df70 Use relative #include paths in benchmarks (as in upstream) c565827c1a Use relative #include paths in ctime_test (as in upstream) 4eca406f4c Use relative #include paths in library (as in upstream) 68b16a1662 bench: Make sys/time.h a system include 162608cc98 cmake: Emulate `PROJECT_IS_TOP_LEVEL` for CMake<3.21 69e1ec0331 Get rid of secp256k1_fe_const_b bf7bf8a64f norm arg: split norm_arg_zero into prove_edge and verify_zero_len a70c4d4a8a norm arg: add test vector for |n| = 0 f5e4b16f0f norm arg: add test vector for sign bit malleability c0de361fc5 norm arg: allow X and R to be the point at infinity f22834f202 norm arg: add verify vector for n = [0], l = [0] d8e7f3763b musig: move ge_{serialize,parse}_ext to module-independent file 050d9b2912 Merge BlockstreamResearch/secp256k1-zkp#226: bppp: align terminology with paper ce5ba9e24d gitignore: Add CMakeUserPresets.json 0a446a312f cmake: Add dev-mode CMake preset a6f4bcf6e1 Merge bitcoin-core/secp256k1#1231: Move `SECP256K1_INLINE` macro definition out from `include/secp256k1.h` a273d74b2e cmake: Improve version comparison 6a58b483ef cmake: Use `if(... IN_LIST ...)` command 2445808c02 cmake: Use dedicated `GENERATOR_IS_MULTI_CONFIG` property 9f8703ef17 cmake: Use dedicated `CMAKE_HOST_APPLE` variable 8c2017035a cmake: Use recommended `add_compile_definitions` command 04d4cc071a cmake: Add `DESCRIPTION` and `HOMEPAGE_URL` options to `project` command 8a8b6536ef cmake: Use `SameMinorVersion` compatibility mode 5b0444a3b5 Merge bitcoin-core/secp256k1#1263: cmake: Make installation optional 47ac3d63cd cmake: Make installation optional 2e035af251 Merge bitcoin-core/secp256k1#1273: build: Make `SECP_VALGRIND_CHECK` preserve `CPPFLAGS` 5be353d658 Merge bitcoin-core/secp256k1#1279: tests: lint wycheproof's python script 08f4b1632d autotools: Move code around to tidy Makefile 2c63d17c1e bppp: align terminology with paper (gamma) dbf2e4d3e1 bppp: align terminology with paper (mu, rho) 04bf3f6778 Merge bitcoin-core/secp256k1#1230: Build: allow static or shared but not both 9ce9984f32 Merge bitcoin-core/secp256k1#1265: Remove bits argument from secp256k1_wnaf_const{_xonly} 566faa17d3 Merge bitcoin-core/secp256k1#1267: doc: clarify process for patch releases ef49a11d29 build: allow static or shared but not both f4dd0419aa Merge BlockstreamResearch/secp256k1-zkp#225: sync-upstream: Use --autostash to handle uncommitted changes 35ada3b954 tests: lint wycheproof's python script 4258c54f4e Merge bitcoin-core/secp256k1#1276: autotools: Don't regenerate Wycheproof header automatically 529b54d922 autotools: Move Wycheproof header from EXTRA_DIST to noinst_HEADERS 06c67dea9f autotools: Don't regenerate Wycheproof header automatically dc0657c762 build: Fix C4005 "macro redefinition" MSVC warnings in examples 1ecb94ebe9 build: Make `SECP_VALGRIND_CHECK` preserve `CPPFLAGS` 13c438cdee sync-upstream: Use --autostash to handle uncommitted changes 6ec1ff6040 Merge BlockstreamResearch/secp256k1-zkp#224: Backport of "ct: Use volatile "trick" in all fe/scalar cmov implementations" 96f4853850 ct: Use volatile "trick" in all fe/scalar cmov implementations 3bab71cf05 Merge bitcoin-core/secp256k1#1268: release cleanup: bump version after 0.3.1 656c6ea8d8 release cleanup: bump version after 0.3.1 346a053d4c Merge bitcoin-core/secp256k1#1269: changelog: Fix link 6a37b2a5ea changelog: Fix link ec98fcedd5 Merge bitcoin-core/secp256k1#1266: release: Prepare for 0.3.1 1b6fb5593c doc: clarify process for patch releases 898e1c676e release: Prepare for 0.3.1 1d9a13fc26 changelog: Remove inconsistent newlines 0e091669a1 changelog: Catch up in preparation of 0.3.1 7b7503dac5 Merge bitcoin-core/secp256k1#1245: tests: Add Wycheproof ECDSA vectors a575339c02 Remove bits argument from secp256k1_wnaf_const (always 256) 145078c418 Merge bitcoin-core/secp256k1#1118: Add x-only ecmult_const version with x specified as n/d e5de454609 tests: Add Wycheproof ECDSA vectors 0f8642079b Add exhaustive tests for ecmult_const_xonly 4485926ace Add x-only ecmult_const version for x=n/d a0f4644f7e Merge bitcoin-core/secp256k1#1252: Make position of * in pointer declarations in include/ consistent 4e682626a3 Merge bitcoin-core/secp256k1#1226: Add CMake instructions to release process 2d51a454fc Merge bitcoin-core/secp256k1#1257: ct: Use volatile "trick" in all fe/scalar cmov implementations 4a496a36fb ct: Use volatile "trick" in all fe/scalar cmov implementations 3d1f430f9f Make position of * in pointer declarations in include/ consistent 2bca0a5cbf Merge bitcoin-core/secp256k1#1241: build: Improve `SECP_TRY_APPEND_DEFAULT_CFLAGS` macro afd8b23b27 Merge bitcoin-core/secp256k1#1244: Suppress `-Wunused-parameter` when building for coverage analysis 1d8f367515 Merge bitcoin-core/secp256k1#1250: No need to subtract 1 before doing a right shift 3e43041be6 No need to subtract 1 before doing a right shift 3addb4c1e8 build: Improve `SECP_TRY_APPEND_DEFAULT_CFLAGS` macro 0c07c82834 Add CMake instructions to release process 464a9115b4 Merge bitcoin-core/secp256k1#1242: Set ARM ASM symbol visibility to `hidden` f16a709fd6 Merge bitcoin-core/secp256k1#1247: Apply Checks only in VERIFY mode. 70be3cade5 Merge bitcoin-core/secp256k1#1246: Typo 4ebd82852d Apply Checks only in VERIFY mode. d1e7ca192d Typo 36b0adf1b9 build: remove warning until it's reproducible 5bb03c2911 Replace `SECP256K1_ECMULT_TABLE_VERIFY` macro by a function 9c8c4f443c Merge bitcoin-core/secp256k1#1238: build: bump CMake minimum requirement to 3.13 0cf2fb91ef Merge bitcoin-core/secp256k1#1243: build: Ensure no optimization when building for coverage analysis fd2a408647 Set ARM ASM symbol visibility to `hidden` 4429a8c218 Suppress `-Wunused-parameter` when building for coverage analysis 8e79c7ed11 build: Ensure no optimization when building for coverage analysis 96dd062511 build: bump CMake minimum requirement to 3.13 427bc3cdcf Merge bitcoin-core/secp256k1#1236: Update comment for secp256k1_modinv32_inv256 647f0a5cb1 Update comment for secp256k1_modinv32_inv256 8e142ca410 Move `SECP256K1_INLINE` macro definition out from `include/secp256k1.h` 77445898a5 Remove `SECP256K1_INLINE` usage from examples 5658209459 Merge bitcoin-core/secp256k1#1228: release cleanup: bump version after 0.3.0 bdf39000b9 Merge bitcoin-core/secp256k1#1223: release: prepare for 0.3.0 28e63f7ea7 release cleanup: bump version after 0.3.0 b40adf2360 release: prepare for 0.3.0 90b513aada Merge bitcoin-core/secp256k1#1229: cmake: Rename project to "libsecp256k1" 8be82d4362 cmake: Rename project to "libsecp256k1" ef4f8bd025 Merge bitcoin-core/secp256k1#1227: readme: Use correct build type in CMake/Windows build instructions 756b61d451 readme: Use correct build type in CMake/Windows build instructions 3295aa149b Merge bitcoin-core/secp256k1#1225: changelog: Add entry for CMake 92098d84cf changelog: Add entry for CMake df323b5c14 Merge bitcoin-core/secp256k1#1113: build: Add CMake-based build system e1eb33724c ci: Add "x86_64: Windows (VS 2022)" task 10602b0030 cmake: Export config files 5468d70964 build: Add CMake-based build system 6048e6c03e Merge bitcoin-core/secp256k1#1222: Remove redundant checks. eb8749fcd0 Merge bitcoin-core/secp256k1#1221: Update Changelog 5d8f53e312 Remove redudent checks. 9d1b458d5f Merge bitcoin-core/secp256k1#1217: Add secp256k1_fe_add_int function d232112fa7 Update Changelog 8962fc95bb Merge bitcoin-core/secp256k1#1218: Update overflow check 2ef1c9b387 Update overflow check 1d25608900 Merge BlockstreamResearch/secp256k1-zkp#223: musig: Update to BIP v1.0.0-rc.4 (Check pubnonce in NonceGen vectors) d23c23e24d musig: Update to BIP v1.0.0-rc.4 (Check pubnonce in NonceGen vectors) c4862f6869 Merge BlockstreamResearch/secp256k1-zkp#215: musig: include pubkey in secnonce and compare when signing a1ec2bb67b musig: add test for signing with wrong secnonce for a keypair bd57a017aa musig: include pubkey in secnonce and compare when signing 5757318782 Merge bitcoin-core/secp256k1#1212: Prevent dead-store elimination when clearing secrets in examples b081f7e4cb Add secp256k1_fe_add_int function 4f57024d86 Merge BlockstreamResearch/secp256k1-zkp#211: Update musig module to BIP MuSig2 v1.0.0-rc.3 5660c13755 prevent optimization in algorithms 09b1d466db Merge bitcoin-core/secp256k1#979: Native jacobi symbol algorithm ce3cfc78a6 doc: Describe Jacobi calculation in safegcd_implementation.md 6be01036c8 Add secp256k1_fe_is_square_var function 1de2a01c2b Native jacobi symbol algorithm 04c6c1b181 Make secp256k1_modinv64_det_check_pow2 support abs val 5fffb2c7af Make secp256k1_i128_check_pow2 support -(2^n) 8ec6d111c8 Merge BlockstreamResearch/secp256k1-zkp#205: Bulletproofs++: Norm argument cbd2555934 Merge bitcoin-core/secp256k1#1209: build: Add SECP256K1_API_VAR to fix importing variables from DLLs 1b21aa5175 Merge bitcoin-core/secp256k1#1078: group: Save a normalize_to_zero in gej_add_ge d7fb25c8ca Make sure that bppp_log2 isn't called with value 0 e5a01d12c6 Rename buletproof_pp* to bppp* c983186872 transcript: add tests 73edc75528 norm arg: add verification vectors 13ad32e814 norm arg: add tests for zero length and zero vectors 34c4847a6a ci: add bulletproofs 2574516483 Add testcases for bulletproofs++ norm arugment 46c7391154 Add norm argument verify API b43dd83b43 musig: add missing static keyword to function 068e6a036a musig: add test vectors from BIP MuSig 36621d13be musig: update to BIP v1.0.0-rc.2 "Add ''pk'' arg to ''NonceGen''" d717a4980b musig: update to BIP v0.8 "Switch from X-only to plain pk inputs." 304f1bc96d extrakeys: add pubkey_sort test vectors from BIP MuSig2 ae89051547 extrakeys: replace xonly_sort with pubkey_sort 98242fcdd9 extrakeys: add secp256k1_pubkey_cmp 73d5b6654d musig: update to BIP v0.7.0 (NonceGen) 060887e9d7 musig: update to BIP v0.5.1 "Rename ordinary tweaking to plain" d9145455bb Add bulletproofs++ norm argument prove API 8638f0e0ce Add internal BP++ commit API 412f8f66a0 Add utility functions required in norm argument 420353d7da Add utilities for log2 17417d44f3 Add utilities from uncompressed Bulletproofs PR 48563c8c79 bulletproofs: add API functionality to generate a large set of generators 048f9f8642 bulletproofs: add new empty module 6162d577fe generator: cleanups in Pedersen/generator code e4330341bd ci: Shutdown wineserver whenever CI script exits 9a5a611a21 build: Suppress stupid MSVC linker warning 739c53b19a examples: Extend sig examples by call that uses static context 914276e4d2 build: Add SECP256K1_API_VAR to fix importing variables from DLLs 1cca7c1744 Merge bitcoin-core/secp256k1#1206: build: Add -Wreserved-identifier supported by clang 8c7e0fc1de build: Add -Wreserved-identifier supported by clang ca92a35d01 field: Simplify code in secp256k1_fe_set_b32 d93f62e369 field: Verify field element even after secp256k1_fe_set_b32 fails 8ebe5c5205 Merge bitcoin-core/secp256k1#1201: ci: Do not set git's `user.{email,name}` config options 5596ec5c2c Merge bitcoin-core/secp256k1#1203: Do not link `bench` and `ctime_tests` to `COMMON_LIB` ef39721ccc Do not link `bench` and `ctime_tests` to `COMMON_LIB` 9b60e3148d ci: Do not set git's `user.{email,name}` config options e1817a6f54 Merge bitcoin-core/secp256k1#1199: ci: Minor improvements inspired by Bitcoin Core 1bff200588 Merge bitcoin-core/secp256k1#1200: Drop no longer used Autoheader macros 9b7d18669d Drop no longer used Autoheader macros c2415866c7 ci: Don't fetch git history 0ecf318851 ci: Use remote pull/merge ref instead of local git merge 0a6006989f Revert "Remove unused scalar_sqr" 87373f5145 MOVE ONLY: move Pedersen commitment stuff to generator module from rangeproof module b1f1675375 Merge BlockstreamResearch/secp256k1-zkp#214: sync-upstream: Fix $REPRODUCE_COMMAND for "select" cbe2815633 musig: update to BIP v0.4 "Allow the output of NonceAgg to be inf" 206017d67d musig: update to BIP v0.3 (NonceGen) d800dd55db musig: remove test vectors a58c7d29bd Merge BlockstreamResearch/secp256k1-zkp#213: Update macOS image for CI e04c660b11 sync-upstream: Fix $REPRODUCE_COMMAND for "select" 3b2c675955 Update macOS image for CI 2b77240b3b Merge bitcoin-core/secp256k1#1172: benchmarks: fix bench_scalar_split eb6bebaee3 scalar: restrict split_lambda args, improve doc and VERIFY_CHECKs 7f49aa7f2d ci: add test job with -DVERIFY 620ba3d74b benchmarks: fix bench_scalar_split 5fbff5d348 Merge bitcoin-core/secp256k1#1170: contexts: Forbid destroying, cloning and randomizing the static context 233822d849 Merge bitcoin-core/secp256k1#1195: ctime_tests: improve output when CHECKMEM_RUNNING is not defined ad7433b140 Merge bitcoin-core/secp256k1#1196: Drop no longer used variables from the build system e39d954f11 tests: Add CHECK_ILLEGAL(_VOID) macros and use in static ctx tests 2cd4e3c0a9 Drop no longer used `SECP_{LIBS,INCLUDE}` variables 613626f94c Drop no longer used `SECP_TEST_{LIBS,INCLUDE}` variables 61841fc9ee contexts: Forbid randomizing secp256k1_context_static 4b6df5e33e contexts: Forbid cloning/destroying secp256k1_context_static b1579cf5fb Merge bitcoin-core/secp256k1#1194: Ensure safety of ctz_debruijn implementation. 8f51229e03 ctime_tests: improve output when CHECKMEM_RUNNING is not defined d6ff738d5b Ensure safety of ctz_debruijn implementation. a01a7d86dc Merge bitcoin-core/secp256k1#1192: Switch to exhaustive groups with small B coefficient a7a7bfaf3d Merge bitcoin-core/secp256k1#1190: Make all non-API functions (except main) static f29a327092 Merge bitcoin-core/secp256k1#1169: Add support for msan instead of valgrind (for memcheck and ctime test) ff8edf89e2 Merge bitcoin-core/secp256k1#1193: Add `noverify_tests` to `.gitignore` ce60785b26 Introduce SECP256K1_B macro for curve b coefficient 4934aa7995 Switch to exhaustive groups with small B coefficient d4a6b58df7 Add `noverify_tests` to `.gitignore` 88e80722d2 Merge bitcoin-core/secp256k1#1160: Makefile: add `-I$(top_srcdir)/{include,src}` to `CPPFLAGS` for precomputed 0f088ec112 Rename CTIMETEST -> CTIMETESTS 74b026f05d Add runtime checking for DECLASSIFY flag 5e2e6fcfc0 Run ctime test in Linux MSan CI job 18974061a3 Make ctime tests building configurable 5048be17e9 Rename valgrind_ctime_test -> ctime_tests 6eed6c18de Update error messages to suggest msan as well 8e11f89a68 Add support for msan integration to checkmem.h 8dc64079eb Add compile-time error to valgrind_ctime_test 0db05a770e Abstract interactions with valgrind behind new checkmem.h 4f1a54e41d Move valgrind CPPFLAGS into SECP_CONFIG_DEFINES cc3b8a4f40 Merge bitcoin-core/secp256k1#1187: refactor: Rename global variables in tests 9a93f48f50 refactor: Rename STTC to STATIC_CTX in tests 3385a2648d refactor: Rename global variables to uppercase in tests e03ef86559 Make all non-API functions (except main) static cbe41ac138 Merge bitcoin-core/secp256k1#1188: tests: Add noverify_tests which is like tests but without VERIFY 203760023c tests: Add noverify_tests which is like tests but without VERIFY e862c4af0c Makefile: add -I$(top_srcdir)/src to CPPFLAGS for precomputed 0eb3000417 Merge bitcoin-core/secp256k1#1186: tests: Tidy context tests 39e8f0e3d7 refactor: Separate run_context_tests into static vs proper contexts a4a09379b1 tests: Clean up and improve run_context_tests() further fc90bb5695 refactor: Tidy up main() f32a36f620 tests: Don't use global context for context tests ce4f936c4f tests: Tidy run_context_tests() by extracting functions 18e0db30cb tests: Don't recreate global context in scratch space test b19806122e tests: Use global copy of secp256k1_context_static instead of clone 2a39ac162e Merge bitcoin-core/secp256k1#1185: Drop `SECP_CONFIG_DEFINES` from examples 2f9ca284e2 Drop `SECP_CONFIG_DEFINES` from examples 31ed5386e8 Merge bitcoin-core/secp256k1#1183: Bugfix: pass SECP_CONFIG_DEFINES to bench compilation c0a555b2ae Bugfix: pass SECP_CONFIG_DEFINES to bench compilation 01b819a8c7 Merge bitcoin-core/secp256k1#1158: Add a secp256k1_i128_to_u64 function. eacad90f69 Merge bitcoin-core/secp256k1#1171: Change ARG_CHECK_NO_RETURN to ARG_CHECK_VOID which returns (void) 3f57b9f774 Merge bitcoin-core/secp256k1#1177: Some improvements to the changelog c30b889f17 Clarify that the ABI-incompatible versions are earlier 881fc33d0c Consistency in naming of modules 665ba77e79 Merge bitcoin-core/secp256k1#1178: Drop `src/libsecp256k1-config.h` 75d7b7f5ba Merge bitcoin-core/secp256k1#1154: ci: set -u in cirrus.sh to treat unset variables as an error 7a74688201 ci: add missing CFLAGS & CPPFLAGS variable to print_environment c2e0fdadeb ci: set -u in cirrus.sh to treat unset variables as an error 9c5a4d21bb Do not define unused `HAVE_VALGRIND` macro ad8647f548 Drop no longer relevant files from `.gitignore` b627ba7050 Remove dependency on `src/libsecp256k1-config.h` 9ecf8149a1 Reduce font size in changelog 2dc133a67f Add more changelog entries ac233e181a Add links to diffs to changelog cee8223ef6 Mention semantic versioning in changelog 9a8d65f07f Merge bitcoin-core/secp256k1#1174: release cleanup: bump version after 0.2.0 02ebc290f7 release cleanup: bump version after 0.2.0 b6b360efaf doc: improve message of cleanup commit 21ffe4b22a Merge bitcoin-core/secp256k1#1055: Prepare initial release e025ccdf74 release: prepare for initial release 0.2.0 6d1784a2e2 build: add missing files to EXTRA_DIST 8c949f56da Merge bitcoin-core/secp256k1#1173: Don't use compute credits for now 13bf1b6b32 changelog: make order of change types match keepachangelog.com b1f992a552 doc: improve release process 7e5b22684f Don't use compute credits for now a49e0940ad docs: Fix typo 2551cdac90 tests: Fix code formatting c635c1bfd5 Change ARG_CHECK_NO_RETURN to ARG_CHECK_VOID which returns (void) cf66f2357c refactor: Add helper function secp256k1_context_is_proper() ad39e2dc41 build: change package version to 0.1.0-dev 5c789dcd73 Merge bitcoin-core/secp256k1#1168: Replace deprecated context flags with NONE in benchmarks and tests d6dc0f4ae3 tests: Switch to NONE contexts in module tests 0c8a5caddd tests: Switch to NONE contexts in tests.c 86540e9e1f tests: add test for deprecated flags and rm them from run_context caa0ad631e group: add gej_eq_var 37ba744f5b tests: Switch to NONE contexts in exhaustive and ctime tests 8d7a9a8eda benchmarks: Switch to NONE contexts 90618e9263 doc: move CHANGELOG from doc/ to root directory e3f84777eb Merge bitcoin-core/secp256k1#1126: API cleanup with respect to contexts 4386a2306c examples: Switch to NONE contexts 7289b51d31 docs: Use doxygen style if and only if comment is user-facing e7d0185c90 docs: Get rid of "initialized for signing" terminology 06126364ad docs: Tidy and improve docs about contexts and randomization e02d6862bd selftest: Expose in public API e383fbfa66 selftest: Rename internal function to make name available for API d2c6d48de3 tests: Use new name of static context 53796d2b24 contexts: Rename static context 72fedf8a6c docs: Improve docs for static context 316ac7625a contexts: Deprecate all context flags except SECP256K1_CONTEXT_NONE 477f02c4de Merge bitcoin-core/secp256k1#1165: gitignore: Add *.sage.py files autogenerated by sage [skip ci] 092be61c5e gitignore: Add *.sage.py files autogenerated by sage 1a553ee8be docs: Change signature "validation" to "verification" ee7341fbac docs: Never require a verification context 751c4354d5 Merge bitcoin-core/secp256k1#1152: Update macOS image for CI 2286f80902 Merge bitcoin-core/secp256k1#993: Enable non-experimental modules by default d216475205 test secp256k1_i128_to_i64 4bc429019d Add a secp256k1_i128_to_u64 function. e40fd277b7 Merge bitcoin-core/secp256k1#1156: Followups to int128_struct arithmetic 99bd335599 Make int128 overflow test use secp256k1_[ui]128_mul a8494b02bf Use compute credits for macOS jobs 3afce0af7c Avoid signed overflow in MSVC AMR64 secp256k1_mul128 c0ae48c995 Update macOS image for CI 9b5f589d30 Heuristically decide whether to use int128_struct 63ff064d2f int128: Add test override for testing __(u)mulh on MSVC X64 f2b7e88768 Add int128 randomized tests 6138d73be4 Merge bitcoin-core/secp256k1#1155: Add MSan CI jobs ddf2b2910e Merge bitcoin-core/secp256k1#1000: Synthetic int128 type. 86e3b38a4a Merge bitcoin-core/secp256k1#1149: Remove usage of CHECK from non-test file 00a42b91b3 Add MSan CI job 44916ae915 Merge bitcoin-core/secp256k1#1147: ci: print env to allow reproducing the job outside of CI c2ee9175e9 Merge bitcoin-core/secp256k1#1146: ci: prevent "-v/--version: not found" irrelevant error e13fae487e Merge bitcoin-core/secp256k1#1150: ci: always cat test_env.log a340d9500a ci: add int128_struct tests dceaa1f579 int128: Tidy #includes of int128.h and int128_impl.h 2914bccbc0 Simulated int128 type. 6a965b6b98 Remove usage of CHECK from non-test file 5c9f1a5c37 ci: always cat all logs_snippets 49ae843592 ci: mostly prevent "-v/--version: not found" irrelevant error 4e54c03153 ci: print env to allow reproducing the job outside of CI a43e982bca Merge bitcoin-core/secp256k1#1144: Cleanup `.gitignore` file f5039cb66c Cleanup `.gitignore` file 798727ae1e Revert "Add test logs to gitignore" d22774e248 Merge BlockstreamResearch/secp256k1-zkp#203: MuSig doc fixes dd83e72d52 Add ordinary tweak info d26100cab2 Exclude nonce_process from pre-processing steps b7607f93f2 Fix reference to xonly_tweak_add f7e9a8544f Merge BlockstreamResearch/secp256k1-zkp#201: rangeproof: add secp256k1_rangeproof_max_size function to estimate rangeproof size 6b6ced9839 rangeproof: add more max_size tests 34876ecb5f rangeproof: add more static test vectors 310e517061 rangeproof: add a bunch more testing f1410cb67a rangeproof: add secp256k1_rangeproof_max_size function to estimate rangeproof size c137ddbdff Merge BlockstreamResearch/secp256k1-zkp#200: build: automatically enable module dependencies 0202d839fb Merge BlockstreamResearch/secp256k1-zkp#199: surjectionproof: make sure that n_used_pubkeys > 0 in generate 5ac8fb035e surjectionproof: make sure that n_used_pubkeys > 0 in generate 7ff446df8b Merge BlockstreamResearch/secp256k1-zkp#198: rangeproof: add a test for all-zero blinding factors 5a40f3d99b replace memcmp with secp256k1_memcmp_var throughout the codebase 92820d944b rangeproof: add a test for all-zero blinding factors 171b294a1c build: improve error message if --enable-experimental is missed 58ab152bb4 build: move all output concerning enabled modules at single place 1493113e61 build: automatically enable module dependencies 4fd7e1eabd Merge BlockstreamResearch/secp256k1-zkp#197: fix include paths in all the -zkp modules 347f96d94a fix include paths in all the -zkp modules 41e8704b48 build: Enable some modules by default 694ce8fb2d Merge bitcoin-core/secp256k1#1131: readme: Misc improvements 88b00897e7 readme: Fix line break 78f5296da4 readme: Sell "no runtime dependencies" ef48f088ad readme: Add IRC channel d1d6e47c17 Merge BlockstreamResearch/secp256k1-zkp#196: surjectionproof: fail to generate proofs when an input equals the output d1175d265d surjectionproof: use secp256k1_memcmp_var rather than bare memcmp bf18ff5a8c surjectionproof: fix generation to fail when any input == the output 4ff6e4274d surjectionproof: add test for existing behavior on input=output proofs 9f8a13dc8e Merge bitcoin-core/secp256k1#1128: configure: Remove pkgconfig macros again (reintroduced by mismerge) cabe085bb4 configure: Remove pkgconfig macros again (reintroduced by mismerge) 71a206fa5b Merge BlockstreamResearch/secp256k1-zkp#194: extrakeys: rename swap/swap64 to fix OpenBSD 7.1 compilation db648478c3 extrakeys: rename swap/swap64 to fix OpenBSD 7.1 compilation 3efeb9da21 Merge bitcoin-core/secp256k1#1121: config: Set preprocessor defaults for ECMULT_* config values 6a873cc4a9 Merge bitcoin-core/secp256k1#1122: tests: Randomize the context with probability 15/16 instead of 1/4 17065f48ae tests: Randomize the context with probability 15/16 instead of 1/4 c27ae45144 config: Remove basic-config.h da6514a04a config: Introduce DEBUG_CONFIG macro for debug output of config 63a3565e97 Merge bitcoin-core/secp256k1#1120: ecmult_gen: Skip RNG when creating blinding if no seed is available d0cf55e13a config: Set preprocessor defaults for ECMULT_* config values 55f8bc99dc ecmult_gen: Improve comments about projective blinding 7a86955800 ecmult_gen: Simplify code (no observable change) 4cc0b1b669 ecmult_gen: Skip RNG when creating blinding if no seed is available af65d30cc8 Merge bitcoin-core/secp256k1#1116: build: Fix #include "..." paths to get rid of further -I arguments 40a3473a9d build: Fix #include "..." paths to get rid of further -I arguments 43756da819 Merge bitcoin-core/secp256k1#1115: Fix sepc256k1 -> secp256k1 typo in group.h 069aba8125 Fix sepc256k1 -> secp256k1 typo in group.h accadc94df Merge bitcoin-core/secp256k1#1114: `_scratch_destroy`: move `VERIFY_CHECK` after invalid scrach space check cd47033335 Merge bitcoin-core/secp256k1#1084: ci: Add MSVC builds 1827c9bf2b scratch_destroy: move VERIFY_CHECK after invalid scrach space check 49e2acd927 configure: Improve rationale for WERROR_CFLAGS 8dc4b03341 ci: Add a C++ job that compiles the public headers without -fpermissive 51f296a46c ci: Run persistent wineserver to speed up wine 3fb3269c22 ci: Add 32-bit MinGW64 build 9efc2e5221 ci: Add MSVC builds 2be6ba0fed configure: Convince autotools to work with MSVC's archiver lib.exe bd81f4140a schnorrsig bench: Suppress a stupid warning in MSVC 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` 2f984ffc45 Save negations in var-time group addition 09f3d71c51 configure: Add a few CFLAGS for MSVC 3b4f3d0d46 build: Reject C++ compilers in the preprocessor 1cc0941414 configure: Don't abort if the compiler does not define __STDC__ cca8cbbac8 configure: Output message when checking for valgrind 1a6be5745f bench: Make benchmarks compile on MSVC e089eecc1e group: Further simply gej_add_ge ac71020ebe group: Save a normalize_to_zero in gej_add_ge git-subtree-dir: src/secp256k1 git-subtree-split: b2ccc8d9fdb91de6d00695acfdedaa80ebf66b35
For context, Bitcoin Core has recently merged libbitcoin-kernel, a small library that intends to eventually minimally encompass Core's validation engine. This kernel lib includes a static libsecp256k1. Without this change, because libsecp256k1.a ends up with exported symbols, we end up with libsecp256k1 symbols exported by our libbitcoin-kernel library (which causes unrelated problems not worth getting into here).
libtool takes care of building both object versions, and it automatically builds objects for shared libs with -DDLL_EXPORT. We just need to opt-in to its functionality.
I can't imagine this having any negative impact on any current statically-linking applications, if anything they'll just be a tiny bit smaller because they can now strip unused symbols.