Struct ark_poly_commit::streaming_kzg::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>,
impl<E, SG> CommitterKeyStream<E, SG>where E: Pairing, SG: Iterable, SG::Item: Borrow<E::G1Affine>,
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>)where
SF: Iterable,
SF::Item: Borrow<E::ScalarField>,
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.
sourcepub 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>,
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.
sourcepub fn commit<SF>(&self, polynomial: &SF) -> Commitment<E>where
SF: Iterable + ?Sized,
SF::Item: Borrow<E::ScalarField>,
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.
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>>where
SF: Iterable,
SF::Item: Borrow<E::ScalarField>,
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.
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>)where
SG: Iterable,
SF: Iterable,
E: Pairing,
SG::Item: Borrow<E::G1Affine>,
SF::Item: Borrow<E::ScalarField> + Copy,
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,
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>
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 more