Skip to content

Commit 3d66175

Browse files
committed
Squashed 'src/secp256k1/' changes from bdf39000b9..8034c67a48
8034c67a48 Add doc/ellswift.md with ElligatorSwift explanation e90aa4e62e Add ellswift testing to CI 131faedd8a Add ElligatorSwift ctime tests 198a04c058 Add tests for ElligatorSwift 9984bfe476 Add ElligatorSwift benchmarks f053da3ab7 Add ellswift module implementing ElligatorSwift 76c64be237 Add functions to test if X coordinate is valid aff948fca2 Add benchmark for key generation 5ed9314d6d Add exhaustive tests for ecmult_const_xonly b69fe88d5e Add x-only ecmult_const version for x=n/d 427bc3cdcf Merge bitcoin-core/secp256k1#1236: Update comment for secp256k1_modinv32_inv256 647f0a5cb1 Update comment for secp256k1_modinv32_inv256 5658209459 Merge bitcoin-core/secp256k1#1228: release cleanup: bump version after 0.3.0 28e63f7ea7 release cleanup: bump version after 0.3.0 git-subtree-dir: src/secp256k1 git-subtree-split: 8034c67a48dc1334bc74ee4ba239111a23d9789e
1 parent 763079a commit 3d66175

21 files changed

+1947
-16
lines changed

.cirrus.yml

Lines changed: 12 additions & 4 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,6 +175,7 @@ task:
173175
ECDH: yes
174176
RECOVERY: yes
175177
SCHNORRSIG: yes
178+
ELLSWIFT: yes
176179
CTIMETESTS: no
177180
matrix:
178181
- env: {}
@@ -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

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ endif()
1010
# The package (a.k.a. release) version is based on semantic versioning 2.0.0 of
1111
# the API. All changes in experimental modules are treated as
1212
# backwards-compatible and therefore at most increase the minor version.
13-
project(libsecp256k1 VERSION 0.3.0 LANGUAGES C)
13+
project(libsecp256k1 VERSION 0.3.1 LANGUAGES C)
1414

1515
# The library version is based on libtool versioning of the ABI. The set of
1616
# rules for updating the version can be found here:
1717
# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
1818
# All changes in experimental modules are treated as if they don't affect the
1919
# interface and therefore only increase the revision.
2020
set(${PROJECT_NAME}_LIB_VERSION_CURRENT 2)
21-
set(${PROJECT_NAME}_LIB_VERSION_REVISION 0)
21+
set(${PROJECT_NAME}_LIB_VERSION_REVISION 1)
2222
set(${PROJECT_NAME}_LIB_VERSION_AGE 0)
2323

2424
set(CMAKE_C_STANDARD 90)

Makefile.am

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,3 +247,7 @@ endif
247247
if ENABLE_MODULE_SCHNORRSIG
248248
include src/modules/schnorrsig/Makefile.am.include
249249
endif
250+
251+
if ENABLE_MODULE_ELLSWIFT
252+
include src/modules/ellswift/Makefile.am.include
253+
endif

ci/cirrus.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ fi
6262
--with-ecmult-window="$ECMULTWINDOW" \
6363
--with-ecmult-gen-precision="$ECMULTGENPRECISION" \
6464
--enable-module-ecdh="$ECDH" --enable-module-recovery="$RECOVERY" \
65+
--enable-module-ellswift="$ELLSWIFT" \
6566
--enable-module-schnorrsig="$SCHNORRSIG" \
6667
--enable-examples="$EXAMPLES" \
6768
--enable-ctime-tests="$CTIMETESTS" \

configure.ac

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ AC_PREREQ([2.60])
55
# backwards-compatible and therefore at most increase the minor version.
66
define(_PKG_VERSION_MAJOR, 0)
77
define(_PKG_VERSION_MINOR, 3)
8-
define(_PKG_VERSION_PATCH, 0)
9-
define(_PKG_VERSION_IS_RELEASE, true)
8+
define(_PKG_VERSION_PATCH, 1)
9+
define(_PKG_VERSION_IS_RELEASE, false)
1010

1111
# The library version is based on libtool versioning of the ABI. The set of
1212
# rules for updating the version can be found here:
1313
# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
1414
# All changes in experimental modules are treated as if they don't affect the
1515
# interface and therefore only increase the revision.
1616
define(_LIB_VERSION_CURRENT, 2)
17-
define(_LIB_VERSION_REVISION, 0)
17+
define(_LIB_VERSION_REVISION, 1)
1818
define(_LIB_VERSION_AGE, 0)
1919

2020
AC_INIT([libsecp256k1],m4_join([.], _PKG_VERSION_MAJOR, _PKG_VERSION_MINOR, _PKG_VERSION_PATCH)m4_if(_PKG_VERSION_IS_RELEASE, [true], [], [-dev]),[https://github.com/bitcoin-core/secp256k1/issues],[libsecp256k1],[https://github.com/bitcoin-core/secp256k1])
@@ -178,6 +178,11 @@ AC_ARG_ENABLE(module_schnorrsig,
178178
AS_HELP_STRING([--enable-module-schnorrsig],[enable schnorrsig module [default=yes]]), [],
179179
[SECP_SET_DEFAULT([enable_module_schnorrsig], [yes], [yes])])
180180

181+
AC_ARG_ENABLE(module_ellswift,
182+
AS_HELP_STRING([--enable-module-ellswift],[enable ElligatorSwift module (experimental)]),
183+
[enable_module_ellswift=$enableval],
184+
[enable_module_ellswift=no])
185+
181186
AC_ARG_ENABLE(external_default_callbacks,
182187
AS_HELP_STRING([--enable-external-default-callbacks],[enable external default callback functions [default=no]]), [],
183188
[SECP_SET_DEFAULT([enable_external_default_callbacks], [no], [no])])
@@ -380,6 +385,10 @@ if test x"$enable_module_schnorrsig" = x"yes"; then
380385
enable_module_extrakeys=yes
381386
fi
382387

388+
if test x"$enable_module_ellswift" = x"yes"; then
389+
AC_DEFINE(ENABLE_MODULE_ELLSWIFT, 1, [Define this symbol to enable the ElligatorSwift module])
390+
fi
391+
383392
# Test if extrakeys is set after the schnorrsig module to allow the schnorrsig
384393
# module to set enable_module_extrakeys=yes
385394
if test x"$enable_module_extrakeys" = x"yes"; then
@@ -422,6 +431,7 @@ AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"])
422431
AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"])
423432
AM_CONDITIONAL([ENABLE_MODULE_EXTRAKEYS], [test x"$enable_module_extrakeys" = x"yes"])
424433
AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"])
434+
AM_CONDITIONAL([ENABLE_MODULE_ELLSWIFT], [test x"$enable_module_ellswift" = x"yes"])
425435
AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$enable_external_asm" = x"yes"])
426436
AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm"])
427437
AM_CONDITIONAL([BUILD_WINDOWS], [test "$build_windows" = "yes"])
@@ -443,6 +453,7 @@ echo " module ecdh = $enable_module_ecdh"
443453
echo " module recovery = $enable_module_recovery"
444454
echo " module extrakeys = $enable_module_extrakeys"
445455
echo " module schnorrsig = $enable_module_schnorrsig"
456+
echo " module ellswift = $enable_module_ellswift"
446457
echo
447458
echo " asm = $set_asm"
448459
echo " ecmult window size = $set_ecmult_window"

0 commit comments

Comments
 (0)