Verifiable and confidential computation based on ZKP and FHE, powered by risc0 zkVM.

Related tags

Command-line zkFHE
Overview

zkFHE

Verifiable and confidential computation based on ZKP and FHE, powered by risc0 zkVM.

A PoC to demonstrate an approach for private computation on a public environment w/o give up data availability (since data can stay encrypted).

FHE provides confidentiality, ZKP provides the proof that the algorithm run following the rules.

How it works

It's based on a tweaked version of Cupcake, a library for the (additive version of) Fan-Vercauteren homomorphic encryption scheme. Tweaked so it can run in the risc0 zkVM (i.e. single thread, custom getrandom).

It runs the following protocol

  1. (Host) Create public and secret key
  2. (Host) Encrypt two numbers with the secret key
  3. (Host) Pass the public key and the two encrypted numbers to the guest vm
  4. (Guest) Fetch the encrypted data and init the FHE framework
  5. (Guest) Perform the (encrypted) sum on the encrypted data using the public key
  6. (Guest) Send back the encrypted sum to the host
  7. (Host) Decrypt the sum with secret key

TL;DR host has the guarantee the guest run the algorithm (ZKP) and that the guest did not access to the unecrypted data (FHE).

How to run

First, install Rust if you don't already have it, then

cargo run --release

If you see 107 (19+88) at the end of the run, it worked.

PS: proof generation takes a lot (2hrs)

You might also like...
git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers.⛰️
git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers.⛰️

git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers. The changelog template can be customized with a configuration file to match the desired format.

UpVent Website (Powered by Rust + Svelte & Fernet Branca).

UpVent Website Source Build Status Description This is the source code for the UpVent's website under upvent.codes. Development occurs on the master b

A syntax highlighter for Node powered by Tree Sitter. Written in Rust.

tree-sitter-highlight A syntax highlighter for Node.js powered by Tree Sitter. Written in Rust. Usage The following will output HTML: const treeSitter

An Intel HAXM powered, protected mode, 32 bit, hypervisor addition calculator, written in Rust.

HyperCalc An Intel HAXM powered, protected mode, 32 bit, hypervisor addition calculator, written in Rust. Purpose None 😏 . Mostly just to learn Rust

Introducing Inlyne, a GPU powered yet browsless tool to help you quickly view markdown files in the blink of an eye.
Introducing Inlyne, a GPU powered yet browsless tool to help you quickly view markdown files in the blink of an eye.

Inlyne - a GPU powered, browserless, markdown + html viewer inlyne README.md --theme dark/light About Markdown files are a wonderful tool to get forma

Starkli (/ˈstɑːrklaɪ/), a ⚡ blazing ⚡ fast ⚡ CLI tool for StarkNet powered by 🦀 starknet-rs 🦀

starkli Starkli (/ˈstɑːrklaɪ/), a ⚡ blazing ⚡ fast ⚡ CLI tool for StarkNet powered by 🦀 starknet-rs 🦀 Installation The package will be published to

ChatGPT powered Rust proc macro that generates code at compile-time.

gpt-macro ChatGPT powered Rust proc macro that generates code at compile-time. Implemented Macros auto_impl!{} #[auto_test(...)] Usage Get ChatGPT API

AI-powered game engine for dynamic, personalized experiences in evolving worlds. Ethical, accessible, inclusive.

ARCADIA: Advanced and Responsive Computational Architecture for Dynamic Interactive Ai: A Whitepaper By Reuven Cohen (rUv) Introduction Imagine a futu

GPT-3 powered CLI tool to help you remember bash commands.

Rusty: GPT-3 Powered CLI Tool Convert natural language into executable commands directly from the terminal! Open source CLI tool powered by OpenAI (br

Owner
Emiliano Bonassi
Emiliano Bonassi
Incremental computation through constrained memoization.

comemo Incremental computation through constrained memoization. [dependencies] comemo = "0.1" A memoized function caches its return values so that it

Typst 37 Dec 15, 2022
High-performance asynchronous computation framework for system simulation

Asynchronix A high-performance asynchronous computation framework for system simulation. What is this? Warning: this page is at the moment mostly addr

Asynchronics 7 Dec 7, 2022
verilot (verifiable lottery) is a command line tool for running and verifying one-time lotteries.

verilot verilot (verifiable lottery) is a command line tool for running and verifying one-time lotteries. Install Install Rust and Cargo with Rustup.

Shelby Doolittle 9 Oct 10, 2022
An implementation of Verifiable Delay Functions in Rust

Verifiable Delay Function (VDF) Implementation in Rust What is a VDF? A Verifiable Delay Function (VDF) is a function that requires substantial time t

null 147 Dec 12, 2022
it aims to augment git with primitives to build integrated, cryptographically verifiable collaboration workflows around source code

it aims to augment git with primitives to build integrated, cryptographically verifiable collaboration workflows around source code. It maintains the distributed property of git, not requiring a central server. it is transport agnostic, and permits data dissemination in client-server, federated, as well as peer-to-peer network topologies.

Kim Altintop 4 Jan 16, 2023
A programming and system administration assistant, powered by chatGPT

TermGPT Interact with ChatGPT from your terminal! ?? ?? Install Cargo cargo install termgpt termgpt --help From source git clone [email protected]:bahdot

Gokul 5 May 11, 2023
Rust-powered CLI tool designed to simplify and streamline the release process with help of ChatGPT

$ releasecraftsman ????‍♂️?? Automate Your Release Process with Precision and Ease. ?? Features Generate well-crafted release notes using GPT-3.5 and

Tornike Gomareli 7 Sep 21, 2023
🛠️ An experimental functional systems programming language, written in Rust and powered by LLVM as a backend.

An experimental functional systems programming language, written in Rust, and powered by LLVM as a backend. ?? Goal: The intent is to create a program

codex 3 Nov 15, 2023
LaTeX support for Typst, powered by Rust and WASM.

MiTeX LaTeX support for Typst, powered by Rust and WASM. MiTeX processes LaTeX code into an abstract syntax tree (AST). Then it transforms the AST int

null 58 Jan 1, 2024
epNFTs, the first partial program-owned NFT Standard powered by Instruction Introspection and Transfer Hooks!

epNFT Standard: A Comprehensive Guide Introduction to epNFTs Welcome to the epNFT-standard repository, where we explore the first program-owned NFT st

epPlex 6 Mar 1, 2024