[−][src]Trait tari_crypto::range_proof::RangeProofService
Associated Types
Loading content...Required methods
fn construct_proof(
&self,
key: &Self::K,
value: u64
) -> Result<Self::P, RangeProofError>
&self,
key: &Self::K,
value: u64
) -> Result<Self::P, RangeProofError>
Construct a new range proof for the given secret key and value. The resulting proof will be sufficient evidence that the prover knows the secret key and value, and that the value lies in the range determined by the service.
fn verify(
&self,
proof: &Self::P,
commitment: &HomomorphicCommitment<Self::PK>
) -> bool
&self,
proof: &Self::P,
commitment: &HomomorphicCommitment<Self::PK>
) -> bool
Verify the range proof against the given commitment. If this function returns true, it attests to the commitment having a value in the range [0; 2^64-1] and that the prover knew both the value and private key.
Implementors
impl RangeProofService for DalekRangeProofService
[src]
type K = RistrettoSecretKey
type P = Vec<u8>
type PK = RistrettoPublicKey
fn construct_proof(
&self,
key: &RistrettoSecretKey,
value: u64
) -> Result<Vec<u8>, RangeProofError>
[src]
&self,
key: &RistrettoSecretKey,
value: u64
) -> Result<Vec<u8>, RangeProofError>