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.2K
Papers: 3.0K
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
Cited Papers

Cited Papers

err
IF0
err
err0
errOAAI
err
errShare
errSave
Halide: Decoupling Algorithms from Schedules for High-Performance Image Processing
err2017-12-27
err70
errOAAI
errRagan-Kelley, Jonathan; Adams, Andrew; Sharlet, Dillon; Barnes, Connelly; Paris, Sylvain; Levoy, Marc; Amarasinghe, Saman; Durand, Fredo
errShare
errSave
Verifying and improving Halide’s term rewriting system with program synthesis
err2020-11-13
err0
PREAI
errNewcomb,Julie L.; Adams,Andrew; Johnson,Steven; Bodik,Rastislav; Kamil,Shoaib
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
Caviar: an e-graph based TRS for automatic code optimization
err2022-03-19
err0
PREAI
errKourta,Smail; Namani,Adel Abderahmane; Benbouzid-Si Tayeb,Fatima; Hazelwood,Kim; Cummins,Chris; Leather,Hugh; Baghdadi,Riyadh
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
errShare
errSave
ANT-ACE: An FHE Compiler Framework for Automating Neural Network Inference
err2025-03-01
err0
PREAI
errLi,Long; Lai,Jianxin; Yuan,Peng; Sui,Tianxiang; Liu,Yan; Zhu,Qing; Zhang,Xiaojing; Xiao,Linjie; Chen,Wenguang; Xue,Jingling
errShare
errSave
researcher View more