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.
Technical Lead:Expected Effort (Days, Weeks or Months):Expected Start Date:People or Skills Needed:
Brief Description:
I use Helib for data encryption and calculation, but it seems that it gives a wrong answer when I set a=-2 and b=3. Have I used the wrong method?
The code is as below:
publicKey.Encrypt(ctx1, to_ZZX(-2)); // Encrypt the value 2
publicKey.Encrypt(ctx2, to_ZZX(-3)); // Encrypt the value 3
Ctxt ctSum = ctx1; // Create a ciphertext to hold the sum and initialize it with Enc(2)
ctSum += ctx2; // Perform Enc(2) + Enc(3)
ZZX ptSum; // Create a plaintext to hold the plaintext of the sum
secretKey.Decrypt(ptSum, ctSum); // Decrypt the ciphertext ctSum into the plaintext ptSum using secretKey
cout << "-2 + -3 = " << ptSum[0] << endl;
Technical Lead: Expected Effort (Days, Weeks or Months): Expected Start Date: People or Skills Needed:
Brief Description:
I use Helib for data encryption and calculation, but it seems that it gives a wrong answer when I set a=-2 and b=3. Have I used the wrong method? The code is as below:
publicKey.Encrypt(ctx1, to_ZZX(-2)); // Encrypt the value 2 publicKey.Encrypt(ctx2, to_ZZX(-3)); // Encrypt the value 3