Skip to content

A demo implementation of groth16 using SnarkJs for prover and bellman for verification

Notifications You must be signed in to change notification settings

hypersign-protocol/snarkjs-bellman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

A demo implementation of groth16 using SnarkJs (by Iden3) for generating proof and Bellman (by zkcrypto) for verification. Our goal was to have rust based implementation for verification so that it can be deployed on blockchains which uses rust based smart contracts like Cosomwasam, Solana etc.

Steps to Run

  1. Clone the repository
  2. Run the following commands
cd prover
npm i
cd ..
sh run.sh
cd prover
npm start

You will get PublicSignals on console screen. Copy them for later use.

Now

cd verifier
cd src

Modify main.rs file

    let public_input: Vec<Scalar> = vec![Scalar::from(30)];

TO

    let public_input: Vec<Scalar> = vec![Scalar::from(30), Scalar::from(${PublicSignals `Copied Earlier`})];

Now

cargo run 

About

A demo implementation of groth16 using SnarkJs for prover and bellman for verification

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published