Conversion of Ciphertext to string

Hello, I am using the Python Wrapper in a project. Is there a function in the Python wrapper that allows the conversion of ciphertext to string?

Could you clarify what you mean? The OpenFHE Python wrapper supports serialization of ciphertexts to files/deserialization from files (either using binary or JSON format). Would this work for your case? How are you planning to use the string?

Hello @ypolyakov. The feature you mentioned would work. I am working on a program that encrypts the answers of a survey and send the encrypted data to a server which would perform computations on the data.

Great. Then you can look at openfhe-python/examples/pke/simple-integers-serial.py at main · openfheorg/openfhe-python · GitHub for an example of ciphertext serialization/deserialization.

Thanks for the link!

Even though the question was sufficiently answered in the end, I want to add something to answer the original answer for other people with the same question. In openfhe-python you can indeed serialize a Ciphertext (and more openfhe objects like keys) to a string, following the example/test found here. These methods that avoid writing to a file (and thus to disk), could be much faster and can be used in other cases that require sharing serialized openfhe objects like multiprocessing (link a related question here).