Bleichenbacher's e=3 signature forgery against sloppy PKCS#1 v1.5 verifiers
At the CRYPTO 2006 rump session Daniel Bleichenbacher showed that many RSA signature verifiers checked the PKCS#1 v1.5 prefix and hash but not that the hash sat right-justified at the end of the block. With public exponent 3, an attacker can then craft a value whose cube root is an integer, forging signatures (and certificates) with pencil-and-paper effort. OpenSSL (CVE-2006-4339), NSS and others were affected.
Broken implementation. The underlying math is not broken by this. The failure is in code, hardware, or how the primitive is used.
Background
Nothing is wrong with RSA or with the PKCS#1 v1.5 signature format when verification is strict; the bug is lenient parsing in specific libraries, which is why this is classed as implementation. The small exponent turns the parsing slack into a practical forgery because there is room to place 'garbage' after the hash. Some CA roots used e = 3, so forged certificates could chain to trusted roots. The pattern recurred in NSS BERserk (2014), python-rsa and others, and is why modern guidance is to verify by re-encoding the expected block and comparing it byte-for-byte.
Sources
- blogBleichenbacher's RSA signature forgery based on implementation error (Hal Finney, IETF OpenPGP list, 27 Aug 2006)IETF Mail Archive, mailarchive.ietf.org
- cveCVE-2006-4339 (OpenSSL)NIST NVD, nvd.nist.gov