poulpyFully homomorphic encryption
GitHub ↗Get started →
Menu

Architecture

Layer ownership.

Protocol knowledge and extension points remain in the layer that owns their semantics.

Source guide · 7dd13e6Markdown

For a visual introduction, see Layered architecture and verification.

To keep the stack well separated, lower layers MUST NOT adapt their APIs to invariants owned by a higher layer: HAL owns generic polynomial primitives, Core owns generic GLWE/GGLWE operations, and CKKS owns CKKS protocol knowledge.

As example, the known-zero-limb optimization for the second ModUp key switch belongs in CKKS’s reference ckks_encapsulated_mod_up and not in the Core layer; a backend can decide to replace that whole operation through its CKKS OEP. Future cross-layer optimizations should compose lower-layer primitives or add an extension point in the layer that owns the semantics.