Struct secp256k1_zkp::SurjectionProof [−][src]
pub struct SurjectionProof { /* fields omitted */ }
Represents a surjection proof.
Implementations
impl SurjectionProof
[src]
pub fn new<C: Signing, R: Rng>(
secp: &Secp256k1<C>,
rng: &mut R,
codomain_tag: Tag,
codomain_blinding_factor: SecretKey,
domain: &[(Generator, Tag, SecretKey)]
) -> Result<SurjectionProof, Error>
[src]
secp: &Secp256k1<C>,
rng: &mut R,
codomain_tag: Tag,
codomain_blinding_factor: SecretKey,
domain: &[(Generator, Tag, SecretKey)]
) -> Result<SurjectionProof, Error>
Prove that a given tag - when blinded - is contained within another set of blinded tags.
Mathematically, we are proving that there exists a surjective mapping between the domain and codomain of tags.
Blinding a tag produces a Generator
. As such, to create this proof we need to provide the [Generator]
s and the respective blinding factors that were used to create them.
impl SurjectionProof
[src]
pub fn from_slice(bytes: &[u8]) -> Result<Self, Error>
[src]
Creates a surjection proof from a slice of bytes.
pub fn serialize(&self) -> Vec<u8>ⓘ
[src]
Serializes a surjection proof.
The format of this serialization is stable and platform-independent.
#[must_use]pub fn verify<C: Verification>(
&self,
secp: &Secp256k1<C>,
codomain: Generator,
domain: &[Generator]
) -> bool
[src]
#[must_use]
pub fn verify<C: Verification>(&self,
secp: &Secp256k1<C>,
codomain: Generator,
domain: &[Generator]
) -> bool
Verify a surjection proof.
Trait Implementations
impl Debug for SurjectionProof
[src]
impl PartialEq<SurjectionProof> for SurjectionProof
[src]
fn eq(&self, other: &SurjectionProof) -> bool
[src]
fn ne(&self, other: &SurjectionProof) -> bool
[src]
impl StructuralPartialEq for SurjectionProof
[src]
Auto Trait Implementations
impl RefUnwindSafe for SurjectionProof
impl Send for SurjectionProof
impl Sync for SurjectionProof
impl Unpin for SurjectionProof
impl UnwindSafe for SurjectionProof
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,