# Primality and Factoring

• Neal Koblitz
Chapter
Part of the Graduate Texts in Mathematics book series (GTM, volume 114)

## Abstract

There are many situations where one wants to know if a large number n is prime. For example, in the RSA public key cryptosystem and in various cryptosystems based on the discrete log problem in finite fields, we need to find a large “random” prime. One interpretation of what this means is to choose a large odd integer $$n_{0}$$ using a generator of random digits and then test $$n_{0}, n_{0}+2, \dotsc$$ for primality until we obtain the first prime which is $$\ge n_{0}$$. A second type of use of primality testing is to determine whether an integer of a certain very special type is a prime. For example, for some large prime f we might want to know whether $$2^{f}-1$$ is a Mersenne prime. If we’re working in the field of $$2^{f}$$ elements, we saw that every element ≠ 0, 1 is a generator of $${\pmb{\text{F}}}^{*}_{2^{f}}$$ if (and only if) $$2^{f}-1$$ is prime (see Exercise 13(a) of §11.1).

## Keywords

Continue Fraction Continue Fraction Expansion Versus Primality Generalize Riemann Hypothesis Nontrivial Factor
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

## References for § V.1

1. 1.
L. M. Adleman, C. Pomerance, and R. S. Rumely, “On distinguishing prime numbers from composite numbers,” Annals of Mathematics‚ Vol. 117 (1983), 173–206.
2. 2.
H. Cohen and H. W. Lenstra, Jr., “Primality testing and Jacobi sums,” Mathematics of Computation‚ Vol. 42 (1984), 297–330.
3. 3.
J. D. Dixon, “Factorization and primality tests,” American Mathematical Monthly‚ Vol. 91 (1984), 333–352.
4. 4.
E. Kranakis, Primality and Cryptography‚ John Wiley & Sons, 1986.
5. 5.
G. L. Miller, “Riemann’s hypothesis and tests for primality,” Proceedings of the Seventh Annual ACM Symposium on the Theory of Computing‚ 234–239.Google Scholar
6. 6.
C. Pomerance, “Recent developments in primality testing,” The Mathematical Intelligencer‚ Vol. 3 (1981), 97–105.
7. 7.
C. Pomerance, “The search for prime numbers,” Scientific American‚ Vol. 247 (1982), 136–147.
8. 8.
M. O. Rabin, “Probabilistic algorithms for testing primality,” Journal of Number Theory‚ Vol. 12 (1980), 128–138.
9. 9.
R. Solovay and V. Strassen, “A fast Monte Carlo test for primality,” SIAM Journal for Computing‚ Vol. 6 (1977), 84–85 and erratum‚ Vol. 7 (1978), 118.
10. 10.
S. Wagon, “Primality testing,” The Mathematical Intelligencer‚ Vol. 8, No. 3 (1986), 58–61.

## References for § V.2

1. 1.
W. D. Blair, C. B. Lacampagne and J. L. Selfridge, “Factoring large numbers on a pocket calculator,” American Math. Monthly‚ Vol. 93 (1986), 802–808.
2. 2.
R. P. Brent, “An improved Monte Carlo factorization algorithm,” BIT, Vol. 20 (1980), 176–184.
3. 3.
R. P. Brent and J. M. Pollard, “Factorization of the eighth Fermat number,” Math, of Computation, Vol. 36 (1981), 627–630.
4. 4.
R. K. Guy, “How to factor a number,” Proceedings of the 5th Manitoba Conference on Numerical Mathematics (1975), 49–89.Google Scholar
5. 5.
J. M. Pollard, “A Monte Carlo method for factorization,” BIT, Vol. 15 (1975), 331–334.

## References for § V.3

1. 1.
L. E. Dickson, History of the Theory of Numbers‚ Vol. 1, Chelsea, 1952, p. 357.Google Scholar
2. 2.
M. Kraitchik, Théorie des Nombres‚ Vol. 2, Gauthier-Villars, 1926.
3. 3.
R. S. Lehman, “Factoring large integers,” Mathematics of Computation‚ Vol. 28 (1974), 637–646.
4. 4.
C. Pomerance, “Analysis and comparison of some integer factoring algorithms,” Computational Methods in Number Theory‚ Part I, Mathematisch Centrum (Amsterdam), 1982.Google Scholar

## References for § V.4

1. 1.
H. Davenport, The Higher Arithmetic‚ 5th ed., Cambridge University Press, 1982.
2. 2.
D. Knuth, The Art of Computer Programming‚ Vol. 2, Addison-Wesley, 1973.Google Scholar
3. 3.
D. H. Lehmer and R. E. Powers, “On factoring large numbers,” Bull. Amer. Math. Soc., Vol. 37 (1931), 770–776.
4. 4.
M. A. Morrison and J. Brillhart, “A method of factoring and the factorization of F7,” Mathematics of Computation, Vol. 29 (1975), 183–205.
5. 5.
C. Pomerance and S. S. Wagstaff, Jr., “Implementation of the continued fraction integer factoring algorithm,” Proceedings of the 12th Winnipeg Conference on Numerical Methods and Computing‚ 1983.Google Scholar
6. 6.
M. C. Wunderlich, “A running time analysis of Brillhart’s continued fraction factoring method,” Number Theory, Carbondale 1979‚ Springer Lecture Notes Vol. 751 (1979), 328–342.
7. 7.
M. C. Wunderlich, “Implementing the continued fraction factoring algorithm on parallel machines,” Mathematics of Computation Vol. 44 (1985), 251–260.