Skip to content

tdjsnelling/garbled-circuits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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