kemspotter Check a site

Learn Lesson 2 of 5 about 4 minutes

A machine that hears the rhythm

What a quantum computer would do to that exchange

  1. Lesson 1: Two strangers, one secret
  2. Lesson 2: A machine that hears the rhythm
  3. Lesson 3: Recorded today, read later
  4. Lesson 4: A new kind of hard problem
  5. Lesson 5: Two locks on one door
In one sentence

Today's key exchange is safe only while nobody can find a rhythm hidden in numbers, and a large quantum computer could find it.

The paint in lesson 1 cannot be unmixed because nobody knows a fast way to find a rhythm hidden in numbers. That is an odd thing for the world's privacy to depend on, so here is what it means.

Take a number, keep multiplying it by itself, and each time keep only the remainder after dividing by some other number N. The results go round in a loop. The length of the loop is called the period. Anyone who knows the period can work out the factors of N, which breaks the RSA system, and the same trick recovers the private number in a key exchange.

An ordinary computer finds the period by walking the loop one step at a time. At real key sizes that walk would outlast the universe many times over. In 1994 Peter Shor showed that a quantum computer could find it another way. It sets up every step of the loop at once and lets them interfere, the way overlapping ripples do. What survives is a row of sharp peaks, and the spacing of the peaks gives away the period.

Try thisPick a number to factor and watch the length of the loop appear as evenly spaced peaks.

The remainders, in order

What a quantum computer would measure

…

Period finding, small enough to see. The lower panel is worked out the way the last step of Shor's algorithm works. A real attack does the same thing with a loop hundreds of digits long.

No machine that can do this at full size exists today. What keeps changing is the estimate of how big it has to be. In 2019 the best published design for breaking a 2048-bit RSA key needed about twenty million noisy qubits and eight hours. In 2025 one of the same authors published a design that needs fewer than one million and less than a week. The target keeps moving towards the machines.

Elliptic curves fall to the same algorithm, and need a smaller machine than RSA does. Nothing in today's key exchange survives it.

What to remember

  • The hard direction is hard only because finding the period is slow.
  • Shor's algorithm finds it quickly on a quantum computer.
  • No such machine exists, and estimates of the size needed keep shrinking.

Words used here: quantum computer, qubit, Shor's algorithm, RSA, elliptic curve.