Skip to content

Commit cd3d749

Browse files
committed
Add ellswift module implementing ElligatorSwift
1 parent 5f8e5b8 commit cd3d749

File tree

5 files changed

+477
-0
lines changed

5 files changed

+477
-0
lines changed

Makefile.am

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,7 @@ endif
227227
if ENABLE_MODULE_SCHNORRSIG
228228
include src/modules/schnorrsig/Makefile.am.include
229229
endif
230+
231+
if ENABLE_MODULE_ELLSWIFT
232+
include src/modules/ellswift/Makefile.am.include
233+
endif

configure.ac

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ AC_ARG_ENABLE(module_schnorrsig,
170170
AS_HELP_STRING([--enable-module-schnorrsig],[enable schnorrsig module [default=no]]), [],
171171
[SECP_SET_DEFAULT([enable_module_schnorrsig], [no], [yes])])
172172

173+
AC_ARG_ENABLE(module_ellswift,
174+
AS_HELP_STRING([--enable-module-ellswift],[enable ElligatorSwift module (experimental)]),
175+
[enable_module_ellswift=$enableval],
176+
[enable_module_ellswift=no])
177+
173178
AC_ARG_ENABLE(external_default_callbacks,
174179
AS_HELP_STRING([--enable-external-default-callbacks],[enable external default callback functions [default=no]]), [],
175180
[SECP_SET_DEFAULT([enable_external_default_callbacks], [no], [no])])
@@ -362,6 +367,10 @@ if test x"$enable_module_schnorrsig" = x"yes"; then
362367
enable_module_extrakeys=yes
363368
fi
364369

370+
if test x"$enable_module_ellswift" = x"yes"; then
371+
AC_DEFINE(ENABLE_MODULE_ELLSWIFT, 1, [Define this symbol to enable the ElligatorSwift module])
372+
fi
373+
365374
# Test if extrakeys is set after the schnorrsig module to allow the schnorrsig
366375
# module to set enable_module_extrakeys=yes
367376
if test x"$enable_module_extrakeys" = x"yes"; then
@@ -407,6 +416,7 @@ AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"])
407416
AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"])
408417
AM_CONDITIONAL([ENABLE_MODULE_EXTRAKEYS], [test x"$enable_module_extrakeys" = x"yes"])
409418
AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"])
419+
AM_CONDITIONAL([ENABLE_MODULE_ELLSWIFT], [test x"$enable_module_ellswift" = x"yes"])
410420
AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$enable_external_asm" = x"yes"])
411421
AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm"])
412422
AM_CONDITIONAL([BUILD_WINDOWS], [test "$build_windows" = "yes"])
@@ -427,6 +437,7 @@ echo " module ecdh = $enable_module_ecdh"
427437
echo " module recovery = $enable_module_recovery"
428438
echo " module extrakeys = $enable_module_extrakeys"
429439
echo " module schnorrsig = $enable_module_schnorrsig"
440+
echo " module ellswift = $enable_module_ellswift"
430441
echo
431442
echo " asm = $set_asm"
432443
echo " ecmult window size = $set_ecmult_window"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include_HEADERS += include/secp256k1_ellswift.h
2+
noinst_HEADERS += src/modules/ellswift/main_impl.h

0 commit comments

Comments
 (0)