HElib
HElib copied to clipboard
Changing Plaintext Space from p^e1 to p^e2
I would like to change the plaintext space from one exponent to another, in particular where e2 > e1. It was mentioned in another issue, and I saw a function called divideByP() in the code that reduces the plaintext space by a factor of p. Is there a way to increase the plaintext space by a factor of p, and if so what would the process for doing that be?
As mentioned #280 you can use ctxt.hackPtxtSpace(p^e2), but you should take care of removing the noise in the higher-order digits before decrypting your ciphertext.