Skip to content
/ nolook Public

A simulation of interactive and non-interactive zero knowledge proofs for password authentication.

License

Notifications You must be signed in to change notification settings

xshthkr/nolook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOLOOK

A simulation of interactive and non-interactive zero knowledge proof protocols (Schnorr's Protocol and Flat-Shamir heuristic) for password authentication.

Features

  • Interactive and Non-interactive ZKP modes
  • Rejection of invalid/tampered proofs
  • Domain separation in hashing (zkp|) to avoid collisions
  • Reads from /dev/urandom for secure randomness

Installation and Usage

Clone the repository and build the project.

git clone https://github.com/xshthkr/nolook.git
cd nolook
make

The binary will be in the bin directory.

./bin/nolook

Caution

There is a suspected bug where an overflow causes the verification to yield invalid. Will be fixing that soon.

Technical Details

Interactive ZKP (Schnorr's Protocol)

  1. Commitment: Alice picks random r, sends t = g^r mod p to Bob
  2. Challenge: Bob replies with random c
  3. Response: Alice computes s = (r - c·x) mod q and sends it
  4. Verification: Bob checks g^s ?= t·y^c mod p

Non-Interactive ZKP (Fiat-Shamir Heuristic)

There is no Bob interacting with Alice. Challenge c is derived via:

  c = Hash("zkp|" + g "|" + y + "|" + t) % q;

The rest of the protocl remains the same.

Requirements

  • Linux (uses /dev/urandom)
  • OpenSSL (libssl-dev or openssl headers) for SHA256
  • C99 or later
  • 64-bit system (uses uint64_t)

References

About

A simulation of interactive and non-interactive zero knowledge proofs for password authentication.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published