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, CH, Backend>(
&self,
challenger: &mut CH,
committed: &Self::Committed,
polys: &[MultilinearExtension<P, Data>],
query: &[FE],
backend: Backend,
) -> Result<Self::Proof, Self::Error>
where Data: Deref<Target = [P]> + Send + Sync,
CH: CanObserve<FE> + CanObserve<Self::Commitment> + CanSample<FE> + CanSampleBits<usize>,
Backend: ComputationBackend;
fn verify_evaluation<CH, Backend>(
&self,
challenger: &mut CH,
commitment: &Self::Commitment,
query: &[FE],
proof: Self::Proof,
values: &[FE],
backend: Backend,
) -> Result<(), Self::Error>
where CH: CanObserve<FE> + CanObserve<Self::Commitment> + CanSample<FE> + CanSampleBits<usize>,
Backend: ComputationBackend;
fn proof_size(&self, n_polys: usize) -> usize;
}
Required Associated Types§
type Commitment: Clone
type Committed
type Proof
type Error: Error + Send + Sync + 'static
Required Methods§
fn n_vars(&self) -> usize
sourcefn commit<Data>(
&self,
polys: &[MultilinearExtension<P, Data>],
) -> Result<(Self::Commitment, Self::Committed), Self::Error>
fn commit<Data>( &self, polys: &[MultilinearExtension<P, Data>], ) -> Result<(Self::Commitment, Self::Committed), Self::Error>
Commit to a batch of polynomials
sourcefn prove_evaluation<Data, CH, Backend>(
&self,
challenger: &mut CH,
committed: &Self::Committed,
polys: &[MultilinearExtension<P, Data>],
query: &[FE],
backend: Backend,
) -> Result<Self::Proof, Self::Error>where
Data: Deref<Target = [P]> + Send + Sync,
CH: CanObserve<FE> + CanObserve<Self::Commitment> + CanSample<FE> + CanSampleBits<usize>,
Backend: ComputationBackend,
fn prove_evaluation<Data, CH, Backend>(
&self,
challenger: &mut CH,
committed: &Self::Committed,
polys: &[MultilinearExtension<P, Data>],
query: &[FE],
backend: Backend,
) -> Result<Self::Proof, Self::Error>where
Data: Deref<Target = [P]> + Send + Sync,
CH: CanObserve<FE> + CanObserve<Self::Commitment> + CanSample<FE> + CanSampleBits<usize>,
Backend: ComputationBackend,
Generate an evaluation proof at a random challenge point.
sourcefn verify_evaluation<CH, Backend>(
&self,
challenger: &mut CH,
commitment: &Self::Commitment,
query: &[FE],
proof: Self::Proof,
values: &[FE],
backend: Backend,
) -> Result<(), Self::Error>where
CH: CanObserve<FE> + CanObserve<Self::Commitment> + CanSample<FE> + CanSampleBits<usize>,
Backend: ComputationBackend,
fn verify_evaluation<CH, Backend>(
&self,
challenger: &mut CH,
commitment: &Self::Commitment,
query: &[FE],
proof: Self::Proof,
values: &[FE],
backend: Backend,
) -> Result<(), Self::Error>where
CH: CanObserve<FE> + CanObserve<Self::Commitment> + CanSample<FE> + CanSampleBits<usize>,
Backend: ComputationBackend,
Verify an evaluation proof at a random challenge point.
sourcefn proof_size(&self, n_polys: usize) -> usize
fn proof_size(&self, n_polys: usize) -> usize
Return the byte-size of a proof.
Object Safety§
This trait is not object safe.