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§
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, 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 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.
sourcefn 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 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.
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.