Struct snarkvm_algorithms::polycommit::kzg10::KZGRandomness
source · pub struct KZGRandomness<E: PairingEngine> {
pub blinding_polynomial: DensePolynomial<E::Fr>,
}
Expand description
KZGRandomness
hides the polynomial inside a commitment. It is output by KZG10::commit
.
Fields§
§blinding_polynomial: DensePolynomial<E::Fr>
For KZG10, the commitment randomness is a random polynomial.
Implementations§
source§impl<E: PairingEngine> KZGRandomness<E>
impl<E: PairingEngine> KZGRandomness<E>
sourcepub fn is_hiding(&self) -> bool
pub fn is_hiding(&self) -> bool
Does self
provide any hiding properties to the corresponding commitment?
self.is_hiding() == true
only if the underlying polynomial is non-zero.
sourcepub fn calculate_hiding_polynomial_degree(hiding_bound: usize) -> usize
pub fn calculate_hiding_polynomial_degree(hiding_bound: usize) -> usize
What is the degree of the hiding polynomial for a given hiding bound?
Trait Implementations§
source§impl<'a, E: PairingEngine> Add<&'a KZGRandomness<E>> for KZGRandomness<E>
impl<'a, E: PairingEngine> Add<&'a KZGRandomness<E>> for KZGRandomness<E>
source§impl<'a, E: PairingEngine> Add<(<E as PairingEngine>::Fr, &'a KZGRandomness<E>)> for KZGRandomness<E>
impl<'a, E: PairingEngine> Add<(<E as PairingEngine>::Fr, &'a KZGRandomness<E>)> for KZGRandomness<E>
§type Output = KZGRandomness<E>
type Output = KZGRandomness<E>
The resulting type after applying the
+
operator.source§impl<'a, E: PairingEngine> AddAssign<&'a KZGRandomness<E>> for KZGRandomness<E>
impl<'a, E: PairingEngine> AddAssign<&'a KZGRandomness<E>> for KZGRandomness<E>
source§fn add_assign(&mut self, other: &'a Self)
fn add_assign(&mut self, other: &'a Self)
Performs the
+=
operation. Read moresource§impl<'a, E: PairingEngine> AddAssign<(<E as PairingEngine>::Fr, &'a KZGRandomness<E>)> for KZGRandomness<E>
impl<'a, E: PairingEngine> AddAssign<(<E as PairingEngine>::Fr, &'a KZGRandomness<E>)> for KZGRandomness<E>
source§fn add_assign(&mut self, (f, other): (E::Fr, &'a KZGRandomness<E>))
fn add_assign(&mut self, (f, other): (E::Fr, &'a KZGRandomness<E>))
Performs the
+=
operation. Read moresource§impl<E: PairingEngine> CanonicalDeserialize for KZGRandomness<E>
impl<E: PairingEngine> CanonicalDeserialize for KZGRandomness<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 KZGRandomness<E>
impl<E: PairingEngine> CanonicalSerialize for KZGRandomness<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 KZGRandomness<E>
impl<E: Clone + PairingEngine> Clone for KZGRandomness<E>
source§fn clone(&self) -> KZGRandomness<E>
fn clone(&self) -> KZGRandomness<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 KZGRandomness<E>
impl<E: Debug + PairingEngine> Debug for KZGRandomness<E>
source§impl<E: Default + PairingEngine> Default for KZGRandomness<E>
impl<E: Default + PairingEngine> Default for KZGRandomness<E>
source§fn default() -> KZGRandomness<E>
fn default() -> KZGRandomness<E>
Returns the “default value” for a type. Read more
source§impl<E: PairingEngine> FromBytes for KZGRandomness<E>
impl<E: PairingEngine> FromBytes for KZGRandomness<E>
source§impl<E: Hash + PairingEngine> Hash for KZGRandomness<E>
impl<E: Hash + PairingEngine> Hash for KZGRandomness<E>
source§impl<E: PartialEq + PairingEngine> PartialEq for KZGRandomness<E>
impl<E: PartialEq + PairingEngine> PartialEq for KZGRandomness<E>
source§fn eq(&self, other: &KZGRandomness<E>) -> bool
fn eq(&self, other: &KZGRandomness<E>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<E: PairingEngine> ToBytes for KZGRandomness<E>
impl<E: PairingEngine> ToBytes for KZGRandomness<E>
source§impl<E: PairingEngine> Valid for KZGRandomness<E>
impl<E: PairingEngine> Valid for KZGRandomness<E>
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
batch: impl Iterator<Item = &'a Self> + Send
) -> Result<(), SerializationError>where
Self: 'a,
impl<E: Eq + PairingEngine> Eq for KZGRandomness<E>
impl<E: PairingEngine> StructuralPartialEq for KZGRandomness<E>
Auto Trait Implementations§
impl<E> RefUnwindSafe for KZGRandomness<E>
impl<E> Send for KZGRandomness<E>
impl<E> Sync for KZGRandomness<E>
impl<E> Unpin for KZGRandomness<E>
impl<E> UnwindSafe for KZGRandomness<E>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.