The headlines say a machine is about to read locked messages. One lock they name is RSA. It plays below. Back and Next stop it so you can look.
Multiply two primes and you get the lock number. Splitting it back apart is the hard part.
10 mod 3 = 1
10 divided by 3 makes 3 groups, and 1 is left over. That leftover is what mod means.
Raise 65 to the 17th. The leftover after dividing by 3233 is 2790. The message is hidden.
Raise 2790 to the secret power. The leftover is 65 again.
Signing uses the secret first. The public power checks it. Add 1 to 588 and the check fails.
Encrypt a sentence
This makes two real primes, large enough for a sentence. Paste locked text into the box below and decrypt it with n and d. The lock is still the classroom one, with no filler. Do not type a secret.
- p
- q
- n
- e
- d
Short version:
- Everyone can see the lock number 3233 and the public power 17. The secret power is 2753. You do not send that one.
- Locking keeps the leftover:
c = m^e mod n. Opening uses the secret power. Signing uses the secret power first, and the public power checks it. - Breaking a real lock means splitting its number back into the two primes. 3233 is small on purpose.
Why a real lock is harder
3233 has four digits, so you can split it by trying what divides it. A real lock number has hundreds of digits. The computer stores it as 2048 ones and zeros.
A quantum computer big enough to split that may still be years or decades away, NIST says. Someone can save today’s locked message and wait. NIST’s plain page calls that harvest now, decrypt later: collect now, open later. Shor’s method (1994) is how that computer would do the split. The new locks, published 13 August 2024, are ML-KEM and ML-DSA. NIST takes the old ones out of its rules by 2035. It does not name the year a real RSA lock breaks.
Leave the browser padlock on
I would leave the padlock in the browser on. The picture is the classroom version: tiny primes, no filler, secret power shown because that is the point. A real signature, the kind on the card a website shows your browser, adds filler first. The rulebook for that filler is PKCS#1. NIST is asking people to start using ML-KEM and ML-DSA, not to stop locking messages while they do.
A password manager builds its key from your passphrase, slowly, on purpose. A card tap is a one-time code for one amount.
Questions people ask
Does the public power have to be 17? No. Any whole number from 3 up works, as long as it and the helper number (one less than each prime, multiplied) share no divisor bigger than 1. 17 is short enough to watch.
Can I put a password in the form? No. The lock number is 3233, and the secret power is printed.
Did a chatbot break a real RSA lock? The number in the picture has four digits, and both primes are on it. A real one has hundreds of digits. A headline that a model cracked RSA still has to show the two primes it split. These two are 61 and 53.