ROCA: Infineon RSALib keys factorable from the public key
Matus Nemec, Marek Sys, Petr Svenda, Dusan Klinec and Vashek Matyas (Masaryk University) found that Infineon's RSALib generated primes of the form k*M + (65537^a mod M), with M a product of small primes. A Coppersmith-based attack factors such keys from the public key alone: about 97 CPU-days ($40-80 on AWS) for 1024-bit and about 140.8 CPU-years ($20,000-40,000) for 2048-bit. Affected: TPMs (roughly a quarter of those deployed), YubiKey 4 tokens, Gemalto IDPrime .NET cards, and national ID cards in Estonia and Slovakia.
Broken implementation. The underlying math is not broken by this. The failure is in code, hardware, or how the primitive is used.
Background
The structure shrank the entropy of each prime and made affected keys trivially fingerprintable, so vulnerable keys could be found in public datasets. Estonia's roughly 750,000 ID cards issued since October 2014 were affected: researchers notified CERT-EE on 30 August 2017, and on 3 November 2017 Estonia blocked the certificates on about 740,000-760,000 cards until holders updated them online with new keys. Paper presented at ACM CCS 2017. RSA itself was unaffected: this is a faulty prime-generation algorithm in one vendor's library, made exploitable by Coppersmith's 1996 method.
Sources
- paperThe Return of Coppersmith's Attack: Practical Factorization of Widely Used RSA Moduli (ACM CCS 2017)Masaryk University CRoCS, crocs.fi.muni.cz
- announcementROCA: Vulnerable RSA generation (CVE-2017-15361)Masaryk University CRoCS, crocs.fi.muni.cz
- wikiROCA vulnerabilityWikipedia, en.wikipedia.org
- announcementROCA Vulnerability and eID: Lessons LearnedEstonian Information System Authority (RIA), ria.ee