Skip to main content

verify_range_proof

Function verify_range_proof 

Source
pub fn verify_range_proof(
    proof: &RangeProofBits,
    lo: u64,
    hi: u64,
    params: &PedersenParams,
) -> bool
Expand description

Verify a bit-decomposition range proof.

For each bit proof checks: g^s * pub^c ≡ R (mod p) where pub is either 1 (bit=0) or g (bit=1). We verify against both possibilities and accept if either passes — this is the toy “OR proof” approximation.