Skip to content

Commit bb0dc6d

Browse files
committed
Squashed 'src/secp256k1/' changes from c0db6509bd..6264c3d093
6264c3d093 docs: update README f825d34260 ci: enable silentpayments module b821a467e2 tests: add constant time tests b5b73bcd99 tests: add BIP-352 test vectors eabeedb752 silentpayments: add benchmarks for scanning 1de8b7e854 silentpayments: add examples/silentpayments.c ed3a44b10a silentpayments: receiving 3c9362dd6a silentpayments: recipient label support 70e20b7145 silentpayments: sending cf44324b5e build: add skeleton for new silentpayments (BIP352) module ad60ef7ea7 Merge bitcoin-core/secp256k1#1689: ci: Convert `arm64` Cirrus tasks to GHA jobs c498779096 Merge bitcoin-core/secp256k1#1687: cmake: support the use of launchers in ctest -S scripts 0dfe387dbe cmake: support the use of launchers in ctest -S scripts 89096c234d Merge bitcoin-core/secp256k1#1692: cmake: configure libsecp256k1.pc during install 7106dce6fd cmake: configure libsecp256k1.pc during install 29e73f4ba5 Merge bitcoin-core/secp256k1#1685: cmake: Emulate Libtool's behavior on FreeBSD 746e36b141 Merge bitcoin-core/secp256k1#1678: cmake: add a helper for linking into static libs a28c2ffa5c Merge bitcoin-core/secp256k1#1683: README: add link to musig example 2a9d374735 Merge bitcoin-core/secp256k1#1690: ci: Bump GCC snapshot major version to 16 add146e101 ci: Bump GCC snapshot major version to 16 004f57fcd8 ci: Move Valgrind build for `arm64` from Cirrus to GHA 5fafdfc30f ci: Move `gcc-snapshot` build for `arm64` from Cirrus to GHA e814b79a8b ci: Switch `arm64_debian` from QEMU to native `arm64` Docker image bcf77346b9 ci: Add `arm64` architecture to `docker_cache` job b77aae9226 ci: Rename Docker image tag to reflect architecture 145ae3e28d cmake: add a helper for linking into static libs 819210974b README: add link to musig example, generalize module enabling hint 95db29b144 Merge bitcoin-core/secp256k1#1679: cmake: Use `PUBLIC_HEADER` target property in installation logic 37dd422b5c cmake: Emulate Libtool's behavior on FreeBSD f24b838bed Merge bitcoin-core/secp256k1#1680: doc: Promote "Building with CMake" to standard procedure 3f31ac43e0 doc: Promote "Building with CMake" to standard procedure 6f67151ee2 cmake: Use `PUBLIC_HEADER` target property c32715b2a0 cmake, move-only: Move module option processing to `src/CMakeLists.txt` 201b2b8f06 Merge bitcoin-core/secp256k1#1675: cmake: Bump minimum required CMake version to 3.22 3af71987a8 cmake: Bump minimum required CMake version to 3.22 92394476e9 Merge bitcoin-core/secp256k1#1673: Assert field magnitude at control-flow join 3a4f448cb4 Assert field magnitude at control-flow join 9fab425256 Merge bitcoin-core/secp256k1#1668: bench_ecmult: add benchmark for ecmult_const_xonly 05445377f4 bench_ecmult: add benchmark for ecmult_const_xonly bb597b3d39 Merge bitcoin-core/secp256k1#1670: tests: update wycheproof files d73ed99479 tests: update wycheproof files 4187a46649 Merge bitcoin-core/secp256k1#1492: tests: Add Wycheproof ECDH vectors e266ba11ae tests: Add Wycheproof ECDH vectors 13906b7154 Merge bitcoin-core/secp256k1#1669: gitignore: Add Python cache files c1bcb03276 gitignore: Add Python cache files 70f149b9a1 Merge bitcoin-core/secp256k1#1662: bench: add ellswift to bench help output 6b3fe51fb6 bench: add ellswift to bench help output d84bb83e26 Merge bitcoin-core/secp256k1#1661: configure: Show exhaustive tests in summary 3f54ed8c1b Merge bitcoin-core/secp256k1#1659: include: remove WARN_UNUSED_RESULT for functions always returning 1 20b05c9d3f configure: Show exhaustive tests in summary e56716a3bc Merge bitcoin-core/secp256k1#1660: ci: Fix exiting from ci.sh on error d87c3bc58f ci: Fix exiting from ci.sh on error 1b6e081538 include: remove WARN_UNUSED_RESULT for functions always returning 1 2abb35b034 Merge bitcoin-core/secp256k1#1657: tests: remove unused uncounting_illegal_callback_fn 51907fa918 tests: remove unused uncounting_illegal_callback_fn a7a5117144 Merge bitcoin-core/secp256k1#1359: Fix symbol visibility issues, add test for it 13ed6f65dc Merge bitcoin-core/secp256k1#1593: Remove deprecated `_ec_privkey_{negate,tweak_add,tweak_mul}` aliases from API d1478763a5 build: Drop no longer needed `-fvisibility=hidden` compiler option 8ed1d83d92 ci: Run `tools/symbol-check.py` 41d32ab2de test: Add `tools/symbol-check.py` 88548058b3 Introduce `SECP256K1_LOCAL_VAR` macro 03bbe8c615 Merge bitcoin-core/secp256k1#1655: gha: Print all *.log files, in a separate action 59860bcc24 gha: Print all *.log files, in a separate action 37d2c60bec Remove deprecated _ec_privkey_{negate,tweak_add,tweak_mul} aliases REVERT: c0db6509bd docs: update README REVERT: 8339232b7e ci: enable silentpayments module REVERT: 635745fc3a tests: add constant time tests REVERT: b1de2ee2f7 tests: add BIP-352 test vectors REVERT: aea372837f silentpayments: add benchmarks for scanning REVERT: 1ec7857aed silentpayments: add examples/silentpayments.c REVERT: c9bec084eb silentpayments: receiving REVERT: 28fd17d7c4 silentpayments: recipient label support REVERT: 065e8b7793 silentpayments: sending REVERT: a6d8b11754 build: add skeleton for new silentpayments (BIP352) module REVERT: 6274359346 bench: add ellswift to bench help output REVERT: 0258186573 configure: Show exhaustive tests in summary REVERT: 53b578d10b include: remove WARN_UNUSED_RESULT for functions always returning 1 REVERT: f75c985604 ci: Fix exiting from ci.sh on error REVERT: 947761b842 tests: remove unused uncounting_illegal_callback_fn REVERT: 5d01f375c6 build: Drop no longer needed `-fvisibility=hidden` compiler option REVERT: dbf1e95d2a ci: Run `tools/symbol-check.py` REVERT: 8174c88f47 test: Add `tools/symbol-check.py` REVERT: 8a287f9a32 Introduce `SECP256K1_LOCAL_VAR` macro REVERT: 7106544a16 Remove deprecated _ec_privkey_{negate,tweak_add,tweak_mul} aliases REVERT: 1e2da62eff gha: Print all *.log files, in a separate action git-subtree-dir: src/secp256k1 git-subtree-split: 6264c3d0939f2ab11ba8c92f3cb521f9c89c8596
1 parent 497f153 commit bb0dc6d

26 files changed

+10904
-279
lines changed

.cirrus.yml

Lines changed: 0 additions & 107 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 63 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,18 @@ env:
4747

4848
jobs:
4949
docker_cache:
50-
name: "Build Docker image"
51-
runs-on: ubuntu-latest
50+
name: "Build ${{ matrix.arch }} Docker image"
51+
runs-on: ${{ matrix.runner }}
52+
53+
strategy:
54+
fail-fast: false
55+
matrix:
56+
include:
57+
- arch: x64
58+
runner: ubuntu-latest
59+
- arch: arm64
60+
runner: ubuntu-24.04-arm
61+
5262
steps:
5363
- name: Set up Docker Buildx
5464
uses: docker/setup-buildx-action@v3
@@ -61,11 +71,11 @@ jobs:
6171
uses: docker/build-push-action@v5
6272
with:
6373
file: ./ci/linux-debian.Dockerfile
64-
tags: linux-debian-image
74+
tags: ${{ matrix.arch }}-debian-image
6575
cache-from: type=gha
6676
cache-to: type=gha,mode=min
6777

68-
linux_debian:
78+
x86_64-debian:
6979
name: "x86_64: Linux (Debian stable)"
7080
runs-on: ubuntu-latest
7181
needs: docker_cache
@@ -107,7 +117,7 @@ jobs:
107117
uses: ./.github/actions/run-in-docker-action
108118
with:
109119
dockerfile: ./ci/linux-debian.Dockerfile
110-
tag: linux-debian-image
120+
tag: x64-debian-image
111121

112122
- name: Print logs
113123
uses: ./.github/actions/print-logs
@@ -144,7 +154,7 @@ jobs:
144154
uses: ./.github/actions/run-in-docker-action
145155
with:
146156
dockerfile: ./ci/linux-debian.Dockerfile
147-
tag: linux-debian-image
157+
tag: x64-debian-image
148158

149159
- name: Print logs
150160
uses: ./.github/actions/print-logs
@@ -177,7 +187,7 @@ jobs:
177187
uses: ./.github/actions/run-in-docker-action
178188
with:
179189
dockerfile: ./ci/linux-debian.Dockerfile
180-
tag: linux-debian-image
190+
tag: x64-debian-image
181191

182192
- name: Print logs
183193
uses: ./.github/actions/print-logs
@@ -219,21 +229,19 @@ jobs:
219229
uses: ./.github/actions/run-in-docker-action
220230
with:
221231
dockerfile: ./ci/linux-debian.Dockerfile
222-
tag: linux-debian-image
232+
tag: x64-debian-image
223233

224234
- name: Print logs
225235
uses: ./.github/actions/print-logs
226236
if: ${{ !cancelled() }}
227237

228-
arm64_debian:
229-
name: "ARM64: Linux (Debian stable, QEMU)"
230-
runs-on: ubuntu-latest
238+
arm64-debian:
239+
name: "arm64: Linux (Debian stable)"
240+
runs-on: ubuntu-24.04-arm
231241
needs: docker_cache
232242

233243
env:
234-
WRAPPER_CMD: 'qemu-aarch64'
235244
SECP256K1_TEST_ITERS: 16
236-
HOST: 'aarch64-linux-gnu'
237245
WITH_VALGRIND: 'no'
238246
ECDH: 'yes'
239247
RECOVERY: 'yes'
@@ -243,27 +251,26 @@ jobs:
243251
ELLSWIFT: 'yes'
244252
SILENTPAYMENTS: 'yes'
245253
CTIMETESTS: 'no'
254+
CC: ${{ matrix.cc }}
246255

247256
strategy:
248257
fail-fast: false
249258
matrix:
250-
configuration:
251-
- env_vars: { } # gcc
252-
- env_vars: # clang
253-
CC: 'clang --target=aarch64-linux-gnu'
254-
- env_vars: # clang-snapshot
255-
CC: 'clang-snapshot --target=aarch64-linux-gnu'
259+
cc:
260+
- 'gcc'
261+
- 'clang'
262+
- 'gcc-snapshot'
263+
- 'clang-snapshot'
256264

257265
steps:
258266
- name: Checkout
259267
uses: actions/checkout@v4
260268

261269
- name: CI script
262-
env: ${{ matrix.configuration.env_vars }}
263270
uses: ./.github/actions/run-in-docker-action
264271
with:
265272
dockerfile: ./ci/linux-debian.Dockerfile
266-
tag: linux-debian-image
273+
tag: arm64-debian-image
267274

268275
- name: Print logs
269276
uses: ./.github/actions/print-logs
@@ -296,26 +303,46 @@ jobs:
296303
uses: ./.github/actions/run-in-docker-action
297304
with:
298305
dockerfile: ./ci/linux-debian.Dockerfile
299-
tag: linux-debian-image
306+
tag: x64-debian-image
300307

301308
- name: Print logs
302309
uses: ./.github/actions/print-logs
303310
if: ${{ !cancelled() }}
304311

305312

306313
valgrind_debian:
307-
name: "Valgrind (memcheck)"
308-
runs-on: ubuntu-latest
314+
name: "Valgrind ${{ matrix.binary_arch }} (memcheck)"
315+
runs-on: ${{ matrix.runner }}
309316
needs: docker_cache
310317

311318
strategy:
312319
fail-fast: false
313320
matrix:
314-
configuration:
315-
- env_vars: { CC: 'clang', ASM: 'auto' }
316-
- env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' }
317-
- env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
318-
- env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
321+
include:
322+
- docker_arch: x64
323+
runner: ubuntu-latest
324+
binary_arch: x64
325+
env_vars: { CC: 'clang', ASM: 'auto' }
326+
- docker_arch: x64
327+
runner: ubuntu-latest
328+
binary_arch: i686
329+
env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' }
330+
- docker_arch: arm64
331+
runner: ubuntu-24.04-arm
332+
binary_arch: arm64
333+
env_vars: { CC: 'clang', ASM: 'auto' }
334+
- docker_arch: x64
335+
runner: ubuntu-latest
336+
binary_arch: x64
337+
env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
338+
- docker_arch: x64
339+
runner: ubuntu-latest
340+
binary_arch: i686
341+
env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
342+
- docker_arch: arm64
343+
runner: ubuntu-24.04-arm
344+
binary_arch: arm64
345+
env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
319346

320347
env:
321348
# The `--error-exitcode` is required to make the test fail if valgrind found errors,
@@ -336,11 +363,11 @@ jobs:
336363
uses: actions/checkout@v4
337364

338365
- name: CI script
339-
env: ${{ matrix.configuration.env_vars }}
366+
env: ${{ matrix.env_vars }}
340367
uses: ./.github/actions/run-in-docker-action
341368
with:
342369
dockerfile: ./ci/linux-debian.Dockerfile
343-
tag: linux-debian-image
370+
tag: ${{ matrix.docker_arch }}-debian-image
344371

345372
- name: Print logs
346373
uses: ./.github/actions/print-logs
@@ -385,7 +412,7 @@ jobs:
385412
uses: ./.github/actions/run-in-docker-action
386413
with:
387414
dockerfile: ./ci/linux-debian.Dockerfile
388-
tag: linux-debian-image
415+
tag: x64-debian-image
389416

390417
- name: Print logs
391418
uses: ./.github/actions/print-logs
@@ -437,7 +464,7 @@ jobs:
437464
uses: ./.github/actions/run-in-docker-action
438465
with:
439466
dockerfile: ./ci/linux-debian.Dockerfile
440-
tag: linux-debian-image
467+
tag: x64-debian-image
441468

442469
- name: Print logs
443470
uses: ./.github/actions/print-logs
@@ -481,7 +508,7 @@ jobs:
481508
uses: ./.github/actions/run-in-docker-action
482509
with:
483510
dockerfile: ./ci/linux-debian.Dockerfile
484-
tag: linux-debian-image
511+
tag: x64-debian-image
485512

486513
- name: Print logs
487514
uses: ./.github/actions/print-logs
@@ -689,7 +716,7 @@ jobs:
689716
uses: ./.github/actions/run-in-docker-action
690717
with:
691718
dockerfile: ./ci/linux-debian.Dockerfile
692-
tag: linux-debian-image
719+
tag: x64-debian-image
693720

694721
- name: Print logs
695722
uses: ./.github/actions/print-logs
@@ -708,7 +735,7 @@ jobs:
708735
uses: ./.github/actions/run-in-docker-action
709736
with:
710737
dockerfile: ./ci/linux-debian.Dockerfile
711-
tag: linux-debian-image
738+
tag: x64-debian-image
712739
command: |
713740
g++ -Werror include/*.h
714741
clang -Werror -x c++-header include/*.h

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,7 @@ libsecp256k1.pc
6666
/CMakeUserPresets.json
6767
# Default CMake build directory.
6868
/build
69+
70+
### Python
71+
__pycache__/
72+
*.py[oc]

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ We strongly recommend updating to 0.3.1 if you use or plan to use Clang >=14 to
115115
- Fix "constant-timeness" issue with Clang >=14 that could leave applications using libsecp256k1 vulnerable to a timing side-channel attack. The fix avoids secret-dependent control flow and secret-dependent memory accesses in conditional moves of memory objects when libsecp256k1 is compiled with Clang >=14.
116116

117117
#### Added
118-
- Added tests against [Project Wycheproof's](https://github.com/google/wycheproof/) set of ECDSA test vectors (Bitcoin "low-S" variant), a fixed set of test cases designed to trigger various edge cases.
118+
- Added tests against [Project Wycheproof's](https://github.com/C2SP/wycheproof/) set of ECDSA test vectors (Bitcoin "low-S" variant), a fixed set of test cases designed to trigger various edge cases.
119119

120120
#### Changed
121121
- Increased minimum required CMake version to 3.13. CMake builds remain experimental.

0 commit comments

Comments
 (0)