Abstract
With the rise of lattice cryptography, (negacyclic) convolution has received increased attention. E.g., the NTRU scheme internally employs cyclic polynomial multiplication, which is equivalent to the standard convolution, on the other hand, many Ring-LWE-based cryptosystems perform negacyclic polynomial multiplication. A method by Crandall implements an efficient negacyclic convolution over a finite field of prime order using an extended Discrete Galois Transform (DGT) – a finite field analogy to Discrete Fourier Transform (DFT). Compared to DGT, the classical DFT runs faster by an order of magnitude, however, it suffers from inevitable rounding errors due to finite floating-point number representation. In a recent Fully Homomorphic Encryption (FHE) scheme by Chillotti et al. named TFHE, small errors are acceptable (although not welcome), therefore we decided to investigate the application of DFT for negacyclic convolution.
The primary goal of this paper is to suggest a method for fast negacyclic convolution over integer coefficients using an extended DFT. The key contribution is a thorough analysis of error propagation, as a result of which we derive parameter bounds that can guarantee even error-free results. We also suggest a setup that admits rare errors, which allows to increase the degree of the polynomials and/or their maximum norm at a fixed floating-point precision. Finally, we run benchmarks with parameters derived from a practical \(\mathsf {TFHE}\) setup. We achieve around \(24{\times }\) better times than the generic NTL library (comparable to Crandall’s method) and around \(4{\times }\) better times than a naïve approach with DFT, with no errors.
This work was supported by the Grant Agency of CTU in Prague, grant No. SGS21/160/OHK3/3T/13.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Goldstine [15] attributes an \(\mathsf {FFT}\)-like algorithm to C. F. Gauss dating to around 1805.
References
IEEE Standard for Floating-Point Arithmetic: IEEE Std 754–2019 (Revision of IEEE 754–2008), pp. 1–84 (2019)
Ajtai, M.: Generating hard instances of lattice problems. In: Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing, pp. 99–108 (1996)
Al Badawi, A., Veeravalli, B., Aung, K.M.M.: Efficient polynomial multiplication via modified discrete galois transform and negacyclic convolution. In: Arai, K., Kapoor, S., Bhatia, R. (eds.) FICC 2018. AISC, vol. 886, pp. 666–682. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-03402-3_47
Bernstein, D.J.: Multidigit multiplication for mathematicians (2001)
Bourse, F., Minelli, M., Minihold, M., Paillier, P.: Fast homomorphic evaluation of deep discretized neural networks. In: Shacham, H., Boldyreva, A. (eds.) CRYPTO 2018. LNCS, vol. 10993, pp. 483–512. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-96878-0_17
Brakerski, Z., Gentry, C., Vaikuntanathan, V.: (Leveled) fully homomorphic encryption without bootstrapping. ACM Trans. Comput. Theory (TOCT) 6(3), 13 (2014)
Carpov, S., Izabachène, M., Mollimard, V.: New techniques for multi-value input homomorphic evaluation and applications. In: Matsui, M. (ed.) CT-RSA 2019. LNCS, vol. 11405, pp. 106–126. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-12612-4_6
Chillotti, I., Gama, N., Georgieva, M., Izabachène, M.: TFHE: fast fully homomorphic encryption over the torus. J. Cryptol. 33(1), 34–91 (2020)
Cooley, J.W., Tukey, J.W.: An algorithm for the machine calculation of complex Fourier series. Math. Comput. 19(90), 297–301 (1965)
Crandall, R., Pomerance, C.B.: Prime Numbers: A Computational Perspective, vol. 182. Springer, New York (2006)
Crandall, R.E.: Integer convolution via split-radix fast galois transform. Center for Advanced Computation Reed College (1999)
Ding, J., Schmidt, D.: Rainbow, a new multivariable polynomial signature scheme. In: Ioannidis, J., Keromytis, A., Yung, M. (eds.) ACNS 2005. LNCS, vol. 3531, pp. 164–175. Springer, Heidelberg (2005). https://doi.org/10.1007/11496137_12
Gentleman, W.M., Sande, G.: Fast Fourier transforms: for fun and profit. In: Proceedings of the November 7–10, 1966, Fall Joint Computer Conference, pp. 563–578 (1966)
Gentry, C., Boneh, D.: A Fully Homomorphic Encryption Scheme, vol. 20. Stanford University (2009)
Goldstine, H.H.: A history of numerical analysis from the 16th through the 19th century. Bull. Am. Math. Soc. 1, 388–390 (1979)
Hart, W., Johansson, F., Pancratz, S.: FLINT: Fast Library for Number Theory (2011). https://www.flintlib.org/
Hoffstein, J., Pipher, J., Silverman, J.H.: NTRU: a ring-based public key cryptosystem. In: Buhler, J.P. (ed.) ANTS 1998. LNCS, vol. 1423, pp. 267–288. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0054868
Jao, D., De Feo, L.: Towards quantum-resistant cryptosystems from supersingular elliptic curve isogenies. In: Yang, B.-Y. (ed.) PQCrypto 2011. LNCS, vol. 7071, pp. 19–34. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-25405-5_2
Karatsuba, A.A., Ofman, Y.P.: Multiplication of many-digital numbers by automatic computers. In: Doklady Akademii Nauk, vol. 145, pp. 293–294. Russian Academy of Sciences (1962)
Klemsa, J.: Benchmarking FFNT (2021). https://gitlab.fit.cvut.cz/klemsjak/ffnt-benchmark
Lyubashevsky, V., Peikert, C., Regev, O.: On ideal lattices and learning with errors over rings. In: Gilbert, H. (ed.) EUROCRYPT 2010. LNCS, vol. 6110, pp. 1–23. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-13190-5_1
Fast Fourier transform in x86 assembly (2021). https://www.nayuki.io/page/fast-fourier-transform-in-x86-assembly. Accessed 30 Jan 2021
NIST: NIST’s Post-Quantum Cryptography Program Enters “Selection Round” (2020). https://www.nist.gov/news-events/news/2020/07/nists-post-quantum-cryptography-program-enters-selection-round
Regev, O.: On lattices, learning with errors, random linear codes, and cryptography. J. ACM (JACM) 56(6), 1–40 (2009)
Schönhage, A., Strassen, V.: Schnelle multiplikation grosser zahlen. Computing 7(3), 281–292 (1971)
Shor, P.W.: Algorithms for quantum computation: discrete logarithms and factoring. In: Proceedings 35th Annual Symposium on Foundations of Computer Science, pp. 124–134. IEEE (1994)
Shoup, V., et al.: NTL: a library for doing number theory (2001). https://libntl.org/
TFHE: Fast Fully Homomorphic Encryption Library over the Torus (2016). https://github.com/tfhe/tfhe
Acknowledgments
We would like to thank Ahmad Al Badawi for useful comments and remarks.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendices
Appendix
A Proof of Proposition 1
Proof
Let us begin with the cyclic convolution. By (30) and Lemma 1 and 2, we have
which we apply as the initial error and variance bound to (22) and (23), respectively, together with multiplication by \(\nicefrac {1}{N} = 2^{-\nu }\), which poses the only difference between \(\mathsf {FFT}^{-1}\) and \(\mathsf {FFT}\) from the error point of view. We neglect other than leading terms and we get
and the cyclic results follow.
For the negacyclic convolution, we feed DFT with a folded and twisted input vector; cf. (31). It enters DFT with error bounded as
Regarding variance, it shows that the term with \(\mathsf {Var}\bigl (\mathsf {Err}(\mathbf{f}'')\bigr )\) will be neglected. Next, we precompute
and apply into
Next, we apply these estimates as the initial error and variance bound into (22) and (23), respectively, together with multiplication by \(\nicefrac {2}{N} = 2^{-\nu +1}\). We have
while in (52), it has shown that the term with \(V_{\bar{\mathbf{H}}}\) was not the leading term, hence it was neglected. By (31) it remains to untwist and unfold, we have
Since the unfolding operation does not change the error, the negacyclic results follow. \(\square \)
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Klemsa, J. (2021). Fast and Error-Free Negacyclic Integer Convolution Using Extended Fourier Transform. In: Dolev, S., Margalit, O., Pinkas, B., Schwarzmann, A. (eds) Cyber Security Cryptography and Machine Learning. CSCML 2021. Lecture Notes in Computer Science(), vol 12716. Springer, Cham. https://doi.org/10.1007/978-3-030-78086-9_22
Download citation
DOI: https://doi.org/10.1007/978-3-030-78086-9_22
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-78085-2
Online ISBN: 978-3-030-78086-9
eBook Packages: Computer ScienceComputer Science (R0)