Skip to content

Modulo-P/miller-first-study

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZK-SNARK proof verification in Plutus

A Plutus implementation of the Groth16 ZKP-verification algorithm.

Implemented and tested a zk-SNARK using a basic implementation of Miller's algorithm and the toy elliptic curve BLS6_6.

Testing instructions

We assume that you have cloned Plutus-Apps and have Nix installed and configured with the proper substituters. At the Plutus-Apps directory, execute

git checkout v1.0.0
nix-shell

After allowing enough time for the nix-shell to start, execute

cabal repl

The REPL should open in module Test_BLS6_6.

ZK-proof verification using the BLS6_6 elliptic curve

Inside the REPL, execute:

testValidator1

Files

Directory src/BLS6_6 provides:

  • Params_BLS6_6 : global parameters associated with elliptic curve BLS6_6.
  • ZKPPVerification_BLS6_6 : identical to ZKPVerification.hs except that imports BLS6_6 parameters.
  • Test_BLS6_6 : allows convenient testing of the validator in the REPL.

Notes

  • Elliptic curve BLS6_6 is described in detail in [1].

  • Datum in file Test_BLS6_6.hs was obtained from the ZK-SNARK setup and proof associated with the 3-factorization problem as explained in [1].

Reference

[1] The MoonMath Manual to zk-SNARKs .

About

Basic implementation of Miller's algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published