write

Engine.write_lossy_bootstrap_key(lossy_bootstrap_key, filename)
Saves the lossy bootstrap key to the specified path.
  • Input:
    • LossyBootstrapKey
    • filename: str
      • Can be an absolute or relative path.
  • Output:
    • None

Examples

Using an absolute path

from desilofhe import Engine

engine = Engine(for_bootstrap=True)
secret_key = engine.create_secret_key()
lossy_bootstrap_key = engine.create_lossy_bootstrap_key(secret_key)
engine.write_lossy_bootstrap_key(
    lossy_bootstrap_key, "/opt/desilo/lossy_bootstrap_key"
)

Using a relative path

from desilofhe import Engine

engine = Engine(for_bootstrap=True)
secret_key = engine.create_secret_key()
lossy_bootstrap_key = engine.create_lossy_bootstrap_key(secret_key)
engine.write_lossy_bootstrap_key(lossy_bootstrap_key, "lossy_bootstrap_key")