[][src]Struct zkp::toolbox::verifier::Verifier

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

Used to produce verification results.

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

Then, allocate secret (Verifier::allocate_scalar) variables and allocate and assign public (Verifier::allocate_point) variables, and use those variables to define the proof statements. Note that no assignments to secret variables are assigned, since the verifier doesn't know the secrets.

Finally, use Verifier::verify_compact or Verifier::verify_batchable to consume the verifier and produce a verification result.

Methods

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

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

Construct a verifier for the proof statement with the given proof_label, operating on the given transcript.

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

Allocate a placeholder scalar variable, without an assignment.

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

Attempt to allocate a point variable, or fail verification if the assignment is invalid.

pub fn verify_compact(self, proof: &CompactProof) -> Result<(), ProofError>[src]

Consume the verifier to produce a verification of a CompactProof.

pub fn verify_batchable(self, proof: &BatchableProof) -> Result<(), ProofError>[src]

Consume the verifier to produce a verification of a BatchableProof.

Trait Implementations

impl<'a> SchnorrCS for Verifier<'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 Verifier<'a>

impl<'a> Send for Verifier<'a>

impl<'a> Sync for Verifier<'a>

impl<'a> Unpin for Verifier<'a>

impl<'a> !UnwindSafe for Verifier<'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>,