Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Threshold signatures #46

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
e1fb4af
Add 64-bit integer utilities
gmaxwell Aug 5, 2015
f126331
Pedersen commitments, borromean ring signatures, and ZK range proofs.
gmaxwell Aug 5, 2015
89e7451
[RANGEPROOF BREAK] Use quadratic residue for tie break and modularity…
apoelstra Jul 4, 2016
023aa86
rangeproof: expose sidechannel message field in the signing API
apoelstra Jul 5, 2016
54fa263
Constant-time generator module
sipa Jul 6, 2016
9b00b61
Expose generator in pedersen/rangeproof API
sipa Jul 6, 2016
2bb5133
rangeproof: several API changes
apoelstra Jul 6, 2016
a66ea35
Implement ring-signature based whitelist delegation scheme
apoelstra Apr 21, 2016
94e81a2
add surjection proof module
apoelstra Jul 1, 2016
5ee6bf3
rangeproof: fix memory leak in unit tests
apoelstra Apr 22, 2017
c4097f7
surjectionproof: tests_impl.h s/assert/CHECK/g
apoelstra May 2, 2017
2cc7f1e
surjectionproof: add API unit tests
apoelstra May 2, 2017
cd4e438
surjectionproof: rename unit test functions to be more consistent wit…
apoelstra May 3, 2017
4617f04
rangeproof: add API tests
apoelstra May 3, 2017
56fca50
Fix include/secp256k1_rangeproof.h function argument documentation.
jonasnick May 8, 2017
c8f54e1
whitelist: fix serialize/parse API to take serialized length
apoelstra Jun 26, 2017
36b100c
Fix checks of whitelist serialize/parse arguments
jonasnick Jun 27, 2017
51fc58a
Add n_keys argument to whitelist_verify
jonasnick Jul 10, 2017
68be611
Fix pedersen_blind_generator_blind_sum return value documentation
jonasnick Jul 10, 2017
f1d6e4b
Fix generator makefile
instagibbs Aug 16, 2017
e93e886
generator: remove unnecessary ARG_CHECK from generate()
apoelstra Aug 30, 2017
a3ad4a8
generator: add API tests
apoelstra Aug 30, 2017
6ceccb7
add whitelist_impl.h to include for dist
instagibbs Feb 13, 2018
6872069
Add whitelisting benchmark
jonasnick Mar 16, 2018
f723bf5
Minor bugfix. Wrong length due to NUL character.
datavetaren May 16, 2018
c908c97
Reject surjection proofs with trailing garbage
real-or-random May 23, 2018
ab4fbc1
Test for rejection of trailing bytes in surjection proofs
real-or-random May 23, 2018
6f14fe4
Test for rejection of trailing bytes in range proofs
real-or-random May 24, 2018
8da4328
fix spelling in documentation
instagibbs Jun 20, 2018
b387ba0
Expose generator in shared library
FrankC01 Jul 25, 2018
cb786d6
rangeproof: add fixed vector test case
apoelstra Oct 2, 2018
65ffea4
rangeproof: check that points deserialize correctly when verifying ra…
apoelstra Oct 2, 2018
2cc4c6f
generator: verify correctness of point when parsing
apoelstra Oct 2, 2018
972d056
rangeproof: verify correctness of pedersen commitments when parsing
apoelstra Oct 2, 2018
e32924f
rangeproof: fix serialization of pedersen commintments
apoelstra Oct 8, 2018
ea62bfe
add unit test for generator and pedersen commitment roundtripping
apoelstra Oct 8, 2018
dec1b9c
Add comment to explain effect of max_n_iterations in surjectionproof_…
jonasnick Apr 17, 2018
e9fea74
Add explanation about how BIP32 unhardened derivation can be used to …
jonasnick Nov 19, 2018
0593861
Enable more builds with rest of experimental flags
instagibbs Jan 3, 2019
14769b9
rangeproof: reduce iteration count in unit tests
apoelstra Jan 3, 2019
9a8a71e
use proper types for rangeproof min/max
instagibbs Jan 3, 2019
a8ae6ba
add chacha20 function
apoelstra Apr 3, 2018
5d5374f
Add schnorrsig module which implements BIP-schnorr [0] compatible sig…
apoelstra May 9, 2018
b61a1a9
Add MuSig module which allows creating n-of-n multisignatures and ada…
jonasnick Dec 22, 2018
0ad6b60
Add 3-of-3 MuSig example
jonasnick Dec 22, 2018
ff16651
musig: add user documentation
apoelstra Feb 8, 2019
cd5ba5c
generator: remove `CHECK` abort calls exposed by public API
apoelstra Mar 27, 2019
865b761
Fix a small typo in the generator parameter name
romanz Apr 11, 2019
86240b2
Clean up ./configure help strings (zkp extensions)
real-or-random Apr 5, 2019
15d9278
Add bench_generator and bench_rangeproof to .gitignore
romanz May 14, 2019
898c9f0
Clarify how to derive alternative generator H
jonasnick May 12, 2019
4a77633
Improve explanation of key cancellation attack in whitelist.md
jonasnick Mar 28, 2019
250ebb3
work in progress: add _allocate_initialized/destroy funcs
dgpv Apr 21, 2019
6f3b0c0
Improve comments for surctionproof init+alloc/destroy funcs
dgpv May 26, 2019
7bc3daa
surjectionproof: add fixed test vectors
apoelstra Apr 30, 2019
290a27b
surjectionproof: add test vectors for "set padding bits"
apoelstra Jun 3, 2019
55311b0
Fix read of wrong buffer (and OOB) in surjectionproof tests
real-or-random Jun 4, 2019
49a1e01
surjectionproof: fix malleability in surjection proof parsing
apoelstra Jun 3, 2019
f94d46e
Merge pull request #71 from real-or-random/fix-trailing-test
apoelstra Jun 4, 2019
e7f4ff4
Merge pull request #70 from apoelstra/2019-06-surjection-count
apoelstra Jun 4, 2019
a118acc
surjectionproof: reduce stack usage
apoelstra Apr 30, 2019
d512d78
surjectionproof: introduce `SECP256K1_SURJECTIONPROOF_MAX_USED_INPUTS…
apoelstra Apr 30, 2019
112edb2
allow reducing surjection proof size (to lower generation stack usage)
romanz May 30, 2019
f7e4d08
surjection proof: Reject proofs with too many used inputs in reduced …
real-or-random Jun 5, 2019
44db4d8
Merge pull request #57 from apoelstra/2019-04-surjectionproof-stack
apoelstra Jun 6, 2019
6303e3b
Fix schnorrsig module after rebase on upstream e541a90e
jonasnick Jun 21, 2019
99e1fb2
Fix musig module after rebase on upstream e541a90e
jonasnick Jun 21, 2019
2f6c335
Merge pull request #72 from jonasnick/fix-upstream-rebase
jonasnick Jun 21, 2019
cb8f059
Add fixups from upstream schnorrsig PR
jonasnick Feb 11, 2019
11af701
Merge pull request #58 from jonasnick/schnorrsig-fix
real-or-random Jun 25, 2019
5ae9db6
add threshold signature module
apoelstra Jan 25, 2019
7befb97
f add old markdown file with lagrange algebra, as a reference point
apoelstra Feb 20, 2019
f6e4f86
f add design doC
apoelstra Jul 1, 2019
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
bench_inv
bench_ecdh
bench_ecmult
bench_generator
bench_rangeproof
bench_schnorrsig
bench_sign
bench_verify
bench_schnorr_verify
bench_recover
bench_internal
tests
Expand Down
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@ cache:
- src/java/guava/
env:
global:
- FIELD=auto BIGNUM=auto SCALAR=auto ENDOMORPHISM=no STATICPRECOMPUTATION=yes ASM=no BUILD=check EXTRAFLAGS= HOST= ECDH=no RECOVERY=no EXPERIMENTAL=no JNI=no
- FIELD=auto BIGNUM=auto SCALAR=auto ENDOMORPHISM=no STATICPRECOMPUTATION=yes ASM=no BUILD=check EXTRAFLAGS= HOST= ECDH=no RECOVERY=no EXPERIMENTAL=no JNI=no GENERATOR=no RANGEPROOF=no WHITELIST=no SCHNORRSIG=no
- GUAVA_URL=https://search.maven.org/remotecontent?filepath=com/google/guava/guava/18.0/guava-18.0.jar GUAVA_JAR=src/java/guava/guava-18.0.jar
matrix:
- SCALAR=32bit FIELD=32bit EXPERIMENTAL=yes RANGEPROOF=yes WHITELIST=yes GENERATOR=yes SCHNORRSIG=yes
- FIELD=64bit EXPERIMENTAL=yes RANGEPROOF=yes WHITELIST=yes GENERATOR=yes SCHNORRSIG=yes
- SCALAR=32bit RECOVERY=yes
- SCALAR=32bit FIELD=32bit ECDH=yes EXPERIMENTAL=yes
- SCALAR=64bit
- FIELD=64bit RECOVERY=yes
- FIELD=64bit ENDOMORPHISM=yes
- FIELD=64bit ENDOMORPHISM=yes ECDH=yes EXPERIMENTAL=yes
- FIELD=64bit ENDOMORPHISM=yes ECDH=yes EXPERIMENTAL=yes SCHNORRSIG=yes
- FIELD=64bit ASM=x86_64
- FIELD=64bit ENDOMORPHISM=yes ASM=x86_64
- FIELD=32bit ENDOMORPHISM=yes
- BIGNUM=no
- BIGNUM=no ENDOMORPHISM=yes RECOVERY=yes EXPERIMENTAL=yes
- BIGNUM=no ENDOMORPHISM=yes RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes
- BIGNUM=no STATICPRECOMPUTATION=no
- BUILD=distcheck
- EXTRAFLAGS=CPPFLAGS=-DDETERMINISTIC
Expand Down Expand Up @@ -65,4 +67,4 @@ before_script: ./autogen.sh
script:
- if [ -n "$HOST" ]; then export USE_HOST="--host=$HOST"; fi
- if [ "x$HOST" = "xi686-linux-gnu" ]; then export CC="$CC -m32"; fi
- ./configure --enable-experimental=$EXPERIMENTAL --enable-endomorphism=$ENDOMORPHISM --with-field=$FIELD --with-bignum=$BIGNUM --with-scalar=$SCALAR --enable-ecmult-static-precomputation=$STATICPRECOMPUTATION --enable-module-ecdh=$ECDH --enable-module-recovery=$RECOVERY --enable-jni=$JNI $EXTRAFLAGS $USE_HOST && make -j2 $BUILD
- ./configure --enable-experimental=$EXPERIMENTAL --enable-endomorphism=$ENDOMORPHISM --with-field=$FIELD --with-bignum=$BIGNUM --with-scalar=$SCALAR --enable-ecmult-static-precomputation=$STATICPRECOMPUTATION --enable-module-ecdh=$ECDH --enable-module-recovery=$RECOVERY --enable-module-rangeproof=$RANGEPROOF --enable-module-whitelist=$WHITELIST --enable-module-generator=$GENERATOR --enable-module-schnorrsig=$SCHNORRSIG --enable-jni=$JNI $EXTRAFLAGS $USE_HOST && make -j2 $BUILD
28 changes: 28 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,34 @@ if ENABLE_MODULE_ECDH
include src/modules/ecdh/Makefile.am.include
endif

if ENABLE_MODULE_SCHNORRSIG
include src/modules/schnorrsig/Makefile.am.include
endif

if ENABLE_MODULE_MUSIG
include src/modules/musig/Makefile.am.include
endif

if ENABLE_MODULE_MUSIG
include src/modules/thresholdsig/Makefile.am.include
endif

if ENABLE_MODULE_RECOVERY
include src/modules/recovery/Makefile.am.include
endif

if ENABLE_MODULE_GENERATOR
include src/modules/generator/Makefile.am.include
endif

if ENABLE_MODULE_RANGEPROOF
include src/modules/rangeproof/Makefile.am.include
endif

if ENABLE_MODULE_WHITELIST
include src/modules/whitelist/Makefile.am.include
endif

if ENABLE_MODULE_SURJECTIONPROOF
include src/modules/surjection/Makefile.am.include
endif
151 changes: 150 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,43 @@ AC_ARG_ENABLE(module_ecdh,
[enable_module_ecdh=$enableval],
[enable_module_ecdh=no])

AC_ARG_ENABLE(module_schnorrsig,
AS_HELP_STRING([--enable-module-schnorrsig],[enable schnorrsig module (experimental)]),
[enable_module_schnorrsig=$enableval],
[enable_module_schnorrsig=no])

AC_ARG_ENABLE(module_musig,
AS_HELP_STRING([--enable-module-musig],[enable MuSig module (experimental)]),
[enable_module_musig=$enableval],
[enable_module_musig=no])

AC_ARG_ENABLE(module_threshold,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe call the module thresholdsig for consistency with musig and with the api names?

AS_HELP_STRING([--enable-module-threshold],[enable threshold MuSig module (experimental)]),
[enable_module_threshold=$enableval],
[enable_module_threshold=no])

AC_ARG_ENABLE(module_recovery,
AS_HELP_STRING([--enable-module-recovery],[enable ECDSA pubkey recovery module [default=no]]),
[enable_module_recovery=$enableval],
[enable_module_recovery=no])

AC_ARG_ENABLE(module_generator,
AS_HELP_STRING([--enable-module-generator],[enable NUMS generator module [default=no]]),
[enable_module_generator=$enableval],
[enable_module_generator=no])

AC_ARG_ENABLE(module_rangeproof,
AS_HELP_STRING([--enable-module-rangeproof],[enable Pedersen / zero-knowledge range proofs module [default=no]]),
[enable_module_rangeproof=$enableval],
[enable_module_rangeproof=no])

AC_ARG_ENABLE(module_whitelist,
AS_HELP_STRING([--enable-module-whitelist],[enable key whitelisting module [default=no]]),
[enable_module_whitelist=$enableval],
[enable_module_whitelist=no])

AC_ARG_ENABLE(external_default_callbacks,
AS_HELP_STRING([--enable-external-default-callbacks],[enable external default callback functions (default is no)]),
AS_HELP_STRING([--enable-external-default-callbacks],[enable external default callback functions [default=no]]),
[use_external_default_callbacks=$enableval],
[use_external_default_callbacks=no])

Expand All @@ -144,6 +174,16 @@ AC_ARG_ENABLE(jni,
[use_jni=$enableval],
[use_jni=no])

AC_ARG_ENABLE(module_surjectionproof,
AS_HELP_STRING([--enable-module-surjectionproof],[enable surjection proof module [default=no]]),
[enable_module_surjectionproof=$enableval],
[enable_module_surjectionproof=no])

AC_ARG_ENABLE(reduced_surjection_proof_size,
AS_HELP_STRING([--enable-reduced-surjection-proof-size],[use reduced surjection proof size (disabling parsing and verification) [default=no]]),
[use_reduced_surjection_proof_size=$enableval],
[use_reduced_surjection_proof_size=no])

AC_ARG_WITH([field], [AS_HELP_STRING([--with-field=64bit|32bit|auto],
[finite field implementation to use [default=auto]])],[req_field=$withval], [req_field=auto])

Expand Down Expand Up @@ -175,6 +215,12 @@ else
CFLAGS="$CFLAGS -O3"
fi

AC_MSG_CHECKING([for __builtin_popcount])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[void myfunc() {__builtin_popcount(0);}]])],
[ AC_MSG_RESULT([yes]);AC_DEFINE(HAVE_BUILTIN_POPCOUNT,1,[Define this symbol if __builtin_popcount is available]) ],
[ AC_MSG_RESULT([no])
])

if test x"$use_ecmult_static_precomputation" != x"no"; then
# Temporarily switch to an environment for the native compiler
save_cross_compiling=$cross_compiling
Expand Down Expand Up @@ -230,6 +276,12 @@ else
set_precomp=no
fi

AC_MSG_CHECKING([for __builtin_clzll])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[void myfunc() { __builtin_clzll(1);}]])],
[ AC_MSG_RESULT([yes]);AC_DEFINE(HAVE_BUILTIN_CLZLL,1,[Define this symbol if __builtin_clzll is available]) ],
[ AC_MSG_RESULT([no])
])

if test x"$req_asm" = x"auto"; then
SECP_64BIT_ASM_CHECK
if test x"$has_64bit_asm" = x"yes"; then
Expand Down Expand Up @@ -488,10 +540,38 @@ if test x"$enable_module_ecdh" = x"yes"; then
AC_DEFINE(ENABLE_MODULE_ECDH, 1, [Define this symbol to enable the ECDH module])
fi

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

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

if test x"$enable_module_threshold" = x"yes"; then
AC_DEFINE(ENABLE_MODULE_THRESHOLD, 1, [Define this symbol to enable the threshold MuSig module])
fi

if test x"$enable_module_recovery" = x"yes"; then
AC_DEFINE(ENABLE_MODULE_RECOVERY, 1, [Define this symbol to enable the ECDSA pubkey recovery module])
fi

if test x"$enable_module_generator" = x"yes"; then
AC_DEFINE(ENABLE_MODULE_GENERATOR, 1, [Define this symbol to enable the NUMS generator module])
fi

if test x"$enable_module_rangeproof" = x"yes"; then
AC_DEFINE(ENABLE_MODULE_RANGEPROOF, 1, [Define this symbol to enable the Pedersen / zero knowledge range proof module])
fi

if test x"$enable_module_whitelist" = x"yes"; then
AC_DEFINE(ENABLE_MODULE_WHITELIST, 1, [Define this symbol to enable the key whitelisting module])
fi

if test x"$enable_module_surjectionproof" = x"yes"; then
AC_DEFINE(ENABLE_MODULE_SURJECTIONPROOF, 1, [Define this symbol to enable the surjection proof module])
fi

AC_C_BIGENDIAN()

if test x"$use_external_asm" = x"yes"; then
Expand All @@ -502,19 +582,79 @@ if test x"$use_external_default_callbacks" = x"yes"; then
AC_DEFINE(USE_EXTERNAL_DEFAULT_CALLBACKS, 1, [Define this symbol if an external implementation of the default callbacks is used])
fi

if test x"$use_reduced_surjection_proof_size" = x"yes"; then
AC_DEFINE(USE_REDUCED_SURJECTION_PROOF_SIZE, 1, [Define this symbol to reduce SECP256K1_SURJECTIONPROOF_MAX_N_INPUTS to 16, disabling parsing and verification])
fi

if test x"$enable_experimental" = x"yes"; then
AC_MSG_NOTICE([******])
AC_MSG_NOTICE([WARNING: experimental build])
AC_MSG_NOTICE([Experimental features do not have stable APIs or properties, and may not be safe for production use.])
AC_MSG_NOTICE([Building ECDH module: $enable_module_ecdh])
AC_MSG_NOTICE([Building NUMS generator module: $enable_module_generator])
AC_MSG_NOTICE([Building range proof module: $enable_module_rangeproof])
AC_MSG_NOTICE([Building key whitelisting module: $enable_module_whitelist])
AC_MSG_NOTICE([Building surjection proof module: $enable_module_surjectionproof])
AC_MSG_NOTICE([Building schnorrsig module: $enable_module_schnorrsig])
AC_MSG_NOTICE([Building MuSig module: $enable_module_musig])
AC_MSG_NOTICE([Building threshold MuSig module: $enable_module_threshold])
AC_MSG_NOTICE([******])


if test x"$enable_module_schnorrsig" != x"yes"; then
if test x"$enable_module_musig" = x"yes"; then
AC_MSG_ERROR([MuSig module requires the schnorrsig module. Use --enable-module-schnorrsig to allow.])
fi
fi

if test x"$enable_module_musig" != x"yes"; then
if test x"$enable_module_threshold" = x"yes"; then
AC_MSG_ERROR([Threshold MuSig module requires the MuSig module. Use --enable-module-musig to allow.])
fi
fi

if test x"$enable_module_generator" != x"yes"; then
if test x"$enable_module_rangeproof" = x"yes"; then
AC_MSG_ERROR([Rangeproof module requires the generator module. Use --enable-module-generator to allow.])
fi
fi

if test x"$enable_module_rangeproof" != x"yes"; then
if test x"$enable_module_whitelist" = x"yes"; then
AC_MSG_ERROR([Whitelist module requires the rangeproof module. Use --enable-module-rangeproof to allow.])
fi
if test x"$enable_module_surjectionproof" = x"yes"; then
AC_MSG_ERROR([Surjection proof module requires the rangeproof module. Use --enable-module-rangeproof to allow.])
fi
fi
else
if test x"$enable_module_ecdh" = x"yes"; then
AC_MSG_ERROR([ECDH module is experimental. Use --enable-experimental to allow.])
fi
if test x"$enable_module_schnorrsig" = x"yes"; then
AC_MSG_ERROR([schnorrsig module is experimental. Use --enable-experimental to allow.])
fi
if test x"$enable_module_musig" = x"yes"; then
AC_MSG_ERROR([MuSig module is experimental. Use --enable-experimental to allow.])
fi
if test x"$enable_module_threshold" = x"yes"; then
AC_MSG_ERROR([Threshold MuSig module is experimental. Use --enable-experimental to allow.])
fi
if test x"$set_asm" = x"arm"; then
AC_MSG_ERROR([ARM assembly optimization is experimental. Use --enable-experimental to allow.])
fi
if test x"$enable_module_generator" = x"yes"; then
AC_MSG_ERROR([NUMS generator module is experimental. Use --enable-experimental to allow.])
fi
if test x"$enable_module_rangeproof" = x"yes"; then
AC_MSG_ERROR([Range proof module is experimental. Use --enable-experimental to allow.])
fi
if test x"$enable_module_whitelist" = x"yes"; then
AC_MSG_ERROR([Key whitelisting module is experimental. Use --enable-experimental to allow.])
fi
if test x"$enable_module_surjectionproof" = x"yes"; then
AC_MSG_ERROR([Surjection proof module is experimental. Use --enable-experimental to allow.])
fi
fi

AC_CONFIG_HEADERS([src/libsecp256k1-config.h])
Expand All @@ -530,10 +670,18 @@ AM_CONDITIONAL([USE_EXHAUSTIVE_TESTS], [test x"$use_exhaustive_tests" != x"no"])
AM_CONDITIONAL([USE_BENCHMARK], [test x"$use_benchmark" = x"yes"])
AM_CONDITIONAL([USE_ECMULT_STATIC_PRECOMPUTATION], [test x"$set_precomp" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_MUSIG], [test x"$enable_module_musig" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_THRESHOLD], [test x"$enable_module_threshold" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_GENERATOR], [test x"$enable_module_generator" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_RANGEPROOF], [test x"$enable_module_rangeproof" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_WHITELIST], [test x"$enable_module_whitelist" = x"yes"])
AM_CONDITIONAL([USE_JNI], [test x"$use_jni" = x"yes"])
AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$use_external_asm" = x"yes"])
AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm"])
AM_CONDITIONAL([ENABLE_MODULE_SURJECTIONPROOF], [test x"$enable_module_surjectionproof" = x"yes"])
AM_CONDITIONAL([USE_REDUCED_SURJECTION_PROOF_SIZE], [test x"$use_reduced_surjection_proof_size" = x"yes"])

dnl make sure nothing new is exported so that we don't break the cache
PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH"
Expand All @@ -552,6 +700,7 @@ echo " with benchmarks = $use_benchmark"
echo " with coverage = $enable_coverage"
echo " module ecdh = $enable_module_ecdh"
echo " module recovery = $enable_module_recovery"
echo " module schnorrsig = $enable_module_schnorrsig"
echo
echo " asm = $set_asm"
echo " bignum = $set_bignum"
Expand Down
6 changes: 6 additions & 0 deletions include/secp256k1.h
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,12 @@ SECP256K1_API int secp256k1_ecdsa_signature_normalize(
*/
SECP256K1_API extern const secp256k1_nonce_function secp256k1_nonce_function_rfc6979;

/** An implementation of the nonce generation function as defined in BIP-schnorr.
* If a data pointer is passed, it is assumed to be a pointer to 32 bytes of
* extra entropy.
*/
SECP256K1_API extern const secp256k1_nonce_function secp256k1_nonce_function_bipschnorr;

/** A default safe nonce generation function (currently equal to secp256k1_nonce_function_rfc6979). */
SECP256K1_API extern const secp256k1_nonce_function secp256k1_nonce_function_default;

Expand Down
Loading