serialize

Engine.serialize_ciphertext(ciphertext)
Serializes a ciphertext.
  • Input:
    • Ciphertext
  • Output:
    • bytearray

Examples

from desilofhe import Engine

engine = Engine()
secret_key = engine.create_secret_key()
public_key = engine.create_public_key(secret_key)

message = [1, 2, 3]
ciphertext = engine.encrypt(message, public_key)
serialized_ciphertext = engine.serialize_ciphertext(ciphertext)