Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -112,15 +112,30 @@ 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.
```bash
zokrates compile --light -i sig.zok
```

Perform the setup phase.
```bash
zokrates setup --light
```

After compiling this file we can now pass our input arguments into witness generation:
Pass our input arguments into witness generation:

`cat zokrates_inputs.txt | ./zokrates compute-witness`
```bash
cat zokrates_inputs.txt | ./zokrates compute-witness --light --stdin
```

Prove and Verify
```bash
zokrates generate-proof
zokrates verify
```

## CLI Usage

Expand Down