Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.24 KB

README.md

File metadata and controls

44 lines (29 loc) · 1.24 KB

Bonsai x FHE

A small demo of running a homomorphic multiplication (using BFV) with Bonsai.

The FHE library and the example are here and here. The Risc0 zkVM template that was used to start this project is described here.

For this repo a fork of the FHE library is used which uses a compatible Rust version for the zkVM.

Quick Start

Init and update submodule:

git submodule init
git submodule update

To build all methods and execute the method within the zkVM, run the following command:

cargo run

To run in developer mode, without generating valid proofs (much faster):

RISC0_DEV_MODE=1 cargo run

Running proofs remotely on Bonsai

If you have access to the URL and API key to Bonsai you can run your proofs remotely. To prove in Bonsai mode, invoke cargo run with two additional environment variables:

BONSAI_API_KEY="YOUR_API_KEY" BONSAI_API_URL="BONSAI_URL" cargo run

Resources