🤖 AI Summary
Existing fully homomorphic encryption (FHE) schemes require programs to be manually implemented as Boolean or arithmetic circuits, severely impeding development efficiency for high-level language applications. This paper presents the first FHE compilation framework supporting automatic translation from Haskell to Boolean circuits, and introduces a novel circuit-level automated parallelization mechanism that generates hierarchical, multi-threadable circuits without manual intervention. By overcoming the traditional reliance on hand-crafted optimizations, our approach achieves significant performance improvements in representative workloads: evaluating an AES circuit takes 28 seconds on 16 threads and reduces to 8 seconds on 100 threads; similar gains are observed in private information retrieval. Our results constitute the first empirical validation that higher-order functional languages—combined with automated circuit parallelization—can jointly enhance both the practicality and scalability of FHE.
📝 Abstract
Fully Homomorphic Encryption (FHE) enables the evaluation of programs directly on encrypted data. However, because only basic operations can be performed on ciphertexts, programs must be expressed as boolean or arithmetic circuits. This low-level representation makes implementing applications for FHE significantly more cumbersome than writing code in a high-level language. To reduce this burden, several transpilers have been developed that translate high-level code into circuit representations. In this work, we extend the range of high-level languages that can target FHE by introducing a transpiler for Haskell, which converts Haskell programs into Boolean circuits suitable for homomorphic evaluation. Our second contribution is the automatic parallelization of these generated circuits. We implement an evaluator that executes gates in parallel by parallelizing each layer of the circuit. We demonstrate the effectiveness of our approach on two key applications: Private Information Retrieval (PIR) and the AES encryption standard. Prior work has parallelized AES encryption manually. We demonstrate that the automated method outperforms some but not all manual parallelizations of AES evaluations under FHE. We achieve an evaluation time of 28 seconds for a parallel execution with 16 threads and an evaluation time of 8 seconds for a parallel execution with 100 threads