Skip to main content

Towards Practical GGM-Based PRF from (Module-)Learning-with-Rounding

  • Conference paper
  • First Online:
Book cover Selected Areas in Cryptography – SAC 2019 (SAC 2019)

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

Included in the following conference series:

Abstract

We investigate the efficiency of a \(\mathsf {(module}\text {-}\mathsf {)LWR}\)-based PRF built using the GGM design. Our construction enjoys the security proof of the GGM construction and the \(\mathsf {(module}\text {-}\mathsf {)LWR}\) hardness assumption which is believed to be post-quantum secure. We propose GGM-based PRFs from PRGs with larger ratio of output to input. This reduces the number of PRG invocations which improves the PRF performance and reduces the security loss in the GGM security reduction. Our construction bridges the gap between practical and provably secure PRFs. We demonstrate the efficiency of our construction by providing parameters achieving at least 128-bit post-quantum security and optimized implementations utilizing AVX2 vector instructions. Our PRF requires, on average, only 39.4 cycles per output byte.

This work was supported in part by BPI-France in the context of the national project RISQ (P141580), by the European Union PROMETHEUS project (Horizon 2020 Research and Innovation Program, grant 780701).

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

Access this chapter

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

Notes

  1. 1.

    Available at https://github.com/BeJade/mlwr-prf.

References

  1. 25th Annual Symposium on Foundations of Computer Science, West Palm Beach, Florida, USA, 24–26 October 1984. IEEE Computer Society (1984)

    Google Scholar 

  2. 2018 IEEE European Symposium on Security and Privacy, EuroS&P 2018, London, United Kingdom, 24–26 April 2018. IEEE (2018)

    Google Scholar 

  3. Alkim, E., Ducas, L., Pöppelmann, T., Schwabe, P.: Post-quantum key exchange - a new hope. In: USENIX 2016 [24], pp. 327–343 (2016)

    Google Scholar 

  4. Alperin-Sheriff, J., Apon, D.: Dimension-preserving reductions from LWE to LWR. IACR Cryptology ePrint Archive 2016:589 (2016)

    Google Scholar 

  5. Alwen, J., Krenn, S., Pietrzak, K., Wichs, D.: Learning with rounding, revisited. In: CRYPTO 2013 [14], pp. 57–74 (2013)

    Chapter  Google Scholar 

  6. Banerjee, A., Brenner, H., Leurent, G., Peikert, C., Rosen, A.: SPRING: fast pseudorandom functions from rounded ring products. In: FSE 2014 [17], pp. 38–57 (2014)

    Chapter  Google Scholar 

  7. Banerjee, A., Peikert, C., Rosen, A.: Pseudorandom functions and lattices. In: EUROCRYPT 2012 [42], pp. 719–737 (2012)

    Chapter  Google Scholar 

  8. Becker, A., Ducas, L., Gama, N., Laarhoven, T.: New directions in nearest neighbor searching with applications to lattice sieving. In: SODA 2016 [26], pp. 10–24 (2016)

    Google Scholar 

  9. Bernstein, D.J.: Batch binary edwards. In: CRYPTO [23], pp. 317–336 (2009)

    Chapter  Google Scholar 

  10. Bogdanov, A., Guo, S., Masny, D., Richelson, S., Rosen, A.: On the hardness of learning with rounding over small modulus. In: TCC 2016 [27], pp. 209–224 (2016)

    MATH  Google Scholar 

  11. Bos, J.W.: CRYSTALS - Kyber: a CCA-secure module-lattice-based KEM. In: EuroS&P 2018 [2], pp. 353–367 (2018)

    Google Scholar 

  12. Bouillaguet, C., Delaplace, C., Fouque, P.-A., Kirchner, P.: Fast lattice-based encryption: stretching Spring. In: PQCrypto 2017 [31], pp. 125–142 (2017)

    Chapter  Google Scholar 

  13. Brakerski, Z., Gentry, C., Vaikuntanathan, V.: (Leveled)fully homomorphic encryption without bootstrapping. TOCT 6(3), 13:1–13:36 (2014)

    Article  MathSciNet  Google Scholar 

  14. Canetti, R., Garay, J.A. (eds.): CRYPTO 2013. LNCS, vol. 8042. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40041-4

    Book  MATH  Google Scholar 

  15. Charikar, M. (ed.): Proceedings of the Twenty-First Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2010, Austin, Texas, USA, 17–19 January 2010. SIAM (2010)

    Google Scholar 

  16. Chen, Y., Nguyen, P.Q.: BKZ 2.0: better lattice security estimates. In: ASIACRYPT 2011 [33], pp. 1–20 (2011)

    Google Scholar 

  17. Cid, C., Rechberger, C. (eds.): FSE 2014. LNCS, vol. 8540. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-46706-0

    Book  Google Scholar 

  18. Ducas, L., Lepoint, T., Lyubashevsky, V., Schwabe, P., Seiler, G., Stehlé, D.: CRYSTALS - dilithium: digital signatures from module lattices. IACR Cryptology ePrint Archive 2017:633 (2017)

    Google Scholar 

  19. Gabow, H.N., Fagin, R. (eds.): Proceedings of the 37th Annual ACM Symposium on Theory of Computing, Baltimore, MD, USA, 22–24 May 2005. ACM (2005)

    Google Scholar 

  20. Gennaro, R., Robshaw, M. (eds.): CRYPTO 2015. LNCS, vol. 9215. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-47989-6

    Book  MATH  Google Scholar 

  21. Gilbert, H. (ed.): EUROCRYPT 2010. LNCS, vol. 6110. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-13190-5

    Book  MATH  Google Scholar 

  22. Goldreich, O., Goldwasser, S., Micali, S.: How to construct random functions (extended abstract). In: FOCS 1984 [1], pp. 464–479 (1984)

    Google Scholar 

  23. Halevi, S. (ed.): CRYPTO 2009. LNCS, vol. 5677. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-03356-8

    Book  MATH  Google Scholar 

  24. Holz, T., Savage, S. (eds.): 25th USENIX Security Symposium, USENIX Security 2016, Austin, TX, USA, 10–12 August 2016. USENIX Association (2016)

    Google Scholar 

  25. Katz, J., Lindell, Y.: Introduction to Modern Cryptography. Chapman & Hall/CRC, Boca Raton (2007)

    Book  Google Scholar 

  26. Krauthgamer, R. (ed.): Proceedings of the Twenty-Seventh Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2016, Arlington, VA, USA, 10–12 January 2016. SIAM (2016)

    Google Scholar 

  27. Kushilevitz, E., Malkin, T. (eds.): TCC 2016. LNCS, vol. 9563. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49099-0

    Book  Google Scholar 

  28. Laarhoven, T.: Search problems in cryptography. Ph.D. thesis, Eindhoven University of Technology, The Netherlands (2015)

    Google Scholar 

  29. Laarhoven, T.: Sieving for shortest vectors in lattices using angular locality-sensitive hashing. In: CRYPTO 2015 [20], pp. 3–22 (2015)

    MATH  Google Scholar 

  30. Laarhoven, T., Mosca, M., van de Pol, J.: Finding shortest lattice vectors faster using quantum search. Des. Codes Cryptogr. 77(2–3), 375–400 (2015)

    Article  MathSciNet  Google Scholar 

  31. Lange, T., Takagi, T. (eds.): PQCrypto 2017. LNCS, vol. 10346. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-59879-6

    Book  Google Scholar 

  32. Langlois, A., Stehlé, D.: Worst-case to average-case reductions for module lattices. Des. Codes Cryptogr. 75(3), 565–599 (2015)

    Article  MathSciNet  Google Scholar 

  33. Lee, D.H., Wang, X. (eds.): ASIACRYPT 2011. LNCS, vol. 7073. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-25385-0

    Book  MATH  Google Scholar 

  34. Lyubashevsky, V., Peikert, C., Regev, O.: On ideal lattices and learning with errors over rings. In: EUROCRYPT 2010 [21], pp. 1–23 (2010)

    Google Scholar 

  35. Lyubashevsky, V., Peikert, C., Regev, O.: On ideal lattices and learning with errors over rings. J. ACM 60(6), 43:1–43:35 (2013). Preliminary version in Eurocrypt 2010 [21]

    Article  MathSciNet  Google Scholar 

  36. Micciancio, D., Voulgaris, P.: Faster exponential time algorithms for the shortest vector problem. In: SODA 2010 [15], pp. 1468–1480 (2010)

    Google Scholar 

  37. Naor, M., Reingold, O.: Synthesizers and their application to the parallel construction of pseudo-random functions. J. Comput. Syst. Sci. 58(2), 336–375 (1999). Preliminary version in FOCS 1995

    Article  MathSciNet  Google Scholar 

  38. Naor, M., Reingold, O.: Number-theoretic constructions of efficient pseudo-random functions. J. ACM 51(2), 231–262 (2004). Preliminary version in FOCS 1997

    Article  MathSciNet  Google Scholar 

  39. Naor, M., Reingold, O., Rosen, A.: Pseudorandom functions and factoring. SIAM J. Comput. 31(5), 1383–1404 (2002). Preliminary version in STOC 2000

    Article  MathSciNet  Google Scholar 

  40. Nguyen, P.Q., Vidick, T.: Sieve algorithms for the shortest vector problem are practical. J. Math. Cryptol. 2(2), 181–207 (2008)

    Article  MathSciNet  Google Scholar 

  41. National Institute of Standards and Technology. SHA-3 standard: Permutation-based hash and extendable-output functions. FIPS PUB 202 (2015). http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf

  42. Pointcheval, D., Johansson, T. (eds.): EUROCRYPT 2012. LNCS, vol. 7237. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-29011-4

    Book  MATH  Google Scholar 

  43. Regev, O.: On lattices, learning with errors, random linear codes, and cryptography. In: STOC 2005 [19], pp. 84–93 (2005)

    Google Scholar 

  44. Schnorr, C.-P., Euchner, M.: Lattice basis reduction: improved practical algorithms and solving subset sum problems. Math. Program. 66(2), 181–199 (1994)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Chitchanok Chuengsatiansup or Damien Stehlé .

Editor information

Editors and Affiliations

A LWR-based PRG

A LWR-based PRG

This Appendix explains our PRF construction based on the \(\mathsf {LWR}\) hardness assumption. Note that, in general, this construction is very much similar to the one in the main article which is based on the \(\mathsf {module}\text {-}\mathsf {LWR}\) hardness assumption. In order not to repeat the same details, we only highlight the differences between the two constructions.

1.1 A.1 Construction

Construction 2 outlines our \(\mathsf {LWR}\)-variant PRF. Recall that the PRF takes two inputs, namely, a key k and a string x of length \(\ell \), and outputs a pseudorandom string z. The matrix \(\mathbf A\) is a public parameter. Similar to the \(\mathsf {module}\text {-}\mathsf {LWR}\) construction, the \(\mathsf {LWR}\) construction is also divided into three parts: pre-computation, main loop, and outputting. Below, we emphasize the differences between the two constructions parts by parts.

figure b

Pre-computation. There is no differences in the way we generate randomness, i.e., \(\mathsf {Random}(k)\), and reformat, i.e., \(\mathsf {Reformat}(\mathbf{t})\). Note however that \(\mathbf{s} \in \mathbb {Z}_{\log B}^n\) (instead of \(\mathcal {R}_{\log B}^{n'}\)).

The reasons for having \(\mathsf {Random}(k)\) are also the same, namely, in case the input k is not random or does not have the preferred length. If this is not the case, then \(\mathsf {Random}(k)\) can be skipped and directly proceed to \(\mathsf {Reformat}(\mathbf{t})\).

Main Loop. Since the underlying PRG is now constructed from \(\mathsf {LWR}\), we need to change polynomial multiplications to integer multiplications. Nevertheless, a similar optimization for computing \(\mathbf{As}\) is still applied, i.e., each iteration we compute vector-vector multiplications instead of a matrix-vector multiplication. For the \(\mathsf {LWR}\) case, we need to multiply only \({m}/{\omega }\) rows of the matrix \(\mathbf A\) to the vector \(\mathbf s\). This time, \(m/\omega \) is certainly more than one. We added an inner loop (line 5–8 in Construction 2) to iterate multiplying those rows. Once we multiply all those \(m/\omega \) rows and before moving the next iteration of the outer loop, we call \(\mathsf {Reformat}(\mathbf{t})\) to extract bits from \(\mathbf t\) and assign to \(\mathbf s\). Note that \(\mathbf t\) contains \(m/\omega \) elements.

Outputting. This part remains the same, namely, we perform the entire matrix-vector multiplication to increase the output length. Then we change the result into the desire format and output it.

1.2 A.2 Implementation

Two major differences between the \(\mathsf {module}\text {-}\mathsf {LWR}\) and the \(\mathsf {LWR}\) implementations are multiplication algorithm and parameter set. In what follows, we explain how we handle multiplications when we cannot use fast polynomial multiplication algorithms, and then we state possible \(\mathsf {LWR}\) parameter sets.

Multiplication. Since we use the plain \(\mathsf {LWR}\), i.e., having neither ring nor module additional structure, our multiplications are simply integer vector multiplications which can be implemented efficiently. Another advantage of using integers instead of polynomials is that we do not need to perform polynomial reductions.

Assume that we can perform w pairs of integer vector multiplications. To multiply row i of matrix \(\mathbf A\) with vector \(\mathbf s\), we load the first w elements of \(\mathbf{A}_i\) and the first w elements of \(\mathbf s\), then we perform integer vector-vector multiplication. After that, we load the next w element of \(\mathbf{A}_i\) and the next w elements of \(\mathbf s\), and again we perform another integer vector-vector multiplication. We repeat these steps until we multiply the entire row of \(\mathbf A\) with \(\mathbf s\). Since we always multiply \(A_{i,j}\) with \(s_j\), i.e, index j of \(\mathbf{A}_i\) with index j of \(\mathbf s\), this means that data are aligned in correct slots and no permutation needed. Therefore, this multiplication step works very well with vectorization.

Next step is to sum all the results of the integer vector-vector multiplications into a single integer. Unlike the multiplication step, this addition step requires permutations because we want to add data which contain in the same vector. To do so, we make use of the instruction vphaddd to perform horizontally additions and the instruction vperm2i128 to perform permutations.

Parameters. We recall parameters in our construction. Let q be a modulus and p be a rounding parameter such that \(q > p\) and \(\log q = \log p + \log B\) where q, p, and B are power of two. Let \(\mathbf {A} \in \mathbb {Z}_q^{m \times n}\) be a random public matrix. Let \(\mathbf {s} \in \mathbb {Z}_{\log B}^n\) be a small secret vector. Similar to the \(\mathsf {module}\text {-}\mathsf {LWR}\) variant, we want to set these parameters such that they satisfy the expansion-rate-\(\omega \) output length requirement and achieve at least 128-bit security for the underlying \(\mathsf {LWR}\) problem.

Recall the length condition. In our \(\mathsf {LWR}\)-based PRG, the input is the vector \(\mathbf s\) and the output is the rounded vector \(\lfloor \mathbf {As} \rfloor _p\). That is, we have the output size \(m \cdot \log {p}\) and the input size \(n \cdot (\log B)\). Therefore, the equation we consider is:

$$\begin{aligned} m \cdot \log {p}&\ge \omega \cdot (n \cdot (\log B)) \\ m \cdot (\log {q} - (\log B))&\ge \omega \cdot (n \cdot (\log B)). \end{aligned}$$

Similar remarks of requiring \(\omega \ge 2\) and larger the \(\omega \) shallower the tree also apply to the \(\mathsf {LWR}\) variant.

Now, we consider the security of the underlying \(\mathsf {LWR}\) problem. We modified Kyber’s script [11] to suit for our security estimation. Two main modifications are: (1) setting the ring dimension to 1 (because we use the plain \(\mathsf {LWR}\)); and (2) using a uniform distribution instead of a binomial one. The conditions in which we search for good parameter sets are as follows:

  • \(q = 2^{16}\), fixed

  • \(\log B \in \{ 1,2,3,4 \}\)

  • n multiple of 32 in range [640, 800]

  • m among 4, 8, 16 and 32 multiples of \(\lceil n \cdot \log B / \log p \rceil \)

Table 4 shows possible parameter sets for the \(\mathsf {LWR}\) construction. To select which parameters to implement, we prioritize the runtime and choose the last row, namely, \(m=1840,n=800,\log B = 2\) which gives \(m/\omega = 115\), the tree’s depth = 32, and the estimated security of 131.

Table 4. Good parameters achieving at least 128-bit \(\mathsf {LWR}\) security and the expansion-rate-\(\omega \) condition

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Chuengsatiansup, C., Stehlé, D. (2020). Towards Practical GGM-Based PRF from (Module-)Learning-with-Rounding. In: Paterson, K., Stebila, D. (eds) Selected Areas in Cryptography – SAC 2019. SAC 2019. Lecture Notes in Computer Science(), vol 11959. Springer, Cham. https://doi.org/10.1007/978-3-030-38471-5_28

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-38471-5_28

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-38470-8

  • Online ISBN: 978-3-030-38471-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics