Struct snarkvm_wasm::kzg10::Randomness [−][src]
pub struct Randomness<E> where
E: PairingEngine, { pub blinding_polynomial: DensePolynomial<<E as PairingEngine>::Fr>, }
Expand description
Randomness hides the polynomial inside a commitment. It is output by KZG10::commit.
Fields
blinding_polynomial: DensePolynomial<<E as PairingEngine>::Fr>For KZG10, the commitment randomness is a random polynomial.
Implementations
impl<E> Randomness<E> where
E: PairingEngine, [src]
impl<E> Randomness<E> where
E: PairingEngine, [src]pub fn is_hiding(&self) -> bool[src]
pub fn is_hiding(&self) -> bool[src]Does self provide any hiding properties to the corresponding commitment?
self.is_hiding() == true only if the underlying polynomial is non-zero.
pub fn calculate_hiding_polynomial_degree(hiding_bound: usize) -> usize[src]
pub fn calculate_hiding_polynomial_degree(hiding_bound: usize) -> usize[src]What is the degree of the hiding polynomial for a given hiding bound?
Trait Implementations
impl<'a, E> Add<&'a Randomness<E>> for Randomness<E> where
E: PairingEngine, [src]
impl<'a, E> Add<&'a Randomness<E>> for Randomness<E> where
E: PairingEngine, [src]type Output = Randomness<E>
type Output = Randomness<E>The resulting type after applying the + operator.
pub fn add(self, other: &'a Randomness<E>) -> Randomness<E>[src]
pub fn add(self, other: &'a Randomness<E>) -> Randomness<E>[src]Performs the + operation. Read more
impl<'a, E> Add<(<E as PairingEngine>::Fr, &'a Randomness<E>)> for Randomness<E> where
E: PairingEngine, [src]
impl<'a, E> Add<(<E as PairingEngine>::Fr, &'a Randomness<E>)> for Randomness<E> where
E: PairingEngine, [src]type Output = Randomness<E>
type Output = Randomness<E>The resulting type after applying the + operator.
pub fn add(
self,
other: (<E as PairingEngine>::Fr, &'a Randomness<E>)
) -> Randomness<E>[src]
pub fn add(
self,
other: (<E as PairingEngine>::Fr, &'a Randomness<E>)
) -> Randomness<E>[src]Performs the + operation. Read more
impl<'a, E> AddAssign<&'a Randomness<E>> for Randomness<E> where
E: PairingEngine, [src]
impl<'a, E> AddAssign<&'a Randomness<E>> for Randomness<E> where
E: PairingEngine, [src]pub fn add_assign(&mut self, other: &'a Randomness<E>)[src]
pub fn add_assign(&mut self, other: &'a Randomness<E>)[src]Performs the += operation. Read more
impl<'a, E> AddAssign<(<E as PairingEngine>::Fr, &'a Randomness<E>)> for Randomness<E> where
E: PairingEngine, [src]
impl<'a, E> AddAssign<(<E as PairingEngine>::Fr, &'a Randomness<E>)> for Randomness<E> where
E: PairingEngine, [src]pub fn add_assign(&mut self, (<E as PairingEngine>::Fr, &'a Randomness<E>))[src]
pub fn add_assign(&mut self, (<E as PairingEngine>::Fr, &'a Randomness<E>))[src]Performs the += operation. Read more
impl<E> CanonicalDeserialize for Randomness<E> where
E: PairingEngine, [src]
impl<E> CanonicalDeserialize for Randomness<E> where
E: PairingEngine, [src]pub fn deserialize<R>(
reader: &mut R
) -> Result<Randomness<E>, SerializationError> where
R: Read, [src]
pub fn deserialize<R>(
reader: &mut R
) -> Result<Randomness<E>, SerializationError> where
R: Read, [src]Reads Self from reader.
pub fn deserialize_uncompressed<R>(
reader: &mut R
) -> Result<Randomness<E>, SerializationError> where
R: Read, [src]
pub fn deserialize_uncompressed<R>(
reader: &mut R
) -> Result<Randomness<E>, SerializationError> where
R: Read, [src]Reads Self from reader without compression.
impl<E> CanonicalSerialize for Randomness<E> where
E: PairingEngine, [src]
impl<E> CanonicalSerialize for Randomness<E> where
E: PairingEngine, [src]pub fn serialize<W>(&self, writer: &mut W) -> Result<(), SerializationError> where
W: Write, [src]
pub fn serialize<W>(&self, writer: &mut W) -> Result<(), SerializationError> where
W: Write, [src]Serializes self into writer.
pub fn serialized_size(&self) -> usize[src]
pub fn serialize_uncompressed<W>(
&self,
writer: &mut W
) -> Result<(), SerializationError> where
W: Write, [src]
pub fn serialize_uncompressed<W>(
&self,
writer: &mut W
) -> Result<(), SerializationError> where
W: Write, [src]Serializes self into writer without compression.
pub fn uncompressed_size(&self) -> usize[src]
impl<E> Clone for Randomness<E> where
E: PairingEngine, [src]
impl<E> Clone for Randomness<E> where
E: PairingEngine, [src]pub fn clone(&self) -> Randomness<E>[src]
pub fn clone(&self) -> Randomness<E>[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl<E> Debug for Randomness<E> where
E: PairingEngine, [src]
impl<E> Debug for Randomness<E> where
E: PairingEngine, [src]impl<E> Default for Randomness<E> where
E: PairingEngine, [src]
impl<E> Default for Randomness<E> where
E: PairingEngine, [src]pub fn default() -> Randomness<E>[src]
pub fn default() -> Randomness<E>[src]Returns the “default value” for a type. Read more
impl<E> FromBytes for Randomness<E> where
E: PairingEngine, [src]
impl<E> FromBytes for Randomness<E> where
E: PairingEngine, [src]impl<E> Hash for Randomness<E> where
E: PairingEngine, [src]
impl<E> Hash for Randomness<E> where
E: PairingEngine, [src]impl<E> PCRandomness for Randomness<E> where
E: PairingEngine, [src]
impl<E> PCRandomness for Randomness<E> where
E: PairingEngine, [src]pub fn empty() -> Randomness<E>[src]
pub fn empty() -> Randomness<E>[src]Outputs empty randomness that does not hide the commitment.
pub fn rand<R>(hiding_bound: usize, bool, rng: &mut R) -> Randomness<E> where
R: RngCore, [src]
pub fn rand<R>(hiding_bound: usize, bool, rng: &mut R) -> Randomness<E> where
R: RngCore, [src]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
strict degree bound. Read more
impl<E> PartialEq<Randomness<E>> for Randomness<E> where
E: PairingEngine, [src]
impl<E> PartialEq<Randomness<E>> for Randomness<E> where
E: PairingEngine, [src]impl<E> ToBytes for Randomness<E> where
E: PairingEngine, [src]
impl<E> ToBytes for Randomness<E> where
E: PairingEngine, [src]impl<E> Eq for Randomness<E> where
E: PairingEngine, [src]
E: PairingEngine,
Auto Trait Implementations
impl<E> RefUnwindSafe for Randomness<E> where
<E as PairingEngine>::Fr: RefUnwindSafe,
<E as PairingEngine>::Fr: RefUnwindSafe,
impl<E> Send for Randomness<E>
impl<E> Sync for Randomness<E>
impl<E> Unpin for Randomness<E> where
<E as PairingEngine>::Fr: Unpin,
<E as PairingEngine>::Fr: Unpin,
impl<E> UnwindSafe for Randomness<E> where
<E as PairingEngine>::Fr: UnwindSafe,
<E as PairingEngine>::Fr: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]pub fn equivalent(&self, key: &K) -> bool[src]
pub fn equivalent(&self, key: &K) -> bool[src]Compare self to key and return true if they are equal.
impl<T> Pointable for T
impl<T> Pointable for Timpl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
type Output = TShould always be Self
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,