Factorization: Pollard's p1p-1 method

17 Dec 2021


§ 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 p1p - 1 method

Pollard's p1p - 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 aaj(modm)a \equiv a^j \pmod{m}.
  3. Compute d=(a1,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 jj+1j \leftarrow j + 1 and repeat the procedure.

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

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

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

Hence, we have aLai(p1)1(modp)a^L \equiv a^{i(p-1)} \equiv 1 \pmod{p} and that aLai(p1)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 paL1p \vert a^L - 1 while qaL1q \nmid a^L - 1. This means that we can use Pollard's p1p-1 to recover pp.