Huelse / SEAL-Python

Microsoft SEAL 4.X For Python
MIT License
324 stars 65 forks source link

TypeError: cannot pickle 'seal.Ciphertext' object #106

Closed ZJG0 closed 3 weeks ago

ZJG0 commented 1 year ago

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?

Huelse commented 1 year ago

use to_string(), refer to serialization.

ZJG0 commented 1 year ago

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.

Huelse commented 1 year ago

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

ZJG0 commented 1 year ago

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.