pub fn verify(
commitment: &PedersenCommitment,
value: u64,
opening: &PedersenOpening,
) -> boolExpand description
Verify a Pedersen commitment.
§Arguments
commitment- The commitment to verifyvalue- The claimed valueopening- The opening information
§Returns
true if the commitment is valid, false otherwise.
§Example
use chie_crypto::pedersen::{commit, verify};
let (commitment, opening) = commit(1024);
assert!(verify(&commitment, 1024, &opening));
assert!(!verify(&commitment, 2048, &opening));