pub struct KateZaveruchaGoldberg<F: IsPrimeField, P: IsPairing> { /* private fields */ }Implementations§
Source§impl<F: IsPrimeField, P: IsPairing> KateZaveruchaGoldberg<F, P>
impl<F: IsPrimeField, P: IsPairing> KateZaveruchaGoldberg<F, P>
pub fn new(srs: StructuredReferenceString<P::G1Point, P::G2Point>) -> Self
Trait Implementations§
Source§impl<F: Clone + IsPrimeField, P: Clone + IsPairing> Clone for KateZaveruchaGoldberg<F, P>
impl<F: Clone + IsPrimeField, P: Clone + IsPairing> Clone for KateZaveruchaGoldberg<F, P>
Source§fn clone(&self) -> KateZaveruchaGoldberg<F, P>
fn clone(&self) -> KateZaveruchaGoldberg<F, P>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<const N: usize, F: IsPrimeField<RepresentativeType = UnsignedInteger<N>>, P: IsPairing> IsCommitmentScheme<F> for KateZaveruchaGoldberg<F, P>
impl<const N: usize, F: IsPrimeField<RepresentativeType = UnsignedInteger<N>>, P: IsPairing> IsCommitmentScheme<F> for KateZaveruchaGoldberg<F, P>
Source§fn commit(&self, p: &Polynomial<FieldElement<F>>) -> Self::Commitment
fn commit(&self, p: &Polynomial<FieldElement<F>>) -> Self::Commitment
Given a polynomial and an SRS, creates a commitment to p(x), which corresponds to a G1 point The commitment is p(s) g1, evaluated as \sum_i c_i srs.powers_main_group[i], where c_i are the coefficients of the polynomial.
Source§fn open(
&self,
x: &FieldElement<F>,
y: &FieldElement<F>,
p: &Polynomial<FieldElement<F>>,
) -> Self::Commitment
fn open( &self, x: &FieldElement<F>, y: &FieldElement<F>, p: &Polynomial<FieldElement<F>>, ) -> Self::Commitment
Creates an evaluation proof for the polynomial p at x equal to y. This is a commitment to the quotient polynomial q(t) = (p(t) - y)/(t - x) The commitment is simply q(s) g1, corresponding to a G1 point
Source§fn verify(
&self,
x: &FieldElement<F>,
y: &FieldElement<F>,
p_commitment: &Self::Commitment,
proof: &Self::Commitment,
) -> bool
fn verify( &self, x: &FieldElement<F>, y: &FieldElement<F>, p_commitment: &Self::Commitment, proof: &Self::Commitment, ) -> bool
Verifies the correct evaluation of a polynomial p by providing a commitment to p, the point x, the evaluation y (p(x) = y) and an evaluation proof (commitment to the quotient polynomial) Basically, we want to show that, at secret point s, p(s) - y = (s - x) q(s) It uses pairings to verify the above condition, e(cm(p) - yg1,g2)*(cm(q), sg2 - xg2)^-1 Returns true for valid evaluation
Source§fn open_batch(
&self,
x: &FieldElement<F>,
ys: &[FieldElement<F>],
polynomials: &[Polynomial<FieldElement<F>>],
upsilon: &FieldElement<F>,
) -> Self::Commitment
fn open_batch( &self, x: &FieldElement<F>, ys: &[FieldElement<F>], polynomials: &[Polynomial<FieldElement<F>>], upsilon: &FieldElement<F>, ) -> Self::Commitment
Creates an evaluation proof for several polynomials at a single point x. upsilon is used to perform the random linear combination, using Horner’s evaluation form
Source§fn verify_batch(
&self,
x: &FieldElement<F>,
ys: &[FieldElement<F>],
p_commitments: &[Self::Commitment],
proof: &Self::Commitment,
upsilon: &FieldElement<F>,
) -> bool
fn verify_batch( &self, x: &FieldElement<F>, ys: &[FieldElement<F>], p_commitments: &[Self::Commitment], proof: &Self::Commitment, upsilon: &FieldElement<F>, ) -> bool
Verifies an evaluation proof for the evaluation of a batch of polynomials at x, using upsilon to perform the random linear combination Outputs true if the evaluation is correct