TECHNOLOGY · 5 MIN
How to share a secret in public
Anyone can lock a message with your public key. Only your private key opens it.
How can your browser and a bank agree on a secret code over the open internet while others listen in?
Your browser agrees a secret key with a website it has never met, in a fraction of a second.
Open padlocks, one key
Picture the bank mailing open padlocks to anyone who asks, while keeping the only key. You put your message in a box and snap a padlock shut. Anyone watching sees padlocks and locked boxes, but nobody else can open them. In real encryption, the padlock is math that’s easy to do and practically impossible to undo without the private key.
Easy one way, hard the other
A classic trick uses prime numbers. Multiplying two huge primes takes a computer a blink, but starting from the product and finding the two primes would take longer than the age of the universe. Once the padlock step shares a fresh secret key, both sides switch to fast ordinary encryption for the rest of the visit. Because future quantum computers could break today’s padlocks, new quantum-safe ones are already rolling out.
Turn on JavaScript to watch each board draw itself, solve one on your own and explain it back.
More in Technology
See the whole library