You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spartan is a high-speed zero-knowledge proof system, a cryptographic primitive that enables a prover to prove a mathematical statement to a verifier without revealing anything besides the validity of the statement. This repository provides `libspartan,` a Rust library that implements a zero-knowledge succinct non-interactive argument of knowledge (zkSNARK), which is a type of zero-knowledge proof system with short proofs and fast verification times. The details of the Spartan proof system are described in our [paper](https://eprint.iacr.org/2019/550) published at [CRYPTO 2020](https://crypto.iacr.org/2020/). The security of the Spartan variant implemented in this library is based on the discrete logarithm problem in the random oracle model.
7
7
@@ -27,6 +27,11 @@ Among transparent SNARKs, Spartan offers the fastest prover with speedups of 36
27
27
`libspartan` uses [`merlin`](https://docs.rs/merlin/) to automate the Fiat-Shamir transform. We also introduce a new type called `RandomTape` that extends a `Transcript` in `merlin` to allow the prover's internal methods to produce private randomness using its private transcript without having to create `OsRng` objects throughout the code. An object of type `RandomTape` is initialized with a new random seed from `OsRng` for each proof produced by the library.
28
28
29
29
## Examples
30
+
To import `libspartan` into your Rust project, add the following dependency to `Cargo.toml`:
31
+
```text
32
+
spartan = "0.2.1"
33
+
```
34
+
30
35
The following example shows how to use `libspartan` to create and verify a SNARK proof.
31
36
Some of our public APIs' style is inspired by the underlying crates we use.
32
37
@@ -60,6 +65,7 @@ Some of our public APIs' style is inspired by the underlying crates we use.
0 commit comments