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>
Source§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 duplicate 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§fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
Returns
Self from a byte array in little-endian order.Source§fn from_bytes_le_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_le_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
Same behavior as
Self::from_bytes_le but avoids costly checks.
This shall only be called when deserializing from a trusted source, such as local storage. Read moreSource§fn read_le_unchecked<R>(reader: R) -> Result<Self, Error>
fn read_le_unchecked<R>(reader: R) -> Result<Self, Error>
Same behavior as
Self::read_le but avoids costly checks.
This shall only be called when deserializing from a trusted source, such as local storage. Read moreSource§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§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> Freeze for KZGRandomness<E>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more