Closed aman1403 closed 3 years ago
Sorry for the reply late, I'm not sure what your code is, you mean encoder = IntegerEncoder(context)
?
And FractionalEncoder
does not exist in the wrapper.
If you want to encode fractional values, please refer to tests/4_ckks_basics.py
.
Thanks for your reply. I need to encode both integer and fractional values. I am using encoder = IntegerEncoder(context)
for encoding the integers value. Is there any other encoder exist in BFV scheme to encode fractional values. Because I need both type of encoders in the same file.
Actually I wanted to divide the encrypted values by 2. As division is not supported in the SEAL library. So, I was going to multiply 0.5
with the encrypted value. But I am unable to encode 0.5
as I only know about Integer Encoder.
Is there any other encoder exist in BFV Scheme to encode float values?
You can not mixed-use these two kinds of the scheme, they are encoded in different ways, refer to the C++ code's note.
No way, consider the ckks scheme or multiply the divisor and dividend 10000 or more times.
Okay. Btw, I was trying to send the encrypted list of Ciphertext
Object from client to server through sockets in python. And I am using Pickle.dumps
to encode it into bytes but getting the following error. Is there any other way to encode this Ciphertext
object into bytes as we can only send bytes like object through sockets in python. I have tried Json, base64, pickle but nothing is working.
For some reason, we can't directly pickle the Ciphertext in SEAL-3.4.5, we talked in #28, but you can use cipher.save('filename')
to save the keys or ciphers to the native.
And the pickle function in SEAL-3.3.2 works well.
Hi,
Actually, I am facing an issue while declaring an encoder as FractionalEncoder. It's working with the IntegerEncoder but it's showing (NameError "FractionalEncoder" doesn't exist) while declaring the variable
encoder=FractionalEncoder(context)
.I think it doesn't exist in python-seal but I need it as I was dealing with Float Numbers. Do you have any idea or is there any other encoder to encode Fractional values.
Please find the screenshot below for reference.