Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
bc7c8db
abi: Use dllexport for mingw builds
theuni May 4, 2023
95448ef
release cleanup: bump version after 0.3.2
sipa May 13, 2023
83186db
Merge bitcoin-core/secp256k1#1314: release cleanup: bump version afte…
real-or-random May 13, 2023
31b4bbe
Make fe_cmov take max of magnitudes
sipa May 15, 2023
5768b50
build: Enable -DVERIFY for precomputation binaries
real-or-random May 17, 2023
e9e4526
Merge bitcoin-core/secp256k1#1317: Make fe_cmov take max of magnitudes
real-or-random May 19, 2023
5f7903c
Merge bitcoin-core/secp256k1#1318: build: Enable -DVERIFY for precomp…
real-or-random May 19, 2023
6433175
Do not invoke fe_is_zero on failed set_b32_limit
sipa May 15, 2023
d373a72
Merge bitcoin-core/secp256k1#1316: Do not invoke fe_is_zero on failed…
real-or-random May 23, 2023
27504d5
ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe
real-or-random May 24, 2023
09df0bf
Merge bitcoin-core/secp256k1#1327: ci: Move wine prefix to /tmp to av…
real-or-random May 24, 2023
1652067
release process: add sanity checks
jonasnick May 12, 2023
79fa50b
release process: mention targeted release schedule
jonasnick May 12, 2023
6348bc7
release process: fix process for maintenance release
jonasnick May 12, 2023
ad84603
release process: clarify change log updates
jonasnick May 12, 2023
20a5da5
Merge bitcoin-core/secp256k1#1310: Refine release process
real-or-random May 24, 2023
1549db0
build: Level up MSVC warnings
hebasto May 24, 2023
908e02d
Merge bitcoin-core/secp256k1#1328: build: Bump MSVC warning level up …
real-or-random May 26, 2023
654246c
refactor: take use of `secp256k1_scalar_{zero,one}` constants
theStack May 29, 2023
e83801f
test: Warn if both `VERIFY` and `COVERAGE` are defined
hebasto May 30, 2023
ade5b36
tests: add checks for scalar constants `secp256k1_scalar_{zero,one}`
theStack May 30, 2023
d75dc59
Merge bitcoin-core/secp256k1#1333: test: Warn if both `VERIFY` and `C…
real-or-random May 31, 2023
debf3e5
Merge bitcoin-core/secp256k1#1330: refactor: take use of `secp256k1_s…
real-or-random May 31, 2023
605e07e
fix input range comment for `secp256k1_fe_add_int`
theStack Jun 1, 2023
bf29f8d
Merge bitcoin-core/secp256k1#1334: fix input range comment for `secp2…
real-or-random Jun 1, 2023
7dae115
Revert "ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe"
hebasto Jun 2, 2023
c7db494
ci: Fix error D8037 in `cl.exe`
hebasto Jun 3, 2023
db29bf2
ci: Remove quirk that runs dummy command after wineserver
real-or-random May 23, 2023
60556c9
Merge bitcoin-core/secp256k1#1337: ci: Fix error D8037 in `cl.exe` (a…
real-or-random Jun 3, 2023
5b7bf2e
Use `__shiftright128` intrinsic in `secp256k1_u128_rshift` on MSVC
hebasto Jun 4, 2023
e449af6
Drop no longer needed `#include "../include/secp256k1.h"`
hebasto Jun 6, 2023
52b8423
scalar: use `secp256k1_{read,write}_be32` helpers (8x32 impl.)
theStack Jun 4, 2023
887183e
scalar: use `secp256k1_{read,write}_be32` helpers (4x64 impl.)
theStack Jun 10, 2023
f364428
docs: correct `pubkey` param descriptions for `secp256k1_keypair_{xon…
theStack Jun 11, 2023
cb1a592
Merge bitcoin-core/secp256k1#1341: docs: correct `pubkey` param descr…
jonasnick Jun 12, 2023
67214f5
Merge bitcoin-core/secp256k1#1339: scalar: refactor: use `secp256k1_{…
real-or-random Jun 12, 2023
740528c
scalar: use newly introduced `secp256k1_{read,write}_be64` helpers (4…
theStack Jun 16, 2023
7067ee5
tests: add tests for `secp256k1_{read,write}_be64`
theStack Jun 16, 2023
f165252
Normalize ge produced from secp256k1_pubkey_load
stratospher Jun 15, 2023
45c5ca7
Merge bitcoin-core/secp256k1#1350: scalar: introduce and use `secp256…
real-or-random Jun 18, 2023
30574f2
Merge bitcoin-core/secp256k1#1349: Normalize ge produced from secp256…
real-or-random Jun 18, 2023
a597a5a
Add benchmark for key generation
sipa Jul 7, 2022
79e5b2a
Add functions to test if X coordinate is valid
sipa Nov 4, 2022
c47917b
Add ellswift module implementing ElligatorSwift
sipa Nov 4, 2022
9695deb
Add tests for ellswift module
sipa Nov 4, 2022
df633cd
Add _prefix and _bip324 ellswift_xdh hash functions
sipa May 5, 2023
2d1d41a
Add ctime tests for ellswift module
sipa Nov 4, 2022
1bcea8c
Add benchmarks for ellswift module
sipa Nov 4, 2022
4f09184
Add ellswift testing to CI
sipa Nov 4, 2022
90e360a
Add doc/ellswift.md with ElligatorSwift explanation
sipa Dec 23, 2022
5779137
field: Document return value of fe_sqrt()
real-or-random Jun 15, 2023
0702ecb
Merge bitcoin-core/secp256k1#1338: Drop no longer needed `#include ".…
real-or-random Jun 21, 2023
705ce7e
Merge bitcoin-core/secp256k1#1129: ElligatorSwift + integrated x-only DH
jonasnick Jun 21, 2023
3c1a0fd
Merge bitcoin-core/secp256k1#1347: field: Document return value of fe…
real-or-random Jun 21, 2023
c32ffd8
Add ellswift to CHANGELOG
sipa Jun 21, 2023
7c7467a
Refer to ellswift.md in API docs
sipa Jun 23, 2023
1083683
Merge bitcoin-core/secp256k1#1336: Use `__shiftright128` intrinsic in…
real-or-random Jun 24, 2023
926dd3e
Merge bitcoin-core/secp256k1#1295: abi: Use dllexport for mingw builds
real-or-random Jun 24, 2023
67887ae
Fix a typo in the error message
hebasto Jun 24, 2023
ac43613
Merge bitcoin-core/secp256k1#1354: Add ellswift to CHANGELOG
real-or-random Jun 25, 2023
fd491ea
Merge bitcoin-core/secp256k1#1355: Fix a typo in the error message
real-or-random Jun 25, 2023
8a72734
Help the compiler prove that a loop is entered
real-or-random May 16, 2023
a178209
ci: Force DWARF v4 for Clang when Valgrind tests are expected
hebasto Jun 26, 2023
c862a9f
ci: Adjust Docker image to Debian 12 "bookworm"
hebasto Jun 26, 2023
799f4ee
Merge bitcoin-core/secp256k1#1356: ci: Adjust Docker image to Debian …
real-or-random Jun 27, 2023
74d9073
Merge commits '83186db3 e9e4526a 5f7903c7 d373a721 09df0bfb 20a5da5f …
jonasnick Jul 26, 2023
b160486
ecdsa_adaptor: add missing include
jonasnick Jul 27, 2023
579999b
scalar: adjust muladd2 to new int128 interface
jonasnick Jul 27, 2023
4c70cc9
Suppress wrong/buggy warning in MSVC <19.33
real-or-random Jul 27, 2023
525b661
bppp/build: Fix linkage of benchmark
real-or-random Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
ECDH: no
RECOVERY: no
SCHNORRSIG: no
ELLSWIFT: no
ECDSA_S2C: no
GENERATOR: no
RANGEPROOF: no
Expand Down Expand Up @@ -81,12 +82,12 @@ task:
<< : *LINUX_CONTAINER
matrix: &ENV_MATRIX
- env: {WIDEMUL: int64, RECOVERY: yes}
- env: {WIDEMUL: int64, ECDH: yes, SCHNORRSIG: yes, EXPERIMENTAL: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes, BPPP: yes}
- env: {WIDEMUL: int64, ECDH: yes, SCHNORRSIG: yes, ELLSWIFT: yes, EXPERIMENTAL: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes, BPPP: yes}
- env: {WIDEMUL: int128}
- env: {WIDEMUL: int128_struct}
- env: {WIDEMUL: int128, RECOVERY: yes, SCHNORRSIG: yes}
- env: {WIDEMUL: int128, RECOVERY: yes, SCHNORRSIG: yes, ELLSWIFT: yes}
- env: {WIDEMUL: int128, ECDH: yes, SCHNORRSIG: yes, EXPERIMENTAL: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes, BPPP: yes}
- env: {WIDEMUL: int128, ASM: x86_64}
- env: {WIDEMUL: int128, ASM: x86_64 , ELLSWIFT: yes}
- env: { RECOVERY: yes, SCHNORRSIG: yes, EXPERIMENTAL: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes, BPPP: yes}
- env: {CTIMETESTS: no, RECOVERY: yes, ECDH: yes, SCHNORRSIG: yes, EXPERIMENTAL: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes, BPPP: yes, CPPFLAGS: -DVERIFY}
- env: {BUILD: distcheck, WITH_VALGRIND: no, CTIMETESTS: no, BENCH: no}
Expand Down Expand Up @@ -171,6 +172,7 @@ task:
ECDH: yes
RECOVERY: yes
SCHNORRSIG: yes
ELLSWIFT: yes
EXPERIMENTAL: yes
ECDSA_S2C: yes
RANGEPROOF: yes
Expand Down Expand Up @@ -198,6 +200,7 @@ task:
ECDH: yes
RECOVERY: yes
SCHNORRSIG: yes
ELLSWIFT: yes
CTIMETESTS: no
matrix:
- env: {}
Expand All @@ -218,6 +221,7 @@ task:
ECDH: yes
RECOVERY: yes
SCHNORRSIG: yes
ELLSWIFT: yes
CTIMETESTS: no
<< : *MERGE_BASE
test_script:
Expand All @@ -235,6 +239,7 @@ task:
ECDH: yes
RECOVERY: yes
SCHNORRSIG: yes
ELLSWIFT: yes
CTIMETESTS: no
<< : *MERGE_BASE
test_script:
Expand Down Expand Up @@ -272,6 +277,7 @@ task:
RECOVERY: yes
EXPERIMENTAL: yes
SCHNORRSIG: yes
ELLSWIFT: yes
ECDSA_S2C: yes
GENERATOR: yes
RANGEPROOF: yes
Expand Down Expand Up @@ -319,6 +325,7 @@ task:
ECDH: yes
RECOVERY: yes
SCHNORRSIG: yes
ELLSWIFT: yes
EXPERIMENTAL: yes
ECDSA_S2C: yes
RANGEPROOF: yes
Expand Down Expand Up @@ -410,6 +417,7 @@ task:
ECDH: yes
RECOVERY: yes
SCHNORRSIG: yes
ELLSWIFT: yes
<< : *MERGE_BASE
test_script:
- ./ci/cirrus.sh
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

#### Added
- New module `ellswift` implements ElligatorSwift encoding for public keys and x-only Diffie-Hellman key exchange for them.
ElligatorSwift permits representing secp256k1 public keys as 64-byte arrays which cannot be distinguished from uniformly random. See:
- Header file `include/secp256k1_ellswift.h` which defines the new API.
- Document `doc/ellswift.md` which explains the mathematical background of the scheme.
- The [paper](https://eprint.iacr.org/2022/759) on which the scheme is based.

## [0.3.2] - 2023-05-13
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`.

Expand Down
16 changes: 13 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ project(libsecp256k1
# The package (a.k.a. release) version is based on semantic versioning 2.0.0 of
# the API. All changes in experimental modules are treated as
# backwards-compatible and therefore at most increase the minor version.
VERSION 0.3.2
VERSION 0.3.3
DESCRIPTION "Optimized C library for ECDSA signatures and secret/public key operations on curve secp256k1."
HOMEPAGE_URL "https://github.com/bitcoin-core/secp256k1"
LANGUAGES C
Expand All @@ -35,7 +35,7 @@ endif()
# All changes in experimental modules are treated as if they don't affect the
# interface and therefore only increase the revision.
set(${PROJECT_NAME}_LIB_VERSION_CURRENT 2)
set(${PROJECT_NAME}_LIB_VERSION_REVISION 2)
set(${PROJECT_NAME}_LIB_VERSION_REVISION 3)
set(${PROJECT_NAME}_LIB_VERSION_AGE 0)

set(CMAKE_C_STANDARD 90)
Expand Down Expand Up @@ -71,6 +71,11 @@ if(SECP256K1_ENABLE_MODULE_EXTRAKEYS)
add_compile_definitions(ENABLE_MODULE_EXTRAKEYS=1)
endif()

option(SECP256K1_ENABLE_MODULE_ELLSWIFT "Enable ElligatorSwift module." ON)
if(SECP256K1_ENABLE_MODULE_ELLSWIFT)
add_compile_definitions(ENABLE_MODULE_ELLSWIFT=1)
endif()

option(SECP256K1_USE_EXTERNAL_DEFAULT_CALLBACKS "Enable external default callback functions." OFF)
if(SECP256K1_USE_EXTERNAL_DEFAULT_CALLBACKS)
add_compile_definitions(USE_EXTERNAL_DEFAULT_CALLBACKS=1)
Expand Down Expand Up @@ -212,8 +217,12 @@ endif()
include(TryAppendCFlags)
if(MSVC)
# Keep the following commands ordered lexicographically.
try_append_c_flags(/W2) # Moderate warning level.
try_append_c_flags(/W3) # Production quality warning level.
try_append_c_flags(/wd4146) # Disable warning C4146 "unary minus operator applied to unsigned type, result still unsigned".
try_append_c_flags(/wd4244) # Disable warning C4244 "'conversion' conversion from 'type1' to 'type2', possible loss of data".
try_append_c_flags(/wd4267) # Disable warning C4267 "'var' : conversion from 'size_t' to 'type', possible loss of data".
# Eliminate deprecation warnings for the older, less secure functions.
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
else()
# Keep the following commands ordered lexicographically.
try_append_c_flags(-pedantic)
Expand Down Expand Up @@ -266,6 +275,7 @@ message(" ECDH ................................ ${SECP256K1_ENABLE_MODULE_ECDH}
message(" ECDSA pubkey recovery ............... ${SECP256K1_ENABLE_MODULE_RECOVERY}")
message(" extrakeys ........................... ${SECP256K1_ENABLE_MODULE_EXTRAKEYS}")
message(" schnorrsig .......................... ${SECP256K1_ENABLE_MODULE_SCHNORRSIG}")
message(" ElligatorSwift ...................... ${SECP256K1_ENABLE_MODULE_ELLSWIFT}")
message("Parameters:")
message(" ecmult window size .................. ${SECP256K1_ECMULT_WINDOW_SIZE}")
message(" ecmult gen precision bits ........... ${SECP256K1_ECMULT_GEN_PREC_BITS}")
Expand Down
8 changes: 6 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ EXTRA_PROGRAMS = precompute_ecmult precompute_ecmult_gen
CLEANFILES = $(EXTRA_PROGRAMS)

precompute_ecmult_SOURCES = src/precompute_ecmult.c
precompute_ecmult_CPPFLAGS = $(SECP_CONFIG_DEFINES)
precompute_ecmult_CPPFLAGS = $(SECP_CONFIG_DEFINES) -DVERIFY
precompute_ecmult_LDADD = $(COMMON_LIB)

precompute_ecmult_gen_SOURCES = src/precompute_ecmult_gen.c
precompute_ecmult_gen_CPPFLAGS = $(SECP_CONFIG_DEFINES)
precompute_ecmult_gen_CPPFLAGS = $(SECP_CONFIG_DEFINES) -DVERIFY
precompute_ecmult_gen_LDADD = $(COMMON_LIB)

# See Automake manual, Section "Errors with distclean".
Expand Down Expand Up @@ -305,6 +305,10 @@ if ENABLE_MODULE_SCHNORRSIG
include src/modules/schnorrsig/Makefile.am.include
endif

if ENABLE_MODULE_ELLSWIFT
include src/modules/ellswift/Makefile.am.include
endif

if ENABLE_MODULE_ECDSA_S2C
include src/modules/ecdsa_s2c/Makefile.am.include
endif
Expand Down
20 changes: 18 additions & 2 deletions ci/cirrus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ case "$WRAPPER_CMD" in
*wine*)
# Make sure to shutdown wineserver whenever we exit.
trap "wineserver -k || true" EXIT INT HUP
# This is apparently only reliable when we run a dummy command such as "hh.exe" afterwards.
wineserver -p && wine hh.exe
wineserver -p
;;
esac

Expand All @@ -55,6 +54,22 @@ if [ -n "$WRAPPER_CMD" ]; then
$WRAPPER_CMD --version
fi

# Workaround for https://bugs.kde.org/show_bug.cgi?id=452758 (fixed in valgrind 3.20.0).
case "${CC:-undefined}" in
clang*)
if [ "$CTIMETESTS" = "yes" ] && [ "$WITH_VALGRIND" = "yes" ]
then
export CFLAGS="${CFLAGS:+$CFLAGS }-gdwarf-4"
else
case "$WRAPPER_CMD" in
valgrind*)
export CFLAGS="${CFLAGS:+$CFLAGS }-gdwarf-4"
;;
esac
fi
;;
esac

./autogen.sh

./configure \
Expand All @@ -63,6 +78,7 @@ fi
--with-ecmult-window="$ECMULTWINDOW" \
--with-ecmult-gen-precision="$ECMULTGENPRECISION" \
--enable-module-ecdh="$ECDH" --enable-module-recovery="$RECOVERY" \
--enable-module-ellswift="$ELLSWIFT" \
--enable-module-ecdsa-s2c="$ECDSA_S2C" \
--enable-module-bppp="$BPPP" \
--enable-module-rangeproof="$RANGEPROOF" --enable-module-whitelist="$WHITELIST" --enable-module-generator="$GENERATOR" \
Expand Down
18 changes: 11 additions & 7 deletions ci/linux-debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ RUN dpkg --add-architecture i386 && \
RUN apt-get update && apt-get install --no-install-recommends -y \
git ca-certificates \
make automake libtool pkg-config dpkg-dev valgrind qemu-user \
gcc clang llvm libc6-dbg \
gcc clang llvm libclang-rt-dev libc6-dbg \
g++ \
gcc-i686-linux-gnu libc6-dev-i386-cross libc6-dbg:i386 libubsan1:i386 libasan6:i386 \
gcc-i686-linux-gnu libc6-dev-i386-cross libc6-dbg:i386 libubsan1:i386 libasan8:i386 \
gcc-s390x-linux-gnu libc6-dev-s390x-cross libc6-dbg:s390x \
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross libc6-dbg:armhf \
gcc-aarch64-linux-gnu libc6-dev-arm64-cross libc6-dbg:arm64 \
Expand All @@ -26,12 +26,16 @@ WORKDIR /root
# The "wine" package provides a convience wrapper that we need
RUN apt-get update && apt-get install --no-install-recommends -y \
git ca-certificates wine64 wine python3-simplejson python3-six msitools winbind procps && \
# Workaround for `wine` package failure to employ the Debian alternatives system properly.
ln -s /usr/lib/wine/wine64 /usr/bin/wine64 && \
# Set of tools for using MSVC on Linux.
git clone https://github.com/mstorsjo/msvc-wine && \
mkdir /opt/msvc && \
python3 msvc-wine/vsdownload.py --accept-license --dest /opt/msvc Microsoft.VisualStudio.Workload.VCTools && \
msvc-wine/install.sh /opt/msvc

# Initialize the wine environment. Wait until the wineserver process has
# exited before closing the session, to avoid corrupting the wine prefix.
RUN wine64 wineboot --init && \
# Since commit 2146cbfaf037e21de56c7157ec40bb6372860f51, the
# msvc-wine effectively initializes the wine prefix when running
# the install.sh script.
msvc-wine/install.sh /opt/msvc && \
# Wait until the wineserver process has exited before closing the session,
# to avoid corrupting the wine prefix.
while (ps -A | grep wineserver) > /dev/null; do sleep 1; done
19 changes: 18 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ AC_DEFUN([SECP_TRY_APPEND_DEFAULT_CFLAGS], [
# libtool makes the same assumption internally.
# Note that "/opt" and "-opt" are equivalent for MSVC; we use "-opt" because "/opt" looks like a path.
if test x"$GCC" != x"yes" && test x"$build_windows" = x"yes"; then
SECP_TRY_APPEND_CFLAGS([-W2 -wd4146], $1) # Moderate warning level, disable warning C4146 "unary minus operator applied to unsigned type, result still unsigned"
SECP_TRY_APPEND_CFLAGS([-W3], $1) # Production quality warning level.
SECP_TRY_APPEND_CFLAGS([-wd4146], $1) # Disable warning C4146 "unary minus operator applied to unsigned type, result still unsigned".
SECP_TRY_APPEND_CFLAGS([-wd4244], $1) # Disable warning C4244 "'conversion' conversion from 'type1' to 'type2', possible loss of data".
SECP_TRY_APPEND_CFLAGS([-wd4267], $1) # Disable warning C4267 "'var' : conversion from 'size_t' to 'type', possible loss of data".
# Eliminate deprecation warnings for the older, less secure functions.
CPPFLAGS="-D_CRT_SECURE_NO_WARNINGS $CPPFLAGS"
# We pass -ignore:4217 to the MSVC linker to suppress warning 4217 when
# importing variables from a statically linked secp256k1.
# (See the libtool manual, section "Windows DLLs" for background.)
Expand Down Expand Up @@ -210,6 +215,10 @@ AC_ARG_ENABLE(module_schnorrsig,
AS_HELP_STRING([--enable-module-schnorrsig],[enable schnorrsig module [default=yes]]), [],
[SECP_SET_DEFAULT([enable_module_schnorrsig], [yes], [yes])])

AC_ARG_ENABLE(module_ellswift,
AS_HELP_STRING([--enable-module-ellswift],[enable ElligatorSwift module [default=yes]]), [],
[SECP_SET_DEFAULT([enable_module_ellswift], [yes], [yes])])

AC_ARG_ENABLE(module_ecdsa_s2c,
AS_HELP_STRING([--enable-module-ecdsa-s2c],[enable ECDSA sign-to-contract module [default=no]]),
[],
Expand Down Expand Up @@ -487,6 +496,12 @@ if test x"$enable_module_schnorrsig" = x"yes"; then
enable_module_extrakeys=yes
fi

if test x"$enable_module_ellswift" = x"yes"; then
AC_DEFINE(ENABLE_MODULE_ELLSWIFT, 1, [Define this symbol to enable the ElligatorSwift module])
fi

# Test if extrakeys is set after the schnorrsig module to allow the schnorrsig
# module to set enable_module_extrakeys=yes
if test x"$enable_module_extrakeys" = x"yes"; then
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_EXTRAKEYS=1"
fi
Expand Down Expand Up @@ -572,6 +587,7 @@ AM_CONDITIONAL([ENABLE_MODULE_RANGEPROOF], [test x"$enable_module_rangeproof" =
AM_CONDITIONAL([ENABLE_MODULE_WHITELIST], [test x"$enable_module_whitelist" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_EXTRAKEYS], [test x"$enable_module_extrakeys" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_ELLSWIFT], [test x"$enable_module_ellswift" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_ECDSA_S2C], [test x"$enable_module_ecdsa_s2c" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_ECDSA_ADAPTOR], [test x"$enable_module_ecdsa_adaptor" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_SURJECTIONPROOF], [test x"$enable_module_surjectionproof" = x"yes"])
Expand All @@ -597,6 +613,7 @@ echo " module ecdh = $enable_module_ecdh"
echo " module recovery = $enable_module_recovery"
echo " module extrakeys = $enable_module_extrakeys"
echo " module schnorrsig = $enable_module_schnorrsig"
echo " module ellswift = $enable_module_ellswift"
echo " module generator = $enable_module_generator"
echo " module rangeproof = $enable_module_rangeproof"
echo " module surjectionproof = $enable_module_surjectionproof"
Expand Down
Loading