SEAL-Python icon indicating copy to clipboard operation
SEAL-Python copied to clipboard

TypeError: cannot pickle 'seal.Ciphertext' object

Open ZJG0 opened this issue 2 years ago • 4 comments

Descripe I wanted to transfer the ciphertext, but the seal.Ciphertext was not serialized and could not transfer. What do I need to do to transmit ciphertext?

ZJG0 avatar Apr 18 '23 13:04 ZJG0

use to_string(), refer to serialization.

Huelse avatar Apr 18 '23 15:04 Huelse

I have tried the to_string() according to the serialization. There is a new problem that recovering the ciphertext from string requires the context. Thus, I have to serialize the context and transfer it to another PC, but how can I recover the context from string.

ZJG0 avatar Apr 19 '23 07:04 ZJG0

Have you carefully read the 7_serialization.py? the EncryptionParameters need to be the same.

Huelse avatar Apr 19 '23 08:04 Huelse

Sure, the reason I'm going to transfer the context to the other PC is because I'm going to use the same context for encryption and decryption, which now seems to have to be done with pre-agreed parameters.

ZJG0 avatar Apr 19 '23 08:04 ZJG0