Methods that work
And how they scaleThe algorithms that really factor numbers, visualized, with charts of how the work grows as the numbers get bigger. That growth rate is the whole story of .
Trial division
Divide by every candidate up to √N. The work grows in step with the size of the smallest prime factor: double p, double the work.
Pollard’s rho
Repeat x → x² + c. Taken mod the hidden prime p, the sequence loops after about √p steps (the birthday paradox), and a gcd reveals p.
Smooth numbers: the idea the next three methods run on
How often numbers have only small factors, against Dickman’s ρ. The one “pattern” that p − 1, the quadratic sieve and ECM all rely on.
Pollard’s p − 1
Fast exactly when p − 1 is made only of small primes. Success rate against the smoothness bound B.
Williams’ p + 1
The sibling of p − 1: it works when p + 1 is smooth. Together the two cover keys that either one misses.
CFRAC: continued fractions before the sieve
The continued fraction of √N hands out squares that are almost N. The method that factored F₇ in 1970 and led straight to the quadratic sieve.
A toy quadratic sieve
Collect smooth values of x² − N, combine them into x² ≡ y² (mod N), and take a gcd. The first sub-exponential method.
Elliptic curves (ECM)
Like p − 1, but every curve is a fresh chance for a smooth group order. Finds medium-size factors of huge numbers.
The number field sieve, explained
The method behind modern factoring records: sieve for pairs where both a − b·m and a norm are smooth. Live for the smallest case, N = m² + 1; the matrix and square-root steps are explained, not run.
Shor’s algorithm, simulated classically
Period finding step by step for N = 15 and 21: the table of powers, the collapse, the Fourier peaks, the continued fraction, the gcd. A simulation, and why it stops at toy size.
The big picture: how far each method reaches
Every method on one chart, and where RSA-2048 sits: far off the edge.