Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

Advertisement

Springer Nature Link
Log in

Certifying Giant Nonprimes

  • Conference paper
  • First Online:

Part of the book series:Lecture Notes in Computer Science ((LNCS,volume 13940))

Included in the following conference series:

  • 837Accesses

Abstract

GIMPS and PrimeGrid are large-scale distributed projects dedicated to searching giant prime numbers, usually of special forms like Mersenne and Proth primes. The numbers in the current search-space are millions of digits large and the participating volunteers need to run resource-consuming primality tests. Once a candidate primeN has been found, the only way for another party to independently verify the primality ofN used to be by repeating the expensive primality test. To avoid the need for second recomputation of each primality test, these projects have recently adopted certifying mechanisms that enable efficient verification of performed tests. However, the mechanisms presently in place only detect benign errors and there is no guarantee against adversarial behavior: a malicious volunteer can mislead the project to reject a giant prime as being non-prime.

In this paper, we propose a practical, cryptographically-sound mechanism for certifying the non-primality of Proth numbers. That is, a volunteer can – parallel to running the primality test forN – generate an efficiently verifiable proof at a little extra cost certifying thatN is not prime. The interactive protocol has statistical soundness and can be made non-interactive using the Fiat-Shamir heuristic.

Our approach is based on a cryptographic primitive called Proof of Exponentiation (PoE) which, for a group\({\mathbb {G}}\), certifies that a tuple\((x,y,T)\in {\mathbb {G}}^2\times \mathbb {N}\) satisfies\(x^{2^T}=y\) (Pietrzak, ITCS 2019 and Wesolowski, J. Cryptol. 2020). In particular, we show how to adapt Pietrzak’s PoE at a moderate additional cost to make it a cryptographically-sound certificate of non-primality.

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

Access this chapter

Subscribe and save

Springer+ Basic
¥17,985 /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
JPY 3498
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
JPY 26311
Price includes VAT (Japan)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
JPY 32889
Price includes VAT (Japan)
  • 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

Similar content being viewed by others

Notes

  1. 1.

    GIMPS first tests by trial division whether a candidate number has any prime divisors of size up to a bound between\(2^{66}\) and\(2^{81}\). Only when this is not the case is that they run a more expensive specialized primality test: details can be found onthis page.

  2. 2.

    Note that some primality tests, like, e.g., Miller-Rabin [27,34], can be modified to (sometimes) yield factors in case the number being tested is not a prime.

  3. 3.

    More details can be found inthis thread ofmersenneforum.org. An implementation due to Atnashev is available onGitHub. The idea of using PoEs for certifying giant primes has been discussed also by Mihai Preda in anotherthread in the same forum already in August 2019.

  4. 4.

    If the order of the group is known, then\(x^{2^T}\) can be computed efficiently using the shortcut:\(y=x^e\) (over\({\mathbb {G}}\)) for\(e=2^T\bmod {{{\,\textrm{ord}\,}}({\mathbb {G}})}\).

  5. 5.

    Recall that the order of an element\(g\in {\mathbb {G}}\), denoted\({{\,\textrm{ord}\,}}(g)\), is the least integer such that\(g^{{{\,\textrm{ord}\,}}(g)}=1\). An example of a group without low-order elements issigned quadratic residues\(QR_N^+\), whereN is sampled as the product of safe primes [15,21]. This is also the algebraic setting used in Pietrzak’s VDF [28].

  6. 6.

    For\(N\in \mathbb {N}\), let\(\pi (N)\) denote the number of primes less thanN. By prime number theorem, asymptotically\(\pi (N)\) approaches\(N/\log (N)\). For the case of Proth numbers, however, even the question of whether there are infinitely many of them is open [9].

  7. 7.

    One could also use SNARGs [22,26] for this purpose but, being a general-purpose primitive, the resulting schemes would not be practically efficient.

  8. 8.

    In the actual protocol, we explain how the verifier can check if the Jacobi symbol ofx is\(-1\) (Step 1 in Fig. 3).

  9. 9.

    Note that if\(\mu \) has orderk, then\(-\mu \) has order 2k (which is not coprime to\(2^{n-1}\)), which is the reason we have to square the statement in Equation (4) before computing the inverse of the exponent.

  10. 10.

    In fact, Miller’s test [27] runs in strict polynomial time assuming the Generalised Riemann Hypothesis.

  11. 11.

    Since these numbers have a succinct representation, the complexity of these tests is, strictly-speaking, exponential in the size of the input (which isn for\(M_n\)).

  12. 12.

    PrimeGrid has already implemented a check\(\mu ^{k\cdot 2^{64}}=1?\) [3]. Our analysis shows that an exponent of 64 is not sufficient for cryptographic soundness as this only gives\(64/\log (n)\) bits of security “per round”; once we apply the Fiat-Shamir methodology to make the proof non-interactive, each round can be attacked individually.

References

  1. Agrawal, M., Kayal, N., Saxena, N.: PRIMES is in P. Ann. Math.160(2), 781–793 (2004)

    Article MathSciNet MATH  Google Scholar 

  2. Atkin, A.O.L., Morain, F.: Elliptic curves and primality proving. Math. Comput.61(203), 29–68 (1993)

    Article MathSciNet MATH  Google Scholar 

  3. Atnashev, P.: Personal communication, February (2022)

    Google Scholar 

  4. Baillie, R., Wagstaff, S.S.: Lucas pseudoprimes. Math. Comput.35(152), 1391–1417 (1980)

    Article MathSciNet MATH  Google Scholar 

  5. Bitansky, N., et al.: PPAD is as hard as LWE and iterated squaring. TCC 2022, to appear (2022)

    Google Scholar 

  6. Block, A.R., Holmgren, J., Rosen, A., Rothblum, R.D., Soni, P.. Time- and space-efficient arguments from groups of unknown order. In: Malkin, T., Peikert, C., eds., Advances in Cryptology – CRYPTO 2021, Part IV, volume 12828 of Lecture Notes in Computer Science, pp. 123–152, Virtual Event, August 16–20, 2021. Springer, Cham (2021).https://doi.org/10.1007/978-3-030-84259-8_5

  7. Boneh, D., Bonneau, J., Bünz, B., Fisch, B.: Verifiable delay functions. In: Shacham, H., Boldyreva, A., editors, Advances in Cryptology – CRYPTO 2018, Part I, volume 10991 of Lecture Notes in Computer Science, pp. 757–788, Santa Barbara, CA, USA, August 19–23, 2018. Springer, Heidelberg, Germany.https://doi.org/10.1007/978-3-319-96884-1_25

  8. Boneh, D., Bünz, B., Fisch, B.: A survey of two verifiable delay functions. Cryptology ePrint Archive, Report 2018/712, (2018).http://eprint.iacr.org/2018/712

  9. Borsos, B., Kovács, A., Tihanyi, N.: Tight upper and lower bounds for the reciprocal sum of proth primes. Ramanujan J.59, 181–198 (2022)

    Article MathSciNet MATH  Google Scholar 

  10. Brillhart, J., Lehmer, D.H., Selfridge, J.L.: New primality criteria and factorizations of\(2^m\, \pm \, 1\). Math. Comput.29(130), 620–647 (1975)

    MATH  Google Scholar 

  11. Buchmann, J., Williams, H.C.: A key-exchange system based on imaginary quadratic fields. J. Cryptol.1(2), 107–118 (1988)

    Article MathSciNet MATH  Google Scholar 

  12. Bünz, B., Fisch, B., Szepieniec, A.: Transparent SNARKs from DARK compilers. In: Canteaut, A., Ishai, Y. (eds.) EUROCRYPT 2020. LNCS, vol. 12105, pp. 677–706. Springer, Cham (2020).https://doi.org/10.1007/978-3-030-45721-1_24

    Chapter  Google Scholar 

  13. Dummit, D.S., Foote, R.M.: Abstract Algebra, 3rd edn. John Wiley and Sons, USA (2003)

    MATH  Google Scholar 

  14. Fiat, A., Shamir, A.: How to prove yourself: practical solutions to identification and signature problems. In: Odlyzko, A.M. (ed.) CRYPTO 1986. LNCS, vol. 263, pp. 186–194. Springer, Heidelberg (1987).https://doi.org/10.1007/3-540-47721-7_12

    Chapter  Google Scholar 

  15. Fischlin, R., Schnorr, C.-P.: Stronger security proofs for RSA and Rabin bits. J. Cryptol.13(2), 221–244 (2000)

    Article MathSciNet MATH  Google Scholar 

  16. Great Internet Mersenne Prime Search GIMPS. GIMPS discovers largest known prime number:\(2^{82,589,933}-1\).https://www.mersenne.org/primes/press/M82589933.html, (2018). Accessed 18 May 2022

  17. Great Internet Mersenne Prime Search GIMPS. Prime95 v30.3.https://www.mersenneforum.org/showthread.php?t=25823, (2020). Accessed 19 May 2022

  18. Goldwasser, S., Kilian, J.: Almost all primes can be quickly certified. In: 18th Annual ACM Symposium on Theory of Computing, pp. 316–329, Berkeley, CA, USA, May 28–30. ACM Press (1986)

    Google Scholar 

  19. Goldwasser, S., Micali, S., Rackoff, C.: The knowledge complexity of interactive proof systems. SIAM J. Comput.18(1), 186–208 (1989)

    Article MathSciNet MATH  Google Scholar 

  20. Hoffmann, C., Hubácek, P., Kamath, C., Klein, K., Pietrzak, K.: Practical statistically-sound proofs of exponentiation in any group. In: Dodis, Y., Shrimpton, T., editors, Advances in Cryptology - CRYPTO 2022, Part II, volume 13508 of Lecture Notes in Computer Science, pp. 370–399, Santa Barbara, CA, USA, August 15–18. Springer, Heidelberg, Germany (2022).https://doi.org/10.1007/978-3-031-15979-4_13

  21. Hofheinz, D., Kiltz, E.: The group of signed quadratic residues and applications. In: Halevi, S. (ed.) CRYPTO 2009. LNCS, vol. 5677, pp. 637–653. Springer, Heidelberg (2009).https://doi.org/10.1007/978-3-642-03356-8_37

    Chapter  Google Scholar 

  22. Kilian, J.: A note on efficient zero-knowledge proofs and arguments (extended abstract). In: 24th Annual ACM Symposium on Theory of Computing, pp. 723–732, Victoria, BC, Canada, May 4–6. ACM Press (1992)

    Google Scholar 

  23. Lehmer, D.H.: Tests for primality by the converse of Fermat’s theorem. Bull. Am. Math. Soc.33(3), 327–340 (1927)

    Article MathSciNet MATH  Google Scholar 

  24. Lombardi, A., Vaikuntanathan, V.: Fiat-Shamir for repeated squaring with applications to PPAD-hardness and VDFs. In: Micciancio, D., Ristenpart, T. (eds.) CRYPTO 2020. LNCS, vol. 12172, pp. 632–651. Springer, Cham (2020).https://doi.org/10.1007/978-3-030-56877-1_22

    Chapter  Google Scholar 

  25. Lucas, E.: Théorie des fonctions numériques simplement périodiques. Am. J. Math.1(4), 289–321 (1878)

    Article  Google Scholar 

  26. Micali, S.: CS proofs (extended abstracts). In: 35th Annual Symposium on Foundations of Computer Science, pp. 436–453, Santa Fe, NM, USA, November 20–22. IEEE Computer Society Press (1994)

    Google Scholar 

  27. Miller, G.L.: Riemann’s hypothesis and tests for primality. J. Comput. Syst. Sci.13(3), 300–317 (1976)

    Article MathSciNet MATH  Google Scholar 

  28. Pietrzak, K.: Simple verifiable delay functions. In: Blum, A., editor, ITCS 2019: 10th Innovations in Theoretical Computer Science Conference, vol. 124, pp. 60:1–60:15, San Diego, CA, USA, January 10–12. LIPIcs (2019)

    Google Scholar 

  29. Pomerance, C., Selfridge, J.L., Wagstaff, S.S.: The pseudoprimes to\(25 \cdot 10^9\). Math. Comput.35(151), 1003–1026 (1980)

    MATH  Google Scholar 

  30. Pratt, V.R.: Every prime has a succinct certificate. SIAM J. Comput.4(3), 214–220 (1975)

    Article MathSciNet MATH  Google Scholar 

  31. PrimeGrid. World record Colbert number discovered!http://www.primegrid.com/forum_thread.php?id=7116, (2016). Accessed 18 May 2022

  32. PrimeGrid. Proposal: a new sierpiński problem.https://www.primegrid.com/forum_thread.php?id=9107, (2020). Accessed 19 May 2022

  33. Proth, F.: Theoremes sur les nombres premiers. Comptes rendus de l’Académie des Sciences de Paris, 87(926), (1878)

    Google Scholar 

  34. Rabin, M.O.: Probabilistic algorithm for testing primality. J. Number Theory12(1), 128–138 (1980)

    Article MathSciNet MATH  Google Scholar 

  35. Riesel, H.: Lucasian criteria for the primality of\({N}= h\cdot 2^n-1\). Math. Comput.23(108), 869–875 (1969)

    MathSciNet MATH  Google Scholar 

  36. Rivest, R.L., Shamir, A., Adleman, L.M.: A method for obtaining digital signatures and public-key cryptosystems (reprint). Commun. ACM26(1), 96–99 (1983)

    Article MATH  Google Scholar 

  37. Rotem, L.: Simple and efficient batch verification techniques for verifiable delay functions. In: Nissim, K., Waters, B. (eds.) TCC 2021. LNCS, vol. 13044, pp. 382–414. Springer, Cham (2021).https://doi.org/10.1007/978-3-030-90456-2_13

    Chapter  Google Scholar 

  38. Solovay, R., Strassen, V.: A fast Monte-Carlo test for primality. SIAM J. Comput.6(1), 84–85 (1977)

    Article MathSciNet MATH  Google Scholar 

  39. Wesolowski, B.: Efficient verifiable delay functions. J. Cryptol.33(4), 2113–2147 (2020)

    Article MathSciNet MATH  Google Scholar 

Download references

Acknowledgements

We are grateful toPavel Atnashev for clarifying via e-mail several aspects of the primality testsimplementated in the PrimeGrid project. Pavel Hubáček is supported by the Czech Academy of Sciences (RVO 67985840), the Grant Agency of the Czech Republic under the grant agreement no. 19-27871X, and by the Charles University project UNCE/SCI/004. Chethan Kamath is supported by Azrieli International Postdoctoral Fellowship, ISF grants 484/18 and 1789/19, and ERC StG project SPP: Secrecy Preserving Proofs.

Author information

Authors and Affiliations

  1. Institute of Science and Technology Austria, Klosterneuburg, Austria

    Charlotte Hoffmann & Krzysztof Pietrzak

  2. Institute of Mathematics, Czech Academy of Sciences, Prague, Czech Republic

    Pavel Hubáček

  3. Tel Aviv University, Tel Aviv, Israel

    Chethan Kamath

Authors
  1. Charlotte Hoffmann

    You can also search for this author inPubMed Google Scholar

  2. Pavel Hubáček

    You can also search for this author inPubMed Google Scholar

  3. Chethan Kamath

    You can also search for this author inPubMed Google Scholar

  4. Krzysztof Pietrzak

    You can also search for this author inPubMed Google Scholar

Corresponding author

Correspondence toCharlotte Hoffmann.

Editor information

Editors and Affiliations

  1. Georgia Institute of Technology, Atlanta, GA, USA

    Alexandra Boldyreva

  2. Georgia Institute of Technology, Atlanta, GA, USA

    Vladimir Kolesnikov

A Attacking Pietrzak’s Protocol in Proth Number Groups

A Attacking Pietrzak’s Protocol in Proth Number Groups

Fig. 4.
figure 4

An attack with success probability at least\(1-(1-1/{{\,\textrm{ord}\,}}(\alpha ))^{\log T}\).

In this section we show how a malicious prover\(\mathcal{P}^*\) can falsely convince the verifier\(\mathcal{V}\) that a Prothprime is composite when using Pietrzak’s PoE. This attack was first described in [8]. Let\(N=k2^n+1\) be prime andx be any quadratic non-residue moduloN. SinceN is prime, it holds that\(x^{k2^{n-1}}=-1\mod N\). The easiest way for\(\mathcal{P}^*\) to cheat is claiming that the result of this exponentiation is 1 instead of\(-1\) and then multiplying the honest messages by\(-1\) until the recombination step (Step2d ofPPoE) yields a correct instance. The probability that\(\mathcal{V}\) accepts this false “proof” of non-primality is\(1-1/2^{\log (n-1)}=1-(n-1)^{-1}\). To see this, consider the first round of the protocol.\(\mathcal{P}^*\) multiplies the correct midpoint\(v=(x^{k})^{2^{(n-1)/2}}\) by\(-1\) and sends the message\(-v\) to\(\mathcal{V}\).\(\mathcal{V}\) samples a random coinr and they both compute\(x'=-x^{kr}v\) and\(y'=(-v)^r\) to create the new statement\(x'^{2^{(n-1)/2}}=y'\). Plugging in the values for\(x',y'\) andv, we see that the new statement is correct wheneverr is an odd integer:

$$\begin{aligned} x'^{2^{(n-1)/2}}&=y'\\ \Leftrightarrow (-x^{kr}v)^{2^{(n-1)/2}}&=(-v)^r\\ \Leftrightarrow v^{2^{(n-1)/2}}&=(-1)^r\\ \Leftrightarrow (x^k)^{2^{n-1}}&=(-1)^r. \end{aligned}$$

Ifr is even, the statement remains false and\(\mathcal{P}^*\) does the same in the next round.\(\mathcal{V}\) only outputsreject if all of the random coins are even which happens with probability\(1/2^{\log (n-1)}=(n-1)^{-1}\) since\(\log (n-1)\) is the number of rounds. Otherwise\(\mathcal{V}\) outputsaccept on a false statement. A generalization of this attack is shown in Fig. 4. Instead of multiplying the correct statement by\(-1\),\(\mathcal{P}^*\) multiplies the correct statement by an arbitrary group element\(\alpha \) and adapts its messages accordingly. The success probability can be lower bounded by\(1-(1-1/{{\,\textrm{ord}\,}}(\alpha ))^{\log (n-1)}\) which is the probability that in at least one round the bad element is raised to a multiple of the order of\(\alpha \). If\({{\,\textrm{ord}\,}}(\alpha )\) is not a prime number, this bound is not tight since the order of the bad element can decrease during the execution of the rounds, making the success probability even higher. In the case whereN is prime, the prover knows the group order\(N-1=k2^n\) and its factorization and can therefore construct elements of sufficiently low order.

Rights and permissions

Copyright information

© 2023 International Association for Cryptologic Research

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Hoffmann, C., Hubáček, P., Kamath, C., Pietrzak, K. (2023). Certifying Giant Nonprimes. In: Boldyreva, A., Kolesnikov, V. (eds) Public-Key Cryptography – PKC 2023. PKC 2023. Lecture Notes in Computer Science, vol 13940. Springer, Cham. https://doi.org/10.1007/978-3-031-31368-4_19

Download citation

Publish with us

Societies and partnerships

Access this chapter

Subscribe and save

Springer+ Basic
¥17,985 /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
JPY 3498
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
JPY 26311
Price includes VAT (Japan)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
JPY 32889
Price includes VAT (Japan)
  • 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


[8]ページ先頭

©2009-2025 Movatter.jp