TFHEpp 使用记录

TFHEpp 使用记录

使用

需要使用 编译器gcc > 10 (unicode 编码)

sudo apt-get install -y build-essential g++-10  apt-utils ca-certificates git cmake libgmp-dev libfftw3-dev

git clone https://github.com/virtualsecureplatform/TFHEpp
cd TFHEpp
git submodule update --init
mkdir -p build && cd build

HE3DB

This code is the implmentation of the paper HE3DB: An Efficient and Elastic Encrypted Database via Arithmetic-and-Logic Fully Homomorphic Encryption.

错误

randen

In file included from /home/wxg/test/tfhe/HE3DB/thirdparty/TFHEpp/thirdparties/randen/randen.cc:19:
/home/wxg/test/tfhe/HE3DB/thirdparty/TFHEpp/thirdparties/randen/vector128.h:38:2: error: #error “Port”
38 | #error “Port”

#if defined(__SSE2__) && defined(__AES__)

#define RANDEN_AESNI 1
#include <wmmintrin.h>

#elif defined(__powerpc__) && defined(__VSX__)

#define RANDEN_PPC 1
#define RANDEN_BIG_ENDIAN 1
#include <altivec.h>

#elif defined(__ARM_NEON) && defined(__ARM_FEATURE_CRYPTO)

#define RANDEN_ARM 1
#include <arm_neon.h>

#else
#error "Port"
#endif

gcc11 好像需要使用-march=native选项应该可以启用针对本地CPU的优化和特性检测,包括SSE2和AES指令集, 同时也需要查看 cpu 有相关指令

lscpu | grep sse2
lscpu | grep aes

没有相关指令则关闭该选项 RANDEN

option(USE_RANDEN "Use randen as CSPRNG" OFF)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值