ZoKrates ➞ Bulletproofs

ZkInterface is a standard for interoperability of zero-knowledge frameworks.

In this demonstration, we connect the ZoKrates compiler to the Dalek Bulletproofs proving system.

All tools run on this page as WebAssembly modules, and communicate through ZkInterface. Check out the code of this demo to get started with your own zero-knowledge application.

The modules compile and run independently.

The application moves ZkInterface messages between modules.

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);
```

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);
```

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.

A computation in the ZoKrates language.

```
_
```

A private witness is used to generate a proof.

```
_
```

The program is compiled into a common R1CS form.

```
_
```

The proof is checked based on public inputs.

```
_
```