Factoring Lab

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

C4 · Weak keysWorks only on weak keys

Small private exponent: Wiener’s attack

Choose the d too small, for speed, and of e/N hand it over. An ordinary key is immune.

The idea

’s d satisfies e·d = 1 + k·φ(N), where φ(N) is just a bit smaller than N. So e/N is almost exactly k/d. If d is small enough, k/d is one of the best simple fractions near e/N, and list those. Try each one: the right one gives a φ(N) that factors N.

Watch it

The convergents k/d of e/N, one per row. For each, the guess for φ(N) and the discriminant s² − 4N; the right row has a perfect square.

The test

200 seeded toy keys (two 32-bit primes) for each size of d from 8 to 26 bits, and 200 ordinary keys with e = 65537. The share breaks, against the proven bound d < N^¼/3.

Fig. C4.2Share of keys Wiener’s attack breaks, by the size of d, with the proven bound

Measuring…