Maths●●●●●Difficulty 3 of 5

Why is it so hard to split a big number into its primes?

In 1977 a magazine hid a message behind a 129-digit number. It took 600 volunteers and 1,600 computers 17 years to read it: 'The Magic Words are Squeamish Ossifrage'.

▶ Start the story

Splitting a big number into primes is hard because nobody knows a shortcut. Multiplying is easy, but going backwards, finding which primes were multiplied, seems to require searching. For small numbers you can just try dividing by 2, 3, 5 and so on up to the square root. For huge numbers, that search explodes: as the number of digits grows, the work for any ordinary computer rises drastically. No efficient method is known, though nobody has proved one can't exist.

A factor tree breaking the number 864 into smaller and smaller factors until only primes, 2s and 3s, remain.
Factoring a small number is quick: 864 breaks down into 2s and 3s. The same job on a number with hundreds of digits can take years of computing.Photo: Krishnavedala · CC0

The hardest cases are numbers made by multiplying two large primes of similar size. That's no accident: such numbers are the keys of RSA encryption. If someone found a fast way to factor, RSA would no longer be secure.

The best story is a magazine puzzle. In August 1977, Martin Gardner's column in Scientific American hid a message behind a 129-digit number. It held out until April 1994, when about 600 volunteers lent some 1,600 computers over the Internet to crack it. The secret message read: The Magic Words are Squeamish Ossifrage. By 2015, the same job took about a day and $30 of cloud computing.

The real threat may be quantum. In 1994 Peter Shor found an algorithm that would factor quickly on a quantum computer, but it may need machines with millions of qubits.

The long road to cracking RSA-129 and its successors
  1. 1977

    Martin Gardner's column publishes RSA-129

  2. 1994

    1,600 computers crack RSA-129: Squeamish Ossifrage

  3. 1994

    Peter Shor's quantum factoring algorithm

  4. 2015

    RSA-129 factored in a day for about $30

  5. 2019

    RSA-240 takes about 900 core-years

  6. 2020

    RSA-250 factored

Quiz me

0/3

  1. 1.Why does RSA encryption use the product of two large primes of similar size?
  2. 2.Testing whether a big number is prime is fast. Why doesn't that help you factor it?
  3. 3.Why could Shor's algorithm threaten RSA, and why hasn't it yet?

Recap

Multiplying primes is easy; un-multiplying them is the hard, unsolved direction.

Surprising fact · Factoring RSA-129 took 1,600 computers in 1994, but only about a day and $30 of cloud computing in 2015.

Sources (3)

No source, no claim. Every fact in this lesson (18 claims) cites at least one of these.

  1. [1]Integer factorization · Wikipedia
  2. [2]RSA numbers · Wikipedia
  3. [3]Shor's algorithm · Wikipedia
More lessons in ➗ Maths (3) See all maths lessons →

One more light on your map.

Get one lesson like this every day, about the things you love. Free, in two or five minutes.

Get the share card for this lesson ↗