Valenta et al. measure small-subgroup exposure: millions of hosts on non-safe DH primes, no library validating by default
Valenta, Adrian, Sanso, Cohney, Fried, Hastings, Halderman and Heninger (NDSS 2017) scanned HTTPS, POP3S, SMTP/STARTTLS, SSH, IKEv1 and IKEv2 and found millions of hosts using DSA-style or other non-safe primes for DH. Of more than 20 libraries and applications examined, none validated subgroup order by default until January 2016. They demonstrated full or partial key recovery against OpenSSL, Exim, the Unbound DNS client and Amazon's load balancer.
Broken implementation. The underlying math is not broken by this. The failure is in code, hardware, or how the primitive is used.
Background
Standards such as NIST SP 800-56A and RFC 5114 recommend DSA-style groups (a prime-order subgroup of size q inside a larger p) for DH. These are secure only if every received key is checked to lie in the order-q subgroup. TLS 1.2 does not even send q to the client, so clients cannot perform the check. The paper ties the 1997 Lim-Lee attack to real deployments and is a main reason RFC 10015 (2026) cites small subgroups when deprecating FFDHE in TLS 1.2.
No new mathematics is involved, and safe-prime groups such as those in RFC 7919 avoid the problem. It is filed as protocol because the root cause is how standards and protocols pair non-safe groups with missing validation, with specific library bugs as the symptoms.
Sources
- paperMeasuring small subgroup attacks against Diffie-Hellman (NDSS 2017)IACR ePrint, eprint.iacr.org
- paperNDSS 2017 programme entryNDSS, ndss-symposium.org