Crate zcash_proofs

source
Expand description

Zcash circuits and proofs.

zcash_proofs contains the zk-SNARK circuits used by Zcash, and the APIs for creating and verifying proofs.

§Feature flags

  • bundled-prover — Bundles the Sapling proving parameters inside the binary, which will increase its size by around 50 MiB.
  • directories — Enables APIs for determining the default location on the local filesystem for storing the Sprout and Sapling proving parameters.
  • download-params — Enables APIs for downloading the Sprout and Sapling proving parameters to the default location on the local filesystem.
  • local-prover (enabled by default) — Enables APIs for loading the Sapling proving parameters from the default location on the local filesystem.
  • multicore (enabled by default) — Enables multithreading support for creating proofs.
  • expensive-tests — A feature used to isolate tests that are expensive to run. Test-only.

Modules§

  • Implementations of the Zcash circuits and Zcash-specific gadgets.
  • proverlocal-prover or bundled-prover
    Abstractions over the proving system and parameters for ease of use.
  • APIs for creating and verifying Sprout proofs.

Structs§

Constants§

Functions§

  • Returns the default folder that the Zcash proving parameters are located in.
  • download_parametersDeprecateddownload-params
    Download the Zcash Sapling parameters if needed, and store them in the default location. Always checks the sizes and hashes of the files, even if they didn’t need to be downloaded.
  • Download the Zcash Sapling parameters if needed, and store them in the default location. Always checks the sizes and hashes of the files, even if they didn’t need to be downloaded.
  • Download the Zcash Sprout parameters if needed, and store them in the default location. Always checks the size and hash of the file, even if it didn’t need to be downloaded.
  • Load the specified parameters, checking the sizes and hashes of the files.
  • Parse Bls12 keys from bytes as serialized by groth16::Parameters::write.