Papers · Theory · 1994
Algorithms for quantum computation: discrete logarithms and factoring
In 1994 a mathematician at Bell Labs showed that a quantum computer could do something useful that no ordinary computer is known to do quickly: break large numbers into their prime factors.
The question
A decade after David Deutsch described a universal quantum computer, the idea still lacked a convincing use. The few quantum algorithms known by 1994 showed their advantage on artificial problems, designed to make the point. Peter Shor, a mathematician at AT&T Bell Labs, was not satisfied with that. He started asking whether a quantum computer could solve a real problem faster.
How it was found
The opening came from a paper Shor read as a member of the program committee of the 1994 STOC conference. In it Dan Simon solved one of those contrived problems much better than the best classical algorithm, using a Fourier transform to find the period of a function. The committee rejected the paper, despite Shor arguing for it.
Shor knew that Fourier transforms are good at finding periods, and that a famous hard problem, the discrete logarithm, was related to periodicity. Solving it would break some public-key cryptosystems. He worked on it without telling anyone, because it seemed a long shot, and in April 1994 he solved it. A colleague, Jeff Lagarias, checked the algorithm and found a small error that was easily fixed.
Shor presented the result at a Bell Labs seminar on a Tuesday. By the weekend the news had travelled, and changed on the way: Umesh Vazirani called to ask whether it was true that he could factor efficiently with a quantum computer. The talk had been about discrete logarithms, but in the meantime Shor had solved factoring as well.
What the paper showed
The paper, presented at the FOCS conference in Santa Fe in November 1994, gives algorithms for two problems: finding discrete logarithms and factoring integers. On a quantum computer, both take a number of steps that grows only polynomially with the size of the input, the number of digits of the integer to be factored. No classical method known then, or now, does this.
They are Las Vegas algorithms: when they return an answer it is correct, and only their running time depends on chance. An expanded version appeared on arXiv in August 1995.
Why it mattered
Factoring is not a contrived problem. Widely used encryption such as RSA relies on it being hard, and Shor's result meant that a large enough quantum computer would undo that protection. Seth Lloyd later summed up the scale involved: a machine with a few thousand logical qubits, able to perform around a million coherent operations, would be enough to break public-key cryptosystems such as RSA.
The result turned quantum computing from a curiosity into a field with real stakes. When Shor shared a Breakthrough Prize in 2023, the citation described his work as the first quantum algorithm that was clearly useful.
What came after
- 1995Peter Shor shows quantum information can be protected from errors
- 1995Kitaev extends Shor's results with a method for measuring eigenvalues
- 2001IBM and Stanford run Shor's algorithm on a 7-qubit computer to factor 15
- 2003Proos and Zalka detail a quantum attack on elliptic-curve keys
- 2023Oded Regev proposes a new quantum algorithm for factoring
- 2025Google researcher estimates RSA-2048 could be broken with under a million qubits
Sources
“This paper gives Las Vegas algorithms for finding discrete logarithms and factoring integers on a quantum computer that take a number of steps which is polynomial in the input size, e.g., the number of digits of the integer to be factored.”
Proceedings of the 35th Annual Symposium on Foundations of Computer Science (IEEE)“This is an expanded version of a paper that appeared in the Proceedings of the 35th Annual Symposium on Foundations of Computer Science, Santa Fe, NM, Nov. 20--22, 1994.”
arXiv (Peter W. Shor)“When I solved it, in April 1994, I told a few people I knew and worked with, including my boss David Johnson, and a colleague at Bell Labs, Jeff Lagarias, who verified that my algorithm was correct.”
arXiv (Peter W. Shor)“The situation changed in 1994, when Peter Shor showed that a relatively modestly sized quantum computer, containing a few thousand logical quantum bits or ‘qubits,’ and capable of performing around a million coherent operations, could be used to factor large numbers and so break public key cryptosystems such as RSA”
arXiv (Seth Lloyd)“Peter Shor went on to invent the first quantum computer algorithm that was clearly useful. Shor’s algorithm can find the factors of large numbers exponentially faster than is thought to be possible for any classical algorithm.”
Breakthrough Prize Foundation