What are public
and private keys?
For anyone who pays with a phone
Can't play sound? The illustrated version is right below.
Read the transcript
The full narration of the video.
A public key isn't really a key at all. It's a lock. And your phone is hiding the key that matches it. Start with a puzzle. When you pay on your phone, the message passes through lots of strangers' machines before it reaches the bank.
Anyone along the way could take a peek. So agree on a password with the bank first? But you've never met, and the message setting up the password could be seen too. How do you whisper a secret in front of everyone?
Here's the trick. The bank makes lots of identical padlocks, all left open, and hands one to anyone who asks. This lock has an odd rule: anyone can snap it shut, but once it's shut, only one key in the world can open it. The bank keeps that key to itself and never gives it out.
To send a secret, you take one of those open locks, put your message in a box, snap it shut, and send it off. People along the way can grab the box, but even holding the very same lock, they can't open it. Only the bank's key can.
That open lock handed out everywhere has a real name: the public key. The key kept to yourself is the private key. Real ones don't look like locks. They're two long strings of numbers that look like gibberish.
Every time you open a website or pay, your phone uses a pair like this: first it checks the site is real, then it quietly agrees on a password with it. But if the public key goes out to the whole world, why can't anyone work out the private key? Because they're made with multiplication. Pick two huge prime numbers and multiply them.
Multiplying is easy. Sixty-one times fifty-three is three thousand two hundred thirty-three. A minute by hand. Now go backwards. Given only three thousand two hundred thirty-three, which two numbers made it? You have to try them one by one. Real keys use numbers over six hundred digits long. In 2020, researchers cracked one with two hundred fifty digits. On a single computer core, that would have taken twenty-seven hundred years.
The pair also works in reverse. The private key stamps a file, and anyone with the public key can check who really sent it. Before your phone installs an update, it checks that stamp. These locks won't be safe forever. If quantum computers get built, they could break them much faster, so companies are already switching to new locks.
Want to see a real public key? Open a website in a computer browser, click the little icon at the far left of the address bar, and find the certificate. That long jumble is it. Where did you first come across the word "key" used like this?
In one line
Want to see a public key? In a computer browser, click the little icon left of the web address and find the certificate.
A public key isn't really a key. It's an open padlock anyone can take and snap shut. The private key is the only key that opens it, and only its owner has it.
What you think
vs. what it is
you must hide
safe to give the world
Put simply: the public key goes to everyone; the private key stays with you and is never shared.
How to whisper
in front of everyone
When you pay on your phone, the message passes through lots of strangers' machines before it reaches the bank, and anyone along the way could peek. Agreeing on a password first doesn't work, because that message could be seen too. Here's the trick:
The open lock handed out everywhere is the public key. The key kept to yourself is the private key. Real ones are two long strings of numbers that look like gibberish.
You use it
every day
The lock is public
so why not the key?
hard to undo The pair is made by multiplying two huge prime numbers. 61 × 53 = 3233 takes a minute by hand. Given only 3233, finding which two numbers made it means trying them one by one.
Real keys use numbers over 600 digits long. In 2020, researchers cracked a 250-digit one. On a single computer core, that would have taken 2,700 years.
These locks won't be safe forever: if quantum computers get built, they could break them much faster. In August 2024, the US National Institute of Standards and Technology (NIST) published new encryption standards, and companies are already switching.
first come across
the word "key" like this?
Open a site in a computer browser,
click the icon at the far left of the address bar,
and find the certificate. That jumble is it.
Quick check
The public key is shared with everyone. Why is that still safe?
A public key is like an open padlock anyone can snap shut, but once it's shut only the private key opens it, and that key is never shared.