Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/w3f/schnorrkel
Schnorr VRFs and signatures on the Ristretto group
https://github.com/w3f/schnorrkel
Last synced: 2 months ago
JSON representation
Schnorr VRFs and signatures on the Ristretto group
- Host: GitHub
- URL: https://github.com/w3f/schnorrkel
- Owner: w3f
- License: bsd-3-clause
- Created: 2018-11-13T00:52:11.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-14T03:25:58.000Z (9 months ago)
- Last Synced: 2024-04-14T13:09:51.383Z (9 months ago)
- Language: Rust
- Homepage:
- Size: 982 KB
- Stars: 298
- Watchers: 16
- Forks: 89
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cryptography-rust - schnorrkel
- awesome-rust - w3f/schnorrkel - Schnorr VRFs and signatures on the Ristretto group (Libraries / Cryptography)
- awesome-rust-cn - w3f/schnorrkel - 施诺尔VRFs和瑞斯特瑞特集团的签名 (库 Libraries / 密码学 Cryptography)
- best-of-crypto - GitHub - 35% open · ⏱️ 29.04.2024): (Smart Contract Platforms)
- awesome-rust - w3f/schnorrkel - Schnorr VRFs and signatures on the Ristretto group (Libraries / Cryptography)
- fucking-awesome-rust - w3f/schnorrkel - Schnorr VRFs and signatures on the Ristretto group (Libraries / Cryptography)
- fucking-awesome-rust - w3f/schnorrkel - Schnorr VRFs and signatures on the Ristretto group (Libraries / Cryptography)
README
# schnorrkel [![](https://img.shields.io/crates/v/schnorrkel.svg)](https://crates.io/crates/schnorrkel) [![](https://docs.rs/schnorrkel/badge.svg)](https://docs.rs/schnorrkel) [![](https://travis-ci.org/w3f/schnorrkel.svg?branch=master)](https://travis-ci.org/w3f/schnorrkel?branch=master)
Schnorrkel implements Schnorr signature on [Ristretto](https://ristretto.group) compressed Ed25519 points, as well as [related](https://github.com/sipa/bips/blob/bip-taproot/bip-0340.mediawiki) protocols like HDKD, [MuSig](https://eprint.iacr.org/2018/068), and a verifiable random function (VRF).
[Ristretto](https://doc.dalek.rs/curve25519_dalek/ristretto/index.html) implements roughly section 7 of Mike Hamburg's [Decaf](https://eprint.iacr.org/2015/673.pdf) paper to provide the 2-torsion free points of the Ed25519 curve as a prime order group. ([related](https://research.web3.foundation/Polkadot/security/keys/accounts-more))
We employ the [merlin](https://github.com/dalek-cryptography/merlin) strategy of [type specific hashing methods](https://docs.rs/merlin/1.0.3/merlin/struct.Transcript.html) with sound domain separation. These wrap Mike Hamburg's [STROBE128](https://strobe.sourceforge.io) construction for symmetric cryptography, itself based on Keccak.
In practice, all our methods consume either a `merlin::Transcript` which developers create handily by feeding data to context specific builders. We do however also support `&mut merlin::Transcript` like the `merlin` crate prefers. We shall exploit this in future to adapt schnorrkel to better conform with the dalek ecosystem's zero-knowledge proof tooling.
We model the VRF itself on ["Making NSEC5 Practical for DNSSEC"](https://eprint.iacr.org/2017/099.pdf) by Dimitrios Papadopoulos, Duane Wessels, Shumon Huque, Moni Naor, Jan Včelák, Leonid Rezyin, andd Sharon Goldberg. We note the [V(X)EdDSA signature scheme](https://www.signal.org/docs/specifications/xeddsa/#vxeddsa) by Trevor Perrin at is basically identical to the NSEC5 construction. Also, the VRF supports individual signers merging numerous VRF outputs created with the same keypair, which parallels the "DLEQ Proofs" and "Batching the Proofs" sections of ["Privacy Pass - The Math"](https://blog.cloudflare.com/privacy-pass-the-math/#dleqproofs) by Alex Davidson, and ["Privacy Pass: Bypassing Internet Challenges Anonymously"](https://www.petsymposium.org/2018/files/papers/issue3/popets-2018-0026.pdf)
by Alex Davidson, Ian Goldberg, Nick Sullivan, George Tankersley, and Filippo Valsorda.Aside from some naive sequential VRF construction, we currently only support the three-round [MuSig](https://eprint.iacr.org/2018/068) for Schnorr multi-signatures, due to all other Schnorr multi-signatures being somewhat broken. In future, we should develop secure schemes like mBCJ from section 5.1 starting page 21 of https://eprint.iacr.org/2018/417 however mBCJ itself works by proof-of-possession, while a [delinearized](http://crypto.stanford.edu/~dabo/pubs/abstracts/aggsurvey.html) variant sounds more applicable.
There are partial bindings for [C](https://github.com/Warchant/sr25519-crust), [JavaScript](https://github.com/paritytech/schnorrkel-js/), and [Python](https://gitlab.com/kauriid/schnorrpy/) as well.