[论文解读] Medha: Microcoded Hardware Accelerator for computing on Encrypted Data
Medha 是一种可编程的、基于微码的 FPGA 硬件加速器,通过灵活可扩展的架构,实现了对加密数据的高效同态计算。它通过利用并行 RNS 多项式算术、片上内存以及一种新颖的分治技术,实现了对多种多项式度数的统一硬件设计支持,从而在大型 RNS-HEAAN 参数集上,相较于优化的软件(Microsoft SEAL)实现了高达 78 倍的加速。
Homomorphic encryption (HE) enables computation on encrypted data, and hence it has a great potential in privacy-preserving outsourcing of computations to the cloud. Hardware acceleration of HE is crucial as software implementations are very slow. In this paper, we present design methodologies for building a programmable hardware accelerator for speeding up the cloud-side homomorphic evaluations on encrypted data. First, we propose a divide-and-conquer technique that enables homomorphic evaluations in a large polynomial ring $R_{Q,2N}$ to use a hardware accelerator that has been built for the smaller ring $R_{Q,N}$. The technique makes it possible to use a single hardware accelerator flexibly for supporting several HE parameter sets. Next, we present several architectural design methods that we use to realize the flexible and instruction-set accelerator architecture, which we call `Medha'. At every level of the implementation hierarchy, we explore possibilities for parallel processing. Starting from hardware-friendly parallel algorithms for the basic building blocks, we gradually build heavily parallel RNS polynomial arithmetic units. Next, many of these parallel units are interconnected elegantly so that their interconnections require the minimum number of nets, therefore making the overall architecture placement-friendly on the platform. For Medha, we take a memory-conservative design approach and get rid of any off-chip memory access during homomorphic evaluations. Finally, we implement Medha in a Xilinx Alveo U250 FPGA and measure timing performances of the microcoded homomorphic addition, multiplication, key-switching, and rescaling for the leveled HE scheme RNS-HEAAN at 200 MHz clock frequency. For two large parameter sets, Medha achieves accelerations by up to 68x and 78x times respectively compared to a highly optimized software implementation Microsoft SEAL running at 2.3 GHz.
研究动机与目标
- 为解决云计算中同态加密(HE)的性能瓶颈,设计一种高速、灵活的硬件加速器。
- 通过单一可重构的硬件架构,支持多种 HE 参数集(包括大多项式度数)。
- 在同态计算过程中消除片外内存访问,提升延迟和能效。
- 通过多项式算术中的深度并行化和处理单元的高效互连,实现高性能。
- 提供一种实际可行的原型验证加速器,在真实世界性能指标上超越现有软件与硬件解决方案。
提出的方法
- 提出一种分治技术,将更大环 $ R_{Q,2N} $ 中的计算映射到专为较小环 $ R_{Q,N} $ 设计的硬件加速器上,从而实现对多种多项式度数的灵活支持。
- 设计一种高度并行的 RNS(残数系统)多项式算术单元(RPAU),采用硬件友好的模算术与数论变换(NTT)算法。
- 采用基于环形的互连拓扑结构连接多个 RPAU,以最小化布线数量并提升 FPGA 上的布局效率。
- 采用内存节约型架构,利用片上内存,消除关键切换(key-switching)等操作期间的片外数据传输。
- 实现微码指令集,以支持可编程性,并兼容多种同态操作,如加法、乘法、重缩放和关键切换。
- 通过在 Xilinx Alveo U250 FPGA 上进行物理实现,以 200 MHz 频率运行,对大参数集的性能进行测量验证。
实验结果
研究问题
- RQ1如何通过单一硬件加速器在不重新设计的情况下,高效支持同态加密中的多种多项式度数?
- RQ2哪些架构技术能够实现在基于 RNS 的多项式算术单元中实现高并行性与低互连开销?
- RQ3通过片上内存优化,能否在大参数 HE 方案的关键切换操作中完全消除片外内存访问?
- RQ4在真实世界 HE 工作负载中,微码可编程加速器在多大程度上能超越高度优化的软件实现?
- RQ5在延迟与吞吐量方面,原型 FPGA 加速器相较于以往的 ASIC 和 FPGA 基于 HE 加速器,性能表现如何?
主要发现
- 对于 RNS-HEAAN 参数集 $ ( ext{log } Q, N) = (438, 2^{14}) $ 和 $ (546, 2^{15}) $,Medha 分别实现了相较于 Microsoft SEAL(运行在 2.3 GHz)高达 68× 和 78× 的加速。
- 通过一种新颖的环映射分治技术,该加速器仅用单一硬件设计即支持多项式度数 $ 2^{14} $ 和 $ 2^{15} $。
- 由于采用内存节约型设计,关键切换操作完全在片上完成,即使在大参数下也无需任何片外内存访问。
- 对于 $ (438, 2^{14}) $ 参数集,Medha 的延迟比块流水硬件加速器 HEAX 低近 2.37 倍。
- FPGA 原型验证表明,硬件加速可在不牺牲可编程性与灵活性的前提下,实现高性能。
- 作者预测,在 ASIC 优化版本的 Medha 中,性能还可进一步提升 5–10 倍。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。