Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ausaf007/zk-proof-demo
Command-line application demonstrating the mathematical working of non-interactive ZK Proofs of discrete log problem. Also called the Schnorr signature scheme.
https://github.com/ausaf007/zk-proof-demo
cryptography java learn non-interactive-zero-knowledge schnorr-signatures zk-proofs
Last synced: about 2 months ago
JSON representation
Command-line application demonstrating the mathematical working of non-interactive ZK Proofs of discrete log problem. Also called the Schnorr signature scheme.
- Host: GitHub
- URL: https://github.com/ausaf007/zk-proof-demo
- Owner: ausaf007
- License: mit
- Created: 2022-06-13T15:48:21.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-08-13T07:22:20.000Z (over 2 years ago)
- Last Synced: 2023-08-06T02:52:51.945Z (over 1 year ago)
- Topics: cryptography, java, learn, non-interactive-zero-knowledge, schnorr-signatures, zk-proofs
- Language: Java
- Homepage:
- Size: 197 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Welcome to Zk-Proof Demo 👋
Understand the mathematical working of Non-Interactive ZK-Proofs.
Table of Contents
## About The Project
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.
## Tech Stack
[![](https://img.shields.io/badge/Built_with-Java-red?style=for-the-badge&logo=Java)](https://www.java.com/)
## Prerequisites
Download and install [Java 8 SE Development Kit](https://www.oracle.com/java/technologies/downloads/#java11) (or higher).
## How To Use?
1. Download the repository or clone it using the bash command:
```
git clone https://github.com/ausaf007/zk-proof-demo.git
```
2. Navigate to `zk-proof-demo/src/`:
```
cd /path/to/repo/zk-proof-demo/src/
```
3. Compile all .java programs:
```
javac zkp_demo/*.java
```
4. **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
```
5. **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
```
6. Thank you for using this application!
## Screenshot
![Preview](./screenshot/running-steps.png)
## License
Code released under [MIT License.](https://github.com/ausaf007/zk-proof-demo/blob/master/LICENSE)