Commit Graph

3127 Commits

Author SHA1 Message Date
DarkWindman
38284aa008 Merge commits '2c076d90 20e3b447 74b8068c e523e4f9 d5997141 d2dcf520 f36afb8b 8113671f d93380fb 03fb60ad 4985ac0f 36e76952 ' into temp-merge-1738 2026-02-25 10:44:34 +02:00
merge-script
a3733f33c1 Merge BlockstreamResearch/secp256k1-zkp#325: Upstream PRs 1685, 1692, 1687, 1689, 1694, 1699, 1704, 1696, 1705, 1702, 1706, 1707, 1708
7ab8b0cc01 release cleanup: bump version after 0.7.0 (Jonas Nick)
a3e742d947 release: Prepare for 0.7.0 (Tim Ruffing)
f67b0ac1a0 ci: Don't hardcode ABI version (Tim Ruffing)
cde4130898 musig/tests: initialize keypair (Jonas Nick)
40b4a06520 changelog: update (Jonas Nick)
8d967a602b musig/test: Remove dead code (Tim Ruffing)
983711cd6d musig/tests: Refactor vectors_signverify (Tim Ruffing)
c82d84bb86 build: add CMake option for disabling symbol visibility attributes (Cory Fields)
ce7923874f build: Add SECP256K1_NO_API_VISIBILITY_ATTRIBUTES (Tim Ruffing)
e5297f6d79 build: Refactor visibility logic (Tim Ruffing)
bf082221ff cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` (Hennadii Stepanov)
3352f9d667 ci: enable musig module for native macOS arm64 job (Sebastian Falbesoner)
44b205e9ee Revert "cmake: configure libsecp256k1.pc during install" (Daniel Pfeifer)
004f57fcd8 ci: Move Valgrind build for `arm64` from Cirrus to GHA (Hennadii Stepanov)
5fafdfc30f ci: Move `gcc-snapshot` build for `arm64` from Cirrus to GHA (Hennadii Stepanov)
e814b79a8b ci: Switch `arm64_debian` from QEMU to native `arm64` Docker image (Hennadii Stepanov)
bcf77346b9 ci: Add `arm64` architecture to `docker_cache` job (Hennadii Stepanov)
b77aae9226 ci: Rename Docker image tag to reflect architecture (Hennadii Stepanov)
0dfe387dbe cmake: support the use of launchers in ctest -S scripts (Daniel Pfeifer)
7106dce6fd cmake: configure libsecp256k1.pc during install (Daniel Pfeifer)
37dd422b5c cmake: Emulate Libtool's behavior on FreeBSD (Hennadii Stepanov)

Pull request description:

  Merge bitcoin-core/secp256k1#1685: cmake: Emulate Libtool's behavior on FreeBSD
  Merge bitcoin-core/secp256k1#1692: cmake: configure libsecp256k1.pc during install
  Merge bitcoin-core/secp256k1#1687: cmake: support the use of launchers in ctest -S scripts
  Merge bitcoin-core/secp256k1#1689: ci: Convert `arm64` Cirrus tasks to GHA jobs
  Merge bitcoin-core/secp256k1#1694: Revert "cmake: configure libsecp256k1.pc during install"
  Merge bitcoin-core/secp256k1#1699: ci: enable musig module for native macOS arm64 job
  Merge bitcoin-core/secp256k1#1704: cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1`
  Merge bitcoin-core/secp256k1#1696: build: Refactor visibility logic and add override
  Merge bitcoin-core/secp256k1#1705: musig/test: Remove dead code
  Merge bitcoin-core/secp256k1#1702: changelog: update
  Merge bitcoin-core/secp256k1#1706: musig/tests: initialize keypair
  Merge bitcoin-core/secp256k1#1707: release: Prepare for 0.7.0
  Merge bitcoin-core/secp256k1#1708: release cleanup: bump version after 0.7.0

  This PR can be recreated with `./contrib/sync-upstream.sh -b master range b9313c6e`.

  Tips:
   * Use `git show --remerge-diff <pr-branch>` to show the conflict resolution in the merge commit.
   * Use `git read-tree --reset -u <pr-branch>` to replay these resolutions during the conflict resolution stage when recreating the PR branch locally.
     Be aware that this may discard your index as well as the uncommitted changes and untracked files in your worktree.

ACKs for top commit:
  real-or-random:
    ACK 9dcd857d54

Tree-SHA512: 4f5844185006fc4d3551febc6803096a36bcf49b0b9042e8d6ed0d7f6856de6bba44a69063406bb421b644708a91981a378133683f850ee1cf23275eab13b0c8
2026-02-25 09:15:12 +01:00
mllwchrry
9dcd857d54 Merge commits '29e73f4b 89096c23 c4987790 ad60ef7e 943479a7 cbbbf3bd 73a69595 7c338042 5e74086d 6037833c 020ee604 a660a497 b9313c6e ' into temp-merge-1708 2026-02-24 13:31:44 +02:00
Jonas Nick
64316eac11 Merge elementsproject/secp256k1-zkp#324: Upstream PRs 1662, 1669, 1492, 1670, 1668, 1673, 1675, 1680, 1679, 1690, 1683, 1678
145ae3e28d cmake: add a helper for linking into static libs (Cory Fields)
819210974b README: add link to musig example, generalize module enabling hint (Sebastian Falbesoner)
add146e101 ci: Bump GCC snapshot major version to 16 (Hennadii Stepanov)
6f67151ee2 cmake: Use `PUBLIC_HEADER` target property (Hennadii Stepanov)
c32715b2a0 cmake, move-only: Move module option processing to `src/CMakeLists.txt` (Hennadii Stepanov)
3f31ac43e0 doc: Promote "Building with CMake" to standard procedure (Hennadii Stepanov)
3af71987a8 cmake: Bump minimum required CMake version to 3.22 (Hennadii Stepanov)
3a4f448cb4 Assert field magnitude at control-flow join (Peter.Dettman)
05445377f4 bench_ecmult: add benchmark for ecmult_const_xonly (Sebastian Falbesoner)
d73ed99479 tests: update wycheproof files (RandomLattice)
e266ba11ae tests: Add Wycheproof ECDH vectors (RandomLattice)
c1bcb03276 gitignore: Add Python cache files (Tim Ruffing)
6b3fe51fb6 bench: add ellswift to bench help output (Jonas Nick)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK cc4a92b510

Tree-SHA512: ca0b28461c5e663a39ff11cb83bd09c1446e49e33c8806a96dd0912c0d14646be4b33ee6eaee88021d342986d17db254358d622a9567d4b6c91e2ab603224cb8
2026-02-24 10:12:03 +00:00
DarkWindman
cc4a92b510 Merge commits '70f149b9 13906b71 4187a466 bb597b3d 9fab4252 92394476 201b2b8f f24b838b 95db29b1 2a9d3747 a28c2ffa 746e36b1 ' into temp-merge-1678 2026-02-23 18:07:05 +02:00
merge-script
6e071d18ba Merge BlockstreamResearch/secp256k1-zkp#323: Upstream PRs 1642, 1639, 1614, 1656, 1647, 1655, 1593, 1359, 1657, 1660, 1659, 1661
4dda31229e ci: Use Python virtual environment in x86_64-macos-native job (mllwchrry)
795f19af1f ci: Switch to macOS 15 Sequoia Intel-based image (Hennadii Stepanov)
2f057a145f ci: Don't hardcode ABI version (Tim Ruffing)
17ad196018 schnorrsig_halfagg: Fix symbol visibility for internal function (mllwchrry)
ec343f0b2f Port bitcoin-core/secp256k1#1642 to zkp-specific code (mllwchrry)
20b05c9d3f configure: Show exhaustive tests in summary (Tim Ruffing)
1b6e081538 include: remove WARN_UNUSED_RESULT for functions always returning 1 (Jonas Nick)
d87c3bc58f ci: Fix exiting from ci.sh on error (Tim Ruffing)
51907fa918 tests: remove unused uncounting_illegal_callback_fn (Jonas Nick)
d1478763a5 build: Drop no longer needed  `-fvisibility=hidden` compiler option (Hennadii Stepanov)
8ed1d83d92 ci: Run `tools/symbol-check.py` (Hennadii Stepanov)
41d32ab2de test: Add `tools/symbol-check.py` (Hennadii Stepanov)
88548058b3 Introduce `SECP256K1_LOCAL_VAR` macro (Hennadii Stepanov)
37d2c60bec Remove deprecated _ec_privkey_{negate,tweak_add,tweak_mul} aliases (Sebastian Falbesoner)
59860bcc24 gha: Print all *.log files, in a separate action (Tim Ruffing)
4c50d73dd9 ci: Add new "Windows (clang-cl)" job (Hennadii Stepanov)
84c0bd1f72 cmake: Adjust diagnostic flags for clang-cl (Hennadii Stepanov)
961ec25a83 musig: Fix clearing of pubnonces (Tim Ruffing)
64228a648f musig: Use _ge_set_all_gej for own public nonces (Tim Ruffing)
300aab1c05 tests: Improve _ge_set_all_gej(_var) tests (Tim Ruffing)
365f274ce3 group: Simplify secp256k1_ge_set_all_gej (Tim Ruffing)
d3082ddead group: Add constant-time secp256k1_ge_set_all_gej (Tim Ruffing)
432ac57705 Make static context const (Daniel Pfeifer)
1823594761 Verify `compressed` argument in `secp256k1_eckey_pubkey_serialize` (Sebastian Falbesoner)

Pull request description:

  Merge bitcoin-core/secp256k1#1642: Verify `compressed` argument in `secp256k1_eckey_pubkey_serialize`
  Merge bitcoin-core/secp256k1#1639: Make static context const
  Merge bitcoin-core/secp256k1#1614: Add _ge_set_all_gej and use it in musig for own public nonces
  Merge bitcoin-core/secp256k1#1656: musig: Fix clearing of pubnonces
  Merge bitcoin-core/secp256k1#1647: cmake: Adjust diagnostic flags for `clang-cl`
  Merge bitcoin-core/secp256k1#1655: gha: Print all *.log files, in a separate action
  Merge bitcoin-core/secp256k1#1593: Remove deprecated `_ec_privkey_{negate,tweak_add,tweak_mul}` aliases from API
  Merge bitcoin-core/secp256k1#1359: Fix symbol visibility issues, add test for it
  Merge bitcoin-core/secp256k1#1657: tests: remove unused uncounting_illegal_callback_fn
  Merge bitcoin-core/secp256k1#1660: ci: Fix exiting from ci.sh on error
  Merge bitcoin-core/secp256k1#1659: include: remove WARN_UNUSED_RESULT for functions always returning 1
  Merge bitcoin-core/secp256k1#1661: configure: Show exhaustive tests in summary

  This PR can be recreated with `./contrib/sync-upstream.sh -b master range d84bb83e`.

  Tips:
   * Use `git show --remerge-diff <pr-branch>` to show the conflict resolution in the merge commit.
   * Use `git read-tree --reset -u <pr-branch>` to replay these resolutions during the conflict resolution stage when recreating the PR branch locally.
     Be aware that this may discard your index as well as the uncommitted changes and untracked files in your worktree.

  Additional fixes:
  * schnorrsig_halfagg: Added `static` to internal helper function to pass `symbol-check.py` introduced in bitcoin-core/secp256k1#1359.
  * ci: Cherry-picked bitcoin-core/secp256k1@f67b0ac1 to fix hardcoded DLL version in symbol-check (zkp produces `libsecp256k1-0.dll`, not `-5.dll`)

ACKs for top commit:
  real-or-random:
    ACK 4dda31229e

Tree-SHA512: 56c6a7dc977fec9cd57330db2a4513b82ee2284e905b70f83d50e9b84f4606b83f695be8eece653ffd88b9852f0a7903662f8ab215434c56c7d3bf3062a3ed16
2026-02-23 16:04:55 +01:00
mllwchrry
4dda31229e ci: Use Python virtual environment in x86_64-macos-native job 2026-02-23 15:03:08 +02:00
Hennadii Stepanov
795f19af1f ci: Switch to macOS 15 Sequoia Intel-based image
The `macos-13` image has been deprecated and will be unavailable soon.
See: https://github.com/actions/runner-images/issues/13045.
2026-02-23 15:00:53 +02:00
Tim Ruffing
2f057a145f ci: Don't hardcode ABI version 2026-02-20 18:53:01 +02:00
mllwchrry
17ad196018 schnorrsig_halfagg: Fix symbol visibility for internal function 2026-02-20 18:50:53 +02:00
mllwchrry
ec343f0b2f Port bitcoin-core/secp256k1#1642 to zkp-specific code 2026-02-20 18:41:10 +02:00
mllwchrry
79953d074b Merge commits '1b1fc093 6c2a39da 31860823 abd25054 4ba1ba2a 03bbe8c6 13ed6f65 a7a51171 2abb35b0 e56716a3 3f54ed8c d84bb83e ' into temp-merge-1661 2026-02-20 18:29:53 +02:00
merge-script
2d30d398f9 Merge BlockstreamResearch/secp256k1-zkp#322: Upstream PRs 1579, 1631, 1633, 1634, 1641, 1650, 1646, 1654
e3bddfa750 modules: Port bitcoin-core/secp256k1#1579 to zkp-specific code (DarkWindman)
13d389629a CONTRIBUTING: mention that `EXIT_` codes should be used (Sebastian Falbesoner)
c855581728 test, bench, precompute_ecmult: use `EXIT_...` constants for `main` return values (Sebastian Falbesoner)
965393fcea examples: use `EXIT_...` constants for `main` return values (Sebastian Falbesoner)
b682dbcf84 README: add instructions for verifying GPG signatures (James O'Beirne)
a82287fb85 schnorrsig: clear out masked secret key in BIP-340 nonce function (Sebastian Falbesoner)
2ac9f558c4 doc: Improve cmake instructions in README (Fabian Jahr)
39705450eb Fix some misspellings (Nicolas Iooss)
c97059f594 release cleanup: bump version after 0.6.0 (Jonas Nick)
39d5dfd542 release: prepare for 0.6.0 (Jonas Nick)
df2eceb279 build: add ellswift.md and musig.md to release tarball (Jonas Nick)
a306bb7e90 tools: fix check-abi.sh after cmake out locations were changed (Jonas Nick)
145868a84d Do not export `secp256k1_musig_nonce_gen_internal` (Hennadii Stepanov)
765ef53335 Clear _gej instances after point multiplication to avoid potential leaks (Sebastian Falbesoner)
349e6ab916 Introduce separate _clear functions for hash module (Tim Ruffing)
99cc9fd6d0 Don't rely on memset to set signed integers to 0 (Tim Ruffing)
97c57f42ba Implement various _clear() functions with secp256k1_memclear() (Tim Ruffing)
9bb368d146 Use secp256k1_memclear() to clear stack memory instead of memset() (Tim Ruffing)
e3497bbf00 Separate between clearing memory and setting to zero in tests (Tim Ruffing)
d79a6ccd43 Separate secp256k1_fe_set_int( . , 0 ) from secp256k1_fe_clear() (Tim Ruffing)
1c08126222 Add secp256k1_memclear() for clearing secret data (Tim Ruffing)
e7d384488e Don't clear secrets in pippenger implementation (Tim Ruffing)

Pull request description:

  Merge bitcoin-core/secp256k1#1579: Clear sensitive memory without getting optimized out (revival of #636)
  Merge bitcoin-core/secp256k1#1631: release: prepare for 0.6.0
  Merge bitcoin-core/secp256k1#1633: release cleanup: bump version after 0.6.0
  Merge bitcoin-core/secp256k1#1634: Fix some misspellings
  Merge bitcoin-core/secp256k1#1641: doc: Improve cmake instructions in README
  Merge bitcoin-core/secp256k1#1650: schnorrsig: clear out masked secret key in BIP-340 nonce function
  Merge bitcoin-core/secp256k1#1646: README: add instructions for verifying GPG signatures
  Merge bitcoin-core/secp256k1#1654: use `EXIT_` constants over magic numbers for indicating program execution status

  This PR can be recreated with `./contrib/sync-upstream.sh -b master range c0d9480`.

  Tips:
   * Use `git show --remerge-diff <pr-branch>` to show the conflict resolution in the merge commit.
   * Use `git read-tree --reset -u <pr-branch>` to replay these resolutions during the conflict resolution stage when recreating the PR branch locally.
     Be aware that this may discard your index as well as the uncommitted changes and untracked files in your worktree.

  ### zkp fixes for Valgrind compatibility
  PR #1579 introduced `secp256k1_memclear` that marks cleared memory as undefined. Updated rangeproof to use `memset`/`secp256k1_scalar_set_int` for initialization, keeping `memclear` only for cleanup.

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

Tree-SHA512: 7a089d1c6cb34dd0706d53a9a92c0aecc6183a60c77de147ba97db9133bb96031aa2178e0cc07017c76fb30048697c1d976eb7b6c206fa50984d28487cf023f6
2026-02-20 17:01:42 +01:00
DarkWindman
e3bddfa750 modules: Port bitcoin-core/secp256k1#1579 to zkp-specific code 2026-02-19 10:24:07 +02:00
DarkWindman
913be29ea2 Merge commits 'b161bffb 0cdc758a ec329c25 8deef00b f79f46c7 00774d07 2e3bf136 c0d9480f ' into temp-merge-1654 2026-02-18 15:57:18 +02:00
merge-script
8aa05cb351 Merge BlockstreamResearch/secp256k1-zkp#320: Upstream PRs 1603, 1599, 1616, 1553, 1620, 1595, 1619, 1624, 1625, 1582, 1581, 1628
a8e6a3cc34 Port bitcoin-core/secp256k1#1628 to zkp public API (mllwchrry)
694342fdb7 Name public API structs (Ava Chow)
0f73caf7c6 test, ci: Lower default iteration count to 16 (Hennadii Stepanov)
87384f5c0f cmake, test: Add `secp256k1_` prefix to test names (Hennadii Stepanov)
980c08df80 util: Remove unused (u)int64_t formatting macros (Tim Ruffing)
096e3e23f6 ci: Update macOS image (Hennadii Stepanov)
57eda3ba30 musig: ctimetests: fix _declassify range for generated nonce points (Sebastian Falbesoner)
447334cb06 include: Avoid visibility("default") on Windows (Tim Ruffing)
8be3839fb2 Remove unused scratch space from API (Jonas Nick)
c232486d84 Revert "cmake: Set `ENVIRONMENT` property for examples on Windows" (Hennadii Stepanov)
26e4a7c214 cmake: Set top-level target output locations (Hennadii Stepanov)
5bab8f6d3c examples: make key generation doc consistent (Jonas Nick)
e8908221a4 examples: do not retry generating seckey randomness in musig (Jonas Nick)
70b6be1834 extrakeys: improve doc of keypair_create (don't suggest retry) (Jonas Nick)
cd4f84f3ba Improve examples/documentation: remove key generation loops (cheapshot003)
ef7ff03407 f can never equal -m (Russell O'Connor)

Pull request description:

  Merge bitcoin-core/secp256k1#1603: f can never equal -m
  Merge bitcoin-core/secp256k1#1599: #1570 improve examples: remove key generation loop
  Merge bitcoin-core/secp256k1#1616: examples: do not retry generating seckey randomness in musig
  Merge bitcoin-core/secp256k1#1553: cmake: Set top-level target output locations
  Merge bitcoin-core/secp256k1#1620: Remove unused scratch space from API
  Merge bitcoin-core/secp256k1#1595: build: 45839th attempt to fix symbol visibility on Windows
  Merge bitcoin-core/secp256k1#1619: musig: ctimetests: fix _declassify range for generated nonce points
  Merge bitcoin-core/secp256k1#1624: ci: Update macOS image
  Merge bitcoin-core/secp256k1#1625: util: Remove unused (u)int64_t formatting macros
  Merge bitcoin-core/secp256k1#1582: cmake, test: Add `secp256k1_` prefix to test names
  Merge bitcoin-core/secp256k1#1581: test, ci: Lower default iteration count to 16
  Merge bitcoin-core/secp256k1#1628: Name public API structs

  This PR can be recreated with `./contrib/sync-upstream.sh -b master range a38d879a`.

  Tips:
   * Use `git show --remerge-diff <pr-branch>` to show the conflict resolution in the merge commit.
   * Use `git read-tree --reset -u <pr-branch>` to replay these resolutions during the conflict resolution stage when recreating the PR branch locally.
     Be aware that this may discard your index as well as the uncommitted changes and untracked files in your worktree.

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

Tree-SHA512: 662518c9f569066402d4b5890abe33d7dc9662bcc2006b42ad83cc08f0a2be6ff923a792681a797b191ed7dd7882155c1eadbc8387011e9c5a10d06183cefb56
2026-02-17 17:22:32 +01:00
mllwchrry
a8e6a3cc34 Port bitcoin-core/secp256k1#1628 to zkp public API 2026-02-16 16:12:41 +02:00
mllwchrry
347d6adfd2 Merge commits 'a88aa935 01b58933 18f9b967 e59158b6 1fae76f5 f0868a9b 68b55209 9b7c59cb 1464f15c 9a8db52f 7d48f5ed a38d879a ' into temp-merge-1628 2026-02-16 16:04:51 +02:00
Jonas Nick
7acd4a1f65 Merge elementsproject/secp256k1-zkp#319: Upstream PR 1479
8c7c24eb8a docs: simplify README description, fix musig docs (mllwchrry)
8d443b8030 musig: Re-add adaptor signatures support (mllwchrry)
168c92011f build: allow enabling the musig module in cmake (Jonas Nick)
f411841a46 Add module "musig" that implements MuSig2 multi-signatures (BIP 327) (Jonas Nick)
0be79660f3 util: add constant-time is_zero_array function (Jonas Nick)
c8fbdb1b97 group: add ge_to_bytes_ext and ge_from_bytes_ext (Jonas Nick)
85e224dd97 group: add ge_to_bytes and ge_from_bytes (Jonas Nick)
21c24fdc7a musig: Remove module in preparation for upstream merge (mllwchrry)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 8c7c24eb8a

Tree-SHA512: d6462e3438af990b2646d7239d1787c1baef29ae15f99e9036e25333e20096c755afa02b414ed41bfc9884dabca844562244aa38397de2d18c6fbdc3980c4356
2026-02-16 13:51:36 +00:00
mllwchrry
8c7c24eb8a docs: simplify README description, fix musig docs 2026-02-16 13:01:42 +02:00
mllwchrry
8d443b8030 musig: Re-add adaptor signatures support 2026-02-13 15:07:52 +02:00
mllwchrry
248358f2bc Merge commit '3660fe5e' into temp-merge-1479 2026-02-13 13:08:00 +02:00
mllwchrry
21c24fdc7a musig: Remove module in preparation for upstream merge 2026-02-13 11:36:52 +02:00
merge-script
211323d6b7 Merge BlockstreamResearch/secp256k1-zkp#318: Upstream PRs 1574, 1576, 1575, 1577, 1578, 1583, 1586, 1600, 1604, 1554
7c987ec89e cmake: Call `enable_testing()` unconditionally (Hennadii Stepanov)
6aa576515e cmake: Delete `CTest` module (Hennadii Stepanov)
292310fbb2 doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description (Sebastian Falbesoner)
421ed1b46f cmake: Introduce `SECP256K1_APPEND_LDFLAGS` variable (Hennadii Stepanov)
9b0f37bff1 fix: remove duplicate 'the' from header file comment (Epic Curious)
fa67b6752d refactor: Use array initialization for unterminated strings (MarcoFalke)
e34b476730 ci: Bump GCC_SNAPSHOT_MAJOR to 15 (maflcko)
7057d3c9af ci: Silent Homebrew's noisy reinstall warnings (Hennadii Stepanov)
c3e40d75db release cleanup: bump version after 0.5.1 (Jonas Nick)
40d87b8e45 release: prepare for 0.5.1 (Jonas Nick)
5770226176 changelog: clarify CMake option (Jonas Nick)
759bd4bbc8 doc: mention `needs-changelog` github label in release process (Jonas Nick)
763d938cf0 ci: only enable extrakeys module when schnorrsig is enabled (Jonas Nick)
af551ab9db tests: do not use functions from extrakeys module (Jonas Nick)

Pull request description:

  Merge bitcoin-core/secp256k1#1574: Fix compilation when extrakeys module isn't enabled
  Merge bitcoin-core/secp256k1#1576: doc: mention `needs-changelog` github label in release process
  Merge bitcoin-core/secp256k1#1575: release: prepare for 0.5.1
  Merge bitcoin-core/secp256k1#1577: release cleanup: bump version after 0.5.1
  Merge bitcoin-core/secp256k1#1578: ci: Silent Homebrew's noisy reinstall warnings
  Merge bitcoin-core/secp256k1#1583: ci: Bump GCC_SNAPSHOT_MAJOR to 15
  Merge bitcoin-core/secp256k1#1586: fix: remove duplicate 'the' from header file comment
  Merge bitcoin-core/secp256k1#1600: cmake: Introduce `SECP256K1_APPEND_LDFLAGS` variable
  Merge bitcoin-core/secp256k1#1604: doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
  Merge bitcoin-core/secp256k1#1554: cmake: Clean up testing code

  This PR can be recreated with `./contrib/sync-upstream.sh -b master range 4c57c7a`.

  Tips:
   * Use `git show --remerge-diff <pr-branch>` to show the conflict resolution in the merge commit.
   * Use `git read-tree --reset -u <pr-branch>` to replay these resolutions during the conflict resolution stage when recreating the PR branch locally.
     Be aware that this may discard your index as well as the uncommitted changes and untracked files in your worktree.

ACKs for top commit:
  real-or-random:
    ACK 551b5dd415

Tree-SHA512: f05d1f21fbd373929666174e0396c46212f28a0ae819e244b7c6b620d0e9aee9ae11bad1d1616cafc34dd375c3635c7637ce25123c66ce92f247ae0fb063be9a
2026-02-13 08:39:06 +01:00
DarkWindman
551b5dd415 Merge commits 'fded437c cdf08c1a 642c885b f8c1b0e0 3fdf146b b3076144 19888550 2f2ccc46 472faaa8 4c57c7a5 ' into temp-merge-1554 2026-02-11 13:56:17 +02:00
merge-script
4ae7cb4f71 Merge BlockstreamResearch/secp256k1-zkp#317: Upstream PRs 1529, 1548, 1545, 1550, 1546, 1543, 1535, 1555, 1565, 1564, 1563, 1551
31f84595c4 Add ellswift usage example (Sebastian Falbesoner)
fe4fbaa7f3 examples: fix case typos in secret clearing paragraphs (s/, Or/, or/) (Sebastian Falbesoner)
16685649d2 doc: Add convention for defaults (Tim Ruffing)
e2af491263 ci: Switch to the new default value of the precomputed table for signing (Hennadii Stepanov)
d94a9273f8 build: Adjust the default size of the precomputed table for signing (Hennadii Stepanov)
9420eece24 cmake: Bump CMake minimum required version up to 3.16 (Hennadii Stepanov)
b8fe33332b cmake: Fixed O3 replacement (Eduardo Menges Mattje)
4d9645bee0 cmake: Remove "AUTO" value of `SECP256K1_ECMULT_GEN_KB` option (Hennadii Stepanov)
a06805ee74 cmake: Remove "AUTO" value of `SECP256K1_ECMULT_WINDOW_SIZE` option (Hennadii Stepanov)
26b94ee92a autotools: Remove "auto" value of `--with-ecmult-gen-kb` option (Hennadii Stepanov)
122dbaeb37 autotools: Remove "auto" value of `--with-ecmult-window` option (Hennadii Stepanov)
158f9e5eae cmake: Do not modify build types when integrating by downstream project (Hennadii Stepanov)
4706be2cd0 cmake: Reimplement `SECP256K1_APPEND_CFLAGS` using Bitcoin Core approach (Hennadii Stepanov)
c2764dbb99 cmake: Rename `SECP256K1_LATE_CFLAGS` to `SECP256K1_APPEND_CFLAGS` (Hennadii Stepanov)
0e2fadb20c fix: typos in secp256k1.c (Elliot Lee)
f87a3589f4 cmake: Do not set `CTEST_TEST_TARGET_ALIAS` (Hennadii Stepanov)
7454a53736 README: mention ellswift module (Sebastian Falbesoner)
ec4c002faa cmake: Simplify `PROJECT_IS_TOP_LEVEL` emulation (Hennadii Stepanov)
cae9a7ad14 cmake: Do not set emulated PROJECT_IS_TOP_LEVEL as cache variable (Hennadii Stepanov)

Pull request description:

  Merge bitcoin-core/secp256k1#1529: cmake: Fix cache issue when integrating by downstream project
  Merge bitcoin-core/secp256k1#1548: README: mention ellswift module
  Merge bitcoin-core/secp256k1#1545: cmake: Do not set `CTEST_TEST_TARGET_ALIAS`
  Merge bitcoin-core/secp256k1#1550: fix: typos in secp256k1.c
  Merge bitcoin-core/secp256k1#1546: cmake: Rename `SECP256K1_LATE_CFLAGS` and switch to Bitcoin Core's approach
  Merge bitcoin-core/secp256k1#1543: cmake: Do not modify build types when integrating by downstream project
  Merge bitcoin-core/secp256k1#1535: build: Replace hardcoded "auto" value with default one
  Merge bitcoin-core/secp256k1#1555: Fixed O3 replacement
  Merge bitcoin-core/secp256k1#1565: cmake: Bump CMake minimum required version up to 3.16
  Merge bitcoin-core/secp256k1#1564: build, ci: Adjust the default size of the precomputed table for signing
  Merge bitcoin-core/secp256k1#1563: doc: Add convention for defaults
  Merge bitcoin-core/secp256k1#1551: Add ellswift usage example

  This PR can be recreated with `./contrib/sync-upstream.sh -b master range 0055b86`.

  Tips:
   * Use `git show --remerge-diff <pr-branch>` to show the conflict resolution in the merge commit.
   * Use `git read-tree --reset -u <pr-branch>` to replay these resolutions during the conflict resolution stage when recreating the PR branch locally.
     Be aware that this may discard your index as well as the uncommitted changes and untracked files in your worktree.

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

Tree-SHA512: 8551626c0f183c495cbbc12d9c292e1995ce4b5558f950e1a2ca84188724884180117f9bcc10c0d2f3e73da054c5b4647efaa8282be74936f4d156038b1c10da
2026-02-11 08:58:20 +01:00
DarkWindman
d0dde4aa2a Merge commits '35c0fdc 5dd637f 69b2192 d7ae25c d403eea f473c95 4af241b a526937 fcc5d73 ca06e58 ea2d5f0 0055b86 ' into temp-merge-1551 2026-02-10 13:06:38 +02:00
Jonas Nick
84ca3b330e Merge elementsproject/secp256k1-zkp#316: Upstream PRs 1533
e73f6f8fd9 tests: refactor: drop `secp256k1_` prefix from testrand.h functions (Sebastian Falbesoner)
0ee7453a99 tests: refactor: add `testutil_` prefix to testutil.h functions (Sebastian Falbesoner)
0c6bc76dcd tests: refactor: move `random_` helpers from tests.c to testutil.h (Sebastian Falbesoner)
0fef8479be tests: refactor: rename `random_field_element_magnitude` -> `random_fe_magnitude` (Sebastian Falbesoner)
59db007f0f tests: refactor: rename `random_group_element_...` -> `random_ge_...` (Sebastian Falbesoner)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 513e550e8a

Tree-SHA512: 25d2d077ae55f0f6887d64b299f3fe6e942b4c709853a743ca5d68514f718990fd7ef1fb3dbcd4343977fc1c7c6af73a091c05038a17767f9823d2d89ae4d476
2026-02-09 14:02:58 +00:00
mllwchrry
513e550e8a Merge commits '4392f0f7 ' into temp-merge-1533 2026-02-09 13:10:17 +02:00
Jonas Nick
0fb0eac97f Merge elementsproject/secp256k1-zkp#314: Upstream PRs 1522, 1523, 1525, 1524, 1526, 1528, 1517, 1532, 1488
91b2deab7b ci: Add zkp modules to arm64-macos-native job (mllwchrry)
218f0cc93b ci: Add native macOS arm64 job (Hennadii Stepanov)
f55703ba49 autotools: Delete unneeded compiler test (Hennadii Stepanov)
396e885886 autotools: Align MSan checking code with CMake's implementation (Hennadii Stepanov)
abde59f52d cmake: Report more compiler details in summary (Hennadii Stepanov)
7abf979a43 cmake: Disable `ctime_tests` if build with `-fsanitize=memory` (Hennadii Stepanov)
ebfb82ee2f ci: Add job with -fsanitize-memory-param-retval (Tim Ruffing)
e1bef0961c configure: Move "experimental" warning to bottom (Tim Ruffing)
55e5d975db autotools: Disable eager MSan in ctime_tests (Tim Ruffing)
9554362b15 tests: call secp256k1_ecmult_multi_var with a non-NULL error callback (Nicolas Iooss)
9f4c8cd730 cmake: Fix `check_arm32_assembly` when using as subproject (Hennadii Stepanov)
dd695563e6 check-abi: explicitly provide public headers (Jonas Nick)
d45d9b74bb changelog: Correct 0.5.0 release date (Tim Ruffing)
2f05e2da4b release cleanup: bump version after 0.5.0 (Tim Ruffing)
c0e4ec3fee release: prepare for 0.5.0 (Tim Ruffing)

Pull request description:

ACKs for top commit:
  real-or-random:
    ACK 91b2deab7b

Tree-SHA512: c535cb2f8db6289ab0f670cd13550835c447d6dd3c8ea3d7a825541fb53797e0f660df9c17dd8669457af1121b21867aa49d787652c7333a54daefb10f8cfeed
2026-02-08 20:12:42 +00:00
mllwchrry
91b2deab7b ci: Add zkp modules to arm64-macos-native job 2026-02-06 14:37:11 +02:00
mllwchrry
f5e9804e34 Merge remote-tracking branch 'zkp/master' into temp-merge-1488 2026-02-06 13:02:03 +02:00
merge-script
e34dc81278 Merge BlockstreamResearch/secp256k1-zkp#315: ci: Backport LLVM apt signature fix
040673bd44 ci, docker: Fix LLVM repository signature failure (Hennadii Stepanov)

Pull request description:

  Cherry-pick of bitcoin-core/secp256k1@0ffb1749a5

  Fixes Docker build CI failure caused by Debian's Sequoia PGP policy rejecting SHA-1 signatures from the LLVM apt repository.

ACKs for top commit:
  real-or-random:
    utACK 040673bd44

Tree-SHA512: d524472a3e74abd787007d453e62e2ae28458e37fa2eaf28ee3f1379634e9f34419a5e06fe52d627ea010f634dcbeb6264ff73b60005cb4622b81c69ffd22e28
2026-02-06 11:56:24 +01:00
Hennadii Stepanov
040673bd44 ci, docker: Fix LLVM repository signature failure
The LLVM apt repository uses legacy SHA1 signatures which are now
rejected by the stricter Sequoia PGP policy.

This change extends the 'sha1.second_preimage_resistance' cutoff date to
9999-01-01 in the default Sequoia config. This effectively whitelists
the legacy signature algorithm, preventing "OpenPGP signature
verification failed" errors during `apt-get update`.

See https://github.com/llvm/llvm-project/issues/153385.
2026-02-06 12:01:29 +02:00
mllwchrry
c946b0978a Merge commits 'e3a885d4 d7f6613d 7d0bc087 7712a530 4155e62f 06bff6de 1791f6fc 4b8d5eea bedffd53 ' into temp-merge-1488 2026-02-06 10:42:44 +02:00
Jonas Nick
1cdc3e0fe3 Merge elementsproject/secp256k1-zkp#311: sync-upstream: Extend git usage tips
41cead8a0b sync-upstream: Extend git usage tips (Tim Ruffing)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 41cead8a0b

Tree-SHA512: ce484d8235a6079be34257bfe859786d2fa666c2f373db7742030210118b8186f8b975517a24be60ee566682d2cdc217f6f10a36ae9c96c9f592dc3c2f5b4331
2026-02-06 08:36:23 +00:00
merge-script
d176205dd7 Merge BlockstreamResearch/secp256k1-zkp#313: Upstream PR 1518
2cb2e312e9 extrakeys: Migrate to bitcoin-core/secp256k1#1518 secp256k1_ec_pubkey_sort (DarkWindman)
7d2591ce12 Add secp256k1_pubkey_sort (Jonas Nick)

Pull request description:

  Merge bitcoin-core/secp256k1#1518: Add secp256k1_pubkey_sort

  This PR can be recreated with `./contrib/sync-upstream.sh -b master range bb528cf`.
  Tip: Use `git show --remerge-diff` to show the changes manually added to the merge commit.

ACKs for top commit:
  real-or-random:
    ACK 2cb2e312e9

Tree-SHA512: dbdb6c5df2195d2ece9574367e0f684a651ea199806a80232c85b0ffd0ba6b930b108bd97385d9fab656754a85fa6de223a93b945046b043aab20ad7bb3d1bff
2026-02-05 22:59:07 +01:00
merge-script
ca68d08872 Merge BlockstreamResearch/secp256k1-zkp#312: scalar: Add SECP256K1_SCALAR_VERIFY to zkp-specific function
96a415b1c0 scalar: Port bitcoin-core/secp256k1#1393 to zkp-specific code (mllwchrry)

Pull request description:

  Add the `SECP256K1_SCALAR_VERIFY` macro to the zkp-specific `secp256k1_scalar_set_u64` function.

  This was missed when upstream PRs bitcoin-core/secp256k1#1373 and bitcoin-core/secp256k1#1393 were merged.

ACKs for top commit:
  real-or-random:
    ACK 96a415b1c0

Tree-SHA512: 4c3c6209e4c27bec7afc07398c9fc50aef7d44850fbbf5969ff4b57991279960c9645c8daeee5d78bee54dac7fe85bc3d9a01ba4b9deb761d574ae6221ef41c1
2026-02-05 21:44:16 +01:00
DarkWindman
2cb2e312e9 extrakeys: Migrate to bitcoin-core/secp256k1#1518 secp256k1_ec_pubkey_sort 2026-02-05 19:02:49 +02:00
DarkWindman
3291b021bf Merge commits 'bb528cf ' into temp-merge-1518 2026-02-05 18:50:53 +02:00
mllwchrry
96a415b1c0 scalar: Port bitcoin-core/secp256k1#1393 to zkp-specific code 2026-02-05 17:29:53 +02:00
Tim Ruffing
41cead8a0b sync-upstream: Extend git usage tips 2026-02-05 16:01:30 +01:00
merge-script
36a7b87449 Merge BlockstreamResearch/secp256k1-zkp#310: Upstream PRs 1058
4c341f89ab Add changelog entry for SDMC (Pieter Wuille)
a043940253 Permit COMB_BITS < 256 for exhaustive tests (Pieter Wuille)
39b2f2a321 Add test case for ecmult_gen recoded = {-1,0,1} (Pieter Wuille)
644e86de9a Reintroduce projective blinding (Pieter Wuille)
07810d9abb Reduce side channels from single-bit reads (Peter Dettman)
a0d32b597d Optimization: use Nx32 representation for recoded bits (Peter Dettman)
e03dcc44b5 Make secp256k1_scalar_get_bits support 32-bit reads (Pieter Wuille)
5005abee60 Rename scalar_get_bits -> scalar_get_bits_limb32; return uint32_t (Pieter Wuille)
6247f485b6 Optimization: avoid unnecessary doublings in precomputation (Peter Dettman)
15d0cca2a6 Optimization: first table lookup needs no point addition (Pieter Wuille)
7a33db35cd Optimization: move (2^COMB_BITS-1)/2 term into ctx->scalar_offset (Pieter Wuille)
ed2a056f3d Provide 3 configurations accessible through ./configure (Pieter Wuille)
5f7be9f6a5 Always generate tables for current (blocks,teeth) config (Pieter Wuille)
fde1dfcd8d Signed-digit multi-comb ecmult_gen algorithm (Peter Dettman)
486518b350 Make exhaustive tests's scalar_inverse(&x,&x) work (Pieter Wuille)
ab45c3e089 Initial gej blinding -> final ge blinding (Pieter Wuille)
aa00a6b892 Introduce CEIL_DIV macro and use it (Tim Ruffing)

Pull request description:

  [bitcoin-core/secp256k1#1058]: Signed-digit multi-comb ecmult_gen algorithm

  This PR can be recreated with `./contrib/sync-upstream.sh -b master range da51507`.
  Tip: Use `git show --remerge-diff` to show the changes manually added to the merge commit.

ACKs for top commit:
  mllwchrry:
    ACK 9a57e3c
  real-or-random:
    ACK 9a57e3c650

Tree-SHA512: 6de5961697ed1f23ce60a6437b622cdf1289273cf9e22f7abfeced08c1f279e30b1a807148f3405c723ad5d3c712eecf0499f994dfce8a1c687b4521b0ef60dd
2026-02-05 15:47:28 +01:00
Jonas Nick
9a57e3c650 Merge commits 'da515074 ' into temp-merge-1058 2026-01-30 21:18:06 +00:00
merge-script
7e460db4ca Merge BlockstreamResearch/secp256k1-zkp#307: Upstream PRs 1484, 1483, 1486, 1496, 1489, 1490, 1507, 1512, 1515
f9cf003d9b scalar: Port bitcoin-core/secp256k1#1512 to zkp-specific code (mllwchrry)
a85e2233e7 ci: Note affected clangs in comment on ASLR quirk (Tim Ruffing)
f7f0184ba1 msan: notate more variable assignments from assembly code (Cory Fields)
a61339149f change inconsistent array param to pointer (Cory Fields)
a5e8ab2484 ci: Add sanitizer env variables to debug output (Tim Ruffing)
84a93de4d2 ci: Add workaround for ASLR bug in sanitizers (Tim Ruffing)
2028069df2 doc: clarify input requirements for secp256k1_fe_mul (Sebastian Falbesoner)
11420a7a28 tests: improve fe_sqr test (Sebastian Falbesoner)
e7bdddd9c9 refactor: rename `check_fe_equal` -> `fe_equal` (Sebastian Falbesoner)
00111c9c56 tests: add missing fe comparison checks for inverse field test cases (Sebastian Falbesoner)
31ba404944 msan: notate variable assignments from assembly code (Cory Fields)
e7ea32e30a msan: Add SECP256K1_CHECKMEM_MSAN_DEFINE which applies to memory sanitizer and not valgrind (Cory Fields)
94a14d5290 ci: Update cache action (Hennadii Stepanov)
3777e3f36a cmake: Recommend native CMake commands in README (Tim Ruffing)
51df2d9ab3 tests: Drop redundant _scalar_check_overflow calls (Tim Ruffing)

Pull request description:

  Merge bitcoin-core/secp256k1#1484: tests: Drop redundant _scalar_check_overflow calls
  Merge bitcoin-core/secp256k1#1483: cmake: Recommend native CMake commands in README
  Merge bitcoin-core/secp256k1#1486: ci: Update cache action
  Merge bitcoin-core/secp256k1#1496: msan: notate variable assignments from assembly code
  Merge bitcoin-core/secp256k1#1489: tests: add missing fe comparison checks for inverse field test cases
  Merge bitcoin-core/secp256k1#1490: tests: improve fe_sqr test (issue #1472)
  Merge bitcoin-core/secp256k1#1507: ci: Add workaround for ASLR bug in sanitizers
  Merge bitcoin-core/secp256k1#1512: msan: notate more variable assignments from assembly code
  Merge bitcoin-core/secp256k1#1515: ci: Note affected clangs in comment on ASLR quirk

  This PR can be recreated with `./contrib/sync-upstream.sh -b master range d831168`.
  Tip: Use `git show --remerge-diff` to show the changes manually added to the merge commit.

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

Tree-SHA512: c1720b50abb452ebea28f48239411863ac5ab2a7dcc2f34b8ebf05eb11b2657d35ea63a261624d33a82b89eb93db41eea166d5565b3e5d080a0181370d3d9b72
2026-01-29 16:26:31 +01:00
mllwchrry
f9cf003d9b scalar: Port bitcoin-core/secp256k1#1512 to zkp-specific code 2026-01-29 12:51:33 +02:00
mllwchrry
8c72644a0e Merge commits '5ad3aa3 2483627 0653a25 d926510 cdc9a62 427e86b 05bfab6 4b77fec d831168 ' into temp-merge-1515 2026-01-23 19:51:09 +02:00
Jonas Nick
797e2ed61a Merge elementsproject/secp256k1-zkp#306: sync-upstream: improve help text
db8750de46 sync-upstream: improve help text (Jonas Nick)

Pull request description:

ACKs for top commit:
  real-or-random:
    utACK db8750de46

Tree-SHA512: 06f28c5ebd74437c3c2ef5ae460bec66ff9f15c4bae3b76c74b1323e2ef24d8ec456b72d58df9d68a3d41fcd44d6dfbefe8115900ccb10b8f028a7b0952b6df1
2026-01-22 11:07:36 +00:00
Jonas Nick
db8750de46 sync-upstream: improve help text 2026-01-22 09:09:27 +00:00
merge-script
42e75b613b Merge BlockstreamResearch/secp256k1-zkp#304: ci: Backport MSan fixes for ctime_tests
b9a82b481f ci: Update macOS image (Hennadii Stepanov)
a1be8ed1b1 ci: Silent Homebrew's noisy reinstall warnings (Hennadii Stepanov)
fd259fe9ad ci: Add job with -fsanitize-memory-param-retval (Tim Ruffing)
76b3396516 configure: Move "experimental" warning to bottom (Tim Ruffing)
e639e6caa9 autotools: Disable eager MSan in ctime_tests (Tim Ruffing)

Pull request description:

  Cherry-picked the upstream fixes from bitcoin-core/secp256k1#1517 to align behaviour here and silence the false 'use-of-uninitialized-value' reports in ctime_tests under Clang ≥16.

  #### Result:
  - `ctime_tests` is clean under MSan.
  - Other tests are unchanged.
  - No API or behaviour changes.

  #### Commits cherry-picked:
  - [55e5d975db](55e5d975db),
  - [e1bef0961c](e1bef0961c),
  - [ebfb82ee2f](ebfb82ee2f)

  #### References:
  Upstream: https://github.com/bitcoin-core/secp256k1/pull/1517

ACKs for top commit:
  apoelstra:
    ACK b9a82b481fc35c5db3a127185ffada77fe107d46; successfully ran local tests
  jonasnick:
    ACK b9a82b481f

Tree-SHA512: b6c9ae38b142c7fadf1157a1b25cdc8e85e6cd271222b950b1246f14daf85b072979d4f2ee8791c8b81b2f6a94ad1094fc8110bbd4ff19153de6a6efad2e3cc0
2025-09-19 17:58:29 +02:00