确保自己电脑上已安装Linux系统 如果没有请看准备阶段
一、准备
1、进入控制面板―>程序―>打开启用或者关闭Windows功能


2、进入启用或关闭Windows功能后 勾选 适用于Linux的Windows子系统 点击确定

3、进入设置->更新和安全->开发者选项 并勾选开发人员模式(目的让Windows运行外来的、可能不安全程序)


4 进入Microsoft Store应用商店 下载Ubuntu系统

5、安装后打开会出现创建用户和密码 相当于Windows创建用户
二、配置基础LibOTe
1、首先确保编译器已安装 (OTe是用C++写的)
sudo apt-get install gcc g++ cmake -y
2 、克隆libOTe
git clone --recursive https://github.com/osu-cryto/libOTe.git
3、 下载解压boost
cd libOTe/cryptoTools/thirdparty/linux
wget -c 'https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.bz2' -O ./boost_1_69_0.tar.bz2
tar xfj boost_1_69_0.tar.bz2
mv boost_1_69_0 boost
4、编译链接boost库
cd boost
./bootstrap.sh
sudo ./b2 stage --with-system --with-thread link=static -mt
5、下载安装miracl(安装在libOTe/cryptoTools/thirdparty/linux下面)
cd..
git clone https://github.com/ladnir/miracl
cd miracl/miracl/source/
sudo bash linux64
在执行sudo bash linux64 时会出现这种情况 不必理会

6、切换至libOTe目录下
cd ../../../../../../
cmake . -DENABLE_MIRACL=ON

7 、执行命令 make (中间出现警告不用管)

8、测试
进入bin目录下的frontend_libOTe 会出现参数表 根据相应的参数来验证
./bin/frontend_libOTe

./bin/frontend_libOTe -u

出现(SKipped……)因为没有安装快速OTe 到此完成了基础OT的安装
三、快速OT安装
1、下载安装relic(安装在libOTe/cryptoTools/thirdparty/linux下面)
git clone https://github.com/relic-toolkit/relic.git
relic
cmake . -DMULTI=OPENMP
make
sudo make install
2、切换至libOTe下 编译安装libOTe
cmake . -DENABLE_RELIC=ON
make
3、测试
./bin/frontend_libOTe -u

至此快速OT配置完成
我是个小白配置这个花了很大时间 ,请教了我的学长,最终才配制完成
如果有什么错误请大佬指点
参考资料 https://github.com/osu-crypto/libOTe
未经允许禁止抄袭 谢谢
网友评论