You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an algorithm that iteratively performs multiple homomorphic multiplications and needs to decrypt once in each iteration. Although the calculation is small, an error will be reported: Overflow detected in decrypted number.
I wrote a test code to describe the problem as below.
from phe import paillier
import random
public_key, private_key = paillier.generate_paillier_keypair(n_length=1024)
x = random.random()
y = random.random()
E_x = public_key.encrypt(x)
iter_k = 100
for i in range(iter_k):
print("iterations:",i)
E_x = y*E_x
private_key.decrypt(E_x)
print(private_key.decrypt(E_x))
I know that increasing the value of n_length can alleviate the problem, but this reduces efficiency and does not eliminate the problem. So, what should I do, thank you.
The text was updated successfully, but these errors were encountered:
I have an algorithm that iteratively performs multiple homomorphic multiplications and needs to decrypt once in each iteration. Although the calculation is small, an error will be reported: Overflow detected in decrypted number.
I wrote a test code to describe the problem as below.
I know that increasing the value of
n_length
can alleviate the problem, but this reduces efficiency and does not eliminate the problem. So, what should I do, thank you.The text was updated successfully, but these errors were encountered: