Homomorphic encryption (HE) is a privacy-preserving technique that enables computation directly on encrypted data. Despite its promise, HE has seen limited use due to performance overheads and compilation challenges. Recent work has made significant advances to address the performance overheads but automatic compilation of efficient HE kernels remains relatively unexplored. This paper presents Porcupine, an optimizing compiler, and HE DSL named Quill to automatically generate HE code using program synthesis. HE poses three major compilation challenges: it only supports a limited set of SIMD-like operators, it uses long-vector operands, and decryption can fail if ciphertext noise growth is not managed properly. Quill captures the underlying HE operator behavior that enables Porcupine to reason about the complex trade-offs imposed by the challenges and generate optimized, verified HE kernels. To improve synthesis time, we propose a series of optimizations including a sketch design tailored to HE and instruction restriction to narrow the program search space. We evaluate Procupine using a set of kernels and show speedups of up to 51% (11% geometric mean) compared to heuristic-driven hand-optimized kernels. Analysis of Porcupine's synthesized code reveals that optimal solutions are not always intuitive, underscoring the utility of automated reasoning in this domain.
翻译:基因加密 (HE) 是一种隐私保护技术, 能够直接计算加密数据。 尽管它有其承诺, 他看到由于性能管理及编译方面的挑战而使用有限。 最近的工作在处理性能管理管理上取得了显著进步, 但高效的HE内核的自动编译仍然相对没有探索。 本文展示了优化的编译者波鲁普因, 名为 Quill 的He, 用于使用程序合成自动生成 HE 代码。 它提出了三大编译挑战 : 它只支持一组有限的SIMD 类操作员, 它使用长视频操作器, 并且如果对加密器噪音增长管理不当, 解密就会失败。 Quill 捕捉了基础的HE操作员行为, 使波鲁普平平平平平能理解挑战带来的复杂交易, 并产生最佳的、 校验的 HE内核内核。 为了改进合成时间, 我们提议了一系列的优化优化, 包括为HE设计的草图设计, 以及指令限制缩小程序搜索空间。 我们使用一套长的内心操作器, 我们用长的内衬来评估Proupine 和显示速度, 显示到51%的自动版版版域的版化的版化版化的版度分析法。 度, 度是不总是方向的硬度, 方向的硬度的硬度分析, 方向的硬度分析, 。