From cbdee7c1ee459b259d55d6ad61dbb21da02d369f Mon Sep 17 00:00:00 2001 From: Tejaswi Nadahalli Date: Thu, 15 Apr 2021 15:54:41 +0200 Subject: [PATCH 1/2] Update readme.me With some additional commands and a missing command line parameter. --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index dc9411a..8721944 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ python demo.py which should create a file called `zokrates_inputs.txt`. -We can now create a small ZoKrates DSL file which wraps the existing `verifyEddsa` function in the standard library. +We can now create a small ZoKrates DSL (sig.zok) file which wraps the existing `verifyEddsa` function in the standard library. ``` from "ecc/babyjubjubParams" import BabyJubJubParams @@ -112,15 +112,22 @@ import "ecc/babyjubjubParams.code" as context def main(private field[2] R, private field S, field[2] A, u32[8] M0, u32[8] M1) -> (bool): BabyJubJubParams context = context() - - bool isVerified = verifyEddsa(R, S, A, M0, M1, context) - + bool isVerified = verifyEddsa(R, S, A, M0, M1, context) return isVerified ```` +Compile the DSL. +`zokrates compile --light -i sig.zok` + +Perform the setup phase. +`zokrates setup --light` + +Pass our input arguments into witness generation: -After compiling this file we can now pass our input arguments into witness generation: +`cat zokrates_inputs.txt | ./zokrates compute-witness --light --stdin` -`cat zokrates_inputs.txt | ./zokrates compute-witness` +Prove and Verify +`zokrates generate-proof` +`zokrates verify` ## CLI Usage From 6d9f6939ae01a3e3f081ed44a9b16e793ab5b06a Mon Sep 17 00:00:00 2001 From: Tejaswi Nadahalli Date: Thu, 15 Apr 2021 16:07:28 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8721944..1e92b4c 100644 --- a/README.md +++ b/README.md @@ -116,18 +116,26 @@ def main(private field[2] R, private field S, field[2] A, u32[8] M0, u32[8] M1) return isVerified ```` Compile the DSL. -`zokrates compile --light -i sig.zok` +```bash +zokrates compile --light -i sig.zok +``` Perform the setup phase. -`zokrates setup --light` +```bash +zokrates setup --light +``` Pass our input arguments into witness generation: -`cat zokrates_inputs.txt | ./zokrates compute-witness --light --stdin` +```bash +cat zokrates_inputs.txt | ./zokrates compute-witness --light --stdin +``` Prove and Verify -`zokrates generate-proof` -`zokrates verify` +```bash +zokrates generate-proof +zokrates verify +``` ## CLI Usage