[][src]Struct zkp::toolbox::prover::Prover

pub struct Prover<'a> { /* fields omitted */ }

Used to create proofs.

To use a Prover, first construct one using Prover::new(), supplying a domain separation label, as well as the transcript to operate on.

Then, allocate and assign secret (Prover::allocate_scalar) and public (Prover::allocate_point) variables, and use those variables to define the proof statements.

Finally, use Prover::prove_compact or Prover::prove_batchable to consume the prover and produce a proof.

Methods

impl<'a> Prover<'a>[src]

pub fn new(proof_label: &'static [u8], transcript: &'a mut Transcript) -> Self[src]

Construct a new prover. The proof_label disambiguates proof statements.

pub fn allocate_scalar(
    &mut self,
    label: &'static [u8],
    assignment: Scalar
) -> ScalarVar
[src]

Allocate and assign a secret variable with the given label.

pub fn allocate_point(
    &mut self,
    label: &'static [u8],
    assignment: RistrettoPoint
) -> (PointVar, CompressedRistretto)
[src]

Allocate and assign a public variable with the given label.

The point is compressed to be appended to the transcript, and the compressed point is returned to allow reusing the result of that computation; it can be safely discarded.

pub fn prove_compact(self) -> CompactProof[src]

Consume this prover to produce a compact proof.

pub fn prove_batchable(self) -> BatchableProof[src]

Consume this prover to produce a batchable proof.

Trait Implementations

impl<'a> SchnorrCS for Prover<'a>[src]

type ScalarVar = ScalarVar

A handle for a scalar variable in the constraint system.

type PointVar = PointVar

A handle for a point variable in the constraint system.

Auto Trait Implementations

impl<'a> RefUnwindSafe for Prover<'a>

impl<'a> Send for Prover<'a>

impl<'a> Sync for Prover<'a>

impl<'a> Unpin for Prover<'a>

impl<'a> !UnwindSafe for Prover<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,