binius_core::poly_commit

Trait PolyCommitScheme

source
pub trait PolyCommitScheme<P, FE>{
    type Commitment: Clone;
    type Committed;
    type Proof;
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn n_vars(&self) -> usize;
    fn commit<Data>(
        &self,
        polys: &[MultilinearExtension<P, Data>],
    ) -> Result<(Self::Commitment, Self::Committed), Self::Error>
       where Data: Deref<Target = [P]> + Send + Sync;
    fn prove_evaluation<Data, Transcript, Backend>(
        &self,
        transcript: &mut Transcript,
        committed: &Self::Committed,
        polys: &[MultilinearExtension<P, Data>],
        query: &[FE],
        backend: &Backend,
    ) -> Result<Self::Proof, Self::Error>
       where Data: Deref<Target = [P]> + Send + Sync,
             Transcript: CanObserve<FE> + CanObserve<Self::Commitment> + CanSample<FE> + CanSampleBits<usize> + CanWrite,
             Backend: ComputationBackend;
    fn verify_evaluation<Transcript, Backend>(
        &self,
        transcript: &mut Transcript,
        commitment: &Self::Commitment,
        query: &[FE],
        proof: Self::Proof,
        values: &[FE],
        backend: &Backend,
    ) -> Result<(), Self::Error>
       where Transcript: CanObserve<FE> + CanObserve<Self::Commitment> + CanSample<FE> + CanSampleBits<usize> + CanRead,
             Backend: ComputationBackend;
    fn proof_size(&self, n_polys: usize) -> usize;
}

Required Associated Types§

Required Methods§

source

fn n_vars(&self) -> usize

source

fn commit<Data>( &self, polys: &[MultilinearExtension<P, Data>], ) -> Result<(Self::Commitment, Self::Committed), Self::Error>
where Data: Deref<Target = [P]> + Send + Sync,

Commit to a batch of polynomials

source

fn prove_evaluation<Data, Transcript, Backend>( &self, transcript: &mut Transcript, committed: &Self::Committed, polys: &[MultilinearExtension<P, Data>], query: &[FE], backend: &Backend, ) -> Result<Self::Proof, Self::Error>
where Data: Deref<Target = [P]> + Send + Sync, Transcript: CanObserve<FE> + CanObserve<Self::Commitment> + CanSample<FE> + CanSampleBits<usize> + CanWrite, Backend: ComputationBackend,

Generate an evaluation proof at a random challenge point.

source

fn verify_evaluation<Transcript, Backend>( &self, transcript: &mut Transcript, commitment: &Self::Commitment, query: &[FE], proof: Self::Proof, values: &[FE], backend: &Backend, ) -> Result<(), Self::Error>
where Transcript: CanObserve<FE> + CanObserve<Self::Commitment> + CanSample<FE> + CanSampleBits<usize> + CanRead, Backend: ComputationBackend,

Verify an evaluation proof at a random challenge point.

source

fn proof_size(&self, n_polys: usize) -> usize

Return the byte-size of a proof.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<F, FDomain, FE, P, PE, DomainFactory, Inner> PolyCommitScheme<P, FE> for RingSwitchPCS<F, FDomain, PE, DomainFactory, Inner>
where F: TowerField, FDomain: Field, FE: ExtensionField<F> + ExtensionField<FDomain> + PackedField<Scalar = FE> + PackedExtension<F> + TowerField, P: PackedField<Scalar = F>, PE: PackedFieldIndexable<Scalar = FE> + PackedExtension<F, PackedSubfield = P> + PackedExtension<FDomain>, DomainFactory: EvaluationDomainFactory<FDomain>, Inner: PolyCommitScheme<PE, FE>,

source§

type Commitment = <Inner as PolyCommitScheme<PE, FE>>::Commitment

source§

type Committed = <Inner as PolyCommitScheme<PE, FE>>::Committed

source§

type Proof = Proof<F, FE, <Inner as PolyCommitScheme<PE, FE>>::Proof>

source§

type Error = Error

source§

impl<F, FDomain, FEncode, FExt, P, PE, DomainFactory, MerkleProver, VCS> PolyCommitScheme<P, FExt> for FRIPCS<F, FDomain, FEncode, PE, DomainFactory, MerkleProver, VCS>
where F: TowerField, FDomain: Field, FEncode: BinaryField, FExt: TowerField + PackedField<Scalar = FExt> + ExtensionField<F> + ExtensionField<FDomain> + ExtensionField<FEncode> + PackedExtension<F> + PackedExtension<FEncode>, P: PackedField<Scalar = F>, PE: PackedFieldIndexable<Scalar = FExt> + PackedExtension<F, PackedSubfield = P> + PackedExtension<FDomain> + PackedExtension<FEncode>, DomainFactory: EvaluationDomainFactory<FDomain>, MerkleProver: MerkleTreeProver<FExt, Scheme = VCS> + Sync, VCS: MerkleTreeScheme<FExt, Digest: Clone + Debug, Proof: Clone + Debug>,

source§

type Commitment = <VCS as MerkleTreeScheme<FExt>>::Digest

source§

type Committed = (Vec<PE>, <MerkleProver as MerkleTreeProver<FExt>>::Committed)

source§

type Proof = Proof<FExt, VCS>

source§

type Error = Error

source§

impl<F, FE, P, Inner> PolyCommitScheme<P, FE> for BatchPCS<P, FE, Inner>
where F: Field, P: PackedField<Scalar = F>, FE: ExtensionField<F> + TowerField, Inner: PolyCommitScheme<P, FE>,