GPU におけるブートストラップ可能な同型暗号のための数論的変換の高速化
Accelerating Number Theoretic Transformations for Bootstrappable Homomorphic Encryption on GPUs
Accelerating Number Theoretic Transformations for Bootstrappable Homomorphic Encryption on GPUs
@misc{kim2020accelerating,
title = {Accelerating Number Theoretic Transformations for Bootstrappable Homomorphic Encryption on GPUs},
author = {Sangpyo Kim and Wonkyung Jung and Jaiyoung Park and Jung Ho Ahn},
year = {2020},
eprint = {2012.01968},
archivePrefix = {arXiv},
primaryClass = {cs.CR},
url = {https://arxiv.org/abs/2012.01968}
}
Kim, S., Jung, W., Park, J., & Ahn, J. H. (2020). Accelerating Number Theoretic Transformations for Bootstrappable Homomorphic Encryption on GPUs [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2012.01968
KIM S, JUNG W, PARK J, et al. Accelerating Number Theoretic Transformations for Bootstrappable Homomorphic Encryption on GPUs[EB/OL]. (2020-12-03)[2026-11-29]. https://arxiv.org/abs/2012.01968.
要旨
同型暗号 (HE) は、暗号化されたメッセージ上でプライバシーを維持した計算を可能にするため、大きな注目を集めています。有限体における整数の離散フーリエ変換 (DFT) の特殊な形式である数論的変換 (NTT) は、HE において暗号化された暗号文上で高速計算を可能にする鍵となるアルゴリズムです。これまでの研究では、NTT とその逆変換を加速するために、DFT の最適化技術を活用して人気のある並列処理プラットフォームである GPU 上で処理を高速化しています。しかし、これらの GPU ベースの研究は、NTT と DFT の主要な違いに関する包括的な分析を欠いているか、暗号化を解除せずに実行可能な演算数の制約が厳しい小さな HE パラメータのみを考慮している場合があります。本稿では、NTT と DFT のアルゴリズム的特性を分析し、DFT と NTT に共通して適用可能な最適化を現代の GPU に適用した場合の NTT の性能を評価します。分析の結果、NTT は大規模な HE パラメータセットにおいて、メインメモリ帯域幅のボトルネックに苦しむことが明らかになりました。このメインメモリ帯域幅の問題に対処するため、本稿では NTT 固有のオンザフライルート生成スキーム、すなわちオンザフライ・トゥィドルリング (OT) を提案します。ベースラインのラジクス 2 NTT 実装と比較し、OT を含むすべての最適化を適用した結果、現代の GPU 上で 4.2 倍の高速化を実現しました。
Homomorphic encryption (HE) draws huge attention as it provides a way of privacy-preserving computations on encrypted messages. Number Theoretic Transform (NTT), a specialized form of Discrete Fourier Transform (DFT) in the finite field of integers, is the key algorithm that enables fast computation on encrypted ciphertexts in HE. Prior works have accelerated NTT and its inverse transformation on a popular parallel processing platform, GPU, by leveraging DFT optimization techniques. However, these GPU-based studies lack a comprehensive analysis of the primary differences between NTT and DFT or only consider small HE parameters that have tight constraints in the number of arithmetic operations that can be performed without decryption. In this paper, we analyze the algorithmic characteristics of NTT and DFT and assess the performance of NTT when we apply the optimizations that are commonly applicable to both DFT and NTT on modern GPUs. From the analysis, we identify that NTT suffers from severe main-memory bandwidth bottleneck on large HE parameter sets. To tackle the main-memory bandwidth issue, we propose a novel NTT-specific on-the-fly root generation scheme dubbed on-the-fly twiddling (OT). Compared to the baseline radix-2 NTT implementation, after applying all the optimizations, including OT, we achieve 4.2x speedup on a modern GPU.