Crate docs

This commit is contained in:
Jack Grigg
2019-09-24 10:54:15 +01:00
parent 7f3036d2c8
commit 4ad3988e43
38 changed files with 259 additions and 18 deletions

View File

@@ -1,3 +1,5 @@
//! Implementations of the Zcash circuits and Zcash-specific gadgets.
pub mod ecc;
pub mod pedersen_hash;

View File

@@ -1,3 +1,5 @@
//! Gadgets implementing Jubjub elliptic curve operations.
use ff::Field;
use pairing::Engine;

View File

@@ -1,3 +1,5 @@
//! Gadget for Zcash's Pedersen hash.
use super::ecc::{EdwardsPoint, MontgomeryPoint};
use bellman::gadgets::boolean::Boolean;
use bellman::gadgets::lookup::*;

View File

@@ -1,3 +1,5 @@
//! The Sapling circuits.
use ff::{Field, PrimeField, PrimeFieldRepr};
use bellman::{Circuit, ConstraintSystem, SynthesisError};

View File

@@ -1,3 +1,15 @@
//! The "hybrid Sprout" circuit.
//!
//! "Hybrid Sprout" refers to the implementation of the [Sprout statement] in
//! `bellman` for [`groth16`], instead of the [original implementation][oldimpl]
//! using [`libsnark`] for [BCTV14].
//!
//! [Sprout statement]: https://zips.z.cash/protocol/protocol.pdf#joinsplitstatement
//! [`groth16`]: bellman::groth16
//! [oldimpl]: https://github.com/zcash/zcash/tree/v2.0.7/src/zcash/circuit
//! [`libsnark`]: https://github.com/scipr-lab/libsnark
//! [BCTV14]: https://eprint.iacr.org/2013/879
use bellman::gadgets::boolean::{AllocatedBit, Boolean};
use bellman::gadgets::multipack::pack_into_inputs;
use bellman::{Circuit, ConstraintSystem, LinearCombination, SynthesisError};

View File

@@ -1,3 +1,8 @@
//! *Zcash circuits and proofs.*
//!
//! `zcash_proofs` contains the zk-SNARK circuits used by Zcash, and the APIs for creating
//! and verifying proofs.
// Catch documentation errors caused by code changes.
#![deny(intra_doc_link_resolution_failure)]

View File

@@ -1,3 +1,5 @@
//! Helpers for creating Sapling proofs.
use pairing::bls12_381::Bls12;
use zcash_primitives::jubjub::{
edwards, fs::FsRepr, FixedGenerators, JubjubBls12, JubjubParams, Unknown,