pub trait IsCommitmentScheme<F: IsField> {
    type Commitment;

    // Required methods
    fn commit(&self, p: &Polynomial<FieldElement<F>>) -> Self::Commitment;
    fn open(
        &self,
        x: &FieldElement<F>,
        y: &FieldElement<F>,
        p: &Polynomial<FieldElement<F>>,
    ) -> Self::Commitment;
    fn open_batch(
        &self,
        x: &FieldElement<F>,
        y: &[FieldElement<F>],
        p: &[Polynomial<FieldElement<F>>],
        upsilon: &FieldElement<F>,
    ) -> Self::Commitment;
    fn verify(
        &self,
        x: &FieldElement<F>,
        y: &FieldElement<F>,
        p_commitment: &Self::Commitment,
        proof: &Self::Commitment,
    ) -> bool;
    fn verify_batch(
        &self,
        x: &FieldElement<F>,
        ys: &[FieldElement<F>],
        p_commitments: &[Self::Commitment],
        proof: &Self::Commitment,
        upsilon: &FieldElement<F>,
    ) -> bool;
}

Required Associated Types§

Required Methods§

source

fn commit(&self, p: &Polynomial<FieldElement<F>>) -> Self::Commitment

source

fn open( &self, x: &FieldElement<F>, y: &FieldElement<F>, p: &Polynomial<FieldElement<F>>, ) -> Self::Commitment

source

fn open_batch( &self, x: &FieldElement<F>, y: &[FieldElement<F>], p: &[Polynomial<FieldElement<F>>], upsilon: &FieldElement<F>, ) -> Self::Commitment

source

fn verify( &self, x: &FieldElement<F>, y: &FieldElement<F>, p_commitment: &Self::Commitment, proof: &Self::Commitment, ) -> bool

source

fn verify_batch( &self, x: &FieldElement<F>, ys: &[FieldElement<F>], p_commitments: &[Self::Commitment], proof: &Self::Commitment, upsilon: &FieldElement<F>, ) -> bool

Implementors§

source§

impl<const N: usize, F: IsPrimeField<RepresentativeType = UnsignedInteger<N>>, P: IsPairing> IsCommitmentScheme<F> for KateZaveruchaGoldberg<F, P>