pub struct HidingVerifier {
pub samples: usize,
}Expand description
Verifier for the hiding property of commitments.
Fields§
§samples: usizeNumber of commitment samples per value.
Implementations§
Source§impl HidingVerifier
impl HidingVerifier
Sourcepub fn test_unique_commitments(
&self,
params: &PedersenParams,
value: u64,
) -> bool
pub fn test_unique_commitments( &self, params: &PedersenParams, value: u64, ) -> bool
Test that commitments to the same value produce different outputs.
This confirms that randomness is being used properly.
Sourcepub fn test_indistinguishability(
&self,
params: &PedersenParams,
value_a: u64,
value_b: u64,
) -> bool
pub fn test_indistinguishability( &self, params: &PedersenParams, value_a: u64, value_b: u64, ) -> bool
Test that commitments to different values are indistinguishable.
Verifies that the commitment set for value A overlaps with the commitment set for value B at most minimally (statistical check).
Trait Implementations§
Source§impl Clone for HidingVerifier
impl Clone for HidingVerifier
Source§fn clone(&self) -> HidingVerifier
fn clone(&self) -> HidingVerifier
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HidingVerifier
impl RefUnwindSafe for HidingVerifier
impl Send for HidingVerifier
impl Sync for HidingVerifier
impl Unpin for HidingVerifier
impl UnsafeUnpin for HidingVerifier
impl UnwindSafe for HidingVerifier
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