[bitcoin-core] libsecp256k1: Compare against schnorr_fun, implement ECDH (#5958)

This commit is contained in:
Guido Vranken 2021-06-22 05:21:23 +02:00 committed by GitHub
parent 3d878248ac
commit d217819bd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 2 deletions

View File

@ -40,11 +40,21 @@ function build_libsecp256k1() {
make clean
fi
SECP256K1_CONFIGURE_PARAMS="
--enable-static
--disable-tests
--disable-benchmark
--disable-exhaustive-tests
--enable-module-recovery
--enable-experimental
--enable-module-schnorrsig
--enable-module-ecdh"
if [[ $CFLAGS = *sanitize=memory* ]]
then
./configure --enable-static --disable-tests --disable-benchmark --disable-exhaustive-tests --enable-module-recovery --enable-experimental --enable-module-schnorrsig --with-asm=no "$@"
./configure $SECP256K1_CONFIGURE_PARAMS --with-asm=no "$@"
else
./configure --enable-static --disable-tests --disable-benchmark --disable-exhaustive-tests --enable-module-recovery --enable-experimental --enable-module-schnorrsig "$@"
./configure $SECP256K1_CONFIGURE_PARAMS "$@"
fi
make
@ -97,6 +107,7 @@ echo -n 'ECDSA_Verify,' >>extra_options.h
echo -n 'ECDSA_Recover,' >>extra_options.h
echo -n 'Schnorr_Sign,' >>extra_options.h
echo -n 'Schnorr_Verify,' >>extra_options.h
echo -n 'ECDH_Derive,' >>extra_options.h
echo -n 'BignumCalc_Mod_2Exp256 ' >>extra_options.h
echo -n '--curves=secp256k1 ' >>extra_options.h
echo -n '--digests=NULL,SHA1,SHA256,SHA512,RIPEMD160,SHA3-256,SIPHASH64 ' >>extra_options.h
@ -110,6 +121,14 @@ cd ../trezor/
make -B -j$(nproc)
cd ../botan/
make -B -j$(nproc)
cd ../schnorr_fun/
export CXXFLAGS="$CXXFLAGS -DCRYPTOFUZZ_SCHNORR_FUN"
if [[ $CFLAGS != *-m32* ]]
then
make
else
make -f Makefile.i386
fi
cd ../../
# Build with 3 configurations of libsecp256k1