arrow
Return

CHEHAB: Automatic Compiler Code Optimization for Fully Homomorphic Encryption

delete2026-01-01
delete0
PRE
AI
A
Abdessamed Seddiki *
A
Arab Mohammed
Z
Zakaria Hebbal
A
Aimad Chabounia
E
Eduardo Chielle
K
Karima Benatchba
C
Challal Yacine
D
Djamel Eddine Menacer
M
Michail Maniatakos
R
Riyadh Baghdadi
DOI:10.1145/3771775.3786269delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Fully Homomorphic Encryption (FHE) enables meaningful computations directly on encrypted data, without requiring decryption. Despite its transformative potential, FHE is still computationally expensive. Moreover, writing efficient code for FHE is an error-prone, tedious, and time-consuming task that requires cryptographic expertise. Programmers may not be aware of all possible optimizations, and some optimizations require substantial effort. In this paper, we propose CHEHAB, a compiler that automatically vectorizes scalar code, optimizes it, and generates highly efficient code for FHE. CHEHAB supports the optimization of both structured and unstructured code. It takes as input a program expressed in the CHEHAB domain-specific language (embedded in C++) and uses a Term Rewriting System (TRS) to simplify it. CHEHAB targets two problems: 1) the vectorization of scalar code and 2) the reduction of instruction execution latency and noise growth. It solves these two problems using a TRS that leverages equality saturation to vectorize code, reduce the number of instructions, and reduce the circuit depth. Compared to related work, the proposed approach not only scales better to larger arithmetic circuits but also generates faster code. We evaluate CHEHAB on a set of kernels and compare it to Coyote, a state-of-the-art vectorizing compiler for FHE. We show that CHEHAB generates code that is, on average, 7.38 Chi faster in execution, 2.49 Chi lower in accumulated noise, and 251 Chi faster in compilation.
Keywords:
Automatic Code Optimization
Compiler
FHE
Fully Homomorphic Encryption
Equality Saturation

Journal

P
PROCEEDINGS OF THE 35TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON COMPILER CONSTRUCTION, CC 2026
IF:
0
Papers:
18
Citations:
0

Organization

N
new york university
Scholars:
6.1K
Papers: 2.9K
Citations: 1
E
Ecole Nationale Superieure d'Informatique
Scholars:
22
Papers: 11
Citations: 0
N
New York University Abu Dhabi
Scholars:
2.1K
Papers: 1.5K
Citations: 3.3K
researcher View more organizations