pub struct BindingVerifier {
pub attempts: usize,
}Expand description
Verifier for the binding property of commitments.
Fields§
§attempts: usizeNumber of binding attempts.
Implementations§
Source§impl BindingVerifier
impl BindingVerifier
Sourcepub fn test_binding(&self, params: &PedersenParams, value: u64) -> bool
pub fn test_binding(&self, params: &PedersenParams, value: u64) -> bool
Test that Pedersen commitments are binding.
Commits to a value, then attempts self.attempts random openings
and verifies none of them produce the same commitment.
Sourcepub fn test_binding_batch(
&self,
params: &PedersenParams,
values: &[u64],
) -> bool
pub fn test_binding_batch( &self, params: &PedersenParams, values: &[u64], ) -> bool
Verify binding holds for a batch of values.
Trait Implementations§
Source§impl Clone for BindingVerifier
impl Clone for BindingVerifier
Source§fn clone(&self) -> BindingVerifier
fn clone(&self) -> BindingVerifier
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 BindingVerifier
impl RefUnwindSafe for BindingVerifier
impl Send for BindingVerifier
impl Sync for BindingVerifier
impl Unpin for BindingVerifier
impl UnsafeUnpin for BindingVerifier
impl UnwindSafe for BindingVerifier
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