Struct CommitterKeyStream

Source
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> Freeze for CommitterKeyStream<E, SG>
where SG: Freeze,

§

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

§

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 T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V