Expand description
Functions for zero-knowledge proof systems.
Functions§
- build_
zk_ proof - Construct a ZK proof for a witness under a given statement.
- dlog_
prove - Prove knowledge of
secretsuch thatgenerator^secret ≡ public (mod p). - dlog_
verify - Verify a Schnorr discrete-log proof.
- modpow
- Fast modular exponentiation:
base^exp mod modulus. - pedersen_
commit - Compute the Pedersen commitment
g^x * h^r mod p. - pedersen_
open - Verify that a commitment opens correctly: check
g^x * h^r ≡ c.value (mod p). - prove_
range - Prove that
lo ≤ x ≤ hiusing bit decomposition. - sigma_
protocol_ properties - Return the three standard properties of the basic (Schnorr) Sigma protocol.
- toy_
params - Toy Pedersen parameters using a small safe prime for testing.
- verify_
range_ proof - Verify a bit-decomposition range proof.
- verify_
zk_ proof - Verify a multi-secret ZK proof given public keys and parameters.