Skip to content

PoC implementation of MuSig2 multisignature algorithm over SECP256k1, compatible with Schnorr BIP 340

License

Notifications You must be signed in to change notification settings

input-output-hk/musig2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MuSig2 Implementation with libsecp256k1

This is a MuSig2 implementation using the libsecp256k1 library for EC operations.

To install the library, follow the directions in libsecp256k1. The library provides an optimized C library for ECDSA signatures and secret and public key operations on curve ecp256k1, as well as usage examples including ECDSA and Schnorr signatures.

This implementation requires configuring the libsecp256k1 with an additional flag --enable-module-schnorrsig as stated in libsecp256k1.

Run the example with examplemusig2.c

make example
./example_run/example

Run the Google tests with

make test
./test_run/test

Note that you need to install Google Test by following the instructions given here.

Running Valgrind in MacOs can be quite painful. We included a Dockerfile to run valgrind checks on MacOs with an arm chip (e.g. M1). To test the code with valgrind, run the following:

 docker build -t "valgrind:1.0" .
 docker run -it -v $PWD:/tmp -w /tmp valgrind:1.0

and once you are interacting with the container, run

make valgrind

Security of MuSig2 with BIP-340 Compatibility

See Security for the BIP-340 compatibility of MuSig2.

About

PoC implementation of MuSig2 multisignature algorithm over SECP256k1, compatible with Schnorr BIP 340

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published