Integer factorization
From Wikipedia, the free encyclopedia
In number theory, integer factorization is the process of breaking down a composite number into smaller non-trivial divisors, which when multiplied together equal the original integer.
When the numbers are very large, no efficient integer factorization algorithm is published; a recent effort which factored a 200 digit number (RSA-200) took eighteen months and used over half a century of computer time. The supposed difficulty of this problem is at the heart of certain algorithms in cryptography such as RSA. Many areas of mathematics and computer science have been brought to bear on the problem, including elliptic curves, algebraic number theory, and quantum computing.
Not all numbers of a given length are equally hard to factor. Given the state of the art as of 2006, the hardest instances of these problems are those where the factors are two randomly-chosen prime numbers of about the same size.
Contents |
[edit] Prime decomposition
By the fundamental theorem of arithmetic, every positive integer has a unique prime factorization. Given an algorithm for integer factorization, one can factor any integer down to its constituent prime factors by repeated application of this algorithm.
[edit] Practical applications
The hardness of this problem is at the heart of several important cryptographic systems. A fast integer factorization algorithm would mean that the RSA public-key algorithm was insecure. Some cryptographic systems, such as the Rabin public-key algorithm and the Blum Blum Shub pseudo-random number generator can make a stronger guarantee - any means of breaking them can be used to build a fast integer factorization algorithm, so if integer factorization is hard then they are strong. In contrast, it may turn out that there are attacks on the RSA problem more efficient than integer factorization, though none are currently published.
A similar hard problem with cryptographic applications is the discrete logarithm problem.
[edit] Current state of the art
A team at the German Federal Agency for Information Technology Security (BSI) holds the record for factorization of semiprimes in the series proposed by the RSA Factoring Challenge sponsored by RSA Security. On May 9, 2005, this team announced factorization of RSA-200, a 663-bit number (200 decimal digits), using the general number field sieve.
The same team later announced factorization of RSA-640, a smaller number containing 193 decimal digits (640 bits), on November 4, 2005.
Both factorizations required several months of computer time using the combined power of 80 AMD Opteron CPUs.
[edit] Difficulty and complexity
If a large, b-bit number is the product of two primes that are roughly the same size, then no algorithm is published that can factor in polynomial time. That means there is no widely known algorithm that can factor it in time O(bk) for any constant k. There are published algorithms, however, that are faster than o(ab) for any number a greater than 1. In other words, there are verifiably algorithms which are super-polynomial but sub-exponential. In particular, the best published asymptotic running time is for the general number field sieve (GNFS) algorithm, which, for a b-bit number n, is:
For an ordinary computer, GNFS is the best published algorithm for large n. For a quantum computer, however, Peter Shor discovered an algorithm in 1994 that solves it in polynomial time. This will have significant implications for cryptography if a large quantum computer is ever built. Shor's algorithm takes only O(b3) time and O(b) space on b-bit number inputs. In 2001, the first 7-qubit quantum computer became the first to run Shor's algorithm. It factored the number 15.
It is not known exactly which complexity classes contain the integer factorization problem. The decision-problem form of it ("does N have a factor less than M?") is known to be in both NP and co-NP. This is because both YES and NO answers can be trivially verified given the prime factors (whose correctness can be verified using the AKS primality test). It is known to be in BQP because of Shor's algorithm. It is suspected to be outside of all three of the complexity classes P, NP-Complete, and co-NP-Complete. If it could be proved that it is in either NP-Complete or co-NP-Complete, that would imply NP = co-NP. That would be a very surprising result, and therefore integer factorization is widely suspected to be outside both of those classes. Many people have tried to find classical polynomial-time algorithms for it and failed, and therefore it is widely suspected to be outside P. Another problem in NP but not believed to be in P or NP-complete is the graph isomorphism problem.
Interestingly, the decision problem "is N a composite number?" (or equivalently: "is N a prime number?") appears to be much easier than the problem of actually finding the factors of N. Specifically, the former can be solved in polynomial time (in the number n of digits of N) with the AKS primality test. In addition, there are a number of probabilistic algorithms that can test primality very quickly if one is willing to accept the small possibility of error. The easiness of primality testing is a crucial part of the RSA algorithm, as it is necessary to find large prime numbers to start with.
[edit] Integer factorization in polynomial time
One of the great unsolved problems of computer science and number theory is finding an algorithm to factor numbers in polynomial time compared with the number of digits. Because of the compelling evidence that factorization is not NP-complete, many believe such an algorithm is likely to exist. If somebody could find a practical method for doing so, it could make factoring almost as easy as primality testing, making popular cryptographic systems such as RSA useless and exposing all existing data. In academia, the existence of such a breakthrough would be big news, settling a stubborn but enticing problem that has captured the interest of thousands of researchers and enabling many other important problems to be solved quickly. If discovered by a secret agency such as the U.S. National Security Agency, which does research in this area, some theorize that the method may be held secret so that the people they investigate will continue to use systems made insecure by the method.
[edit] Factoring algorithms
[edit] Special-purpose
A special-purpose factoring algorithm's running time depends on the properties of its unknown factors: size, special form, etc. Exactly what the running time depends on varies between algorithms.
- Trial division
- Pollard's rho algorithm
- Pollard's p-1 algorithm
- Williams' p+1 algorithm
- Lenstra elliptic curve factorization
- Fermat's factorization method
- Special number field sieve
[edit] General-purpose
A general-purpose factoring algorithm's running time depends solely on the size of the integer to be factored. This is the type of algorithm used to factor RSA numbers. Most general-purpose factoring algorithms are based on the congruence of squares method.
- Dixon's algorithm
- Continued fraction factorization (CFRAC)
- Quadratic sieve
- General number field sieve
- Shanks' square forms factorization (SQUFOF)
[edit] Other notable algorithms
[edit] External links
- Richard P. Brent, "Recent Progress and Prospects for Integer Factorisation Algorithms", Computing and Combinatorics", 2000, pp.3-22. download
- Manindra Agrawal, Neeraj Kayal, Nitin Saxena, "PRIMES is in P." Annals of Mathematics 160(2): 781-793 (2004). August 2005 version PDF
- [1] is a public-domain integer factorization program for Windows. It claims to handle 80-digit numbers. See also the web site for this program MIRACL
- http://www.alpertron.com.ar/ECM.HTM is an integer factorization Java applet that uses the Elliptic Curve Method and the Self Initializing Quadratic Sieve.
- The RSA Challenge Numbers - a factoring challenge.
- Eric W. Weisstein, “RSA-640 Factored,” MathWorld Headline News, November 8, 2005, http://mathworld.wolfram.com/news/2005-11-08/rsa-640/
- Joe Monzo, JustMusic Prime-Factor Notation
- Qsieve, a suite of programs for integer factorization. It contains several factorization methods like Elliptic Curve Method and MPQS.
[edit] References
- Donald Knuth. The Art of Computer Programming, Volume 2: Seminumerical Algorithms, Third Edition. Addison-Wesley, 1997. ISBN 0-201-89684-2. Section 4.5.4: Factoring into Primes, pp.379–417.
- Richard Crandall and Carl Pomerance (2001). Prime Numbers: A Computational Perspective, 1st edition, Springer. ISBN 0-387-94777-9. Chapter 5: Exponential Factoring Algorithms, pp.191–226. Chapter 6: Subexponential Factoring Algorithms, pp.227–284. Section 7.4: Elliptic curve method, pp.301–313.