Contains lower-level tools that allow programmable specification of proof statements.
define_proof macro allows declarative
specification of static proof statements, and expands into code
that uses this lower-level API. This lower-level API can also be
used directly to perform imperative specification of proof
statements, allowing proof statements with runtime parameters
(e.g., an anonymous credential with a variable number of
SchnorrCS trait defines the common constraint system API
used for specifying proof statements; it is implemented by the
Roughly speaking, the tools fit together in the following way:
Statements are defined as generic functions which take a
SchnorrCSimplementation and some variables, and add the proof statements to the constraint system;
To create a proof, construct a
Prover, allocate and assign variables, pass the prover and the variables to the generic statement function, then consume the prover to obtain a proof.
To verify a proof, construct a
Verifier, allocate and assign variables, pass the verifier and the variables to the generic statement function, then consume the verifier to obtain a verification result.
Note that the expansion of the
define_proof macro contains a
internal module with the generated proof statement
function, making it possible to combine generated and hand-crafted
proof statements into the same constraint system.
Implements batch verification of batchable proofs.
Implements proof creation.
Implements proof verification of compact and batchable proofs.
An interface for specifying proof statements, common between provers and verifiers.
This trait defines the wire format for how the constraint system interacts with the proof transcript.