On Wednesday, October 21, 2026 at 2:08:10 AM UTC-7 Peter Gutmann wrote:

leeyc0 <[email protected]> writes:

>However eMudhra incident proved that improper operations can cause 
extremely
>weak key being generated. Is there any way inspected the (expected) key
>entropy generated by HSM?

It has been done a few times before, e.g. by Švenda et al in "The 
Million-Key
Question - Investigating the Origins of RSA Public Keys", 
https://www.fi.muni.cz/reports/files/2016/FIMU-RS-2016-03.pdf

In 2024, I surveyed millions of TLS and SSH public keys, developing a 
somewhat novel scanning methodology to find potentially forgotten, broken, 
or obsolete keys that remain live, and which are not captured by zgrab2, 
Censys, or Shodan.
https://web.archive.org/web/20260318053819/https://cryptographycaffe.sandboxaq.com/posts/survey-public-keys-internet/#how-we-did-it

Despite not using sophisticated classification methods like Švenda et al, I 
found several cases where key material is so glaringly idiosyncratic that 
it must identify a common bespoke codebase used to generate the key. For 
example, hundreds of DNSKEYS where the RSA *exponent* contains what I can 
best describe as a typographical error:

"We observed exactly 93 distinct RSA public keys with a public exponent of 
65337; this value appears to result from a typographical error or 
misunderstanding about the decimal representation of the common public 
exponent of 65537 (= 2^16 + 1). All of these keys were used as DNSKEYs; the 
vast majority of them are associated with .fi domain names (Finland), but 
they also include domain names of one US government agency. Because of the 
extreme rarity of this RSA public exponent, and the fact that it only 
appears in geographically-clustered DNSKEYs, there is a strong probability 
that some common key-generating codebase is shared by the DNSSEC 
infrastructure for these domains."

I also found hundreds of RSA keys with small prime factors, like 3 or 5 or 
even 2, indicating weakness with how the key generator picks "large 
semi-primes".

And lastly, it is trivial to distinguish RSA SSH keys that were generated 
by older versions of OpenSSH and PuTTY, due to their non-standard public 
exponents. If anyone discovers a weakness in the keygen entropy source(s) 
of pre-2010 OpenSSH or pre-2022 PuTTY, there are hundreds of thousands of 
easy-to-find SSH server and user keys to target for attacks. 

-- 
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-security-policy/ff22de7d-ffc2-4e7c-a165-7cebd11bb20cn%40mozilla.org.

Reply via email to