Crate sunscreen_zkp_backend

Source
Expand description

This crate contains ZKP backends for use with the Sunscreen compiler and runtime.

Modules§

bulletproofs
Types for working with Bulletproofs as the ZKP backend.

Structs§

BigInt
A large integer representing a backend-agnostic field element.
Uint
Stack-allocated big unsigned integer.

Enums§

Error
An error in a ZKP backend.
Operation
An operation in Sunscreen’s intermediate representation programs before JIT compilation.
Proof
An R1CS proof.

Traits§

FieldSpec
Indicates the given type is a field used used in a ZKP backend. E.g. Bulletproofs uses Ristretto Scalar values.
Gadget
In ZKP circuits, it’s often simpler for the prover to provide additional inputs and prove they meet some criteria than to directly compute some quantity. However, something must compute these additional inputs. Rather than delegate this responsibility to the prover’s application, we use Gadgets.
ZkpBackend
The methods needed for a type to serve as a proof system in the Sunscreen ecosystem.
ZkpFrom
See std::convert::From. This trait exists to avoid limitations with foreign trait rules.
ZkpInto
See std::convert::Into. This trait exists to avoid limitations with foreign trait rules.

Functions§

jit_prover
Just in time compile a CompiledZkpProgram into an ExecutableZkpProgram for creating proofs.
jit_verifier
Just in time compile a CompiledZkpProgram into an ExecutableZkpProgram for verifying proofs.

Type Aliases§

CompiledZkpProgram
A ZKP program that has been through frontend compilation, but not yet JIT’d.
ExecutableZkpProgram
A ZKP program that has been JIT’d and is ready for use in a ZKP backend.
Result
See std::result::Result.