zkp: a toolkit for Schnorr proofs

define_proof! {
vrf_proof, // Name of the module for generated implementation
"VRF", // Label for the proof statement
(x), // Secret variables
(A, G, H), // Public variables unique to each proof
(B) : // Public variables common between proofs
A = (x * B), // Statements to prove
G = (x * H)
}
  • a specification of an “anonymous credential presentation with 10 hidden attributes” proof from CMZ’13. Thanks to the choice of group, as well as the backend optimization work I did, the generated implementation performs verification between 20 to 40 times faster than the benchmark numbers reported in that paper.
  • A transcript-based signature and VRF construction with an auto-generated implementation. This includes an example of using the online interactive composition described in the Merlin blog post to provide chained signatures between two counterparties.
  • An example of using the lower-level constraint system API manually.

Using the API

To experiment with the API, add the crates to Cargo.toml:

[dependencies]
curve25519-dalek = "1"
zkp = "0.6"
#[macro_use]
extern crate zkp;
extern crate curve25519_dalek;

What’s next

I’m hoping to streamline the API a little bit and release 1.0 soon. If this toolkit seems like it would be useful to you, please try out the API and leave comments on the issue tracker!

--

--

interested in zero-knowledge, privacy, freedom, mathematics, & the number 24

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Henry de Valence

Henry de Valence

483 Followers

interested in zero-knowledge, privacy, freedom, mathematics, & the number 24