Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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)