{"id":343,"date":"2015-11-04T21:01:21","date_gmt":"2015-11-04T21:01:21","guid":{"rendered":"https:\/\/www.lapsedordinary.net\/?p=343"},"modified":"2015-11-04T21:01:21","modified_gmt":"2015-11-04T21:01:21","slug":"how-did-they-break-diffie-hellman","status":"publish","type":"post","link":"http:\/\/lapsed.ordinary\/2015\/11\/04\/how-did-they-break-diffie-hellman\/","title":{"rendered":"(How) did they break Diffie-Hellman?"},"content":{"rendered":"

Earlier this year, a research paper<\/a> presented a new attack against the Diffie-Hellman key exchange protocol. Among other things, the paper came with a reasonable explanation of how the NSA might be able to read a lot of the Internet’s VPN traffic. I wrote a blog<\/a> about this in May.
\nLast month, the paper was presented at a conference and thus made the news again. Because I believed some of the news articles misunderstood the paper<\/s> I just like writing about cryptography, I thought I’d explain what Diffie-Hellman is, what the paper showed and what its consequences are.<\/p>\n

Chicken or the egg<\/h3>\n

Diffie-Hellman (named after its inventors Whitfield Diffie and Martin Hellman) attempts to solve the chicken-or-egg problem in cryptography: for Alice and Bob to communicate securely over a public channel such as the Internet they need to share a common encryption key. But for them to agree on such a key they need to be able to communicate securely over a public channel.
\n(N.B. in a typical situation where the protocol is used, Alice is a web browser or a VPN client; Bob is a web server using HTTPS, or a VPN server.)
\nDiffie-Hellman is called a key-exchange protocol, which is a bit of misnomer, as rather than exchange a previously generated key, the protocol actually generates the key.
\nIn the first step, Alice and Bob both choose a (large) random number, which they both keep secret. Let’s call Alice’s number a<\/i> and Bob’s number b<\/i>.
\nNow using a ‘mechanism’ (more on which later) that is part of the protocol, Alice uses a<\/i> to compute a second number, which is denoted ga<\/sup><\/i>. Bob uses the same mechanism to compute a number gb<\/sup><\/i>. Alice and Bob then share ga<\/sup><\/i> and gb<\/sup><\/i> with each other, over a public channel.
\nSo we are now in the following situation:<\/p>\n