Commit Graph

2897 Commits

Author SHA1 Message Date
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
Hennadii Stepanov
b9a82b481f ci: Update macOS image
The macOS 12 GHA image has been deprecated since 2024-10-07.
See: https://github.com/actions/runner-images/issues/10721
2025-09-18 13:12:29 +05:30
Hennadii Stepanov
a1be8ed1b1 ci: Silent Homebrew's noisy reinstall warnings 2025-09-18 13:12:18 +05:30
Tim Ruffing
fd259fe9ad ci: Add job with -fsanitize-memory-param-retval 2025-09-16 15:27:23 +05:30
Tim Ruffing
76b3396516 configure: Move "experimental" warning to bottom
to make it more promiment
2025-09-16 15:24:23 +05:30
Tim Ruffing
e639e6caa9 autotools: Disable eager MSan in ctime_tests
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2025-09-16 15:17:35 +05:30
Jonas Nick
f92fd5cc91 Merge elementsproject/secp256k1-zkp#303: ci: backport upstream string-initializer fixes and clean up related tests
7d779c6d9d examples/musig: use brace-enclosed initializer for 32-byte msg (BEULAHEVANJALIN)
53fd89b635 musig/tests: initialize keypair (Jonas Nick)
40bd8549dd musig/test: Remove dead code (Tim Ruffing)
c4570307ec test/fix: refactor unterminated string initializers to brace arrays - Mirror upstream fix (bitcoin-core/secp256k1 fa67b675) - Convert tags, test vectors, and constants in -zkp-only modules (ecdsa_adaptor, ecdsa_s2c, musig, bppp, rangeproof, schnorrsig_halfagg) - Avoid -Wunterminated-string-initialization without changing behavior (BEULAHEVANJALIN)
654a8c327c refactor: Use array initialization for unterminated strings (MarcoFalke)

Pull request description:

ACKs for top commit:
  real-or-random:
    utACK 7d779c6d9d thanks!
  jonasnick:
    ACK 7d779c6d9d

Tree-SHA512: edb9885a36eab499dee05e0c87a184f139ba6f68c01128ae692ab1195546ba8ff77d0c0b06faa22164fd89fd27935fd68b1e9c04a1fc9bcd0b7d6472515095dd
2025-09-16 06:00:35 +00:00
BEULAHEVANJALIN
7d779c6d9d examples/musig: use brace-enclosed initializer for 32-byte msg
Switch msg initialization from a string literal to a brace-enclosed
array to avoid -Wunterminated-string-initialization. Upstream removed
the trailing '!' from the message; this change retains it.
2025-09-09 21:56:53 +05:30
Jonas Nick
53fd89b635 musig/tests: initialize keypair
The keypair is unused in musig_partial_sign, but clang-snapshot gives a compiler
warning anyway.
2025-09-09 21:56:00 +05:30
Tim Ruffing
40bd8549dd musig/test: Remove dead code
This avoids a compiler warning on clang-snapshot about &keypair being uninitialized.

(cherry picked from commit 8d967a602b)
2025-09-09 21:55:51 +05:30
BEULAHEVANJALIN
c4570307ec test/fix: refactor unterminated string initializers to brace arrays
- Mirror upstream fix (bitcoin-core/secp256k1 fa67b675)
- Convert tags, test vectors, and constants in -zkp-only modules (ecdsa_adaptor, ecdsa_s2c, musig, bppp, rangeproof, schnorrsig_halfagg)
- Avoid -Wunterminated-string-initialization without changing behavior
2025-09-09 21:55:17 +05:30
MarcoFalke
654a8c327c refactor: Use array initialization for unterminated strings
The previous code is correct and harmless to initialize an array with a
non-terminated character sequence using a string literal.

However, it requires exactly specifying the array size, which can be
cumbersome.

Also, GCC-15 may issue the -Wunterminated-string-initialization warning.
[1]

Fix both issues by using array initialization. This refactoring commit
does not change behavior.

[1] Example warning:

src/modules/schnorrsig/main_impl.h:48:46: error: initializer-string for array of 'unsigned char' is too long [-Werror=unterminated-string-initialization]
   48 | static const unsigned char bip340_algo[13] = "BIP0340/nonce";
      |                                              ^~~~~~~~~~~~~~~

(cherry picked from commit fa67b6752d)

Conflicts:
	src/testrand_impl.h (kept local name `secp256k1_testrand_seed`)
2025-09-09 21:47:12 +05:30
Andrew Poelstra
f9a04ae405 Merge BlockstreamResearch/secp256k1-zkp#302: extrakeys: fix pubkey_sort_cmp test
83d0fa25a8 extrakeys: fix pubkey_sort_cmp test (Jonas Nick)

Pull request description:

  Instead of providing CTX directly, pass a cmp_data object containing CTX. Otherwise, memory sanitizer fails with "use-of-uninitialized-value".


ACKs for top commit:
  real-or-random:
    utACK 83d0fa25a8
  apoelstra:
    ACK 83d0fa25a826d716f809e00ef0a67385b776aec9; successfully ran local tests


Tree-SHA512: eb36c9f90632a3fb472653686ffb5c7a9c29849e05ab1084106a49c23e60ca1c90022ee1accd99ab5bfaa4fd5b3f4670cea8d5a2c415f00c05d645c793b6bedd
2025-09-09 15:27:50 +00:00
Jonas Nick
83d0fa25a8 extrakeys: fix pubkey_sort_cmp test
Instead of providing CTX directly, pass a cmp_data object containing CTX.
Otherwise, memory sanitizer fails with "use-of-uninitialized-value".
2025-09-08 19:18:39 +00:00
Jonas Nick
0055b86780 Merge bitcoin-core/secp256k1#1551: Add ellswift usage example
31f84595c4 Add ellswift usage example (Sebastian Falbesoner)
fe4fbaa7f3 examples: fix case typos in secret clearing paragraphs (s/, Or/, or/) (Sebastian Falbesoner)

Pull request description:

ACKs for top commit:
  real-or-random:
    utACK 31f84595c4
  jonasnick:
    ACK 31f84595c4

Tree-SHA512: 5fe894b599c78db585a6d5238c17a894d020106561a625027efc4d67c870a288aad0814e77e7c3cb03e96b7cf940db95a6933d5a5e34a93aa644b3dcbfd8e938
2024-07-10 18:23:58 +00:00
Jonas Nick
ea2d5f0f17 Merge bitcoin-core/secp256k1#1563: doc: Add convention for defaults
16685649d2 doc: Add convention for defaults (Tim Ruffing)

Pull request description:

ACKs for top commit:
  hebasto:
    ACK 16685649d2
  jonasnick:
    ACK 16685649d2

Tree-SHA512: cb359e20f1944b4095512413df4d55ccd89e1838da8e006cea4e523e6d1d5008afbab4e0d87b05a6e6ad991d1a0003066fc205d15443c8f1eb2b02e13196155a
2024-07-09 18:21:37 +00:00
merge-script
ca06e58b2c Merge bitcoin-core/secp256k1#1564: build, ci: Adjust the default size of the precomputed table for signing
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)

Pull request description:

  This PR implements the [outcomes](https://github.com/bitcoin-core/secp256k1/issues/1549#issuecomment-2200559257) from today's IRC meeting:

  1. The default size of the precomputed table for signing is now aligned with Bitcoin Core's [default](a057869aa3).

  2. The default value in CI has been updated to reflect the new default.

ACKs for top commit:
  sipa:
    utACK e2af491263
  real-or-random:
    utACK e2af491263

Tree-SHA512: aa9db5bc2aec29a35a503a80617a4c096e9909648084fe1ce43b5dd7e74dd812e7642305bd5bc13eb581efc23f12904e200e13cb1a35955b773e05ab4f84be4e
2024-07-03 22:18:28 +02:00
Hennadii Stepanov
e2af491263 ci: Switch to the new default value of the precomputed table for signing 2024-07-03 14:04:18 +01:00
Hennadii Stepanov
d94a9273f8 build: Adjust the default size of the precomputed table for signing
The new default value of the precomputed table for signing is aligned
with Bitcoin Core's default.
See: a057869aa3
2024-07-03 14:04:13 +01:00
merge-script
fcc5d7381b Merge bitcoin-core/secp256k1#1565: cmake: Bump CMake minimum required version up to 3.16
9420eece24 cmake: Bump CMake minimum required version up to 3.16 (Hennadii Stepanov)

Pull request description:

  Debian 10 [reached](https://wiki.debian.org/DebianReleases) EOL LTS yesterday, on 2024-06-30.

  There no longer seem to be compelling reasons to maintain support for CMake 3.13.

  The suggested minimum required version, CMake 3.16, is shipped with Ubuntu 20.04 LTS, which is [supported](https://wiki.ubuntu.com/Releases) until April 2025.

  Debian 11 ships with CMake 3.18 (3.25 in backports). In [other](https://repology.org/project/cmake/versions) major distros and package managers, CMake versions are not older.

ACKs for top commit:
  fanquake:
    ACK 9420eece24 - If the only significant change is for some MSVC compat code, this doesn't seem super compelling, but seems ok either way.
  real-or-random:
    utACK 9420eece24

Tree-SHA512: 7066f053f9820f9ddeb27f9e8042edb67a31cd61e29eadff12b50d63bbe278f6ffd15f84035932bc4c337461a7eb342339ed62e46e100c5447106a702fad229c
2024-07-03 14:44:05 +02:00
Hennadii Stepanov
9420eece24 cmake: Bump CMake minimum required version up to 3.16 2024-07-03 08:23:20 +01:00
Tim Ruffing
16685649d2 doc: Add convention for defaults 2024-07-01 18:40:24 +02:00
merge-script
a5269373fa Merge bitcoin-core/secp256k1#1555: Fixed O3 replacement
b8fe33332b cmake: Fixed O3 replacement (Eduardo Menges Mattje)

Pull request description:

  Old replacement of `O3` in `CMAKE_C_FLAGS_RELEASE` skip spaces, which is problematic. For instance, if `CMAKE_C_FLAGS_RELEASE = "-O3 -DFOO"`, regex will replace it with `-O2-DFOO`, which causes a compile error.

  This patch changes this behavior, keeping whichever space exists between the flags.

  If I may question, what is the rationale behind replacing `O3` with `O2`? Changing the user's flags is a bad practice overall, and I don't see how this replacement is beneficial.

ACKs for top commit:
  hebasto:
    re-ACK b8fe33332b.

Tree-SHA512: d84091eb594af695805784e87f49d38ac08a7cf42978c844383882196389a0d83fc5f72e6394887b9961cc3f96538962f4ee86ef3eeca2c96509c64428046c70
2024-06-29 12:12:32 +02:00
Eduardo Menges Mattje
b8fe33332b cmake: Fixed O3 replacement 2024-06-28 17:41:58 -03:00
Sebastian Falbesoner
31f84595c4 Add ellswift usage example
This should hopefully be useful as orientation for users implementing
the key exchange part of BIP324. Conceptually the example is not very
different to the ECDH one, so a lot of code/comments are just copied
(e.g. context creation, secret key generation, shared secret comparison,
console output, cleanup with secret key clearing).
2024-06-25 17:11:20 +02:00
Sebastian Falbesoner
fe4fbaa7f3 examples: fix case typos in secret clearing paragraphs (s/, Or/, or/) 2024-06-25 17:11:07 +02:00