deserialize

Engine.deserialize_bootstrap_key(data)
Creates a bootstrap key from a serialized data.
  • Input:
    • data: bytes or bytearray
  • Output:
    • BootstrapKey

Examples

from desilofhe import Engine

engine = Engine(for_bootstrap=True)
secret_key = engine.create_secret_key()
bootstrap_key = engine.create_bootstrap_key(secret_key)
serialized_bootstrap_key = engine.serialize_bootstrap_key(bootstrap_key)

# bytearray
bootstrap_key = engine.deserialize_bootstrap_key(serialized_bootstrap_key)

# bytes
bootstrap_key = engine.deserialize_bootstrap_key(
    bytes(serialized_bootstrap_key)
)