fhelium.config._prime_catalog
Load the versioned CKKS prime resources packaged with FHElium.
The installed tables supply ordered Q-prime candidates and a separate sequence for the special primes in P. Entries are keyed by target prime width and ring dimension.
Loading validates the resource format/version metadata, serialized key schema, one-dimensional int64 tensors, nonempty unique sequences, and the required q = 1 mod 2N NTT congruence. The decoded tables are sorted, wrapped in read-only mappings, and cached once per process. PrimeCatalog returns list copies so parameter selection cannot mutate the shared installed data.
The corresponding offline generator is scripts/generate_prime_catalog.py; runtime code only consumes its reviewed, packaged outputs.
PrimeKey
data View source
PrimeKey = tuple[int, int]PrimeTable
data View source
PrimeTable = Mapping[PrimeKey, tuple[int, ...]]PrimeCatalog
class View source
PrimeCatalog()Process-local view of immutable packaged CKKS prime tables.
scaling_primes
method
def scaling_primes(prime_bits: int, degree: int) -> list[int]: ...Return a mutable copy of one ordered scaling-prime sequence.
special_primes
method
def special_primes(prime_bits: int, degree: int) -> list[int]: ...Return a mutable copy of one ordered special-prime sequence.
scaling_keys
property
scaling_keys: tuple[PrimeKey, ...]Return supported scaling-prime catalog keys.
special_keys
property
special_keys: tuple[PrimeKey, ...]Return supported terminal/special-prime catalog keys.
get_prime_catalog
function View source
def get_prime_catalog() -> PrimeCatalog: ...Load and validate the installed catalog once per process.