Efficient Generation of Prime Numbers

  • Marc Joye
  • Pascal Paillier
  • Serge Vaudenay
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1965)


The generation of prime numbers underlies the use of most public-key schemes, essentially as a major primitive needed for the creation of key pairs or as a computation stage appearing during various cryptographic setups. Surprisingly, despite decades of intense mathematical studies on primality testing and an observed progressive intensification of cryptographic usages, prime number generation algorithms remain scarcely investigated and most real-life implementations are of rather poor performance. Common generators typically output a n-bit prime in heuristic average complexity O(n4) or O(n4/ log n) and these figures, according to experience, seem impossible to improve significantly: this paper rather shows a simple way to substantially reduce the value of hidden constants to provide much more efficient prime generation algorithms. We apply our techniques to various contexts (DSA primes, safe primes, ANSI X9.31-compliant primes, strong primes, etc.) and show how to build fast implementations on appropriately equipped smart-cards, thus allowing on-board key generation.


Prime number generation key generation RSA DSA fast implementations crypto-processors smart-cards. 


  1. 1.
    ANSI X9.31. Public-key cryptography using RSA for the financial services industry. American National Standard for Financial Services, draft, 1995.Google Scholar
  2. 2.
    A.O.L. Atkin and F. Morain. Elliptic curves and primality proving. Mathematics of Computation, vol. 61, pp. 29–68, 1993.zbMATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    D. Boneh and M. Franklin. Efficient generation of shared RSA keys. In Advances in Cryptology-CRYPTO’97, vol. 1294 of Lecture Notes in Computer Science, pp. 425–439, Springer-Verlag, 1997.CrossRefGoogle Scholar
  4. 4.
    W. Bosma and M.-P. van der Hulst. Faster primality testing. In Advances in Cryptology-CRYPTO’89, vol. 435 of Lecture Notes in Computer Science, pp. 652–656, Springer-Verlag, 1990.Google Scholar
  5. 5.
    J. Brandt and I. Damg∢rd. On generation of probable primes by incremental search. In Advances in Cryptology-CRYPTO’ 92, vol. 740 of Lecture Notes in Computer Science, pp. 358–370, Springer-Verlag, 1993.Google Scholar
  6. 6.
    J. Brandt, I. Damg∢rd, and P. Landrock. Speeding up prime number generation. In Advances in Cryptology-ASIACRYPT’91, vol. 739 of Lecture Notes in Computer Science, pp. 440–449, Springer-Verlag, 1991.Google Scholar
  7. 7.
    C. Couvreur and J.-J. Quisquater. An introduction to fast generation of large prime numbers. Philips Journal of Research, vol. 37, pp. 231–264, 1982.MathSciNetGoogle Scholar
  8. 8.
    C. Ding, D. Pei, and A. Salomaa. Chinese Remainder Theorem, Word Scientific, 1996.Google Scholar
  9. 9.
    FIPS 186. Digital signature standard. Federal Information Processing Standards Publication 186, US Department of Commerce/N.I.S.T., 1994.Google Scholar
  10. 10.
    D.E. Knuth. The Art of Computer Programming-Seminumerical Algorithms, vol. 2, Addison-Wesley, 2nd ed., 1981.Google Scholar
  11. 11.
    A.J. Menezes, P.C. van Oorschot, and S.A. Vanstone. Handbook of Applied Cryptography, CRC Press, 1997.Google Scholar
  12. 12.
    H.C. Pocklington. The determination of the prime or composite nature of large numbers by Fermat’s theorem. Proc. of the Cambridge Philosophical Society, vol. 18, pp. 29–30, 1914.Google Scholar
  13. 13.
    H. Riesel. Prime Numbers and Computer Methods for Factorization, Birkhäuser, 1985.Google Scholar
  14. 14.
    R.L. Rivest. Remarks on a proposed cryptanalytic attack on the M.I.T. public-key cryptosystem. Cryptologia, vol. 2, pp. 62–65, 1978.CrossRefGoogle Scholar
  15. 15.
    R.L. Rivest, A. Shamir, and L.M. Adleman. A method for obtaining digital signatures and public-key cryptosystems. Communications of the ACM, vol. 21, pp. 120–126, 1978.zbMATHCrossRefMathSciNetGoogle Scholar
  16. 16.
    R. Solovay and V. Strassen. A fast Monte-Carlo test for primality. SIAM Journal on Computing, vol. 6, pp. 84–85, 1977.zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • Marc Joye
    • 1
  • Pascal Paillier
    • 1
  • Serge Vaudenay
    • 2
  1. 1.Gemplus Card InternationalFrance
  2. 2.École Polytechnique Fédérale de LausanneSwitzerland

Personalised recommendations