Lecture: Introduction to Integer Factorization Algorithms

Background Material


With primality tests, we know that a number is likely composite before we try to find the factors. This provides a fundamental change in the point of view of the factoring algorithms we consider next. We no longer provide algorithms that both determine primality and find factors. Moreover, we are happy to find a single factor (check to see if it is prime) and continue recursively with many different algorithms rather than provide algorithms that find all factors. Typically, we search for small, moderate, and large factors with different algorithms. Moreover, we will give up determinism and settle for non-deterministic algorithms that may not succeed, but when they do, typically find factors much faster than deterministic algorithms. In this lecture we look at an algorithm (Pollard Rho) for finding modest size factors (small factors are found by trial division). In the next lecture we will look at an algorithm for finding larger factors (quadratic sieve). Other possible algorithms exist for both tasks and are discussed in the book.


  1. Review trial division approach and its shortcomings.
  2. Fermat's algorithm (sec. 3.6 - just beginning of the section)
  3. Kraitchik's improvement
  4. Pollard Rho algorithm (sec. 4.5) for finding moderately sized factors.

Maple Worksheet

  1. pollardrho.mw - Maple worksheet implementing Fermat's algorithm and the Pollard Rho algorithm.

Practice Assignment

  1. Experiment with the Maple worksheet.
Created: June 1, 2008 (revised May 15, 2012) by jjohnson AT cs DOT drexel DOT edu