Skip to content

zk-SNARK (Groth16) based authentication for EVM smart contracts.

Notifications You must be signed in to change notification settings

sudiptab2100/zkSNARK-Auth-JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zkSNARK Authentication

  • Used ZoKrates library to implement zkSNARK based authentication on EVM blockchain
  • Prover can prove to smart contract verifier his knowledge of hash pre-image to authenticate himself

Groth16 Verifier & Proof Generator (ZoKrates.js)

This is a simple example of how to use ZoKrates.js to generate a proof and verify it using the Groth16 verifier (OnChain - Solidity, OffChain).

Installation

npm install

Usage

Generate Prover and Verifier keys & Verifier Smart Contract

npm run setup

Generate Hash Values from password and k

npm run generate-hash

Generate Proof

npm run proof

Verify Proof (OnChain)

npm run verify-onchain

Verify Proof (OffChain)

npm run verify-offchain

Releases

No releases published

Packages

No packages published