Skip to main content

pedersen_commit

Function pedersen_commit 

Source
pub fn pedersen_commit(x: i64, r: u64, params: &PedersenParams) -> Commitment
Expand description

Compute the Pedersen commitment g^x * h^r mod p.

The secret value x is taken modulo (p-1) to handle negative values.