Twitter Implements Perfect Forward Secrecy

Twitter Implements Perfect Forward Secrecy
Twitter Implements Perfect Forward Secrecy

When Infosecurity asked Whit Diffie if government spying meant the effective end of cryptography for communications, he replied 'not if it's done correctly.' Doing things correctly, he explained, means using 'ephemeral' rather than permanent encryption keys. It means that every session is given its own key, and that key is destroyed after use. This technology is called 'perfect forward secrecy' (PFS), or just forward secrecy.

On Friday, Twitter blogged, "we’re happy to announce that we recently enabled forward secrecy for traffic on,, and" Twitter makes no direct statement on why it believes that this is necessary for its users, it just comments, "As the Electronic Frontier Foundation points out, this type of protection is increasingly important on today’s internet."

What the EFF explains is that if ordinarily encrypted communications are intercepted and stored ("as leaked NSA documents confirm the agency is doing"), then an adversary can take its time to crack the cipher. "That means that the encrypted data, once stored, is only as secure as the secret key, which may be vulnerable to compromised server security or disclosure by the service provider." It is clear that a prime motivation for Twitter to introduce PFS is to protect its users from government surveillance.

"In order to support forward secrecy", explained Twitter's Jacob Hoffman-Andrews, "we’ve enabled the EC Diffie-Hellman cipher suites." He goes on to describe that Twitter chose to use the elliptic curve version (ECDHE) over the traditional version (DHE) for performance reasons. "Elliptic Curve Diffie-Hellman (ECDHE) is only a little more expensive than RSA for an equivalent security level. Vincent Bernat (@vince2_) benchmarked ECDHE at a 15% overhead relative to RSA over 2048-bit keys. DHE, by comparison, used 310% more CPU than RSA."

But he also added that his quite detailed explanation of Twitter's new PFS is "not just to discuss an interesting piece of technology, but to present what we believe should be the new normal for web service owners." Twitter's announcement is a call for forward secrecy to become endemic on the internet; for websites to offer it, and for users to demand it.

It is an example of engineers responding to Bruce Schneier's call for technologists to reclaim the internet. "This is not the internet the world needs, or the internet its creators envisioned. We need to take it back. And by we, I mean the engineering community."

What’s Hot on Infosecurity Magazine?