Trait elements::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§
sourcefn 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<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
sourcefn blind_asset_proof_verify(
&self,
secp: &Secp256k1<All>,
asset: AssetId,
asset_commit: Generator
) -> bool
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.