Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Fast and Error-Free Negacyclic Integer Convolution Using Extended Fourier Transform

  • Conference paper
  • First Online:
Cyber Security Cryptography and Machine Learning (CSCML 2021)

Part of the book series: Lecture Notes in Computer Science ((LNSC,volume 12716))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    Goldstine [15] attributes an \(\mathsf {FFT}\)-like algorithm to C. F. Gauss dating to around 1805.

References

  1. IEEE Standard for Floating-Point Arithmetic: IEEE Std 754–2019 (Revision of IEEE 754–2008), pp. 1–84 (2019)

    Google Scholar 

  2. 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)

    Google Scholar 

  3. 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

    Chapter  Google Scholar 

  4. Bernstein, D.J.: Multidigit multiplication for mathematicians (2001)

    Google Scholar 

  5. 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

    Chapter  Google Scholar 

  6. Brakerski, Z., Gentry, C., Vaikuntanathan, V.: (Leveled) fully homomorphic encryption without bootstrapping. ACM Trans. Comput. Theory (TOCT) 6(3), 13 (2014)

    MathSciNet  MATH  Google Scholar 

  7. 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

    Chapter  Google Scholar 

  8. Chillotti, I., Gama, N., Georgieva, M., Izabachène, M.: TFHE: fast fully homomorphic encryption over the torus. J. Cryptol. 33(1), 34–91 (2020)

    Article  MathSciNet  Google Scholar 

  9. Cooley, J.W., Tukey, J.W.: An algorithm for the machine calculation of complex Fourier series. Math. Comput. 19(90), 297–301 (1965)

    Google Scholar 

  10. Crandall, R., Pomerance, C.B.: Prime Numbers: A Computational Perspective, vol. 182. Springer, New York (2006)

    Google Scholar 

  11. Crandall, R.E.: Integer convolution via split-radix fast galois transform. Center for Advanced Computation Reed College (1999)

    Google Scholar 

  12. 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

    Chapter  Google Scholar 

  13. 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)

    Google Scholar 

  14. Gentry, C., Boneh, D.: A Fully Homomorphic Encryption Scheme, vol. 20. Stanford University (2009)

    Google Scholar 

  15. Goldstine, H.H.: A history of numerical analysis from the 16th through the 19th century. Bull. Am. Math. Soc. 1, 388–390 (1979)

    Google Scholar 

  16. Hart, W., Johansson, F., Pancratz, S.: FLINT: Fast Library for Number Theory (2011). https://www.flintlib.org/

  17. 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

    Chapter  Google Scholar 

  18. 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

    Chapter  MATH  Google Scholar 

  19. 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)

    Google Scholar 

  20. Klemsa, J.: Benchmarking FFNT (2021). https://gitlab.fit.cvut.cz/klemsjak/ffnt-benchmark

  21. 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

    Chapter  Google Scholar 

  22. Fast Fourier transform in x86 assembly (2021). https://www.nayuki.io/page/fast-fourier-transform-in-x86-assembly. Accessed 30 Jan 2021

  23. 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

  24. Regev, O.: On lattices, learning with errors, random linear codes, and cryptography. J. ACM (JACM) 56(6), 1–40 (2009)

    Article  MathSciNet  Google Scholar 

  25. Schönhage, A., Strassen, V.: Schnelle multiplikation grosser zahlen. Computing 7(3), 281–292 (1971)

    Article  MathSciNet  Google Scholar 

  26. 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)

    Google Scholar 

  27. Shoup, V., et al.: NTL: a library for doing number theory (2001). https://libntl.org/

  28. TFHE: Fast Fully Homomorphic Encryption Library over the Torus (2016). https://github.com/tfhe/tfhe

Download references

Acknowledgments

We would like to thank Ahmad Al Badawi for useful comments and remarks.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jakub Klemsa .

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

(42)
(43)

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

(44)
(45)

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

$$\begin{aligned} \Vert \mathsf {Err}(\mathbf{f}'')\Vert _\infty \lessapprox (1 \cdot 0 + 2^{\varphi _0 + \nicefrac {1}{2}} \cdot 2^{-\chi -1}) \cdot \sqrt{2} = 2^{\varphi _0-\chi }. \end{aligned}$$
(46)

Regarding variance, it shows that the term with \(\mathsf {Var}\bigl (\mathsf {Err}(\mathbf{f}'')\bigr )\) will be neglected. Next, we precompute

$$\begin{aligned} c_H^{(\mathbf{f}'')}&= 2 (\sqrt{2}-1) \cdot \Vert \mathsf {Err}(\mathbf{f}'')\Vert _\infty + (2 - \sqrt{2}) \cdot 2^{\varphi _0 + \nicefrac {1}{2} - \chi + 1} \nonumber \\&\lessapprox 6 (\sqrt{2}-1) \cdot 2^{\varphi _0 - \chi } , \quad \text {and} \end{aligned}$$
(47)
$$\begin{aligned} d_N^{(\mathbf{f}'')}&= \nicefrac {1}{6} \, 2^{2(\varphi _0+\nicefrac {1}{2})-2\chi } , \end{aligned}$$
(48)

and apply into

(49)
(50)

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

(51)
(52)

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

(53)
(54)

Since the unfolding operation does not change the error, the negacyclic results follow.    \(\square \)

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics