基于GPU加速的全同态加密框架CAT及其在高精度隐私数据集查询中的应用
CAT: A GPU-Accelerated FHE Framework with Its Application to High-Precision Private Dataset Query
摘要 Abstract
我们介绍了一个开源的基于GPU加速的全同态加密(FHE)框架CAT,其功能性和效率均超越现有解决方案。CAT具有三层架构:核心数学的基础层、预计算元素和组合操作的桥梁层以及可API访问的FHE算子层。它利用并行执行操作、密文数据的明确定义布局模式、内核融合/分割以及双GPU池等技术来提升整体执行效率。此外,内存管理机制确保了服务器端的适用性并防止数据泄露。基于我们的框架,我们实现了三种广泛使用的FHE方案:CKKS、BFV和BGV。结果显示,基于Nvidia 4090的实现相比CPU实现速度提高了2173倍,对于特定操作相比最先进的GPU加速工作提升了1.25倍。此外,我们通过基于CKKS的隐私数据库查询场景验证,实现了比CPU版本快33倍的速度。所有查询任务可以在单个GPU上在一秒钟内处理多达10^3行的数据集,存储空间为2-5GB。我们的实现经过了广泛的稳定性测试,并可以轻松部署在商业GPU上。我们希望我们的工作能够通过提供一个稳健、面向工业且开源的工具,显著推动最先进的FHE算法在各种现实系统中的集成。
We introduce an open-source GPU-accelerated fully homomorphic encryption (FHE) framework CAT, which surpasses existing solutions in functionality and efficiency. \emph{CAT} features a three-layer architecture: a foundation of core math, a bridge of pre-computed elements and combined operations, and an API-accessible layer of FHE operators. It utilizes techniques such as parallel executed operations, well-defined layout patterns of cipher data, kernel fusion/segmentation, and dual GPU pools to enhance the overall execution efficiency. In addition, a memory management mechanism ensures server-side suitability and prevents data leakage. Based on our framework, we implement three widely used FHE schemes: CKKS, BFV, and BGV. The results show that our implementation on Nvidia 4090 can achieve up to 2173$\times$ speedup over CPU implementation and 1.25$\times$ over state-of-the-art GPU acceleration work for specific operations. What's more, we offer a scenario validation with CKKS-based Privacy Database Queries, achieving a 33$\times$ speedup over its CPU counterpart. All query tasks can handle datasets up to $10^3$ rows on a single GPU within 1 second, using 2-5 GB storage. Our implementation has undergone extensive stability testing and can be easily deployed on commercial GPUs. We hope that our work will significantly advance the integration of state-of-the-art FHE algorithms into diverse real-world systems by providing a robust, industry-ready, and open-source tool.