Paper 2023/049

Phantom: A CUDA-Accelerated Word-Wise Homomorphic Encryption Library

Hao Yang, Nanjing University of Aeronautics and Astronautics
Shiyu Shen, Fudan University
Wangchen Dai, Zhejiang Lab
Lu Zhou, Nanjing University of Aeronautics and Astronautics
Zhe Liu, Zhejiang Lab
Yunlei Zhao, Fudan University
Abstract

Homomorphic encryption (HE) is a promising technique for privacy-preserving computations, especially the word-wise HE schemes that allow batching. However, the high computational overhead hinders the deployment of HE in real-word applications. GPUs are often used to accelerate execution, but a comprehensive performance comparison of different schemes on the same platform is still missing. In this work, we fill this gap by implementing three word-wise HE schemes BGV, BFV, and CKKS on GPU, with both theoretical and engineering optimizations. We enhance the hybrid key-switching technique, significantly reducing the computational and memory overhead. We explore several kernel fusing strategies to reuse data, resulting in reduced memory access and IO latency, and enhancing the overall performance. By comparing with the state-of-the-art works, we demonstrate the effectiveness of our implementation. Meanwhile, we introduce a unified framework that finely integrates our implementation of the three schemes, covering almost all scheme functions and homomorphic operations. We optimize the management of pre-computation, RNS bases, and memory in the framework, to provide efficient and lowlatency data access and transfer. Based on this framework, we provide a thorough benchmark of the three schemes, which can serve as a reference for scheme selection and implementation in constructing privacy-preserving applications. Our library is available for access at https://github.com/encryptorion-lab/phantom-fhe. It is released under the GPLv3 license.

Metadata
Available format(s)
PDF
Category
Implementation
Publication info
Published elsewhere. IEEE Transactions on Dependable and Secure Computing
DOI
10.1109/TDSC.2024.3363900
Keywords
Homomorphic encryptionGPU accelerationBGVBFVCKKS
Contact author(s)
crypto @ d4rk dev
shenshiyu21 @ m fudan edu cn
w dai @ my cityu edu hk
lu zhou @ nuaa edu cn
zhe liu @ nuaa edu cn
ylzhao @ fudan edu cn
History
2024-02-19: revised
2023-01-16: received
See all versions
Short URL
https://ia.cr/2023/049
License
Creative Commons Attribution
CC BY

BibTeX

@misc{cryptoeprint:2023/049,
      author = {Hao Yang and Shiyu Shen and Wangchen Dai and Lu Zhou and Zhe Liu and Yunlei Zhao},
      title = {Phantom: A {CUDA}-Accelerated Word-Wise Homomorphic Encryption Library},
      howpublished = {Cryptology {ePrint} Archive, Paper 2023/049},
      year = {2023},
      doi = {10.1109/TDSC.2024.3363900},
      url = {https://eprint.iacr.org/2023/049}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.