[][src]Struct bulletproofs::r1cs::prover::ProverCS

pub struct ProverCS<'a, 'b> {
    transcript: &'a mut Transcript,
    bp_gens: &'b BulletproofGens,
    pc_gens: &'b PedersenGens,
    constraints: Vec<LinearCombination>,
    a_L: Vec<Scalar>,
    a_R: Vec<Scalar>,
    a_O: Vec<Scalar>,
    v: Vec<Scalar>,
    v_blinding: Vec<Scalar>,
}

A ConstraintSystem implementation for use by the prover.

Fields

transcript: &'a mut Transcriptbp_gens: &'b BulletproofGenspc_gens: &'b PedersenGensconstraints: Vec<LinearCombination>

The constraints accumulated so far.

a_L: Vec<Scalar>

Stores assignments to the "left" of multiplication gates

a_R: Vec<Scalar>

Stores assignments to the "right" of multiplication gates

a_O: Vec<Scalar>

Stores assignments to the "output" of multiplication gates

v: Vec<Scalar>

High-level witness data (value openings to V commitments)

v_blinding: Vec<Scalar>

High-level witness data (blinding openings to V commitments)

Methods

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

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

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

Output

Returns a tuple of

(wL, wR, wO, wV)

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

fn eval(&self, lc: &LinearCombination) -> Scalar[src]

pub fn prove(self) -> Result<R1CSProof, R1CSError>[src]

Consume this ConstraintSystem to produce a proof.

Trait Implementations

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

impl<'a, 'b> Drop for ProverCS<'a, 'b>[src]

Overwrite secrets with null bytes when they go out of scope.

Auto Trait Implementations

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

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

Blanket Implementations

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

impl<T> From for T[src]

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

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
[src]

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

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
[src]

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

impl<T> Same for T

type Output = T

Should always be Self