Lab 01 · Why it breaks

One-Way Padlock

Quick to lock, hard to unlock. The one idea that most of today's internet security rests on.

Explainer

Watch the idea first.

A padlock that snaps shut in a second, the long search to open it, and why a quantum computer changes that. 1 min 22 s, with captions.

Narrated with an ElevenLabs synthetic voice; animation made in code with Remotion. Educational, not for production use.
Read the transcript
  1. Anyone can snap a padlock shut. One hand, one second, no key. Opening it again without the key is a very different job.
  2. Some arithmetic works the same way. Multiply two primes, 89 and 97, and you get 8,633. One quick step.
  3. Now go backwards. Given only 8,633, which two primes made it? There is no shortcut. You try primes, one by one, until one divides it. That took 24 tries.
  4. Add digits, and the search explodes, while multiplying stays a single step. Real keys use numbers more than 600 digits long, far beyond any search.
  5. The two secret primes are your private key. Their product is your public key. It's safe to show anyone, because reversing it is the slow direction. Much of today's internet security rests on that gap.
  6. But a large enough quantum computer, running Shor's algorithm, could find those primes far faster. That is why new locks, built on different math, are being standardized. Next: Clockwork Ciphers.
Step 1 · Analogy

Picture an open padlock on a gate.

Anyone walking past can snap it shut with one hand. No key, no skill, one second. Opening it again is a different job: without the key you are stuck.

Some arithmetic behaves the same way. Going forward takes one quick step. Going backward takes a long search, unless you hold a secret. You are about to feel that difference yourself.

Step 2 · Sandbox

Lock it. Then try to unlock it.

Steps

  1. 1Snap a lock shutdone
  2. 2Open a 2-digit lock
  3. 3Open a 3-digit lock
  4. 4Open a 4-digit lock
  5. 5Which grew faster?

Snap a lock shut

Pick two secret numbers. Multiplying them is the lock.

53 × 61 = 3,233 locked in 1 step

Open lock 1 of 3

Someone else made this lock from two secret numbers. Find one of them.

77

LockedPick a number to test whether it divides the lock.

Event log
LockDigitsSteps to lockYour tries to unlockOpened with
7721
43731
8,63341

Goal

Open all three locks, then say which job grew faster.

0 of 3 locks open.

Most tries you could need, by size of lock
2 digits4
3 digits11
4 digits25
6 digits168
8 digits1,229

Computed: the count of primes up to the square root, testing one at a time. One zero-based scale, no minimum bar width. Locking stays at 1 step in every row.

Educational, not for production use. An intuition builder, not a proof. Every number here is computed in your browser.

Practice: planned

Lock 1 of 3: 77, locked. 0 tries so far. 0 of 3 locks open.

Step 3 · Formal bridge

Now it has a name.

Finish the lab to see the real terms. They will make sense once you have done it by hand.

What you felt is a one-way function: quick to compute, slow to reverse. Multiplying two primes took one step every time. Undoing it is integer factorization, and your tries climbed with each lock.

The two secret primes are a private key. Their product is a public key: safe to show anyone, because reversing it is the slow direction. The RSA system is built on this exact gap.

Why this matters for quantum

A sufficiently capable quantum computer could run Shor’s algorithm, which finds those factors far faster than guessing. That is Lab 03, Shattering the Clock (planned). It is why new locks built on different math are being standardized.

Step 4 · Teach-back

Explain it to a colleague.

Feedback only. It never blocks your progress. Your text stays in this browser.

What a good answer covers

  • To doOne direction is quick, the other is slow.
  • To doA secret makes the slow direction quick.
  • To doWhere the padlock picture stops working.

Where the padlock picture breaks

Real keys are hundreds of digits long, and attackers use far better methods than trying one number at a time. A quantum computer would not win by trying faster, either: it uses a different trick, which is Lab 03. And nobody has proved the search must stay slow. It is a well-tested assumption, not a guarantee.