525b661f83bppp/build: Fix linkage of benchmark (Tim Ruffing)4c70cc9bf5Suppress wrong/buggy warning in MSVC <19.33 (Tim Ruffing)579999b425scalar: adjust muladd2 to new int128 interface (Jonas Nick)b160486766ecdsa_adaptor: add missing include (Jonas Nick)c862a9fb49ci: Adjust Docker image to Debian 12 "bookworm" (Hennadii Stepanov)a1782098a9ci: Force DWARF v4 for Clang when Valgrind tests are expected (Hennadii Stepanov)8a7273465bHelp the compiler prove that a loop is entered (Tim Ruffing)67887ae65cFix a typo in the error message (Hennadii Stepanov)7c7467ab7fRefer to ellswift.md in API docs (Pieter Wuille)c32ffd8d8cAdd ellswift to CHANGELOG (Pieter Wuille)bc7c8db179abi: Use dllexport for mingw builds (Cory Fields)5b7bf2e9d4Use `__shiftright128` intrinsic in `secp256k1_u128_rshift` on MSVC (Hennadii Stepanov)5779137457field: Document return value of fe_sqrt() (Tim Ruffing)90e360acc2Add doc/ellswift.md with ElligatorSwift explanation (Pieter Wuille)4f091847c2Add ellswift testing to CI (Pieter Wuille)1bcea8c57fAdd benchmarks for ellswift module (Pieter Wuille)2d1d41acf8Add ctime tests for ellswift module (Pieter Wuille)df633cdebaAdd _prefix and _bip324 ellswift_xdh hash functions (Pieter Wuille)9695deb351Add tests for ellswift module (Pieter Wuille)c47917bbd6Add ellswift module implementing ElligatorSwift (Pieter Wuille)79e5b2a8b8Add functions to test if X coordinate is valid (Pieter Wuille)a597a5a9ceAdd benchmark for key generation (Pieter Wuille)e449af6872Drop no longer needed `#include "../include/secp256k1.h"` (Hennadii Stepanov)f1652528beNormalize ge produced from secp256k1_pubkey_load (stratospher)7067ee54b4tests: add tests for `secp256k1_{read,write}_be64` (Sebastian Falbesoner)740528caadscalar: use newly introduced `secp256k1_{read,write}_be64` helpers (4x64 impl.) (Sebastian Falbesoner)887183e7descalar: use `secp256k1_{read,write}_be32` helpers (4x64 impl.) (Sebastian Falbesoner)52b84238descalar: use `secp256k1_{read,write}_be32` helpers (8x32 impl.) (Sebastian Falbesoner)f3644287b1docs: correct `pubkey` param descriptions for `secp256k1_keypair_{xonly_,}pub` (Sebastian Falbesoner)db29bf220cci: Remove quirk that runs dummy command after wineserver (Tim Ruffing)c7db4942b3ci: Fix error D8037 in `cl.exe` (Hennadii Stepanov)7dae115861Revert "ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe" (Hennadii Stepanov)605e07e365fix input range comment for `secp256k1_fe_add_int` (Sebastian Falbesoner)ade5b36701tests: add checks for scalar constants `secp256k1_scalar_{zero,one}` (Sebastian Falbesoner)654246c635refactor: take use of `secp256k1_scalar_{zero,one}` constants (Sebastian Falbesoner)e83801f5dbtest: Warn if both `VERIFY` and `COVERAGE` are defined (Hennadii Stepanov)1549db0ca5build: Level up MSVC warnings (Hennadii Stepanov)ad84603297release process: clarify change log updates (Jonas Nick)6348bc7eeerelease process: fix process for maintenance release (Jonas Nick)79fa50b082release process: mention targeted release schedule (Jonas Nick)165206789brelease process: add sanity checks (Jonas Nick)27504d5c94ci: Move wine prefix to /tmp to avoid error D8037 in cl.exe (Tim Ruffing)6433175ffeDo not invoke fe_is_zero on failed set_b32_limit (Pieter Wuille)5768b50229build: Enable -DVERIFY for precomputation binaries (Tim Ruffing)31b4bbee1eMake fe_cmov take max of magnitudes (Pieter Wuille)95448ef2f8release cleanup: bump version after 0.3.2 (Pieter Wuille) Pull request description: ACKs for top commit: real-or-random: tACK525b661f83Tree-SHA512: edee04b48ebcede0ad48b165b18a7542b48d6e5d9db034154682fa89bf76ec90569f8073cff8ce57f8abb016671604bcdec58a3a0c1aade911e62dcb63d4acd1
e9e4526a 5f7903c7 d373a721 09df0bfb 20a5da5f 908e02d5 d75dc59b debf3e5c bf29f8d0 60556c9f cb1a5927 67214f5f 45c5ca76 30574f22 0702ecb0 705ce7ed 3c1a0fd3 10836832 926dd3e9 ac43613d fd491ea1 799f4eec ' into temp-merge-1356
e9e4526a 5f7903c7 d373a721 09df0bfb 20a5da5f 908e02d5 d75dc59b debf3e5c bf29f8d0 60556c9f cb1a5927 67214f5f 45c5ca76 30574f22 0702ecb0 705ce7ed 3c1a0fd3 10836832 926dd3e9 ac43613d fd491ea1 799f4eec ' into temp-merge-1356
4258c54f 566faa17 9ce9984f 04bf3f67 5be353d6 2e035af2 5b0444a3 a6f4bcf6 5ec1333d f6bef03c 1f33bb2b 1c895367 6b7e5b71 596b336f 4b84f4bf 024a4094 222ecaf6 4b0f711d 3c818388 f30c7486 1cf15ebd 24c768ae 341cc197 c63ec88e 54d34b6c 073d98a0 9eb6934f ab5a9171 fb3a8063 006ddc1f 3353d3c7 b54a0672 7d4f86d2 e8295d07 3e3d125b acf5c55a ' into temp-merge-1312
ff8edf89 f29a3270 a7a7bfaf a01a7d86 b1579cf5 ad7433b1 233822d8 5fbff5d3 2b77240b 1bff2005 e1817a6f 5596ec5c 8ebe5c52 1cca7c17 1b21aa51 cbd25559 09b1d466 57573187 8962fc95 9d1b458d eb8749fc 6048e6c0 ' into temp-merge-1222
e9e4526a 5f7903c7 d373a721 09df0bfb 20a5da5f 908e02d5 d75dc59b debf3e5c bf29f8d0 60556c9f cb1a5927 67214f5f 45c5ca76 30574f22 0702ecb0 705ce7ed 3c1a0fd3 10836832 926dd3e9 ac43613d fd491ea1 799f4eec ' into temp-merge-1356
4258c54f 566faa17 9ce9984f 04bf3f67 5be353d6 2e035af2 5b0444a3 a6f4bcf6 5ec1333d f6bef03c 1f33bb2b 1c895367 6b7e5b71 596b336f 4b84f4bf 024a4094 222ecaf6 4b0f711d 3c818388 f30c7486 1cf15ebd 24c768ae 341cc197 c63ec88e 54d34b6c 073d98a0 9eb6934f ab5a9171 fb3a8063 006ddc1f 3353d3c7 b54a0672 7d4f86d2 e8295d07 3e3d125b acf5c55a ' into temp-merge-1312
e9e4526a 5f7903c7 d373a721 09df0bfb 20a5da5f 908e02d5 d75dc59b debf3e5c bf29f8d0 60556c9f cb1a5927 67214f5f 45c5ca76 30574f22 0702ecb0 705ce7ed 3c1a0fd3 10836832 926dd3e9 ac43613d fd491ea1 799f4eec ' into temp-merge-1356
e9e4526a 5f7903c7 d373a721 09df0bfb 20a5da5f 908e02d5 d75dc59b debf3e5c bf29f8d0 60556c9f cb1a5927 67214f5f 45c5ca76 30574f22 0702ecb0 705ce7ed 3c1a0fd3 10836832 926dd3e9 ac43613d fd491ea1 799f4eec ' into temp-merge-1356
e9e4526a 5f7903c7 d373a721 09df0bfb 20a5da5f 908e02d5 d75dc59b debf3e5c bf29f8d0 60556c9f cb1a5927 67214f5f 45c5ca76 30574f22 0702ecb0 705ce7ed 3c1a0fd3 10836832 926dd3e9 ac43613d fd491ea1 799f4eec ' into temp-merge-1356
libsecp256k1-zkp
A fork of libsecp256k1 with support for advanced and experimental features such as Confidential Assets and MuSig2
Added features:
- Experimental module for ECDSA adaptor signatures.
- Experimental module for ECDSA sign-to-contract.
- Experimental module for MuSig2.
- Experimental module for Confidential Assets (Pedersen commitments, range proofs, and surjection proofs).
- Experimental module for Bulletproofs++ range proofs.
- Experimental module for address whitelisting.
Experimental features are made available for testing and review by the community. The APIs of these features should not be considered stable.
Build steps
libsecp256k1-zkp is built using autotools:
$ ./autogen.sh
$ ./configure
$ make
$ make check # run the test suite
$ sudo make install # optional
To compile optional modules (such as Schnorr signatures), you need to run ./configure with additional flags (such as --enable-module-schnorrsig). Run ./configure --help to see the full list of available flags. For experimental modules, you will also need --enable-experimental as well as a flag for each individual module, e.g. --enable-module-musig.
Usage examples
Usage examples can be found in the examples directory. To compile them you need to configure with --enable-examples.
To compile the Schnorr signature, ECDH and MuSig examples, you need to enable the corresponding module by providing a flag to the configure script, for example --enable-module-schnorrsig.
Test coverage
This library aims to have full coverage of the reachable lines and branches.
To create a test coverage report, configure with --enable-coverage (use of GCC is necessary):
$ ./configure --enable-coverage
Run the tests:
$ make check
To create a report, gcovr is recommended, as it includes branch coverage reporting:
$ gcovr --exclude 'src/bench*' --print-summary
To create a HTML report with coloured and annotated source code:
$ mkdir -p coverage
$ gcovr --exclude 'src/bench*' --html --html-details -o coverage/coverage.html
Benchmark
If configured with --enable-benchmark (which is the default), binaries for benchmarking the libsecp256k1-zkp functions will be present in the root directory after the build.
To print the benchmark result to the command line:
$ ./bench_name
To create a CSV file for the benchmark result :
$ ./bench_name | sed '2d;s/ \{1,\}//g' > bench_name.csv
Reporting a vulnerability
See SECURITY.md