Looking at this code again, skipping the modulo n^2 operation is probably a bad idea if the plaintext is a large number. I guess the optimal thing to do would be to figure out the threshold at which skipping it makes sense, but, otherwise, RandomizeCiphertext will be faster if we make sure it only multiplies numbers that are smaller than n^2.
Looking at this code again, skipping the modulo
n^2operation is probably a bad idea if the plaintext is a large number. I guess the optimal thing to do would be to figure out the threshold at which skipping it makes sense, but, otherwise,RandomizeCiphertextwill be faster if we make sure it only multiplies numbers that are smaller thann^2.