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 repre- sentation 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 tar- get 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 eval- uation 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
翻译:全同态加密(FHE)支持直接在加密数据上执行程序。然而,由于仅能对密文执行基本运算,程序必须表示为布尔电路或算术电路。这种底层表示方式使得为 FHE 实现应用程序比用高级语言编写代码更为繁琐。为减轻此负担,目前已开发出多种将高级代码转换为电路表示的转译器。本工作中,我们通过引入一种针对 Haskell 的转译器扩展了可面向 FHE 的高级语言范围,该转译器将 Haskell 程序转换为适用于同态评估的布尔电路。我们的第二项贡献是对这些生成电路的自动并行化。我们实现了一种评估器,通过并行化电路的每一层来并行执行门运算。我们在两个关键应用上验证了方法的有效性:私有信息检索(PIR)与 AES 加密标准。先前工作已通过手动方式实现了 AES 加密的并行化。我们证明,在 FHE 下执行 AES 评估时,自动化方法优于部分(但非全部)手动并行方案。我们在 16 线程并行执行中实现了 28 秒的评估时间,在 100 线程并行执行中实现了 8 秒的评估时间。