C6 · Weak keysWorks only on weak keys
Known high bits of p: Coppersmith’s lattice
Leak the top half of a prime and a -reduction step recovers the rest. Exact LLL on BigInt, with the limit measured against the prediction. No faster than brute force at toy size, and the page says so.
The idea
Suppose you know the top bits of p and only the low u bits are missing. Then p = a + x with a known and x small. Coppersmith’s trick builds a table of polynomials that all vanish at x modulo a power of p, uses a -shortening algorithm (LLL) to find a combination with tiny coefficients, and then that polynomial vanishes at x over the plain integers, where roots are easy to find.
Watch it
LLL runs in your browser on exact integers (dimension 9). “Known part” is p with its low bits set to zero.
The test
Twelve keys at each size of the hidden part. Success share against the number of unknown bits, with the limit the condition predicts.
Fig. C6.2Share of toy keys where the lattice recovers p, against the number of unknown low bits of p
Measuring…