write

Engine.write_fixed_roll_key(fixed_roll_key, file_path)
Saves the fixed roll key to the specified path.
  • Input:
    • FixedRollKey
    • file_path: str or pathlib.Path
      • Can be an absolute or relative path.
  • Output:
    • None

Examples

Using an absolute path

from desilofhe import Engine

engine = Engine()
secret_key = engine.create_secret_key()
fixed_roll_key = engine.create_fixed_roll_key(secret_key, shift=1)
engine.write_fixed_roll_key(fixed_roll_key, "/opt/desilo/fixed_roll_key")

Using a relative path

from desilofhe import Engine

engine = Engine()
secret_key = engine.create_secret_key()
fixed_roll_key = engine.create_fixed_roll_key(secret_key, shift=1)
engine.write_fixed_roll_key(fixed_roll_key, "roll_key")