Table of Contents
This is a command-line application demonstrating the mathematical working of non-interactive ZK Proofs of discrete log problem. Also called the Schnorr signature scheme.
Download and install Java 8 SE Development Kit (or higher).
- Download the repository or clone it using the bash command:
git clone https://github.com/ausaf007/zk-proof-demo.git - Navigate to
zk-proof-demo/src/:cd /path/to/repo/zk-proof-demo/src/ - Compile all .java programs:
javac zkp_demo/*.java - Signing step: This step is performed by Peggy, who is the prover. Generate public/private key pair, and sign with a message.
- Run Peggy class:
java zkp_demo.Peggy- Generate public/private key pair:
generate --pkp- Sign the message:
sign TYPE_ANY_MESSAGE- Quit from Peggy class:
quit - Proving step: Verify the Schnorr signature provided by Peggy. This step is performed by Victor, who is the verifier.
- Run Victor class:
java zkp_demo.Victor- Verify the message:
verify- Quit from Victor class:
quit - Thank you for using this application!
Code released under MIT License.