Gabes: Garbled Circuits in Python¶
Introduction¶
Garbled Circuits allow two distrusting parties to compute a joint function while keeping their inputs private. More precisely, it allows Alice with input x and Bob with input y to compute a function f(x, y) without Alice ever knowing y and without Bob knowing x. The way it does so is by first translating f to a boolean circuit from which it will cleverly obfuscate or garble the circuit to allow the computation of f while keeping the inputs private.
The classical example is that of two millionaires who wish to find out who is richer without revealing their wealth. In that case, f becomes the “>” (greater than) function, and x and y are their wealth.
Gabes implements garbled circuits in Python. The application runs as a command line interface but the functions required to run garbled circuits can be used without the command line (see gabes).
Installation¶
At the command line either via pip:
$ pip install gabes
Or, if you have virtualenvwrapper installed:
$ mkvirtualenv gabes
$ pip install gabes
Usage¶
Each party will run their own instance of the program on their computer as a CLI app. The garbler will provide the IP and port number to establish the connection with the evaluator.
Note
Make sure to open the port when connecting between two different networks.
Garbler’s Side:
gabes -g -grr3 -c Desktop/my-circuit.circuit -a localhost:5000
Evaluator’s Side:
gabes -e -grr3 -a localhost:5000
Flags¶
Documentation¶
All the documentation can be found in https://gabes.readthedocs.io/en/latest/
Interface¶
Details of functions and classes are given in this section.
Feedback¶
If you have any suggestions or questions about gabes feel free to email me at nachonavarroasv@gmail.com.
If you encounter any errors or problems with gabes, please let me know! Open an Issue at the GitHub http://github.com/nachonavarro/gabes main repository.