使用
需要使用 编译器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)