Compile-Time Fully Homomorphic Encryption of Vectors: Eliminating Online Encryption via Algebraic Basis Synthesis
Dongfang Zhao
TL;DR
This paper tackles the data-ingestion bottleneck in fully homomorphic encryption by proposing compile-time ciphertext synthesis, which constructs encrypted vectors from a precomputed encrypted basis and a single zero-ciphertext masked at runtime. The method reframes encryption as a symbolic algebraic process, enabling encryption-free online ingestion while preserving batching and slot-aligned operations, and it is formalized as a randomized $\mathbb{Z}_t$-module morphism with an IND-CPA security proof via a hybrid argument. The key contributions include an abstract interface for synthesis, a memory-efficient vector-caching instantiation using a single reusable zero ciphertext, a linear-time online synthesis algorithm, and a rigorous reduction showing IND-CPA security relative to the underlying FHE scheme. The approach supports integration with standard FHE APIs and operations like rotation and aggregation, offering practical benefits for encrypted databases, streaming pipelines, and secure compiler backends, and it opens avenues for further algebraic and categorical explorations of encrypted computation.
Abstract
We propose a framework for compile-time ciphertext synthesis in fully homomorphic encryption (FHE) systems, where ciphertexts are constructed from precomputed encrypted basis vectors combined with a runtime-scaled encryption of zero. This design eliminates online encryption and instead relies solely on ciphertext-level additions and scalar multiplications, enabling efficient data ingestion and algebraic reuse. We formalize the method as a randomized $\mathbb{Z}_t$-module morphism and prove that it satisfies IND-CPA security under standard assumptions. The proof uses a hybrid game reduction, showing that adversarial advantage in distinguishing synthesized ciphertexts is negligible if the underlying FHE scheme is IND-CPA secure. Unlike prior designs that require a pool of random encryptions of zero, our construction achieves equivalent security using a single zero ciphertext multiplied by a fresh scalar at runtime, reducing memory overhead while preserving ciphertext randomness. The resulting primitive supports efficient integration with standard FHE APIs and maintains compatibility with batching, rotation, and aggregation, making it well-suited for encrypted databases, streaming pipelines, and secure compiler backends.
