Closed Ten000hours closed 1 year ago
I guess you have run out of the cipher space budget, which means you should set larger a poly_modulus_degree
and coeff_modulus
, and notice the ckks scheme will lose precision.
recommend you read these encryptionparams.h or 3_levels.cpp
Type I have a question about the result after two-time encryption
Descripe Hi,
I have a question about the result after the encryption for ciphertext two times using CKKS scheme. The whole process of what I did is:
encrypt an numpy array --> ciphertext multi_plain with plaintext(numpy array) --> decrypt the result ciphertext --> re-encrypt the result --> ciphertext multi_plain plaintext --> decrypt for getting result
. The reason for two times encryption is to refresh the noise budget. Everything works well until I get the result after the secondmulti_plain
. Here is the question:if I choose a relatively small value, like 400, for the plaintext part(the variable kenel in the following code), it will produce the correct result after two-time multiplication. But when I choose a value like 4000 for plaintext, it outputs the wrong result.
result for choosing 4000 for
b
( wrong for 001 : should equal to 4000 4000 1)result for choosing 400 for
b
( correct for 001 : 400 400 1 )The main code is following:
The CKKS setup code: