diff --git a/demo/index.html b/demo/index.html index fd3ff42..b5de20e 100644 --- a/demo/index.html +++ b/demo/index.html @@ -34,7 +34,7 @@ -
+

ZkInterface:
ZoKrates ➞ Bulletproofs

@@ -64,6 +64,74 @@

ZkInterface:
ZoKrates ➞ Bull

+
+
+

WebAssembly Modules

+

+ The modules compile and run independently.
+ The application moves ZkInterface messages between modules. +

+
+
+ +
+
+
+

ZoKrates.wasm

+

+ The frontend module generates the constraints, prover's witnesses, and verifier's inputs, + and store them in ZkInterface messages. +

+
+

+      let constraints = zkif_zokrates.make_constraint_system(code);
+      
+      let {prover_msg, verifier_msg} = zkif_zokrates.make_witness(code, x, y);
+    
+
+ +
+ +
+
+

Bulletproofs.wasm

+

+ The proving system reads the ZkInterface messages to generate proofs. +
  +

+
+

+      let proof = zkif_bulletproofs.prove(constraints, prover_msg);
+      
+      let valid = zkif_bulletproofs.verify(constraints, verifier_msg, proof);
+    
+
+
+ + +
+ +
+
+

ZkInterface messages

+

+ There are three types of messages: +

+

    +
  • Circuit: describes the input variables of the circuit.
  • +
  • R1CSConstraints: describes the constraints between variables.
  • +
  • Witness: contains values to assign to variables.
  • +
+

+ See the + interface definition + and the + paper + for details. +

+
+
+
@@ -131,51 +199,8 @@

Verifier's View

-
- -
-
-

WebAssembly Modules

-

- The modules compile and run independently.
- The application moves ZkInterface messages between modules. -

-
-
- -
-
-
-

ZoKrates.wasm

-

- The frontend module generates the constraints, prover's witnesses, and verifier's inputs, - and store them in ZkInterface messages. -

-
-

-let constraints = zkif_zokrates.make_constraint_system(code);
-
-let {prover_msg, verifier_msg} = zkif_zokrates.make_witness(code, x, y);
-    
-
- -
- -
-
-

Bulletproofs.wasm

-

- The proving system reads the ZkInterface messages to generate proofs. -
  -

-
-

-let proof = zkif_bulletproofs.prove(constraints, prover_msg);
-
-let valid = zkif_bulletproofs.verify(constraints, verifier_msg, proof);
-    
-
-
+ +