Pollard's p−1p-1 method


§ Motivation

We want to continue looking into methods of factorization to see that it is a sufficiently hard problem to solve, and that the RSA algorithm is secure as a result.

§ Pollard's p−1p - 1 method

Pollard's p−1p - 1 method

Suppose we know that mm is the product of two primes and we want to find a prime factor pp.

  1. Choose aa randomly, and set j=1j = 1.
  2. Set a≡aj(modm)a \equiv a^j \pmod{m}.
  3. Compute d=(a−1,m)d = (a-1, m).
  4. If 1<d<m1 \lt d \lt m, then dd is a non-trivial factor of mm. Otherwise, set j←j+1j \leftarrow j + 1 and repeat the procedure.

This method works reliably a given composite composed of two primes m=pqm=pq such that p−1p - 1 is the product of small primes.

Suppose that there exists LL such that (p−1)∣L(p - 1) \vert L, but (q−1)∤L(q - 1) \nmid L. Then, it must be true that there exists i,j,ki, j, k with k≠0k \neq 0 satisfying

L=i(p−1), and L=j(q−1)+k.L = i(p - 1),\text{ and } L = j(q - 1) + k.

Hence, we have aL≡ai(p−1)≡1(modp)a^L \equiv a^{i(p-1)} \equiv 1 \pmod{p} and that aL≡ai(p−1)≡ak(modq)a^L \equiv a^{i(p-1)} \equiv a^k \pmod{q}. Since the value kk has no structure that relates to ordq(a)\text{ord}_q(a), with high probability, for most choices of aa we find that p∣aL−1p \vert a^L - 1 while q∤aL−1q \nmid a^L - 1. This means that we can use Pollard's p−1p-1 to recover pp.