You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+32-15
Original file line number
Diff line number
Diff line change
@@ -70,39 +70,54 @@ By default, if available, the libsnark backend will be used. In this case, the f
70
70
*`pysnark_vk`: key material to verify proofs for this computation
71
71
*`pysnark_log`: computation log that can be verified with the `pysnark_vk` key: number of inputs/outputs, followed by the inputs/outputs themselves, followed by a proof that the input/outputs were correctly computed
72
72
73
+
PySNARK with libsnark can use the more recent Groth16 proof system instead of traditional Pinocchio proofs by using the libsnarkgg backend:
74
+
75
+
```
76
+
cd examples
77
+
rm pysnark_*
78
+
PYSNARK_BACKEND=libsnarkgg python3 cube.py 3
79
+
```
73
80
74
81
### Combining with snarkjs
75
82
76
-
PySNARK with the libsnark backend can automatically produce snarkjs `public.json`, `proof.json` and `verification_key.json` files for the performed verifiable computation:
83
+
**Note: this feature has been recently updated, please use the latest Git version**
84
+
85
+
PySNARK with the libsnarkgg backend can automatically produce snarkjs `public.json`, `proof.json` and `verification_key.json` files for the performed verifiable computation:
**Note: this feature has been recently updated, please use the latest Git version**
102
+
103
+
PySNARK can be used in combination with snarkjs as a drop-in replacement of programming circuits using circom. PySNARK generates the `circuit.r1cs` file corresponding to the computation constraints and the `witness.wtns` file containing the values for the current computation:
104
+
94
105
```
95
-
$ cd examples
96
106
$ PYSNARK_BACKEND=snarkjs python3 cube.py 33
97
107
The cube of 33 is 35937
98
-
witness.json and circuit.json written; use 'snarkjs setup', 'snarkjs proof', and 'snarkjs verify'
99
-
$ snarkjs setup
100
-
$ snarkjs proof
101
-
$ snarkjs verify
102
-
OK
103
-
$ snarkjs generateverifier
104
-
$ snarkjs generatecall
108
+
snarkjs witness.wtns and circuit.r1cs written; see readme
0 commit comments