Skip to content

Commit a143a12

Browse files
committed
Update src/secp256k1 subtree to version with ElligatorSwift support
2 parents d23cdf6 + 901336e commit a143a12

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+3892
-1175
lines changed

src/secp256k1/.cirrus.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ env:
2121
ECDH: no
2222
RECOVERY: no
2323
SCHNORRSIG: no
24+
ELLSWIFT: no
2425
### test options
2526
SECP256K1_TEST_ITERS:
2627
BENCH: yes
@@ -74,12 +75,12 @@ task:
7475
<< : *LINUX_CONTAINER
7576
matrix: &ENV_MATRIX
7677
- env: {WIDEMUL: int64, RECOVERY: yes}
77-
- env: {WIDEMUL: int64, ECDH: yes, SCHNORRSIG: yes}
78+
- env: {WIDEMUL: int64, ECDH: yes, SCHNORRSIG: yes, ELLSWIFT: yes}
7879
- env: {WIDEMUL: int128}
79-
- env: {WIDEMUL: int128_struct}
80-
- env: {WIDEMUL: int128, RECOVERY: yes, SCHNORRSIG: yes}
80+
- env: {WIDEMUL: int128_struct, ELLSWIFT: yes}
81+
- env: {WIDEMUL: int128, RECOVERY: yes, SCHNORRSIG: yes, ELLSWIFT: yes}
8182
- env: {WIDEMUL: int128, ECDH: yes, SCHNORRSIG: yes}
82-
- env: {WIDEMUL: int128, ASM: x86_64}
83+
- env: {WIDEMUL: int128, ASM: x86_64 , ELLSWIFT: yes}
8384
- env: { RECOVERY: yes, SCHNORRSIG: yes}
8485
- env: {CTIMETESTS: no, RECOVERY: yes, ECDH: yes, SCHNORRSIG: yes, CPPFLAGS: -DVERIFY}
8586
- env: {BUILD: distcheck, WITH_VALGRIND: no, CTIMETESTS: no, BENCH: no}
@@ -154,6 +155,7 @@ task:
154155
ECDH: yes
155156
RECOVERY: yes
156157
SCHNORRSIG: yes
158+
ELLSWIFT: yes
157159
CTIMETESTS: no
158160
<< : *MERGE_BASE
159161
test_script:
@@ -173,10 +175,11 @@ task:
173175
ECDH: yes
174176
RECOVERY: yes
175177
SCHNORRSIG: yes
178+
ELLSWIFT: yes
176179
CTIMETESTS: no
177180
matrix:
178181
- env: {}
179-
- env: {EXPERIMENTAL: yes, ASM: arm}
182+
- env: {EXPERIMENTAL: yes, ASM: arm32}
180183
<< : *MERGE_BASE
181184
test_script:
182185
- ./ci/cirrus.sh
@@ -193,6 +196,7 @@ task:
193196
ECDH: yes
194197
RECOVERY: yes
195198
SCHNORRSIG: yes
199+
ELLSWIFT: yes
196200
CTIMETESTS: no
197201
<< : *MERGE_BASE
198202
test_script:
@@ -210,6 +214,7 @@ task:
210214
ECDH: yes
211215
RECOVERY: yes
212216
SCHNORRSIG: yes
217+
ELLSWIFT: yes
213218
CTIMETESTS: no
214219
<< : *MERGE_BASE
215220
test_script:
@@ -247,6 +252,7 @@ task:
247252
RECOVERY: yes
248253
EXPERIMENTAL: yes
249254
SCHNORRSIG: yes
255+
ELLSWIFT: yes
250256
CTIMETESTS: no
251257
# Use a MinGW-w64 host to tell ./configure we're building for Windows.
252258
# This will detect some MinGW-w64 tools but then make will need only
@@ -286,6 +292,7 @@ task:
286292
ECDH: yes
287293
RECOVERY: yes
288294
SCHNORRSIG: yes
295+
ELLSWIFT: yes
289296
CTIMETESTS: no
290297
matrix:
291298
- name: "Valgrind (memcheck)"
@@ -361,6 +368,7 @@ task:
361368
ECDH: yes
362369
RECOVERY: yes
363370
SCHNORRSIG: yes
371+
ELLSWIFT: yes
364372
<< : *MERGE_BASE
365373
test_script:
366374
- ./ci/cirrus.sh
@@ -397,13 +405,13 @@ task:
397405
- PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL pull/$env:CIRRUS_PR/merge; git reset --hard FETCH_HEAD; }
398406
configure_script:
399407
- '%x64_NATIVE_TOOLS%'
400-
- cmake -G "Visual Studio 17 2022" -A x64 -S . -B build -DSECP256K1_ENABLE_MODULE_RECOVERY=ON -DSECP256K1_BUILD_EXAMPLES=ON
408+
- cmake -E env CFLAGS="/WX" cmake -G "Visual Studio 17 2022" -A x64 -S . -B build -DSECP256K1_ENABLE_MODULE_RECOVERY=ON -DSECP256K1_BUILD_EXAMPLES=ON
401409
build_script:
402410
- '%x64_NATIVE_TOOLS%'
403411
- cmake --build build --config RelWithDebInfo -- -property:UseMultiToolTask=true;CL_MPcount=5
404412
check_script:
405413
- '%x64_NATIVE_TOOLS%'
406-
- ctest --test-dir build -j 5
414+
- ctest -C RelWithDebInfo --test-dir build -j 5
407415
- build\src\RelWithDebInfo\bench_ecmult.exe
408416
- build\src\RelWithDebInfo\bench_internal.exe
409417
- build\src\RelWithDebInfo\bench.exe

src/secp256k1/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,7 @@ build-aux/compile
5959
build-aux/test-driver
6060
libsecp256k1.pc
6161

62+
### CMake
63+
/CMakeUserPresets.json
6264
# Default CMake build directory.
6365
/build

src/secp256k1/CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.3.2] - 2023-05-13
11+
We strongly recommend updating to 0.3.2 if you use or plan to use GCC >=13 to compile libsecp256k1. When in doubt, check the GCC version using `gcc -v`.
12+
13+
#### Security
14+
- Module `ecdh`: Fix "constant-timeness" issue with GCC 13.1 (and potentially future versions of GCC) that could leave applications using libsecp256k1's ECDH module vulnerable to a timing side-channel attack. The fix avoids secret-dependent control flow during ECDH computations when libsecp256k1 is compiled with GCC 13.1.
15+
16+
#### Fixed
17+
- Fixed an old bug that permitted compilers to potentially output bad assembly code on x86_64. In theory, it could lead to a crash or a read of unrelated memory, but this has never been observed on any compilers so far.
18+
19+
#### Changed
20+
- Various improvements and changes to CMake builds. CMake builds remain experimental.
21+
- Made API versioning consistent with GNU Autotools builds.
22+
- Switched to `BUILD_SHARED_LIBS` variable for controlling whether to build a static or a shared library.
23+
- Added `SECP256K1_INSTALL` variable for the controlling whether to install the build artefacts.
24+
- Renamed asm build option `arm` to `arm32`. Use `--with-asm=arm32` instead of `--with-asm=arm` (GNU Autotools), and `-DSECP256K1_ASM=arm32` instead of `-DSECP256K1_ASM=arm` (CMake).
25+
26+
#### ABI Compatibility
27+
The ABI is compatible with versions 0.3.0 and 0.3.1.
28+
1029
## [0.3.1] - 2023-04-10
1130
We strongly recommend updating to 0.3.1 if you use or plan to use Clang >=14 to compile libsecp256k1, e.g., Xcode >=14 on macOS has Clang >=14. When in doubt, check the Clang version using `clang -v`.
1231

@@ -68,7 +87,8 @@ This version was in fact never released.
6887
The number was given by the build system since the introduction of autotools in Jan 2014 (ea0fe5a5bf0c04f9cc955b2966b614f5f378c6f6).
6988
Therefore, this version number does not uniquely identify a set of source files.
7089

71-
[unreleased]: https://github.com/bitcoin-core/secp256k1/compare/v0.3.1...HEAD
90+
[unreleased]: https://github.com/bitcoin-core/secp256k1/compare/v0.3.2...HEAD
91+
[0.3.2]: https://github.com/bitcoin-core/secp256k1/compare/v0.3.1...v0.3.2
7292
[0.3.1]: https://github.com/bitcoin-core/secp256k1/compare/v0.3.0...v0.3.1
7393
[0.3.0]: https://github.com/bitcoin-core/secp256k1/compare/v0.2.0...v0.3.0
7494
[0.2.0]: https://github.com/bitcoin-core/secp256k1/compare/423b6d19d373f1224fd671a982584d7e7900bc93..v0.2.0

0 commit comments

Comments
 (0)