+
T. Gollamudi, A. Gollamudi, and J. Gancher, “ILA: Correctness via Type Checking for Fully Homomorphic Encryption,” in CCS '25, forthcoming, 2025.
Abstract: RLWE-based Fully Homomorphic Encryption (FHE) schemes add some small noise to the message during encryption. The noise accumulates with each homomorphic operation. When the noise exceeds a critical value, the FHE circuit produces an incorrect output. This makes developing FHE applications quite subtle, as one must closely track the noise to ensure correctness. Existing libraries and compilers offer limited support to statically track the noise. Additionally, FHE circuits are plagued by wraparound errors common in finite modulus arithmetic.
We present a correctness-oriented IR, Intermediate Language for Arithmetic Circuits (ILA), for type-checking circuits intended for homomorphic evaluation. Our IR is backed by a type system that tracks low-level quantitative bounds (e.g., ciphertext noise) without using the secret key. Using our type system, we identify and prove a strong functional correctness criterion for ILA circuits. The core type system does not assume a particular FHE scheme but axiomatizes a model of FHE. We instantiate this model with the exact FHE schemes (BGV, BFV, and TFHE), and obtain functional correctness for free.
We implement a concrete type checker ILA, parameterized by the noise estimators for three popular FHE libraries (OpenFHE, SEAL, and TFHE-rs). We also use the type checker to infer optimal placement of modulus switching. Evaluation shows that ILA type checker is sound, practical, and efficient.