[][src]Struct bulletproofs::r1cs::verifier::VerifierCS

pub struct VerifierCS<'a, 'b> {
    bp_gens: &'b BulletproofGens,
    pc_gens: &'b PedersenGens,
    transcript: &'a mut Transcript,
    constraints: Vec<LinearCombination>,
    num_vars: usize,
    V: Vec<CompressedRistretto>,

A ConstraintSystem implementation for use by the verifier.


bp_gens: &'b BulletproofGenspc_gens: &'b PedersenGenstranscript: &'a mut Transcriptconstraints: Vec<LinearCombination>num_vars: usize

Records the number of low-level variables allocated in the constraint system.

Because the VerifierCS only keeps the constraints themselves, it doesn't record the assignments (they're all Missing), so the num_vars isn't kept implicitly in the variable assignments.

V: Vec<CompressedRistretto>


impl<'a, 'b> VerifierCS<'a, 'b>[src]

fn flattened_constraints(
    &mut self,
    z: &Scalar
) -> (Vec<Scalar>, Vec<Scalar>, Vec<Scalar>, Vec<Scalar>, Scalar)

Use a challenge, z, to flatten the constraints in the constraint system into vectors used for proving and verification.


Returns a tuple of

(wL, wR, wO, wV, wc)

where w{L,R,O} is \( z \cdot z^Q \cdot W_{L,R,O} \).

This has the same logic as ProverCS::flattened_constraints() but also computes the constant terms (which the prover skips because they're not needed to construct the proof).

pub fn verify(self, proof: &R1CSProof) -> Result<(), R1CSError>[src]

Consume this VerifierCS and attempt to verify the supplied proof.

Trait Implementations

impl<'a, 'b> ConstraintSystem for VerifierCS<'a, 'b>[src]

Auto Trait Implementations

impl<'a, 'b> Send for VerifierCS<'a, 'b>

impl<'a, 'b> Sync for VerifierCS<'a, 'b>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> BorrowMut for T where
    T: ?Sized

impl<T> Same for T

type Output = T

Should always be Self