Sitemap
Press enter or click to view image in full size

Member-only story

ML-KEM is not Diffie-Hellman Key Exchange: A Step-by-Step Guide to ML-KEM

4 min readJul 19, 2025

--

Every so often, in technology, something comes along that changes a whole area. This is now happening with post-quantum cryptography, and where we will remove our teaching of areas of RSA and ECC public key cryptography, and replace them with quantum-robust methods. One of the areas that will go is the usage of the Diffie-Hellman key exchange method. It is now around 49 years old, and has done us well, but needs to be replaced with KEM (Key Encapsulation Method). Basically, a KEM is more like public key encryption than a key exchange method.

From DH to ML-KEM

If you are into cybersecurity, you will probably have learnt all about the amazing Diffie-Hellman method. With this, Bob and Alice each create a secret (b and a, respectively), and then share a public version of their secret:

Press enter or click to view image in full size

In the end, they can generate the same secret. For ML-KEM (aka Kyber), we take Alice’s public key, and then pass that to Bob. Bob will then use this key to encapsulate the key. The output of this is ct and ss. Bob will send ct to Alice, and then can decode the value of ss to reveal the shared secret. Alice will then…

--

--

Prof Bill Buchanan OBE FRSE
Prof Bill Buchanan OBE FRSE

Written by Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.