Jonas Nick b5a6812bd6 Merge elementsproject/secp256k1-zkp#285: Upstream PRs 1426, 1430, 1184, 1437, 1442, 1441, 1445, 1438, 1393, 1446, 1450, 1451, 1431, 990, 1455, 1380, 1465, 1466, 1473, 1474, 1476, 1480, 1468, 1482, 1249
b673a43090 musig: new upstream def of VERIFY_CHECK (empty in non-VERIFY) (Jonas Nick)
cd173688fb musig: replace point_{save,load} with ge_{to,from}_bytes (Jonas Nick)
33db8edb27 group: add ge_to_bytes and ge_from_bytes (Jonas Nick)
de54a1eff7 musig2: clean up ctx doc in include file (Jonas Nick)
4f65698865 extrakeys: Remove redundant secp256k1_pubkey_cmp (Tim Ruffing)
c29f28e638 include: make docs more consistent (Tim Ruffing)
42f8c51402 cmake: Add `SECP256K1_LATE_CFLAGS` configure option (Hennadii Stepanov)
e6822678ea build: Error if required module explicitly off (Tim Ruffing)
89ec583ccf build: Clean up handling of module dependencies (Tim Ruffing)
b37fdb28ce check-abi: Minor UI improvements (Tim Ruffing)
ad5f589a94 check-abi: Default to HEAD for new version (Tim Ruffing)
9fb7e2f156 release process: Style and formatting nits (Tim Ruffing)
e7053d065b release process: Add email step (Tim Ruffing)
429d21dc79 release process: Run sanity checks on release PR (Tim Ruffing)
ba5d72d626 assumptions: Use new STATIC_ASSERT macro (Tim Ruffing)
e53c2d9ffc Require that sizeof(secp256k1_ge_storage) == 64 (Tim Ruffing)
d0ba2abbff util: Add STATIC_ASSERT macro (Tim Ruffing)
da7bc1b803 include: in doc, remove article in front of "pointer" (Jonas Nick)
aa3dd5280b include: make doc about ctx more consistent (Jonas Nick)
e3f690015a include: remove obvious "cannot be NULL" doc (Jonas Nick)
3dbfb48946 tests: restore scalar_mul test (Jonas Nick)
d77170a88d Fix typos (shuoer86)
4b2e06f460 release cleanup: bump version after 0.4.1 (Jonas Nick)
672053d801 release: prepare for 0.4.1 (Jonas Nick)
74a4d974d5 doc: Add ABI checking with `check-abi.sh` to the Release Process (Hennadii Stepanov)
e7f830e32c Add `tools/check-abi.sh` (Hennadii Stepanov)
3928b7c383 doc: improve secp256k1_fe_set_b32_mod doc (Coding Enthusiast)
e02f313b1f Add comment on length checks when parsing ECDSA sigs (Tim Ruffing)
0e5ea62207 CONTRIBUTING: add some coding and style conventions (Jonas Nick)
1a432cb982 README: update first sentence (Jonas Nick)
0922a047fb docs: move coverage report instructions to CONTRIBUTING (Jonas Nick)
76880e4015 Add CONTRIBUTING.md including scope and guidelines for new code (Jonas Nick)
d2e36a2b81 changelog: add entry for "field: Remove x86_64 asm" (Jonas Nick)
04af0ba162 Replace ge_equals_ge[,j] calls with group.h equality calls (Pieter Wuille)
60525f6c14 Add unit tests for group.h equality functions (Pieter Wuille)
a47cd97d51 Add group.h ge/gej equality functions (Pieter Wuille)
f07cead0ca build: Don't call assembly an optimization (Tim Ruffing)
2f0762fa8f field: Remove x86_64 asm (Tim Ruffing)
bb4672342e remove VERIFY_SETUP define (Sebastian Falbesoner)
a3a3e11acd remove unneeded VERIFY_SETUP uses in ECMULT_CONST_TABLE_GET_GE macro (Sebastian Falbesoner)
a0fb68a2e7 introduce and use SECP256K1_SCALAR_VERIFY macro (Sebastian Falbesoner)
cf25c86d05 introduce and use SECP256K1_{FE,GE,GEJ}_VERIFY macros (Sebastian Falbesoner)
5d89bc031b remove superfluous `#ifdef VERIFY`/`#endif` preprocessor conditions (Sebastian Falbesoner)
c2688f8de9 redefine VERIFY_CHECK to empty in production (non-VERIFY) mode (Sebastian Falbesoner)
dcdda31f2c Tighten secp256k1_fe_mul_inner's VERIFY_BITS checks (Russell O'Connor)
8e2a5fe908 correct assertion for secp256k1_fe_mul_inner (roconnor-blockstream)
1ddd76af0a bench: add --help option to bench_internal (Sebastian Falbesoner)
33dc7e4d3e asm: add .note.GNU-stack section for non-exec stack (fanquake)
10271356c8 Return temporaries to being unsigned in secp256k1_fe_sqr_inner (roconnor-blockstream)
8185e72d29 ci: Ignore internal errors in snapshot compilers (Hennadii Stepanov)
355bbdf38a Add changelog entry for signed-digit ecmult_const algorithm (Pieter Wuille)
21f49d9bec Remove unused secp256k1_scalar_shr_int (Pieter Wuille)
115fdc7232 Remove unused secp256k1_wnaf_const (Pieter Wuille)
aa9f3a3c00 ecmult_const: add/improve tests (Jonas Nick)
4d16e90111 Signed-digit based ecmult_const algorithm (Pieter Wuille)
ba523be067 make SECP256K1_SCALAR_CONST reduce modulo exhaustive group order (Pieter Wuille)
2140da9cd5 Add secp256k1_scalar_half for halving scalars (+ tests/benchmarks). (Pieter Wuille)
5dab0baa80 README: remove CI badge (Jonas Nick)
fa4d6c76b6 ci/cirrus: Add native ARM64 persistent workers (MarcoFalke)
2262d0eaab ci/cirrus: Bring back skeleton .cirrus.yml without jobs (Tim Ruffing)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK b673a43090

Tree-SHA512: fe4f4d1db71518cad80724c21915a6235ffc21aadc06226f6dc29237e786f546189165ffdbe64b90b094ada4c36a031caa712c1f21bf280d33ba221fda2e0019
2024-01-23 19:07:05 +00:00
2024-01-09 01:05:09 +01:00
2024-01-03 20:03:07 +08:00
2013-05-09 15:24:32 +02:00

libsecp256k1-zkp

Dependencies: None

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

Building with 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.

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

Contributing to libsecp256k1

See CONTRIBUTING.md

Description
Experimental fork of libsecp256k1 with support for pedersen commitments and range proofs.
Readme 12 MiB
Languages
C 93.2%
Sage 1.6%
CMake 1.2%
M4 1.2%
Assembly 1.1%
Other 1.7%