Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:quant-ph/9508027 · SIAM Journal on Computing

Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer

Peter W. Shor

Published Oct 1, 1997• 11,363 citations
arXivHTMLPDF

Abstract

A digital computer is generally believed to be an efficient universal computing device; that is, it is believed able to simulate any physical computing device with an increase in computation time by at most a polynomial factor. This may not be true when quantum mechanics is taken into consideration. This paper considers factoring integers and finding discrete logarithms, two problems which are generally thought to be hard on a classical computer and which have been used as the basis of several proposed cryptosystems. Efficient randomized algorithms are given for these two problems on a hypothetical quantum computer. These algorithms take a number of steps polynomial in the input size, e.g., the number of digits of the integer to be factored.

DOI
10.1137/s0097539795293172

Related papers

Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer

Peter W. Shor

A digital computer is generally believed to be an efficient universal computing device; that is, it is believed to be able to simulate any physical computing device with an increase in computation time by at most a polynomial factor. This may not be true when quantum mechanics is taken into consideration. This paper considers factoring integers and finding discrete logarithms, two problems that are generally thought to be hard on classical computers and that have been used as the basis of several proposed cryptosystems. Efficient randomized algorithms are given for these two problems on a hypothetical quantum computer. These algorithms take a number of steps polynomial in the input size, for example, the number of digits of the integer to be factored.

SIAM Review•Jan 1, 1999•5,171 citations

Algorithms for quantum computation: discrete logarithms and factoring

Peter W. Shor

A computer is generally considered to be a universal computational device; i.e., it is believed able to simulate any physical computational device with a cost in computation time of at most a polynomial factor: It is not clear whether this is still true when quantum mechanics is taken into consideration. Several researchers, starting with David Deutsch, have developed models for quantum mechanical computers and have investigated their computational properties. 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. These two problems are generally considered hard on a classical computer and have been used as the basis of several proposed cryptosystems. We thus give the first examples of quantum cryptanalysis.>

Annual Symposium on Foundations of Computer Science•Dec 17, 2002•11,207 citations

Quantum computing

Peter W. Shor

The Church-Turing thesis says that a digital computer is a universal computational device; that is, it is able to simulate any physically realizable computational device. It has generally been believed that this simulation can be made efficient so that it entails at most a polynomial increase in computation time. This may not be true if quantum mechanics is taken into consideration. A quantum computer is a hypothetical machine based on quantum mechanics. We explain quantum computing, and give an algorithm for prime factorization on a quantum computer that runs asymptotically much faster than the best known algorithm on a digital computer. It is not clear whether it will ever be possible to build large-scale quantum computers. One of the main difficulties is in manipulating coherent quantum states without introducing errors or losing coherence. We discuss quantum error-correcting codes and fault-tolerant quantum computing, which can guarantee highly reliable quantum computation, given only moderately reliable quantum computing hardware.

EMS Press eBooks•Jan 1, 1998•107 citations

Proposing a Quantum simulator for integer factorization

José Luis Rosales, Vicente Martín Ayuso

Many cryptographic algorithms depend on computational complexity assumptions. Notorious cases are the RSA algorithm for public key criptography or the Diffie-Hellman key exchange protocol, to publicly agree on a common secret key. Both algorithms are known to be broken by quantum computing as well as those that can be reduced to a discrete logarithm problem. These are key algorithms in our digital society and are at the basis of everyday tasks, specially those that rely on digital signatures. The RSA algorithm, in particular, is probably the most used algorithm and is its assumed security the one that guards most of the e-commerce nowadays. In this case, it is the time complexity of finding the prime factors of a large number, that grows worse than polinomially with the size of the number, the main guardian of our cyberinfrastructure. The fact that a quantum computer can solve this problem in polynomial time using Shor's algorithm is seen as a potentially major disruption and has prompted security agencies to advice the progressive deprecation of these algorithms.

•Jan 1, 2016•0 citations

Quantum Computational Number Theory

Song Yuan Yan

This chapter gives an account of ef?cient algorithms for solving the three important infeasible problems in computational number theory, including the Integer Factorization Problem (IFP), the Discrete Logarithm Problems (DLP), and the Elliptic Curve Discrete Logarithm Problem (ECDLP). The quantum algorithms for order ?nding and factoring can be used, with some small modi?cations, to solve the Discrete Logarithm Problem (DLP) ef?ciently in polynomial time. Quantum factoring is reportedly in its very earliest stages and will not threaten the security of RSA at least at present, as the current quantum computer can only factor a number with just 2 digits, such as 15, which is essentially hopeless. The Elliptic Curve Method (ECM) factoring algorithm is very well suited to parallel implementation. The Number Field Sieve (NFS) factoring algorithm is also very well suited to parallel implementation.

Wiley eBooks•Nov 27, 2012•5 citations

Integer Factorization by Quantum Measurements

Giuseppe Mussardo, Andrea Trombettoni

Quantum algorithms are at the heart of the ongoing efforts to use quantum mechanics to solve computational problems unsolvable on ordinary classical computers. Their common feature is the use of genuine quantum properties such as entanglement and superposition of states. Among the known quantum algorithms, a special role is played by the Shor algorithm, i.e. a polynomial-time quantum algorithm for integer factorization, with far reaching potential applications in several fields, such as cryptography. Here we present a different algorithm for integer factorization based on another genuine quantum property: quantum measurement. In this new scheme, the factorization of the integer $N$ is achieved in a number of steps equal to the number $k$ of its prime factors, -- e.g., if $N$ is the product of two primes, two quantum measurements are enough, regardless of the number of digits $n$ of the number $N$. Since $k$ is the lower bound to the number of operations one can do to factorize a general integer, one sees that a quantum mechanical setup can saturate such a bound.

arXiv:2309.10757•Sep 19, 2023•3 citations
A digital computer is generally believed to be an efficient universal computing device; that is, it is believed able to simulate any physical computing device with an increase in computation time by at most a polynomial factor. This may not be true when quantum mechanics is taken into consideration. This paper considers factoring integers and finding discrete logarithms, two problems which are generally thought to be hard on a classical computer and which have been used as the basis of several proposed cryptosystems. Efficient randomized algorithms are given for these two problems on a hypothetical quantum computer. These algorithms take a number of steps polynomial in the input size, e.g., the number of digits of the integer to be factored.
A digital computer is generally believed to be an efficient universal computing device; that is, it is believed to be able to simulate any physical computing device with an increase in computation time by at most a polynomial factor. This may not be true when quantum mechanics is taken into consideration. This paper considers factoring integers and finding discrete logarithms, two problems that are generally thought to be hard on classical computers and that have been used as the basis of several proposed cryptosystems. Efficient randomized algorithms are given for these two problems on a hypothetical quantum computer. These algorithms take a number of steps polynomial in the input size, for example, the number of digits of the integer to be factored.
A computer is generally considered to be a universal computational device; i.e., it is believed able to simulate any physical computational device with a cost in computation time of at most a polynomial factor: It is not clear whether this is still true when quantum mechanics is taken into consideration. Several researchers, starting with David Deutsch, have developed models for quantum mechanical computers and have investigated their computational properties. 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. These two problems are generally considered hard on a classical computer and have been used as the basis of several proposed cryptosystems. We thus give the first examples of quantum cryptanalysis.>
The Church-Turing thesis says that a digital computer is a universal computational device; that is, it is able to simulate any physically realizable computational device. It has generally been believed that this simulation can be made efficient so that it entails at most a polynomial increase in computation time. This may not be true if quantum mechanics is taken into consideration. A quantum computer is a hypothetical machine based on quantum mechanics. We explain quantum computing, and give an algorithm for prime factorization on a quantum computer that runs asymptotically much faster than the best known algorithm on a digital computer. It is not clear whether it will ever be possible to build large-scale quantum computers. One of the main difficulties is in manipulating coherent quantum states without introducing errors or losing coherence. We discuss quantum error-correcting codes and fault-tolerant quantum computing, which can guarantee highly reliable quantum computation, given only moderately reliable quantum computing hardware.
Many cryptographic algorithms depend on computational complexity assumptions. Notorious cases are the RSA algorithm for public key criptography or the Diffie-Hellman key exchange protocol, to publicly agree on a common secret key. Both algorithms are known to be broken by quantum computing as well as those that can be reduced to a discrete logarithm problem. These are key algorithms in our digital society and are at the basis of everyday tasks, specially those that rely on digital signatures. The RSA algorithm, in particular, is probably the most used algorithm and is its assumed security the one that guards most of the e-commerce nowadays. In this case, it is the time complexity of finding the prime factors of a large number, that grows worse than polinomially with the size of the number, the main guardian of our cyberinfrastructure. The fact that a quantum computer can solve this problem in polynomial time using Shor's algorithm is seen as a potentially major disruption and has prompted security agencies to advice the progressive deprecation of these algorithms.
This chapter gives an account of ef?cient algorithms for solving the three important infeasible problems in computational number theory, including the Integer Factorization Problem (IFP), the Discrete Logarithm Problems (DLP), and the Elliptic Curve Discrete Logarithm Problem (ECDLP). The quantum algorithms for order ?nding and factoring can be used, with some small modi?cations, to solve the Discrete Logarithm Problem (DLP) ef?ciently in polynomial time. Quantum factoring is reportedly in its very earliest stages and will not threaten the security of RSA at least at present, as the current quantum computer can only factor a number with just 2 digits, such as 15, which is essentially hopeless. The Elliptic Curve Method (ECM) factoring algorithm is very well suited to parallel implementation. The Number Field Sieve (NFS) factoring algorithm is also very well suited to parallel implementation.
Quantum algorithms are at the heart of the ongoing efforts to use quantum mechanics to solve computational problems unsolvable on ordinary classical computers. Their common feature is the use of genuine quantum properties such as entanglement and superposition of states. Among the known quantum algorithms, a special role is played by the Shor algorithm, i.e. a polynomial-time quantum algorithm for integer factorization, with far reaching potential applications in several fields, such as cryptography. Here we present a different algorithm for integer factorization based on another genuine quantum property: quantum measurement. In this new scheme, the factorization of the integer NNN is achieved in a number of steps equal to the number kkk of its prime factors, -- e.g., if NNN is the product of two primes, two quantum measurements are enough, regardless of the number of digits nnn of the number NNN. Since kkk is the lower bound to the number of operations one can do to factorize a general integer, one sees that a quantum mechanical setup can saturate such a bound.