Skip to content

How the NSA can break trillions of encrypted Web and VPN connections


For years, privacy advocates have pushed developers of websites, virtual private network apps, and other cryptographic software to adopt the Diffie-Hellman cryptographic key exchange as a defense against surveillance from the US National Security Agency and other state-sponsored spies. Now, researchers are renewing their warning that a serious flaw in the way the key exchange is implemented is allowing the NSA to break and eavesdrop on trillions of encrypted connections.

The cost for adversaries is by no means modest. For commonly used 1024-bit keys, it would take about a year and cost a “few hundred million dollars” to crack just one of the extremely large prime numbers that form the starting point of a Diffie-Hellman negotiation. But it turns out that only a few primes are commonly used, putting the price well within the NSA’s $11 billion-per-year budget dedicated to “groundbreaking cryptanalytic capabilities.”

Most plausible theory

Halderman and Heninger say their theory fits what’s known about the NSA’s mass decryption capabilities better than any competing explanation. Documents leaked by former NSA subcontractor Edward Snowden, for instance, showed the agency was able to monitor encrypted VPN connections, pass intercepted data to supercomputers, and then obtain the key required to decrypt the communications.

“The design of the system goes to great lengths to collect particular data that would be necessary for an attack on Diffie-Hellman but not for alternative explanations, like a break in AES or other symmetric crypto,” the researchers wrote. “While the documents make it clear that NSA uses other attack techniques, like software and hardware ‘implants,’ to break crypto on specific targets, these don’t explain the ability to passively eavesdrop on VPN traffic at a large scale.”

The blog post came as Halderman, Heninger, and a raft of other researchers formally presented their academic paper detailing their findings to the 22nd ACM Conference on Computer and Communications Security in Denver on Wednesday. The paper, titled “Imperfect Forward Secrecy: How Diffie-Hellman Fails in Practice,” received extensive media coverage in May when the paper was first released. Besides exposing the likely secret behind the NSA’s mass interception of encrypted communications, the paper also revealed a closely related attack that left tens of thousands of HTTPS-protected websites, mail servers, and other widely used Internet services open to less sophisticated eavesdroppers.

The attack, which was dubbed Logjam, was extremely serious because it required just two weeks to generate data needed to attack the two most commonly called prime numbers 512-bit Diffie-Hellman uses to negotiate ephemeral keys. It affected an estimated 8.4 percent of the top 1 million Web domains and 3.4 percent of HTTPS-supported websites overall. E-mail servers that supportsimple mail transfer protocol with StartTLS, secure POP3, and IMAP were estimated to be vulnerable in 14.8 percent, 8.9 percent, and 8.4 percent of the cases respectively. To exploit vulnerable connections, attackers used the number field sieve algorithm to precompute data. Once they had completed that task, they could perform man-in-the-middle attacks against vulnerable connections in real time.

The Logjam weakness was the result of export restrictions the US government mandated in the 1990s on US developers who wanted their software to be used abroad. The regimen was established by the Clinton administration so that the FBI and other agencies could break the encryption used by foreign entities. In the five months since the paper was released, most widely used browsers, VPNs, and server apps have removed support for 512-bit Diffie-Hellman, making Logjam much less of a threat. But a similar vulnerability can still be exploited by attackers with nation-state-sized budgets to passively decrypt the 1024-bit Diffie-Hellman key sizes that many implementations still use by default.

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: