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 에서 암호화된 암호문 상에서 빠른 계산을 가능하게 하는 핵심 알고리즘이다. 기존 연구들은 DFT 최적화 기법을 활용하여 GPU 와 같은 인기 있는 병렬 처리 플랫폼에서 NTT 와 그 역변환을 가속화해 왔으나, 이러한 GPU 기반 연구들은 NTT 와 DFT 간의 주요 차이에 대한 포괄적인 분석을 누락하거나, 해독 없이 수행할 수 있는 연산 수에 엄격한 제약을 가진 소규모 HE 파라미터만 고려한 경우가 많다. 본 논문에서는 NTT 와 DFT 의 알고리즘적 특성을 분석하고, 현대 GPU 에 일반적으로 적용 가능한 DFT 와 NTT 최적화를 적용했을 때 NTT 의 성능을 평가한다. 분석 결과, NTT 는 대규모 HE 파라미터 세트에서 심각한 메인 메모리 대역폭 병목 현상을 겪는다는 것을 발견한다. 메인 메모리 대역폭 문제를 해결하기 위해, 우리는 NTT 전용 오프-더-플라이 루트 생성 방식을 제안한다. 이를 오프-더-플라이 트위들링 (OT) 이라고 부른다. OT 를 포함한 모든 최적화를 적용한 후, 기본 라디우스-2 NTT 구현에 비해 현대 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.