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

Object Safety§

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§