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.14k stars 765 forks source link

GCD(ptxtSpace, pubKey.getPtxtSpace())>1 failed error #262

Open imtiyazuddin opened 5 years ago

imtiyazuddin commented 5 years ago

Technical Lead: Expected Effort (Days, Weeks or Months): Expected Start Date: People or Skills Needed:

Brief Description: I am getting the following error while multiplying two ciphertexts.

Ctxt::Ctxt(const FHEPubKey &, long int) :Assertion GCD(ptxtSpace, pubKey.getPtxtSpace())>1 failed

Can anyone please help. I have initialized all the ciphers using same public keys.

Also another observation, the multiplying works fine when done on a single core. When I tried to parallelize using intels tbb, I am getting this error.

We tried to print cptxtSpace and pubKey.getPtxtSpace() values in Ctxt.cpp and we are getting same values when ran on single cpu. When we tried to run on multiple cpus they are different

Please help i am new to this library

Thanks in advance

boev commented 5 years ago

Hi,

I have tested HElib in a multithreaded environment and it worked nicely. Have you enabled threads in GMP and NTL? After downloading NTL my script for installing it does this:

cd ntl-$(NTL_Version)/src && ./configure NTL_GMP_LIP=on NTL_THREADS=on