Aceleração de Transformações Teóricas de Números para Criptografia Homomórfica Bootstrappable em GPUs
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.
Resumo
A criptografia homomórfica (HE) tem atraído grande atenção, pois oferece uma maneira de realizar computações que preservam a privacidade em mensagens criptografadas. A Transformada Numérica Teórica (NTT), uma forma especializada da Transformada de Fourier Discreta (DFT) no corpo finito dos inteiros, é o algoritmo chave que habilita computações rápidas em cifras criptografadas em HE. Trabalhos anteriores aceleraram a NTT e sua transformação inversa em uma plataforma popular de processamento paralelo, a GPU, explorando técnicas de otimização de DFT. No entanto, esses estudos baseados em GPU carecem de uma análise abrangente das principais diferenças entre NTT e DFT ou consideram apenas pequenos parâmetros de HE que possuem restrições apertadas no número de operações aritméticas que podem ser realizadas sem decodificação. Neste trabalho, analisamos as características algorítmicas da NTT e da DFT e avaliamos o desempenho da NTT ao aplicarmos as otimizações comumente aplicáveis a ambas a DFT e NTT em GPUs modernas. A partir da análise, identificamos que a NTT sofre com um gargalo severo de largura de banda da memória principal em conjuntos grandes de parâmetros de HE. Para enfrentar o problema de largura de banda da memória principal, propomos um esquema de geração de raízes específica para NTT, denominado "twiddling on-the-fly" (OT). Em comparação com a implementação de radix-2 da NTT de base, após aplicar todas as otimizações, incluindo OT, alcançamos uma aceleração de 4,2x em uma GPU moderna.
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.