Paper 2024/1014

Grafting: Complementing RNS in CKKS

Jung Hee Cheon, Seoul National University, CryptoLab Inc.
Hyeongmin Choe, Seoul National University
Minsik Kang, Seoul National University
Jaehyung Kim, CryptoLab Inc.
Abstract

The RNS variant of the CKKS scheme (SAC 2018) is widely implemented due to its computational efficiency. However, the current optimized implementations of the RNS-CKKS scheme have a limitation when choosing the ciphertext modulus. It requires the scale factors to be approximately equal to a factor (or a product of factors) of the ciphertext modulus. This restriction causes inefficiency when the scale factor is not close to the power of the machine's word size, wasting the machine's computation budget. In this paper, we solve this implementation-side issue algorithmically by introducing \emph{Grafting}, a ciphertext modulus management system. In Grafting, we mitigate the link between the ciphertext modulus and the application-dependent scale factor. We efficiently enable rescaling by an arbitrary amount of bits by suggesting a method managing the ciphertext modulus with mostly word-sized factors. Thus, we can fully utilize the machine architecture with word-sized factors of the ciphertext modulus while keeping the application-dependent scale factors. This also leads to hardware-friendly RNS-CKKS implementation as a side effect. Furthermore, we apply our technique to Tuple-CKKS multiplication (CCS 2023), solving a restriction due to small scale factors. Our proof-of-concept implementation shows that the overall complexity of RNS-CKKS is almost proportional to the number of coprime factors comprising the ciphertext modulus, of size smaller than the machine's word size. This results in a substantial speed-up from Grafting: $17$-$51$% faster homomorphic multiplications and $43$% faster CoeffsToSlots in bootstrapping, implemented based on the HEaaN library. We estimate that the computational gain could range up to $1.71\times$ speed-up for the current parameters used in the RNS-CKKS libraries.

Metadata
Available format(s)
PDF
Category
Implementation
Publication info
Preprint.
Keywords
Homomorphic EncryptionRNS-CKKS
Contact author(s)
jhcheon @ snu ac kr
sixtail528 @ snu ac kr
kaiser351 @ snu ac kr
jaehyungkim @ cryptolab co kr
History
2024-06-28: approved
2024-06-24: received
See all versions
Short URL
https://ia.cr/2024/1014
License
Creative Commons Attribution
CC BY

BibTeX

@misc{cryptoeprint:2024/1014,
      author = {Jung Hee Cheon and Hyeongmin Choe and Minsik Kang and Jaehyung Kim},
      title = {Grafting: Complementing {RNS} in {CKKS}},
      howpublished = {Cryptology ePrint Archive, Paper 2024/1014},
      year = {2024},
      note = {\url{https://eprint.iacr.org/2024/1014}},
      url = {https://eprint.iacr.org/2024/1014}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.