Let's say I calulated addition or multiplication of 2 Ciphertexts
and seved the result in a third one. If I want to perform additional mathematical operations on my result Ciphertext
(destination Chipertext
), is it advisable to use evaluator.relinearize()
on it before doing so? Because if I understood it correctly, some operations on Ciphertext
cause the result Ciphertext
size to be larger than 2. If yes, then would this be a good approach for relinearizing one Ciphertext
?
EvaluationKeys ev_keys;
int size = result.size();
keygen.generate_evaluation_keys(size - 2, ev_keys); // We need size - 2 ev_keys for performing this relinearization.
evaluator.relinearize(result, ev_keys);