- 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
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).
npm installGenerate Prover and Verifier keys & Verifier Smart Contract
npm run setupGenerate Hash Values from password and k
npm run generate-hashGenerate Proof
npm run proofVerify Proof (OnChain)
npm run verify-onchainVerify Proof (OffChain)
npm run verify-offchain