Accelerating Fully Homomorphic Encryption Through Architecture-Centric Analysis and Optimization

Homomorphic Encryption (HE) draws a significant attention as a privacy-preserving way for cloud computing because it allows computation on encrypted messages called ciphertexts. Among numerous HE schemes proposed, HE for Arithmetic of Approximate Numbers (HEAAN) is rapidly gaining popularity across a wide range of applications because it supports messages that can tolerate approximate computation with no limit on the number of arithmetic operations applicable to the corresponding ciphertexts. A critical shortcoming of HE is the high computation complexity of ciphertext arithmetic; especially, HE multiplication (HE Mul) is more than 10,000 times slower than the corresponding multiplication between unencrypted messages. This leads to a large body of HE acceleration studies, including ones exploiting FPGAs; however, those did not conduct a rigorous analysis of computational complexity and data access patterns of HE Mul. Moreover, the proposals mostly focused on designs with small parameter sizes, making it difficult to accurately estimate their performance in conducting a series of complex arithmetic operations. In this paper, we first describe how HE Mul of HEAAN is performed in a manner friendly to computer architects. Then we conduct a disciplined analysis on its computational and memory access characteristics, through which we (1) extract parallelism in the key functions composing HE Mul and (2) demonstrate how to effectively map the parallelism to the popular parallel processing platforms, multicore CPUs and GPUs, by applying a series of optimization techniques such as transposing matrices and pinning data to threads. This leads to the performance improvement of HE Mul on a CPU and a GPU by 42.9x and 134.1x, respectively, over the single-thread reference HEAAN running on a CPU. The conducted analysis and optimization would set a new foundation for future HE acceleration research.

[1]  David Harvey,et al.  Faster arithmetic for number-theoretic transforms , 2012, J. Symb. Comput..

[2]  Rosario Cammarota,et al.  nGraph-HE2: A High-Throughput Framework for Neural Network Inference on Encrypted Data , 2019, IACR Cryptol. ePrint Arch..

[3]  Tharam S. Dillon,et al.  Cloud Computing: Issues and Challenges , 2010, 2010 24th IEEE International Conference on Advanced Information Networking and Applications.

[4]  Berk Sunar,et al.  A Custom Accelerator for Homomorphic Encryption Applications , 2017, IEEE Transactions on Computers.

[5]  Vinod Vaikuntanathan,et al.  On-the-fly multiparty computation on the cloud via multikey fully homomorphic encryption , 2012, STOC '12.

[6]  Pascal Paillier,et al.  Public-Key Cryptosystems Based on Composite Degree Residuosity Classes , 1999, EUROCRYPT.

[7]  Frederik Vercauteren,et al.  Somewhat Practical Fully Homomorphic Encryption , 2012, IACR Cryptol. ePrint Arch..

[8]  Jung Hee Cheon,et al.  A Full RNS Variant of Approximate Homomorphic Encryption , 2018, IACR Cryptol. ePrint Arch..

[9]  C. Ding Chinese remainder theorem , 1996 .

[10]  Randy H. Katz,et al.  A view of cloud computing , 2010, CACM.

[11]  Nicolas Gama,et al.  TFHE: Fast Fully Homomorphic Encryption Over the Torus , 2019, Journal of Cryptology.

[12]  Bharadwaj Veeravalli,et al.  High-Performance FV Somewhat Homomorphic Encryption on GPUs: An Implementation using CUDA , 2018, IACR Trans. Cryptogr. Hardw. Embed. Syst..

[13]  Jie Lin,et al.  The AlexNet Moment for Homomorphic Encryption: HCNN, the First Homomorphic CNN on Encrypted Data with GPUs , 2018, IACR Cryptol. ePrint Arch..

[14]  Craig Gentry,et al.  A fully homomorphic encryption scheme , 2009 .

[15]  Frederik Vercauteren,et al.  HEPCloud: An FPGA-Based Multicore Processor for FV Somewhat Homomorphic Function Evaluation , 2018, IEEE Transactions on Computers.

[16]  Kim Laine,et al.  HEAX: High-Performance Architecture for Computation on Homomorphically Encrypted Data in the Cloud , 2019, IACR Cryptol. ePrint Arch..

[17]  Jung Hee Cheon,et al.  Faster Homomorphic Discrete Fourier Transforms and Improved FHE Bootstrapping , 2018, IACR Cryptol. ePrint Arch..

[18]  Kurt Rohloff,et al.  Designing an FPGA-Accelerated Homomorphic Encryption Co-Processor , 2017, IEEE Transactions on Emerging Topics in Computing.

[19]  Craig Gentry,et al.  (Leveled) fully homomorphic encryption without bootstrapping , 2012, ITCS '12.

[20]  A. Salomaa,et al.  Chinese remainder theorem: applications in computing, coding, cryptography , 1996 .

[21]  Berk Sunar,et al.  cuHE: A Homomorphic Encryption Accelerator Library , 2015, IACR Cryptol. ePrint Arch..

[22]  Taher El Gamal A public key cryptosystem and a signature scheme based on discrete logarithms , 1984, IEEE Trans. Inf. Theory.

[23]  Prashant Pandey,et al.  Cloud computing , 2010, ICWET.

[24]  V. Kavitha,et al.  A survey on security issues in service delivery models of cloud computing , 2011, J. Netw. Comput. Appl..

[25]  Ronald L. Rivest,et al.  ON DATA BANKS AND PRIVACY HOMOMORPHISMS , 1978 .

[26]  Li Fei-Fei,et al.  Faster CryptoNets: Leveraging Sparsity for Real-World Encrypted Inference , 2018, ArXiv.

[27]  Frederik Vercauteren,et al.  FPGA-Based High-Performance Parallel Architecture for Homomorphic Computing on Encrypted Data , 2019, 2019 IEEE International Symposium on High Performance Computer Architecture (HPCA).

[28]  Michael Naehrig,et al.  CryptoNets: applying neural networks to encrypted data with high throughput and accuracy , 2016, ICML 2016.

[29]  Jung Hee Cheon,et al.  Bootstrapping for Approximate Homomorphic Encryption , 2018, IACR Cryptol. ePrint Arch..

[30]  D. J. Bernstein Fast multiplication and its applications , 2008 .

[31]  Bohn Stafleu van Loghum,et al.  Online … , 2002, LOG IN.

[32]  Léo Ducas,et al.  FHEW: Bootstrapping Homomorphic Encryption in Less Than a Second , 2015, EUROCRYPT.

[33]  Julien Eynard,et al.  A Full RNS Variant of FV Like Somewhat Homomorphic Encryption Schemes , 2016, SAC.

[34]  Efraim Rotem,et al.  Inside 6th-Generation Intel Core: New Microarchitecture Code-Named Skylake , 2017, IEEE Micro.

[35]  Hao Chen,et al.  Simple Encrypted Arithmetic Library - SEAL v2.1 , 2016, Financial Cryptography Workshops.

[36]  Berk Sunar,et al.  Accelerating LTV Based Homomorphic Encryption in Reconfigurable Hardware , 2015, CHES.

[37]  J. Tukey,et al.  An algorithm for the machine calculation of complex Fourier series , 1965 .

[38]  Jung Hee Cheon,et al.  Homomorphic Encryption for Arithmetic of Approximate Numbers , 2017, ASIACRYPT.

[39]  Bharadwaj Veeravalli,et al.  Implementation and Performance Evaluation of RNS Variants of the BFV Homomorphic Encryption Scheme , 2019, IEEE Transactions on Emerging Topics in Computing.

[40]  Jung Hee Cheon,et al.  Logistic regression model training based on the approximate homomorphic encryption , 2018, BMC Medical Genomics.