Read this lesson as text
The Key Exchange Problem
Cryptography · Axiom Academy
INTRO The Key Exchange Problem How do you share a secret key when everyone is listening? Alice wants to send Bob an encrypted message. But there's a problem: encryption requires a secret key. Click the button to see what happens when Alice tries to send the key. How It Was Done Before the Internet Historically, this problem was solved with trusted couriers. Watch as a diplomatic courier physically carries the key from London to Washington. Click the button to see the magnitude of the problem in the modern internet age. The Seemingly Impossible Challenge Let's state the problem clearly. This seems impossible at first glance! Alice and Bob want to create a shared secret. But they can only communicate over a public channel that Eve can see. How can they agree on a secret when every message is visible to everyone? In 1976, Whitfield Diffie and Martin Hellman discovered something revolutionary: you can create a shared secret over a public channel. The trick involves one-way functions and modular arithmetic, where certain operations are easy to do but nearly impossible to reverse. Both Alice and Bob contribute to the secret, but neither one sends the actual secret. They each send partial information that is useless to Eve, but when combined with their private data, produces the same shared secret on both sides.
This is the written version of the interactive lesson above. See the full Cryptography course.