Trait PCCommitmentState

Source
pub trait PCCommitmentState:
    Clone
    + CanonicalSerialize
    + CanonicalDeserialize {
    type Randomness: Clone + CanonicalSerialize + CanonicalDeserialize;

    // Required methods
    fn empty() -> Self;
    fn rand<R: RngCore>(
        num_queries: usize,
        has_degree_bound: bool,
        num_vars: Option<usize>,
        rng: &mut R,
    ) -> Self::Randomness;
}
Expand description

Defines the minimal interface of commitment state for any polynomial commitment scheme. It might be randomness etc.

Required Associated Types§

Source

type Randomness: Clone + CanonicalSerialize + CanonicalDeserialize

This is the type of Randomness that the rand method returns

Required Methods§

Source

fn empty() -> Self

Outputs empty randomness that does not hide the commitment.

Source

fn rand<R: RngCore>( num_queries: usize, has_degree_bound: bool, num_vars: Option<usize>, rng: &mut R, ) -> Self::Randomness

Samples randomness for commitments; num_queries specifies the number of queries that the commitment will be opened at. has_degree_bound indicates that the corresponding commitment has an enforced num_vars specifies the number of variables for multivariate commitment. strict degree bound.

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§

Source§

impl<E, P> PCCommitmentState for ark_poly_commit::marlin::marlin_pst13_pc::Randomness<E, P>
where E: Pairing, P: DenseMVPolynomial<E::ScalarField>, P::Point: Index<usize, Output = E::ScalarField>,

Source§

impl<F: PrimeField> PCCommitmentState for HyraxCommitmentState<F>

A vector of scalars, each of which multiplies the distinguished group element in the Pederson commitment key for a different commitment

Source§

impl<F: PrimeField, P: DenseUVPolynomial<F>> PCCommitmentState for ark_poly_commit::kzg10::Randomness<F, P>

Source§

impl<F: PrimeField, P: DenseUVPolynomial<F>> PCCommitmentState for ark_poly_commit::marlin::marlin_pc::Randomness<F, P>

Source§

impl<G: AffineRepr> PCCommitmentState for ark_poly_commit::ipa_pc::Randomness<G>