Pollard's p−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 p−1 method
Pollard's p−1 method
Suppose we know that m is the product of two primes and we want to find a prime factor p.
- Choose a randomly, and set j=1.
- Set a≡aj(modm).
- Compute d=(a−1,m).
- If 1<d<m, then d is a non-trivial factor of m. Otherwise, set j←j+1 and repeat the procedure.
This method works reliably a given composite composed of two primes m=pq such that p−1 is the product of small primes.
Suppose that there exists L such that (p−1)∣L, but (q−1)∤L.
Then, it must be true that there exists i,j,k with k=0 satisfying
L=i(p−1), and L=j(q−1)+k.
Hence, we have aL≡ai(p−1)≡1(modp) and that aL≡ai(p−1)≡ak(modq). Since the value k has no structure that relates to ordq(a), with high probability, for most choices of a we find that p∣aL−1 while q∤aL−1. This means that we can use Pollard's p−1 to recover p.