On Mon, 26 Oct 2026 23:41:32 -0700 (PDT) Arabella Barks <[email protected]> wrote:
> Aside from blocklist mechanisms, are there other computation-only > methods to quickly validate weak-entropy RSA and EC keys based on > their public keys? There are unlimited ways to generate "weak entropy" keys. The question can, therefore, not be reasonably answered in a generic way. However, in the recent case, we are talking about a very specific type of "weak entropy": a private key that is a very small scalar number. For elliptic curve algorithms, this can be algorithmically detected by the Baby Step Giant Step algorithm (which is what paranoid-crypto does, the tool that detected it) or by Pollard's Lambda, also known as Pollard's Kangoroo. For RSA, there's a similar vulnerability with small private exponents. However, it's relatively rare, as a small private exponent leads to a large public exponent, which is very unusual. If you see large public exponents you should assume something is wrong. (It's pretty much standard to have a public exponent of e=65537. My recommendation is to simply not accept keys with e!=65537, that prevents this possible issue and some other RSA weaknesses entirely.) An efficient algorithm to detect such keys is known as Wiener's attack. (My own tool badkeys contains an implementation.) I've recently seen such small private exponent RSA keys (more precisely: confused exponent, as the *private* exponent was d=65537) in the Linux version of a software called CompleteFTP that used them as SSH host keys. -- Hanno Böck - Independent security researcher https://itsec.hboeck.de/ https://badkeys.info/ -- 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/20261027123323.45fee8c4%40hboeck.de.
