How Diffie-Hellman Fails in Practice

https://weakdh.org

  • How is NSA breaking so much crypto?
    https://freedom-to-tinker.com/blog/haldermanheninger/how-is-nsa-breaking-so-much-crypto

    Yesterday at ACM CCS, one of the leading security research venues, we and twelve coauthors presented a paper that we think solves this technical mystery.

    The key is, somewhat ironically, Diffie-Hellman key exchange, an algorithm that we and many others have advocated as a defense against mass surveillance. Diffie-Hellman is a cornerstone of modern cryptography used for VPNs, HTTPS websites, email, and many other protocols. Our paper shows that, through a confluence of number theory and bad implementation choices, many real-world users of Diffie-Hellman are likely vulnerable to state-level attackers.

    For the nerds in the audience, here’s what’s wrong: If a client and server are speaking Diffie-Hellman, they first need to agree on a large prime number with a particular form. There seemed to be no reason why everyone couldn’t just use the same prime, and, in fact, many applications tend to use standardized or hard-coded primes. But there was a very important detail that got lost in translation between the mathematicians and the practitioners: an adversary can perform a single enormous computation to “crack” a particular prime, then easily break any individual connection that uses that prime.

    How enormous a computation, you ask? Possibly a technical feat on a scale (relative to the state of computing at the time) not seen since the Enigma cryptanalysis during World War II. Even estimating the difficulty is tricky, due to the complexity of the algorithm involved, but our paper gives some conservative estimates. For the most common strength of Diffie-Hellman (1024 bits), it would cost a few hundred million dollars to build a machine, based on special purpose hardware, that would be able to crack one Diffie-Hellman prime every year.

    Would this be worth it for an intelligence agency? Since a handful of primes are so widely reused, the payoff, in terms of connections they could decrypt, would be enormous.

    Imperfect Forward Secrecy: How Diffie-Hellman Fails in Practice
    https://weakdh.org/imperfect-forward-secrecy-ccs15.pdf

  • Une nouvelle faille du protocole #TLS, nommée #Logjam, fait son entrée. Si on utilise Diffie-Hellman pour l’échange de clés (ce qui est recommandé, pour avoir la « confidentialité persistante »), les groupes Diffie-Hellman ont pu être pré-calculés dans certains cas, surtout s’ils sont trop petits (1024 bits ou moins), surtout si l’attaquant a les moyens d’un État (je ne vise personne...). Cela peut perturber l’échange de clés et, par exemple, permettre le choix d’algorithmes de crypto "exportation" (comme avec la faille FREAK <http://seenthis.net/messages/348012>), si ces algorithmes sont acceptés par le serveur.

    https://weakdh.org

    SeenThis n’est pas vulnérable, n’ayant pas de TLS du tout :-) Sinon, il faut mettre à jour serveurs <https://weakdh.org/sysadmin.html> et clients.

    Au passage, bonne page Web sur les tests TLS
    <http://www.exploresecurity.com/wp-content/uploads/custom/SSL_manual_cheatsheet.html>

    • tu multiplies les piques sur l’hébergement non sécurisé de seenthis ; mais il faut bien constater qu’il n’y a pour l’instant personne de compétent pour s’en occuper ;)