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

How can i perform addition between the slots of a Ctxt ? #336

Closed lupascucristian closed 4 years ago

lupascucristian commented 4 years ago

Your Contact: clupascu8@gmail.com Your environment (OS/HW): Ubuntu 18.04.03 LTS Detailed Description: Suppose we have a Ctxt with 84 slots, each one containing the encryption of 1/0 (in F2). How should we compute the sum (xor) of those slots ?

boev commented 4 years ago

You can use shifts and additions. The idea should be the same as in runningSums method in HElib (check this). It is probably better to use the native HElib method for this, than implementing your own.

lupascucristian commented 4 years ago

Thank you, Yordan !