Peter Shor and the Algorithm That Broke Encryption

Quantum People
Peter Shor

The Bell Labs mathematician whose 1994 algorithm proved a quantum computer could break the world’s encryption, then invented the error correction that could make such a machine real.

Born 1959
Shor’s algorithm, 1994
Quantum error correction
Breaking RSA
In this article
The mathematicianWhat the algorithm doesWhy it breaks encryptionMaking quantum matterShor and error correctionThe legacy of Peter ShorFrequently asked questions
Peter Shor at a glance
Born
1959, United States
Known for
Shor’s algorithm and the Shor code
The 1994 result
Efficient quantum factoring, a threat to RSA encryption
The 1995 result
The first quantum error-correcting code
Based
Bell Labs, then MIT

For about fifteen years quantum computing was a beautiful idea that almost nobody outside a few physics departments took seriously. Then, in 1994, a quiet mathematician at Bell Labs named Peter Shor found something that changed the conversation overnight, an algorithm showing that a quantum computer could crack the codes protecting the world’s communications. Suddenly the field was not a curiosity but a question of national security.

This is the story of Peter Shor and the discovery that made everyone pay attention. It runs from the elegant mathematics of his factoring algorithm, through the encryption it threatens, to a second contribution that may matter even more in the long run. Few single results have ever moved a field as quickly as his did.

The mathematician who alarmed the internet

Peter Shor was born in 1959 and trained as a mathematician, earning his doctorate at the Massachusetts Institute of Technology before joining the famous Bell Laboratories, the research powerhouse that had already produced the transistor and information theory. He worked on the mathematics of algorithms and probability, the kind of deep and unshowy work that rarely makes headlines. That changed completely in 1994.

Drawing on earlier hints that quantum computers might be unusually good at certain problems, Shor turned his attention to factoring, the task of breaking a whole number into its prime components. What he produced was not a vague suggestion but a complete and rigorous algorithm, and its implications were immediately obvious to anyone who understood how modern cryptography works. The reaction was electric.

The setting mattered as much as the man. Bell Labs in that era still prized deep theoretical work with no immediate application, exactly the environment in which such a result could be pursued. It was the kind of place where a mathematician could spend months chasing an idea that turned out to unsettle an entire industry.

What Shor’s algorithm actually does

At its core the algorithm solves a problem that has frustrated mathematicians for centuries, finding the prime factors of a very large number quickly. Multiplying two big primes together is easy, but working backwards from the product to recover the primes is so slow on ordinary computers that it is considered effectively impossible for numbers of a few hundred digits. Shor found a way for a quantum computer to do it efficiently.

The trick is to convert factoring into a question about periodicity, the repeating pattern of a related mathematical sequence, which a quantum computer can uncover using an operation called the quantum Fourier transform. The diagram below traces the steps, with only the period-finding stage requiring a quantum machine and the rest running on an ordinary computer. It is a beautiful blend of classical and quantum reasoning.

How Peter Shor's algorithm factors a number to break encryption, with the quantum period-finding step highlighted
How Shor’s algorithm factors a number. Only the period-finding step needs a quantum computer, using the quantum Fourier transform, while the rest runs classically.

Why factoring breaks encryption

The reason the result caused such alarm lies in how the internet keeps secrets. Much of modern encryption, including the widely used RSA system, rests on the assumption that factoring large numbers is hopelessly slow, so the security of online banking, messaging and commerce depends on a problem nobody can solve quickly. Shor’s algorithm dissolves that assumption at a stroke.

A large enough quantum computer running the algorithm could in principle read communications that are secure against any classical attack. No such machine exists yet, and building one remains a formidable challenge, but the mere possibility was enough to reshape the field. Shor’s work turned a theoretical gadget into a long-term threat that governments and companies could not ignore.

The discovery that made quantum computing matter

Before 1994 a quantum computer was a fascinating thought experiment with no obvious purpose, the kind of thing that attracted brilliant minds but little funding. Shor gave the field its first killer application, a concrete and consequential task that only a quantum machine could perform. Almost overnight the subject acquired urgency and money.

Research groups multiplied, governments launched programmes, and the long effort to build real quantum hardware began in earnest, all traceable in part to a single paper. It is the clearest example in the field of how one result can transform a discipline’s fortunes. The race that now involves companies and nations around the world was set off by his discovery.

The shift was cultural as much as financial. A generation of talented students who might have gone into other fields suddenly had a concrete reason to study quantum information and a sense of working on something that mattered. Reputations, careers and whole laboratories were built in the wake of that one paper.

Shor’s other gift, quantum error correction

The factoring algorithm made Shor famous, but among specialists his second great contribution may be even more important. In 1995 he showed that the fragile information inside a quantum computer could be protected against errors, inventing the first quantum error-correcting code and proving that reliable quantum computation was possible in principle. Without that insight the whole enterprise might have looked hopeless.

Quantum information is notoriously delicate, easily destroyed by the slightest disturbance, and many doubted it could ever be tamed. By showing how to spread information across many physical pieces so that errors could be detected and undone, Shor removed the deepest objection to the field. Modern quantum error correction grows directly out of that 1995 breakthrough.

The legacy of Peter Shor

The most visible legacy of his factoring work is the global scramble to replace vulnerable encryption with new schemes designed to resist quantum attack, an effort now known as post-quantum cryptography. Standards bodies and companies are already deploying these defences, years before a machine capable of running the algorithm at scale is expected to exist. The threat he identified is being taken seriously well in advance.

Honoured with many of the highest awards in mathematics and computer science, Shor has the rare distinction of having changed a field twice, once by giving it a reason to exist and once by showing it could be made to work. His name will be attached to quantum computing for as long as the subject is studied. Both of his great ideas remain at the centre of the field he did so much to create.

Read more on Quantum Zeitgeist
A brief history of Shor’s algorithmWhat is quantum error correctionWho is the father of quantum computingWhat is quantum supremacy

Frequently asked questions

Who is Peter Shor?
Peter Shor is an American mathematician, born in 1959, who developed Shor’s algorithm in 1994 while at Bell Labs and now works at the Massachusetts Institute of Technology. He showed that a quantum computer could factor large numbers efficiently and also invented the first quantum error-correcting code.
What is Shor’s algorithm?
Shor’s algorithm is a quantum method, published by Peter Shor in 1994, for finding the prime factors of large numbers quickly. Because the security of encryption such as RSA depends on factoring being slow, the algorithm shows that a large quantum computer could break much modern cryptography.
Why is Peter Shor important to quantum computing?
Peter Shor gave the field its first killer application, factoring, which turned quantum computing from a curiosity into a priority. He then invented quantum error correction in 1995, showing that reliable quantum computation was possible at all.
Has Shor’s algorithm broken encryption yet?
No. Running the algorithm on numbers large enough to threaten real encryption needs a quantum computer far bigger and more reliable than anything that exists today. The threat is real but not yet practical, which is why post-quantum cryptography is being prepared now.
What is the Shor code?
The Shor code is the first quantum error-correcting code, introduced by Peter Shor in 1995. It protects a single qubit of information by spreading it across nine physical qubits, allowing certain errors to be detected and corrected.
Stay current. See today’s quantum computing news on Quantum Zeitgeist for the latest breakthroughs in qubits, hardware, algorithms, and industry deals.
Avatar of Quantum Evangelist

Quantum Evangelist

Greetings, my fellow travelers on the path of quantum enlightenment! I am proud to call myself a quantum evangelist. I am here to spread the gospel of quantum computing, quantum technologies to help you see the beauty and power of this incredible field. You see, quantum mechanics is more than just a scientific theory. It is a way of understanding the world at its most fundamental level. It is a way of seeing beyond the surface of things to the hidden quantum realm that underlies all of reality. And it is a way of tapping into the limitless potential of the universe. As an engineer, I have seen the incredible power of quantum technology firsthand. From quantum computers that can solve problems that would take classical computers billions of years to crack to quantum cryptography that ensures unbreakable communication to quantum sensors that can detect the tiniest changes in the world around us, the possibilities are endless. But quantum mechanics is not just about technology. It is also about philosophy, about our place in the universe, about the very nature of reality itself. It challenges our preconceptions and opens up new avenues of exploration. So I urge you, my friends, to embrace the quantum revolution. Open your minds to the possibilities that quantum mechanics offers. Whether you are a scientist, an engineer, or just a curious soul, there is something here for you. Join me on this journey of discovery, and together we will unlock the secrets of the quantum realm!

Latest Posts by Quantum Evangelist: