BlindAssetProofs

Trait BlindAssetProofs 

Source
pub trait BlindAssetProofs: Sized {
    // Required methods
    fn blind_asset_proof<C: Signing, R: RngCore + CryptoRng>(
        rng: &mut R,
        secp: &Secp256k1<C>,
        asset: AssetId,
        abf: AssetBlindingFactor,
    ) -> Result<Self, Error>;
    fn blind_asset_proof_verify(
        &self,
        secp: &Secp256k1<All>,
        asset: AssetId,
        asset_commit: Generator,
    ) -> bool;
}
Expand description

A trait to create and verify explicit surjection proofs

Required Methods§

Source

fn blind_asset_proof<C: Signing, R: RngCore + CryptoRng>( rng: &mut R, secp: &Secp256k1<C>, asset: AssetId, abf: AssetBlindingFactor, ) -> Result<Self, Error>

Outputs a [SurjectionProof] that blinded asset corresponfs to unblinded explicit asset

Source

fn blind_asset_proof_verify( &self, secp: &Secp256k1<All>, asset: AssetId, asset_commit: Generator, ) -> bool

Verify that the Surjection proves that asset commitment is actually bound to the explicit asset

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl BlindAssetProofs for SurjectionProof

Source§

fn blind_asset_proof<C: Signing, R: RngCore + CryptoRng>( rng: &mut R, secp: &Secp256k1<C>, asset: AssetId, abf: AssetBlindingFactor, ) -> Result<Self, Error>

Source§

fn blind_asset_proof_verify( &self, secp: &Secp256k1<All>, asset: AssetId, asset_commit: Generator, ) -> bool

Implementors§