This is a modular Rust implementation of the Schnorr Sigma Protocol using the Fiat-Shamir heuristic.
Prover proves knowledge of x
such that y = g^x mod p
without revealing x
.
- Prover computes
a = g^r mod p
- Prover derives challenge
c = H(a)
- Prover computes response
z = r + c * x
- Verifier checks if
g^z == a * y^c
cargo run
You should see output like:
Verification: true
or
Verification: false