arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.01598cs.CRcs.ARcs.PF
收藏

CiFlow:同态加密密钥切换的数据流分析与优化

CiFlow: Dataflow Analysis and Optimization of Key Switching for Homomorphic Encryption

Negar Neda, Austin Ebel, Benedict Reynwar, Brandon Reagen

AI总结:

本文针对同态加密中占约70%耗时的密钥切换瓶颈,提出并评估 MP、DC、OC 三种数据流,证明 OC 可减少中间工作集与片外访问,在 RPU 上最高加速4.16倍并节省12.25倍SRAM。

摘要:

同态加密(HE)是一种隐私保护计算技术,支持在加密数据上进行计算。如今,HE 的潜力在很大程度上仍未实现,因为其速度慢得不切实际,阻碍了它在真实应用中的使用。HE 的一个主要计算瓶颈是密钥切换操作,该操作约占 HE 整体执行时间的 70%,并且涉及大量输入、中间结果和密钥数据。先前研究主要关注通过硬件加速器提升 HE 性能,这类加速器通常配备大容量片上 SRAM 和高片外带宽,以处理大规模数据。本文提出一种通过严格分析密钥切换数据流来提升其性能的新方法。主要目标是在有限片上内存条件下优化数据复用,从而最小化片外数据移动。我们引入三种不同的数据流:Max-Parallel(MP)、Digit-Centric(DC)和 Output-Centric(OC),每一种都具有针对密钥切换计算的独特调度方式。通过分析,我们展示了所提出的 Output-Centric 技术如何通过显著降低密钥切换中间工作集并缓解对海量片外带宽的需求,从而有效复用数据。我们使用 RPU 对三种数据流进行了全面评估;RPU 是近期发布的一种面向环处理算法定制的向量处理器,这些算法包括 HE。该评估考虑了带宽和计算吞吐量的扫描,以及密钥是在片上缓冲还是以流式传输。借助 OC,我们证明其相比 MP 数据流最高可实现 4.16 倍加速,并展示了 OC 如何通过以流式方式传输密钥来节省 12.25 倍片上 SRAM,同时性能损失极小。

英文摘要:

Homomorphic encryption (HE) is a privacy-preserving computation technique that enables computation on encrypted data. Today, the potential of HE remains largely unrealized as it is impractically slow, preventing it from being used in real applications. A major computational bottleneck in HE is the key-switching operation, accounting for approximately 70% of the overall HE execution time and involving a large amount of data for inputs, intermediates, and keys. Prior research has focused on hardware accelerators to improve HE performance, typically featuring large on-chip SRAMs and high off-chip bandwidth to deal with large scale data. In this paper, we present a novel approach to improve key-switching performance by rigorously analyzing its dataflow. Our primary goal is to optimize data reuse with limited on-chip memory to minimize off-chip data movement. We introduce three distinct dataflows: Max-Parallel (MP), Digit-Centric (DC), and Output-Centric (OC), each with unique scheduling approaches for key-switching computations. Through our analysis, we show how our proposed Output-Centric technique can effectively reuse data by significantly lowering the intermediate key-switching working set and alleviating the need for massive off-chip bandwidth. We thoroughly evaluate the three dataflows using the RPU, a recently published vector processor tailored for ring processing algorithms, which includes HE. This evaluation considers sweeps of bandwidth and computational throughput, and whether keys are buffered on-chip or streamed. With OC, we demonstrate up to 4.16x speedup over the MP dataflow and show how OC can save 12.25x on-chip SRAM by streaming keys for minimal performance penalty.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑