准备
下载
git clone https://codeup.aliyun.com/6306306f95064d67d44656e5/lxr1907/SecureValueRecovery.git
进入目录
cd SecureValueRecovery
编译enclave
make -C ./enclave
等待很长时间下载各种镜像后
报错:
Fatal error: can't create build/kbupd_enclave_t.o: No such file or directory
进入目录创建build目录
cd enclave
mkdir build
报错如下
编译server
make -C ./service docker
运行service的环境安装
下载intel-sgx,根据ubuntu版本
https://download.01.org/intel-sgx/sgx-linux/2.17/distro/ubuntu18.04-server/sgx_linux_x64_sdk_2.17.100.3.bin
或
https://download.01.org/intel-sgx/sgx-linux/2.17/distro/ubuntu20.04-server/sgx_linux_x64_sdk_2.17.100.3.bin
最新 sgx_linux_x64_sdk_2.19.100.3.bin
赋权限
chmod +x sgx_linux_x64_sdk_2.17.100.3.bin
安装
./sgx_linux_x64_sdk_2.17.100.3.bin
修改环境文件
vi sgxsdk/environment #把其中的sdk_libs目录名处,增加lib64
-----------------------
export SGX_SDK=/home/ubuntu/SecureValueRecovery/sgxsdk
export PATH=$PATH:$SGX_SDK/bin:$SGX_SDK/bin/x64
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$SGX_SDK/pkgconfig
if [ -z "$LD_LIBRARY_PATH" ]; then
export LD_LIBRARY_PATH=$SGX_SDK/lib64:$SGX_SDK/sdk_libs
else
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SGX_SDK/lib64:$SGX_SDK/sdk_libs
fi
-----------------------
执行
source sgxsdk/environment
下载libsgx-enclave-common
https://download.01.org/intel-sgx/sgx_repo/ubuntu/pool/main/libs/libsgx-enclave-common/libsgx-enclave-common_2.17.100.3-focal1_amd64.deb
最新libsgx-enclave-common_2.19.100.3-focal1_amd64.deb
查看ubuntu的对应下载版本
lsb_release -a
focal对应focal版本
安装
dpkg -i libsgx-enclave-common_2.17.100.3-focal1_amd64.deb
查看help
service/build/target/release/kbupd help
运行 replica
service/build/target/release/kbupd --kbuptlsd-bin-file service/build/target/release/kbuptlsd --config-file ./service/config/replica.sample.yml --enclave-directory /home/ubuntu/SecureValueRecovery/service/kbupd/res/enclave/ replica --peer-ca-file certificate.txt --peer-key-file signal.lxrtalk.com.p12 --enclave-debug yes
运行service
nohup ./service/build/target/release/kbupd --config-file ./service/config/frontend.sample.yml --enclave-directory service/kbupd/res/enclave/ --kbuptlsd-bin-file service/ frontend --listen-api 127.0.0.1:8082 --peer-ca-file certificate.txt --peer-key-file signal.lxrtalk.com.p12 2>&1 &
报错