Factoring Lab

Receipts for factoring ideas: which work, which don’t, and how fast they stop working.

B

Methods that work

And how they scale

The 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 .

B1 Live

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.

Works, and here’s how it scales
B2 Live

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.

Works, and here’s how it scales
B3 Live

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.

Real, already known
B4 Live

Pollard’s p − 1

Fast exactly when p − 1 is made only of small primes. Success rate against the smoothness bound B.

Works, and here’s how it scales
B5 Live

Williams’ p + 1

The sibling of p − 1: it works when p + 1 is smooth. Together the two cover keys that either one misses.

Works, and here’s how it scales
B6 Live

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.

Works, and here’s how it scales
B7 Live

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.

Works, and here’s how it scales
B8 Live

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.

Works, and here’s how it scales
B9 Live

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.

Works, and here’s how it scales
B10 Live

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.

Works, and here’s how it scales
B11 Live

The big picture: how far each method reaches

Every method on one chart, and where RSA-2048 sits: far off the edge.

Works, and here’s how it scales