Struct snarkvm_algorithms::polycommit::sonic_pc::CommitterKey
source · pub struct CommitterKey<E: PairingEngine> {
pub powers_of_beta_g: Vec<E::G1Affine>,
pub lagrange_bases_at_beta_g: BTreeMap<usize, Vec<E::G1Affine>>,
pub powers_of_beta_times_gamma_g: Vec<E::G1Affine>,
pub shifted_powers_of_beta_g: Option<Vec<E::G1Affine>>,
pub shifted_powers_of_beta_times_gamma_g: Option<BTreeMap<usize, Vec<E::G1Affine>>>,
pub enforced_degree_bounds: Option<Vec<usize>>,
pub max_degree: usize,
}Expand description
CommitterKey is used to commit to, and create evaluation proofs for, a given polynomial.
Fields
powers_of_beta_g: Vec<E::G1Affine>The key used to commit to polynomials.
lagrange_bases_at_beta_g: BTreeMap<usize, Vec<E::G1Affine>>The key used to commit to polynomials in Lagrange basis.
powers_of_beta_times_gamma_g: Vec<E::G1Affine>The key used to commit to hiding polynomials.
shifted_powers_of_beta_g: Option<Vec<E::G1Affine>>The powers used to commit to shifted polynomials.
This is None if self does not support enforcing any degree bounds.
shifted_powers_of_beta_times_gamma_g: Option<BTreeMap<usize, Vec<E::G1Affine>>>The powers used to commit to shifted hiding polynomials.
This is None if self does not support enforcing any degree bounds.
enforced_degree_bounds: Option<Vec<usize>>The degree bounds that are supported by self.
Sorted in ascending order from smallest bound to largest bound.
This is None if self does not support enforcing any degree bounds.
max_degree: usizeThe maximum degree supported by the UniversalParams from which self was derived
Implementations
sourceimpl<E: PairingEngine> CommitterKey<E>
impl<E: PairingEngine> CommitterKey<E>
sourcepub fn shifted_powers_of_beta_g(
&self,
degree_bound: impl Into<Option<usize>>
) -> Option<Powers<'_, E>>
pub fn shifted_powers_of_beta_g(
&self,
degree_bound: impl Into<Option<usize>>
) -> Option<Powers<'_, E>>
Obtain powers for committing to shifted polynomials.
sourcepub fn lagrange_basis(
&self,
domain: EvaluationDomain<E::Fr>
) -> Option<LagrangeBasis<'_, E>>
pub fn lagrange_basis(
&self,
domain: EvaluationDomain<E::Fr>
) -> Option<LagrangeBasis<'_, E>>
Obtain elements of the SRS in the lagrange basis powers, for use with the underlying KZG10 construction.
sourceimpl<E: PairingEngine> CommitterKey<E>
impl<E: PairingEngine> CommitterKey<E>
pub fn max_degree(&self) -> usize
pub fn supported_degree(&self) -> usize
Trait Implementations
sourceimpl<E: PairingEngine> CanonicalDeserialize for CommitterKey<E>
impl<E: PairingEngine> CanonicalDeserialize for CommitterKey<E>
fn deserialize_with_mode<R: Read>(
reader: R,
compress: Compress,
validate: Validate
) -> Result<Self, SerializationError>
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R
) -> Result<Self, SerializationError>where
R: Read,
sourceimpl<E: PairingEngine> CanonicalSerialize for CommitterKey<E>
impl<E: PairingEngine> CanonicalSerialize for CommitterKey<E>
fn serialize_with_mode<W: Write>(
&self,
writer: W,
compress: Compress
) -> Result<(), SerializationError>
fn serialized_size(&self, compress: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn uncompressed_size(&self) -> usize
sourceimpl<E: Clone + PairingEngine> Clone for CommitterKey<E>where
E::G1Affine: Clone,
E::G1Affine: Clone,
E::G1Affine: Clone,
E::G1Affine: Clone,
E::G1Affine: Clone,
impl<E: Clone + PairingEngine> Clone for CommitterKey<E>where
E::G1Affine: Clone,
E::G1Affine: Clone,
E::G1Affine: Clone,
E::G1Affine: Clone,
E::G1Affine: Clone,
sourcefn clone(&self) -> CommitterKey<E>
fn clone(&self) -> CommitterKey<E>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more