#zero-knowledge #bitcoin #crypto #grin #secp256k1 #extension

grin_secp256k1zkp

Grin’s fork with Zero-Knowledge extensions of Rust bindings for Pieter Wuille’s libsecp256k1 library. Implements ECDSA for the SECG elliptic curve group secp256k1 and related utilities.

14 releases

0.7.14 May 13, 2024
0.7.12 May 17, 2023
0.7.11 Apr 26, 2021
0.7.10 Dec 11, 2020
0.7.1 Oct 25, 2018

#2 in #grin

Download history 8/week @ 2024-07-02 136/week @ 2024-07-09 350/week @ 2024-07-16 228/week @ 2024-07-23 270/week @ 2024-07-30 193/week @ 2024-08-06 134/week @ 2024-08-13 175/week @ 2024-08-20 329/week @ 2024-08-27 124/week @ 2024-09-03 360/week @ 2024-09-10 244/week @ 2024-09-17 240/week @ 2024-09-24 195/week @ 2024-10-01 136/week @ 2024-10-08 113/week @ 2024-10-15

702 downloads per month
Used in 79 crates (5 directly)

CC0 license

650KB
13K SLoC

C 7.5K SLoC // 0.1% comments Rust 4.5K SLoC // 0.1% comments GNU Style Assembly 748 SLoC // 0.1% comments Java 438 SLoC // 0.3% comments M4 224 SLoC // 0.3% comments Automake 182 SLoC Shell 2 SLoC

Contains (obscure autoconf code, 25KB) depend/secp256k1-zkp/configure.ac

Build Status

rust-secp256k1

rust-secp256k1 is a wrapper around libsecp256k1, a C library by Peter Wuille for producing ECDSA signatures using the SECG curve secp256k1. This library

  • exposes type-safe Rust bindings for all libsecp256k1 functions
  • implements key generation
  • implements deterministic nonce generation via RFC6979
  • implements many unit tests, adding to those already present in libsecp256k1
  • makes no allocations (except in unit tests) for efficiency and use in freestanding implementations

Full documentation


lib.rs:

Secp256k1

Rust bindings for Pieter Wuille's secp256k1 library, which is used for fast and accurate manipulation of ECDSA signatures on the secp256k1 curve. Such signatures are used extensively by the Bitcoin network and its derivatives.

Dependencies

~1.2–2.4MB
~50K SLoC