KateZaveruchaGoldberg

Struct KateZaveruchaGoldberg 

Source
pub struct KateZaveruchaGoldberg<F: IsPrimeField, P: IsPairing> { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl<F: Clone + IsPrimeField, P: Clone + IsPairing> Clone for KateZaveruchaGoldberg<F, P>
where P::G1Point: Clone, P::G2Point: Clone,

Source§

fn clone(&self) -> KateZaveruchaGoldberg<F, P>

Returns a duplicate 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<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

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

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

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

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

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

Source§

type Commitment = <P as IsPairing>::G1Point

Auto Trait Implementations§

§

impl<F, P> Freeze for KateZaveruchaGoldberg<F, P>
where <P as IsPairing>::G2Point: Freeze,

§

impl<F, P> RefUnwindSafe for KateZaveruchaGoldberg<F, P>

§

impl<F, P> Send for KateZaveruchaGoldberg<F, P>
where F: Send, <P as IsPairing>::G2Point: Send, <P as IsPairing>::G1Point: Send,

§

impl<F, P> Sync for KateZaveruchaGoldberg<F, P>
where F: Sync, <P as IsPairing>::G2Point: Sync, <P as IsPairing>::G1Point: Sync,

§

impl<F, P> Unpin for KateZaveruchaGoldberg<F, P>
where F: Unpin, <P as IsPairing>::G2Point: Unpin, <P as IsPairing>::G1Point: Unpin,

§

impl<F, P> UnwindSafe for KateZaveruchaGoldberg<F, P>

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> 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