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

Usage of Ctxt and vector<Ctxt> #357

Closed seniakalma closed 3 years ago

seniakalma commented 4 years ago

Your Contact: senia.kalma@gmail.com Your environment (OS/HW): Ubuntu 20.04, AMD Ryzen 5 3600, 16GB RAM Detailed Description: Hi, I'm trying to manipulate encrypted data with 2 operations, Shift (left) and addition. I've found this guide that shows(and works) how to add/multiply data by using Ctxt, and this example for doing leftBitwiseShift which uses a "std::vector eNums" that, as far as I understood, uses a vector of the binary representation of a number. The problem is that I wasn't able to make them work together, for example- doing shift left-addition-shift left, as I couldn't find any conversion function between the 2 presentation, or the 2 functions together in one of the representations. Can you suggest a way to make it work? Can you please explain what the 2 representations are used for, and which one I should use? Thanks, Senia