homenc / HElib

HElib is an open-source software library that implements homomorphic encryption. It supports the BGV scheme with bootstrapping and the Approximate Number CKKS scheme. HElib also includes optimizations for efficient homomorphic evaluation, focusing on effective use of ciphertext packing techniques and on the Gentry-Halevi-Smart optimizations.
https://homenc.github.io/HElib
Other
3.11k stars 761 forks source link

Homo AES compatible #343

Open xueyumusic opened 4 years ago

xueyumusic commented 4 years ago

After lots of updates of HElib, it seems that homo AES has several places which are not complatible. This PR tried to make homo AES work with the latest helib.

Some places to modify are:

  1. replace L(number of level) with N(nuber of bits) in the modulus chain to be compatible with buildModChain
  2. helib namespace and include files
  3. findBaseLevel modify
  4. CMakeLists.txt modify

The running cases are:

./TEST_AES boot=1 sz=3 N=800
./TEST_AES boot=0 sz=4 N=1600
WeiBenqiang commented 3 years ago

From my test ./TEST_AES boot=1 sz=3 N=800,for bootstapping case, N=800 is a litter big,which actural satisfies "level" we need and does not trigger batchRecrypt. And the security level is just 30. So I think we should change N to be smaller,i,e, N=500, ./TEST_AES boot=0 sz=4 N=1600,for not bootstrapping case ,N=1600 is also too large,which cannot achieve required secutiry level,just 42.7, therefore, N should be smaller, i,e, N=800 can copy with "level" we need, and security level will be 170 . Any problem???