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 760 forks source link

CKKS Rescaling in HElib #404

Open peiworld opened 3 years ago

peiworld commented 3 years ago

Is rescaling a part of the ModSwitch procedure in HElib? Looking for the right place to make changes in how much to rescale, any pointer?

"HElib takes care of CKKS rescaling on its own so you do not need to worry about it. It does not yet support CKKS bootstrapping, however."

Originally posted by @shaih in https://github.com/homenc/HElib/issues/341#issuecomment-581880535

DylanWangWQF commented 2 years ago

It's probably different, as explained in the original HEAAN paper in P3:

For homomorphic operations, we always maintain our decryption structure small enough compared to the ciphertext modulus so that the computation result is still smaller than q. However, we still have a problem that the bit size of the message increases exponentially with the depth of a circuit without rounding. To address this problem, we suggest a new technique - called rescaling - that manipulates the message of ciphertext. Technically it seems similar to the modulus-switching method suggested by Brakerski and Vaikuntanatan [6], but it plays a completely different role in our construction.