p3_commit

Trait Pcs

Source
pub trait Pcs<Challenge, Challenger>
where Challenge: ExtensionField<Val<Self::Domain>>,
{ type Domain: PolynomialSpace; type Commitment: Clone + Serialize + DeserializeOwned; type ProverData; type Proof: Clone + Serialize + DeserializeOwned; type Error: Debug; // Required methods fn natural_domain_for_degree(&self, degree: usize) -> Self::Domain; fn commit( &self, evaluations: Vec<(Self::Domain, RowMajorMatrix<Val<Self::Domain>>)>, ) -> (Self::Commitment, Self::ProverData); fn get_evaluations_on_domain<'a>( &self, prover_data: &'a Self::ProverData, idx: usize, domain: Self::Domain, ) -> impl Matrix<Val<Self::Domain>> + 'a; fn open( &self, rounds: Vec<(&Self::ProverData, Vec<Vec<Challenge>>)>, challenger: &mut Challenger, ) -> (OpenedValues<Challenge>, Self::Proof); fn verify( &self, rounds: Vec<(Self::Commitment, Vec<(Self::Domain, Vec<(Challenge, Vec<Challenge>)>)>)>, proof: &Self::Proof, challenger: &mut Challenger, ) -> Result<(), Self::Error>; }
Expand description

A (not necessarily hiding) polynomial commitment scheme, for committing to (batches of) polynomials

Required Associated Types§

Source

type Domain: PolynomialSpace

Source

type Commitment: Clone + Serialize + DeserializeOwned

The commitment that’s sent to the verifier.

Source

type ProverData

Data that the prover stores for committed polynomials, to help the prover with opening.

Source

type Proof: Clone + Serialize + DeserializeOwned

The opening argument.

Source

type Error: Debug

Required Methods§

Source

fn natural_domain_for_degree(&self, degree: usize) -> Self::Domain

This should return a coset domain (s.t. Domain::next_point returns Some)

Source

fn commit( &self, evaluations: Vec<(Self::Domain, RowMajorMatrix<Val<Self::Domain>>)>, ) -> (Self::Commitment, Self::ProverData)

Source

fn get_evaluations_on_domain<'a>( &self, prover_data: &'a Self::ProverData, idx: usize, domain: Self::Domain, ) -> impl Matrix<Val<Self::Domain>> + 'a

Source

fn open( &self, rounds: Vec<(&Self::ProverData, Vec<Vec<Challenge>>)>, challenger: &mut Challenger, ) -> (OpenedValues<Challenge>, Self::Proof)

Source

fn verify( &self, rounds: Vec<(Self::Commitment, Vec<(Self::Domain, Vec<(Challenge, Vec<Challenge>)>)>)>, proof: &Self::Proof, challenger: &mut Challenger, ) -> Result<(), Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§