Has it been Pwned
ImplementationPractical impact

OpenSSL CVE-2016-0701: key recovery via small subgroups with RFC 5114 / X9.42 parameters

Antonio Sanso (Adobe) reported that OpenSSL 1.0.2 supported X9.42-style DH parameters, such as the RFC 5114 groups, whose primes are not safe, yet did not validate peer public keys against the subgroup order and by default reused the server's DH private exponent unless SSL_OP_SINGLE_DH_USE was set. An attacker could make many handshakes with small-order elements and recover the exponent via Lim-Lee style small-subgroup attacks. Rated High; fixed in 1.0.2f, which validates X9.42 keys when q is known and always generates a fresh exponent.

A separate source-review date has not been recorded for this historical entry. Corrections.

Broken implementation. The underlying math is not broken by this. The failure is in code, hardware, or how the primitive is used.

Background

This is the textbook Lim-Lee attack (1997) showing up nineteen years later in the most widely used TLS library. The vulnerable configuration needed three ingredients: a non-safe prime with small factors in (p-1)/q, exponent reuse, and missing subgroup checks. Those were common because standards such as NIST SP 800-56A and RFC 5114 promoted DSA-style parameters for DH.

It was an implementation and validation bug. DH over a properly validated group, or over a safe prime with fresh keys, was never affected.

Sources

  1. announcementOpenSSL Security Advisory [28 Jan 2016]OpenSSL, openssl-library.org
  2. paperMeasuring small subgroup attacks against Diffie-Hellman (NDSS 2017)IACR ePrint, eprint.iacr.org