fhelium.eager._key_inventory
Typed key ownership for one eager CKKS runtime.
KeyInventory stores validated secret, public, relinearization, conjugation, and normalized rotation keys. Replacing the secret key clears every key whose mathematical relation was derived from the previous secret.
KeyInventory
class View source
KeyInventory(validator: CkksValidator)Own validated keys and their dependency invalidation rules.
Attributes
| Name | Type | Default/value |
|---|---|---|
validator | CkksValidator |
clear_evaluation_keys
method
def clear_evaluation_keys() -> None: ...Remove relinearization, conjugation, and rotation keys.
clear_all
method
def clear_all() -> None: ...Remove every installed key.
set_secret_key
method
def set_secret_key(key: SecretKey | None) -> None: ...Install a secret key and invalidate keys derived from its predecessor.
require_secret_key
method
def require_secret_key() -> SecretKey: ...Return the installed secret key or raise when none is installed.
secret_key
property
secret_key: SecretKey | NoneReturn the installed secret key, if any.
set_public_key
method
def set_public_key(key: PublicKey | None) -> None: ...Install or remove the public encryption key.
require_public_key
method
def require_public_key() -> PublicKey: ...Return the installed public key or raise when none is installed.
public_key
property
public_key: PublicKey | NoneReturn the installed public key, if any.
set_relinearization_key
method
def set_relinearization_key(key: RelinearizationKey | None) -> None: ...Install or remove relinearization material.
require_relinearization_key
method
def require_relinearization_key() -> RelinearizationKey: ...Return installed relinearization material.
relinearization_key
property
relinearization_key: RelinearizationKey | NoneReturn installed relinearization material, if any.
set_conjugation_key
method
def set_conjugation_key(key: ConjugationKey | None) -> None: ...Install or remove conjugation material.
require_conjugation_key
method
def require_conjugation_key() -> ConjugationKey: ...Return installed conjugation material.
conjugation_key
property
conjugation_key: ConjugationKey | NoneReturn installed conjugation material, if any.
set_rotation_key
method
def set_rotation_key(key: RotationKey | None, *, step: int) -> None: ...Install or remove the normalized rotation key for step.
rotation_key
method
def rotation_key(step: int) -> RotationKey | None: ...Return the key for a normalized signed rotation step, if installed.
require_rotation_key
method
def require_rotation_key(step: int) -> RotationKey: ...Return the key for step or raise when none is installed.
rotation_keys
property
rotation_keys: dict[int, RotationKey]Return a copy of the normalized rotation-key map.