Efficient Generation of Prime Numbers
- 3.3k Downloads
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.
KeywordsPrime number generation key generation RSA DSA fast implementations crypto-processors smart-cards.
- 1.ANSI X9.31. Public-key cryptography using RSA for the financial services industry. American National Standard for Financial Services, draft, 1995.Google Scholar
- 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.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.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
- 8.C. Ding, D. Pei, and A. Salomaa. Chinese Remainder Theorem, Word Scientific, 1996.Google Scholar
- 9.FIPS 186. Digital signature standard. Federal Information Processing Standards Publication 186, US Department of Commerce/N.I.S.T., 1994.Google Scholar
- 10.D.E. Knuth. The Art of Computer Programming-Seminumerical Algorithms, vol. 2, Addison-Wesley, 2nd ed., 1981.Google Scholar
- 11.A.J. Menezes, P.C. van Oorschot, and S.A. Vanstone. Handbook of Applied Cryptography, CRC Press, 1997.Google Scholar
- 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.H. Riesel. Prime Numbers and Computer Methods for Factorization, Birkhäuser, 1985.Google Scholar