pub struct CommitterKeyStream<E, SG>where
    E: Pairing,
    SG: Iterable,
    SG::Item: Borrow<E::G1Affine>,{
    pub powers_of_g: SG,
    pub powers_of_g2: Vec<E::G2Affine>,
}
Expand description

The streaming SRS for the polynomial commitment scheme consists of a stream of consecutive powers of g. It also implements functions for setup, commit and open.

Fields§

§powers_of_g: SG

Stream of G1 elements.

§powers_of_g2: Vec<E::G2Affine>

Two G2 elements needed for the committer.

Implementations§

source§

impl<E, SG> CommitterKeyStream<E, SG>where E: Pairing, SG: Iterable, SG::Item: Borrow<E::G1Affine>,

source

pub fn as_committer_key(&self, max_degree: usize) -> CommitterKey<E>

Turn a streaming SRS into a normal SRS.

source

pub fn open<SF>( &self, polynomial: &SF, alpha: &E::ScalarField, max_msm_buffer: usize ) -> (E::ScalarField, EvaluationProof<E>)where SF: Iterable, SF::Item: Borrow<E::ScalarField>,

Evaluate a single polynomial at the point alpha, and provide an evaluation proof along with the evaluation.

source

pub fn open_multi_points<SF>( &self, polynomial: &SF, points: &[E::ScalarField], max_msm_buffer: usize ) -> (Vec<E::ScalarField>, EvaluationProof<E>)where SF: Iterable, SF::Item: Borrow<E::ScalarField>,

Evaluate a single polynomial at a set of points points, and provide an evaluation proof along with evaluations.

source

pub fn commit<SF>(&self, polynomial: &SF) -> Commitment<E>where SF: Iterable + ?Sized, SF::Item: Borrow<E::ScalarField>,

The commitment procedures, that takes as input a committer key and the streaming coefficients of polynomial, and produces the desired commitment.

source

pub fn batch_commit<'a, F>( &self, polynomials: &[&'a dyn Iterable<Item = F, Iter = &mut dyn Iterator<Item = F>>] ) -> Vec<Commitment<E>>where F: Borrow<E::ScalarField>,

The batch commitment procedures, that takes as input a committer key and the streaming coefficients of a list of polynomials, and produces the desired commitments.

source

pub fn commit_folding<SF>( &self, polynomials: &FoldedPolynomialTree<'_, E::ScalarField, SF>, max_msm_buffer: usize ) -> Vec<Commitment<E>>where SF: Iterable, SF::Item: Borrow<E::ScalarField>,

The commitment procedures for our tensor check protocol. The algorithm takes advantage of the tree structure of folding polynomials in our protocol. Please refer to our paper for more details. The function takes as input a committer key and the tree structure of all the folding polynomials, and produces the desired commitment for each polynomial.

source

pub fn open_folding<'a, SF>( &self, polynomials: FoldedPolynomialTree<'a, E::ScalarField, SF>, points: &[E::ScalarField], etas: &[E::ScalarField], max_msm_buffer: usize ) -> (Vec<Vec<E::ScalarField>>, EvaluationProof<E>)where SG: Iterable, SF: Iterable, E: Pairing, SG::Item: Borrow<E::G1Affine>, SF::Item: Borrow<E::ScalarField> + Copy,

The commitment procedures for our tensor check protocol. The algorithm takes advantage of the tree structure of folding polynomials in our protocol. Please refer to our paper for more details. The function evaluates all the folding polynomials at a set of evaluation points points and produces a single batched evaluation proof. eta is the random challenge for batching folding polynomials.

Trait Implementations§

source§

impl<E, SG> Clone for CommitterKeyStream<E, SG>where E: Pairing + Clone, SG: Iterable + Clone, SG::Item: Borrow<E::G1Affine>, E::G2Affine: Clone,

source§

fn clone(&self) -> CommitterKeyStream<E, SG>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a, E: Pairing> From<&'a CommitterKey<E>> for CommitterKeyStream<E, Reverse<&'a [E::G1Affine]>>

source§

fn from(ck: &'a CommitterKey<E>) -> Self

Converts to this type from the input type.
source§

impl<E, SG> From<&CommitterKeyStream<E, SG>> for VerifierKey<E>where E: Pairing, SG: Iterable, SG::Item: Borrow<E::G1Affine>,

source§

fn from(ck: &CommitterKeyStream<E, SG>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<E, SG> RefUnwindSafe for CommitterKeyStream<E, SG>where SG: RefUnwindSafe, <E as Pairing>::G2Affine: RefUnwindSafe,

§

impl<E, SG> Send for CommitterKeyStream<E, SG>

§

impl<E, SG> Sync for CommitterKeyStream<E, SG>

§

impl<E, SG> Unpin for CommitterKeyStream<E, SG>where SG: Unpin, <E as Pairing>::G2Affine: Unpin,

§

impl<E, SG> UnwindSafe for CommitterKeyStream<E, SG>where SG: UnwindSafe, <E as Pairing>::G2Affine: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V