pub struct CommitterKeyStream<E, SG>{
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>
impl<E, SG> CommitterKeyStream<E, SG>
Sourcepub fn as_committer_key(&self, max_degree: usize) -> CommitterKey<E>
pub fn as_committer_key(&self, max_degree: usize) -> CommitterKey<E>
Turn a streaming SRS into a normal SRS.
Sourcepub fn open<SF>(
&self,
polynomial: &SF,
alpha: &E::ScalarField,
max_msm_buffer: usize,
) -> (E::ScalarField, EvaluationProof<E>)
pub fn open<SF>( &self, polynomial: &SF, alpha: &E::ScalarField, max_msm_buffer: usize, ) -> (E::ScalarField, EvaluationProof<E>)
Evaluate a single polynomial at the point alpha
, and provide an evaluation proof along with the evaluation.
Sourcepub fn open_multi_points<SF>(
&self,
polynomial: &SF,
points: &[E::ScalarField],
max_msm_buffer: usize,
) -> (Vec<E::ScalarField>, EvaluationProof<E>)
pub fn open_multi_points<SF>( &self, polynomial: &SF, points: &[E::ScalarField], max_msm_buffer: usize, ) -> (Vec<E::ScalarField>, EvaluationProof<E>)
Evaluate a single polynomial at a set of points points
, and provide an evaluation proof along with evaluations.
Sourcepub fn commit<SF>(&self, polynomial: &SF) -> Commitment<E>
pub fn commit<SF>(&self, polynomial: &SF) -> Commitment<E>
The commitment procedures, that takes as input a committer key and the streaming coefficients of polynomial, and produces the desired commitment.
Sourcepub 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>,
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.
Sourcepub fn commit_folding<SF>(
&self,
polynomials: &FoldedPolynomialTree<'_, E::ScalarField, SF>,
max_msm_buffer: usize,
) -> Vec<Commitment<E>>
pub fn commit_folding<SF>( &self, polynomials: &FoldedPolynomialTree<'_, E::ScalarField, SF>, max_msm_buffer: usize, ) -> Vec<Commitment<E>>
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.
Sourcepub 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>)
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>)
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>
impl<E, SG> Clone for CommitterKeyStream<E, SG>
Source§fn clone(&self) -> CommitterKeyStream<E, SG>
fn clone(&self) -> CommitterKeyStream<E, SG>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'a, E: Pairing> From<&'a CommitterKey<E>> for CommitterKeyStream<E, Reverse<&'a [E::G1Affine]>>
impl<'a, E: Pairing> From<&'a CommitterKey<E>> for CommitterKeyStream<E, Reverse<&'a [E::G1Affine]>>
Source§fn from(ck: &'a CommitterKey<E>) -> Self
fn from(ck: &'a CommitterKey<E>) -> Self
Source§impl<E, SG> From<&CommitterKeyStream<E, SG>> for VerifierKey<E>
impl<E, SG> From<&CommitterKeyStream<E, SG>> for VerifierKey<E>
Source§fn from(ck: &CommitterKeyStream<E, SG>) -> Self
fn from(ck: &CommitterKeyStream<E, SG>) -> Self
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>
impl<E, SG> UnwindSafe for CommitterKeyStream<E, SG>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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