ecdsa_adaptor: initialize project
This commit adds the foundational configuration and building scripts and an initial structure for the project.
This commit is contained in:
parent
fac477f822
commit
654cd633f5
@ -189,3 +189,6 @@ if ENABLE_MODULE_ECDSA_S2C
|
|||||||
include src/modules/ecdsa_s2c/Makefile.am.include
|
include src/modules/ecdsa_s2c/Makefile.am.include
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if ENABLE_MODULE_ECDSA_ADAPTOR
|
||||||
|
include src/modules/ecdsa_adaptor/Makefile.am.include
|
||||||
|
endif
|
||||||
|
@ -17,6 +17,7 @@ Features:
|
|||||||
* Suitable for embedded systems.
|
* Suitable for embedded systems.
|
||||||
* Optional module for public key recovery.
|
* Optional module for public key recovery.
|
||||||
* Optional module for ECDH key exchange.
|
* Optional module for ECDH key exchange.
|
||||||
|
* Optional module for ECDSA adaptor signatures (experimental).
|
||||||
|
|
||||||
Experimental features have not received enough scrutiny to satisfy the standard of quality of this library but are made available for testing and review by the community. The APIs of these features should not be considered stable.
|
Experimental features have not received enough scrutiny to satisfy the standard of quality of this library but are made available for testing and review by the community. The APIs of these features should not be considered stable.
|
||||||
|
|
||||||
|
15
configure.ac
15
configure.ac
@ -180,6 +180,11 @@ AC_ARG_ENABLE(module_ecdsa_s2c,
|
|||||||
[enable_module_ecdsa_s2c=$enableval],
|
[enable_module_ecdsa_s2c=$enableval],
|
||||||
[enable_module_ecdsa_s2c=no])
|
[enable_module_ecdsa_s2c=no])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(module_ecdsa-adaptor,
|
||||||
|
AS_HELP_STRING([--enable-module-ecdsa-adaptor],[enable ECDSA adaptor module [default=no]]),
|
||||||
|
[enable_module_ecdsa_adaptor=$enableval],
|
||||||
|
[enable_module_ecdsa_adaptor=no])
|
||||||
|
|
||||||
AC_ARG_ENABLE(external_default_callbacks,
|
AC_ARG_ENABLE(external_default_callbacks,
|
||||||
AS_HELP_STRING([--enable-external-default-callbacks],[enable external default callback functions [default=no]]),
|
AS_HELP_STRING([--enable-external-default-callbacks],[enable external default callback functions [default=no]]),
|
||||||
[use_external_default_callbacks=$enableval],
|
[use_external_default_callbacks=$enableval],
|
||||||
@ -580,6 +585,10 @@ 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])
|
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
|
fi
|
||||||
|
|
||||||
|
if test x"$enable_module_ecdsa_adaptor" = x"yes"; then
|
||||||
|
AC_DEFINE(ENABLE_MODULE_ECDSA_ADAPTOR, 1, [Define this symbol to enable the ECDSA adaptor module])
|
||||||
|
fi
|
||||||
|
|
||||||
###
|
###
|
||||||
### Check for --enable-experimental if necessary
|
### Check for --enable-experimental if necessary
|
||||||
###
|
###
|
||||||
@ -596,6 +605,7 @@ if test x"$enable_experimental" = x"yes"; then
|
|||||||
AC_MSG_NOTICE([Building extrakeys module: $enable_module_extrakeys])
|
AC_MSG_NOTICE([Building extrakeys module: $enable_module_extrakeys])
|
||||||
AC_MSG_NOTICE([Building schnorrsig module: $enable_module_schnorrsig])
|
AC_MSG_NOTICE([Building schnorrsig module: $enable_module_schnorrsig])
|
||||||
AC_MSG_NOTICE([Building ECDSA sign-to-contract module: $enable_module_ecdsa_s2c])
|
AC_MSG_NOTICE([Building ECDSA sign-to-contract module: $enable_module_ecdsa_s2c])
|
||||||
|
AC_MSG_NOTICE([Building ECDSA adaptor signatures module: $enable_module_ecdsa_adaptor])
|
||||||
AC_MSG_NOTICE([******])
|
AC_MSG_NOTICE([******])
|
||||||
|
|
||||||
|
|
||||||
@ -632,6 +642,9 @@ else
|
|||||||
if test x"$enable_module_ecdsa_s2c" = x"yes"; then
|
if test x"$enable_module_ecdsa_s2c" = x"yes"; then
|
||||||
AC_MSG_ERROR([ECDSA sign-to-contract module module is experimental. Use --enable-experimental to allow.])
|
AC_MSG_ERROR([ECDSA sign-to-contract module module is experimental. Use --enable-experimental to allow.])
|
||||||
fi
|
fi
|
||||||
|
if test x"$enable_module_ecdsa_adaptor" = x"yes"; then
|
||||||
|
AC_MSG_ERROR([ecdsa adaptor signatures module is experimental. Use --enable-experimental to allow.])
|
||||||
|
fi
|
||||||
if test x"$set_asm" = x"arm"; then
|
if test x"$set_asm" = x"arm"; then
|
||||||
AC_MSG_ERROR([ARM assembly optimization is experimental. Use --enable-experimental to allow.])
|
AC_MSG_ERROR([ARM assembly optimization is experimental. Use --enable-experimental to allow.])
|
||||||
fi
|
fi
|
||||||
@ -673,6 +686,7 @@ AM_CONDITIONAL([ENABLE_MODULE_WHITELIST], [test x"$enable_module_whitelist" = x"
|
|||||||
AM_CONDITIONAL([ENABLE_MODULE_EXTRAKEYS], [test x"$enable_module_extrakeys" = 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_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"])
|
||||||
AM_CONDITIONAL([ENABLE_MODULE_ECDSA_S2C], [test x"$enable_module_ecdsa_s2c" = 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([USE_EXTERNAL_ASM], [test x"$use_external_asm" = 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([USE_ASM_ARM], [test x"$set_asm" = x"arm"])
|
||||||
AM_CONDITIONAL([ENABLE_MODULE_SURJECTIONPROOF], [test x"$enable_module_surjectionproof" = x"yes"])
|
AM_CONDITIONAL([ENABLE_MODULE_SURJECTIONPROOF], [test x"$enable_module_surjectionproof" = x"yes"])
|
||||||
@ -698,6 +712,7 @@ echo " module recovery = $enable_module_recovery"
|
|||||||
echo " module extrakeys = $enable_module_extrakeys"
|
echo " module extrakeys = $enable_module_extrakeys"
|
||||||
echo " module schnorrsig = $enable_module_schnorrsig"
|
echo " module schnorrsig = $enable_module_schnorrsig"
|
||||||
echo " module ecdsa-s2c = $enable_module_ecdsa_s2c"
|
echo " module ecdsa-s2c = $enable_module_ecdsa_s2c"
|
||||||
|
echo " module ecdsa-adaptor = $enable_module_ecdsa_adaptor"
|
||||||
echo
|
echo
|
||||||
echo " asm = $set_asm"
|
echo " asm = $set_asm"
|
||||||
echo " bignum = $set_bignum"
|
echo " bignum = $set_bignum"
|
||||||
|
19
include/secp256k1_ecdsa_adaptor.h
Normal file
19
include/secp256k1_ecdsa_adaptor.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#ifndef SECP256K1_ECDSA_ADAPTOR_H
|
||||||
|
#define SECP256K1_ECDSA_ADAPTOR_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** This module implements single signer ECDSA adaptor signatures following
|
||||||
|
* "One-Time Verifiably Encrypted Signatures A.K.A. Adaptor Signatures" by
|
||||||
|
* Lloyd Fournier
|
||||||
|
* (https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-November/002316.html
|
||||||
|
* and https://github.com/LLFourn/one-time-VES/blob/master/main.pdf).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SECP256K1_ECDSA_ADAPTOR_H */
|
1
src/modules/ecdsa_adaptor/Makefile.am.include
Normal file
1
src/modules/ecdsa_adaptor/Makefile.am.include
Normal file
@ -0,0 +1 @@
|
|||||||
|
include_HEADERS += include/secp256k1_ecdsa_adaptor.h
|
12
src/modules/ecdsa_adaptor/main_impl.h
Normal file
12
src/modules/ecdsa_adaptor/main_impl.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/**********************************************************************
|
||||||
|
* Copyright (c) 2020-2021 Jonas Nick, Jesse Posner *
|
||||||
|
* Distributed under the MIT software license, see the accompanying *
|
||||||
|
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
#ifndef SECP256K1_MODULE_ECDSA_ADAPTOR_MAIN_H
|
||||||
|
#define SECP256K1_MODULE_ECDSA_ADAPTOR_MAIN_H
|
||||||
|
|
||||||
|
#include "include/secp256k1_ecdsa_adaptor.h"
|
||||||
|
|
||||||
|
#endif
|
@ -831,6 +831,10 @@ int secp256k1_ec_pubkey_combine(const secp256k1_context* ctx, secp256k1_pubkey *
|
|||||||
# include "modules/ecdsa_s2c/main_impl.h"
|
# include "modules/ecdsa_s2c/main_impl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_MODULE_ECDSA_ADAPTOR
|
||||||
|
# include "modules/ecdsa_adaptor/main_impl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_MODULE_MUSIG
|
#ifdef ENABLE_MODULE_MUSIG
|
||||||
# include "modules/musig/main_impl.h"
|
# include "modules/musig/main_impl.h"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user