Skip to content

Commit d5e22a5

Browse files
authored
Merge pull request #35 from jonasnick/2018-10-musig
Add MuSig module
2 parents 43dd1f4 + 2fc700a commit d5e22a5

21 files changed

+3747
-2
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
bench_inv
22
bench_ecdh
33
bench_ecmult
4+
bench_schnorrsig
45
bench_sign
56
bench_verify
6-
bench_schnorr_verify
77
bench_recover
88
bench_internal
99
tests

Makefile.am

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,14 @@ if ENABLE_MODULE_ECDH
178178
include src/modules/ecdh/Makefile.am.include
179179
endif
180180

181+
if ENABLE_MODULE_SCHNORRSIG
182+
include src/modules/schnorrsig/Makefile.am.include
183+
endif
184+
185+
if ENABLE_MODULE_MUSIG
186+
include src/modules/musig/Makefile.am.include
187+
endif
188+
181189
if ENABLE_MODULE_RECOVERY
182190
include src/modules/recovery/Makefile.am.include
183191
endif

configure.ac

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,16 @@ AC_ARG_ENABLE(module_ecdh,
129129
[enable_module_ecdh=$enableval],
130130
[enable_module_ecdh=no])
131131

132+
AC_ARG_ENABLE(module_schnorrsig,
133+
AS_HELP_STRING([--enable-module-schnorrsig],[enable schnorrsig module (experimental)]),
134+
[enable_module_schnorrsig=$enableval],
135+
[enable_module_schnorrsig=no])
136+
137+
AC_ARG_ENABLE(module_musig,
138+
AS_HELP_STRING([--enable-module-musig],[enable MuSig module (experimental)]),
139+
[enable_module_musig=$enableval],
140+
[enable_module_musig=no])
141+
132142
AC_ARG_ENABLE(module_recovery,
133143
AS_HELP_STRING([--enable-module-recovery],[enable ECDSA pubkey recovery module (default is no)]),
134144
[enable_module_recovery=$enableval],
@@ -463,6 +473,14 @@ if test x"$enable_module_ecdh" = x"yes"; then
463473
AC_DEFINE(ENABLE_MODULE_ECDH, 1, [Define this symbol to enable the ECDH module])
464474
fi
465475

476+
if test x"$enable_module_schnorrsig" = x"yes"; then
477+
AC_DEFINE(ENABLE_MODULE_SCHNORRSIG, 1, [Define this symbol to enable the schnorrsig module])
478+
fi
479+
480+
if test x"$enable_module_musig" = x"yes"; then
481+
AC_DEFINE(ENABLE_MODULE_MUSIG, 1, [Define this symbol to enable the MuSig module])
482+
fi
483+
466484
if test x"$enable_module_recovery" = x"yes"; then
467485
AC_DEFINE(ENABLE_MODULE_RECOVERY, 1, [Define this symbol to enable the ECDSA pubkey recovery module])
468486
fi
@@ -510,8 +528,17 @@ if test x"$enable_experimental" = x"yes"; then
510528
AC_MSG_NOTICE([Building range proof module: $enable_module_rangeproof])
511529
AC_MSG_NOTICE([Building key whitelisting module: $enable_module_whitelist])
512530
AC_MSG_NOTICE([Building surjection proof module: $enable_module_surjectionproof])
531+
AC_MSG_NOTICE([Building schnorrsig module: $enable_module_schnorrsig])
532+
AC_MSG_NOTICE([Building MuSig module: $enable_module_musig])
513533
AC_MSG_NOTICE([******])
514534

535+
536+
if test x"$enable_module_schnorrsig" != x"yes"; then
537+
if test x"$enable_module_musig" = x"yes"; then
538+
AC_MSG_ERROR([MuSig module requires the schnorrsig module. Use --enable-module-schnorrsig to allow.])
539+
fi
540+
fi
541+
515542
if test x"$enable_module_generator" != x"yes"; then
516543
if test x"$enable_module_rangeproof" = x"yes"; then
517544
AC_MSG_ERROR([Rangeproof module requires the generator module. Use --enable-module-generator to allow.])
@@ -530,6 +557,12 @@ else
530557
if test x"$enable_module_ecdh" = x"yes"; then
531558
AC_MSG_ERROR([ECDH module is experimental. Use --enable-experimental to allow.])
532559
fi
560+
if test x"$enable_module_schnorrsig" = x"yes"; then
561+
AC_MSG_ERROR([schnorrsig module is experimental. Use --enable-experimental to allow.])
562+
fi
563+
if test x"$enable_module_musig" = x"yes"; then
564+
AC_MSG_ERROR([MuSig module is experimental. Use --enable-experimental to allow.])
565+
fi
533566
if test x"$set_asm" = x"arm"; then
534567
AC_MSG_ERROR([ARM assembly optimization is experimental. Use --enable-experimental to allow.])
535568
fi
@@ -560,6 +593,8 @@ AM_CONDITIONAL([USE_EXHAUSTIVE_TESTS], [test x"$use_exhaustive_tests" != x"no"])
560593
AM_CONDITIONAL([USE_BENCHMARK], [test x"$use_benchmark" = x"yes"])
561594
AM_CONDITIONAL([USE_ECMULT_STATIC_PRECOMPUTATION], [test x"$set_precomp" = x"yes"])
562595
AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"])
596+
AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"])
597+
AM_CONDITIONAL([ENABLE_MODULE_MUSIG], [test x"$enable_module_musig" = x"yes"])
563598
AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"])
564599
AM_CONDITIONAL([ENABLE_MODULE_GENERATOR], [test x"$enable_module_generator" = x"yes"])
565600
AM_CONDITIONAL([ENABLE_MODULE_RANGEPROOF], [test x"$enable_module_rangeproof" = x"yes"])

0 commit comments

Comments
 (0)