Struct snarkvm_algorithms::polycommit::kzg10::KZGCommitment
source · pub struct KZGCommitment<E: PairingEngine>(pub E::G1Affine);
Expand description
KZGCommitment
commits to a polynomial. It is output by KZG10::commit
.
Tuple Fields§
§0: E::G1Affine
The commitment is a group element.
Implementations§
source§impl<E: PairingEngine> KZGCommitment<E>
impl<E: PairingEngine> KZGCommitment<E>
pub fn empty() -> Self
pub fn has_degree_bound(&self) -> bool
pub fn is_in_correct_subgroup_assuming_on_curve(&self) -> bool
Trait Implementations§
source§impl<E: PairingEngine> CanonicalDeserialize for KZGCommitment<E>
impl<E: PairingEngine> CanonicalDeserialize for KZGCommitment<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,
source§impl<E: PairingEngine> CanonicalSerialize for KZGCommitment<E>
impl<E: PairingEngine> CanonicalSerialize for KZGCommitment<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
source§impl<E: Clone + PairingEngine> Clone for KZGCommitment<E>where
E::G1Affine: Clone,
impl<E: Clone + PairingEngine> Clone for KZGCommitment<E>where
E::G1Affine: Clone,
source§fn clone(&self) -> KZGCommitment<E>
fn clone(&self) -> KZGCommitment<E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<E: Debug + PairingEngine> Debug for KZGCommitment<E>where
E::G1Affine: Debug,
impl<E: Debug + PairingEngine> Debug for KZGCommitment<E>where
E::G1Affine: Debug,
source§impl<E: Default + PairingEngine> Default for KZGCommitment<E>where
E::G1Affine: Default,
impl<E: Default + PairingEngine> Default for KZGCommitment<E>where
E::G1Affine: Default,
source§fn default() -> KZGCommitment<E>
fn default() -> KZGCommitment<E>
Returns the “default value” for a type. Read more
source§impl<E: PairingEngine> FromBytes for KZGCommitment<E>
impl<E: PairingEngine> FromBytes for KZGCommitment<E>
source§impl<E: Hash + PairingEngine> Hash for KZGCommitment<E>where
E::G1Affine: Hash,
impl<E: Hash + PairingEngine> Hash for KZGCommitment<E>where
E::G1Affine: Hash,
source§impl<E: PartialEq + PairingEngine> PartialEq<KZGCommitment<E>> for KZGCommitment<E>where
E::G1Affine: PartialEq,
impl<E: PartialEq + PairingEngine> PartialEq<KZGCommitment<E>> for KZGCommitment<E>where
E::G1Affine: PartialEq,
source§fn eq(&self, other: &KZGCommitment<E>) -> bool
fn eq(&self, other: &KZGCommitment<E>) -> bool
source§impl<E: PairingEngine> ToBytes for KZGCommitment<E>
impl<E: PairingEngine> ToBytes for KZGCommitment<E>
source§impl<E: PairingEngine> ToConstraintField<<E as PairingEngine>::Fq> for KZGCommitment<E>
impl<E: PairingEngine> ToConstraintField<<E as PairingEngine>::Fq> for KZGCommitment<E>
fn to_field_elements(&self) -> Result<Vec<E::Fq>, ConstraintFieldError>
source§impl<E: PairingEngine> ToMinimalBits for KZGCommitment<E>
impl<E: PairingEngine> ToMinimalBits for KZGCommitment<E>
source§impl<E: PairingEngine> Valid for KZGCommitment<E>
impl<E: PairingEngine> Valid for KZGCommitment<E>
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
batch: impl Iterator<Item = &'a Self> + Send
) -> Result<(), SerializationError>where
Self: 'a,
impl<E: Copy + PairingEngine> Copy for KZGCommitment<E>where
E::G1Affine: Copy,
impl<E: Eq + PairingEngine> Eq for KZGCommitment<E>where
E::G1Affine: Eq,
impl<E: PairingEngine> StructuralEq for KZGCommitment<E>
impl<E: PairingEngine> StructuralPartialEq for KZGCommitment<E>
Auto Trait Implementations§
impl<E> RefUnwindSafe for KZGCommitment<E>where
<E as PairingEngine>::G1Affine: RefUnwindSafe,
impl<E> Send for KZGCommitment<E>
impl<E> Sync for KZGCommitment<E>
impl<E> Unpin for KZGCommitment<E>where
<E as PairingEngine>::G1Affine: Unpin,
impl<E> UnwindSafe for KZGCommitment<E>where
<E as PairingEngine>::G1Affine: UnwindSafe,
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.