MP-SPDZ使用体验

项目地址:data61/MP-SPDZ: Versatile framework for multi-party computation (github.com)

安装

1)在ubuntu环境中,安装依赖包。

1
apt-get install automake build-essential git libboost-dev libboost-thread-dev libntl-dev libsodium-dev libssl-dev libtool m4 python3 texinfo yasm

2)使用git下载项目源码,注意不是二进制的release文件。

3)在项目目录中,编译代码。

1
make -j 8 tldr

4)试用并执行 the tutorial 教程,他是一个双方的、对恶意安全的教程。

1
2
3
4
5
6
7
8
9
10
11
12
13
➜  MP-SPDZ git:(master) ./compile.py tutorial
Default bit length: 64
Default security parameter: 40
Compiling file /home/zhuang/Downloads/MP-SPDZ/Programs/Source/tutorial.mpc
WARNING: Order of memory instructions not preserved, errors possible
Writing to /home/zhuang/Downloads/MP-SPDZ/Programs/Schedules/tutorial.sch
Writing to /home/zhuang/Downloads/MP-SPDZ/Programs/Bytecode/tutorial-0.bc
Program requires:
4 integer inputs from player 0
4 integer inputs from player 1
5420 integer bits
2474 integer triples
238 virtual machine rounds