Multi-Party Computation Language is a high-level programming language that implements secure two-party computation with Garbled Circuit Protocol. The Go programming language highly inspires the MCPL. Therefore, it is easy to use existing Go functions and programs in MPCL with minor modifications. However, the goal is not to make MPCL fully compatible with Go.
Secure multi-party computation has two parties: garbler and
evaluator. Both parties run the garbled
application with
appropritate arguments:
-e
-e
option is not
specified, the peer runs in the garbler mode.-i
-i
option multiple times, or by
separating input values with comma.For example, this is how you can run Yao’s Millionaires’ Problem. The evaluator is started with input 800000:
$ apps/garbled/garbled -e -i 800000 apps/garbled/examples/millionaire.mpcl - In1: a{1,0}i64:int64 + In2: b{1,0}i64:int64 - Out: %_{0,1}b1:bool1 - In: [800000] Listening for connections at :8080
The garbler is started with input 750000:
$ apps/garbled/garbled -i 750000 apps/garbled/examples/millionaire.mpcl + In1: a{1,0}i64:int64 - In2: b{1,0}i64:int64 - Out: %_{0,1}b1:bool1 - In: [75000] Result[0]: false
Both garbler and evaluator return the result false
since garbler’s
input is smaller than evaluator’s input.
The garbled application takes the following command line arguments:
-O
-circ
-cpuprofile
-d
-dot
-e
-format
-circ
output file. Possible
values are: mpclc
(default), bristol
.-i
-memprofile
-ssa
-stream
-svg
-v
Copyright © 2024 Markku Rossi