Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 985 Bytes

README.md

File metadata and controls

20 lines (13 loc) · 985 Bytes

garbled-circuits

A toy multi-party computation (MPC) implementation using Yao’s Garbled Circuits and RSA-based 1-2 Oblivious Transfer in TypeScript.

Boolean circuits are synthesised from Verilog using Yosys as per the Zellic blog post linked below.

The included example solves the ‘millionaire problem’ whereby two parties (Alice and Bob) want to know who is the richer of the two without revealing their own wealth to the other party. It takes 2 32-bit numbers as input (A_0...A_31 and B_0...B_31) and returns a single-bit A_IS_GREATER as the output.

Usage

$ yarn build
$ yarn start ./verilog/millionaire/out.v

Resources followed