Trait elements::BlindValueProofs
source · pub trait BlindValueProofs: Sized {
// Required methods
fn blind_value_proof<C: Signing, R: RngCore + CryptoRng>(
rng: &mut R,
secp: &Secp256k1<C>,
explicit_val: u64,
value_commit: PedersenCommitment,
asset_gen: Generator,
vbf: ValueBlindingFactor
) -> Result<Self, Error>;
fn blind_value_proof_verify<C: Verification>(
&self,
secp: &Secp256k1<C>,
explicit_val: u64,
asset_gen: Generator,
value_commit: PedersenCommitment
) -> bool;
}
Expand description
A trait to create and verify explicit rangeproofs
Required Methods§
sourcefn blind_value_proof<C: Signing, R: RngCore + CryptoRng>(
rng: &mut R,
secp: &Secp256k1<C>,
explicit_val: u64,
value_commit: PedersenCommitment,
asset_gen: Generator,
vbf: ValueBlindingFactor
) -> Result<Self, Error>
fn blind_value_proof<C: Signing, R: RngCore + CryptoRng>( rng: &mut R, secp: &Secp256k1<C>, explicit_val: u64, value_commit: PedersenCommitment, asset_gen: Generator, vbf: ValueBlindingFactor ) -> Result<Self, Error>
Outputs a [RangeProof]
that blinded value
corresponfs to unblinded explicit value
sourcefn blind_value_proof_verify<C: Verification>(
&self,
secp: &Secp256k1<C>,
explicit_val: u64,
asset_gen: Generator,
value_commit: PedersenCommitment
) -> bool
fn blind_value_proof_verify<C: Verification>( &self, secp: &Secp256k1<C>, explicit_val: u64, asset_gen: Generator, value_commit: PedersenCommitment ) -> bool
Verify that the Rangeproof proves that commitment is actually bound to the explicit value
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl BlindValueProofs for RangeProof
impl BlindValueProofs for RangeProof
source§fn blind_value_proof<C: Signing, R: RngCore + CryptoRng>(
rng: &mut R,
secp: &Secp256k1<C>,
explicit_val: u64,
value_commit: PedersenCommitment,
asset_gen: Generator,
vbf: ValueBlindingFactor
) -> Result<Self, Error>
fn blind_value_proof<C: Signing, R: RngCore + CryptoRng>( rng: &mut R, secp: &Secp256k1<C>, explicit_val: u64, value_commit: PedersenCommitment, asset_gen: Generator, vbf: ValueBlindingFactor ) -> Result<Self, Error>
Outputs a [RangeProof]
that blinded value_commit
corresponds to explicit value
source§fn blind_value_proof_verify<C: Verification>(
&self,
secp: &Secp256k1<C>,
explicit_val: u64,
asset_gen: Generator,
value_commit: PedersenCommitment
) -> bool
fn blind_value_proof_verify<C: Verification>( &self, secp: &Secp256k1<C>, explicit_val: u64, asset_gen: Generator, value_commit: PedersenCommitment ) -> bool
Verify that the Rangeproof proves that commitment is actually bound to the explicit value