C7 · Weak keysWorks only on weak keys
Structured primes: a toy ROCA
A key generator that builds primes from a hidden pattern leaves a fingerprint in the public number and a short list to search. Flag, then break, at toy size.
The idea
The 2017 flaw made primes of the form p = k·M + (65537ᵃ mod M), where M is a product of the first small primes. Then p mod every small prime lies in a tiny subgroup, and so does N = p·q. A public check spots it, and the number of possible primes shrinks from billions to a short list.
Watch it
Each check asks whether N mod ℓ lies in the powers of 65537 modulo ℓ.
The test
Share flagged among structured keys, false alarms among ordinary keys against theory, and the work to break a structured key against ordinary .
Fig. C7.2Tests needed to break each structured toy key, one dot per key, against the number of primes ordinary trial division would try
Measuring…