Integer factorization
15491
221016693
2008-06-22T17:54:15Z
Siddhant
270584
clean up using [[Project:AutoWikiBrowser|AWB]]
{{redirect|Prime decomposition|the prime decomposition theorem for 3-manifolds|Prime decomposition (3-manifold)}}
In [[number theory]], '''integer factorization''' is the process of breaking down a [[composite number]] into smaller non-trivial[[divisor| divisors]], which when multiplied together equal the original integer.
When the numbers are very large, no efficient integer [[factorization]] [[algorithm]] is publicly known; a recent effort which factored a 200-digit number ([[RSA-200]]) took eighteen months and used over half a century of computer time. The presumed 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 computer|quantum computing]].
Not all numbers of a given length are equally hard to factor. The hardest instances of these problems (for currently known techniques) are [[semiprime]]s, i.e. the product of two distinct [[prime number]]s. When they are both large, randomly chosen, and about the same size (but not too close), even the fastest prime factorization algorithms on the fastest computers can take enough time to make the search impractical.
==Prime decomposition==
By the [[fundamental theorem of arithmetic]], every positive integer greater than one has a unique prime factorization. However, the fundamental theorem of arithmetic gives no insight into how to obtain an integer's prime factorization; it only guarantees its existence.
Given an algorithm for integer factorization, one can factor any integer down to its constituent [[prime factor]]s by repeated application of this algorithm.
==Practical applications==
The hardness <!-- do not change this to "difficulty" - it's a technical term --> 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 is not secure. Some cryptographic systems, such as the [[Rabin cryptosystem|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; 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 is currently published.
A similar hard problem with cryptographic applications is the [[discrete logarithm problem]].
Even in the absence of cryptographic systems based on its hardness, integer factorization also has many positive applications in algorithms. For example, once an integer ''n'' is placed in its prime factorization representation, it enables the rapid computation of [[multiplicative function]]s on ''n''. It can also be used to save storage, since any [[multiset]] of prime numbers can be stored without loss of information as its product; this was exploited, for example, by the [[Arecibo message]].
==Current state of the art==
{{seealso|integer factorization records}}
A team at the German Federal Agency for Information Technology Security ([[Federal Office for Information Security|BSI]]) holds the record for factorization of [[semiprime]]s 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.
===Difficulty and complexity===
If a large, ''b''-[[bit]] number is the product of two primes that are roughly the same size, then no [[algorithm]] has been published that can factor in [[polynomial time]], ''i.e.'', that can factor it in time [[Big O notation|O]](''b''<sup>''k''</sup>) for some constant ''k''. There are published algorithms that are faster than [[Big O notation|O]]((1+ε)<sup>''b''</sup>) for all positive ε, ''i.e.'', sub-exponential.
The best published asymptotic running time is for the [[general number field sieve]] (GNFS) algorithm, which, for a ''b''-bit number n, is:
:<math>O\left(\exp\left(\left(\begin{matrix}\frac{64}{9}\end{matrix} b\right)^{1\over3} (\log b)^{2\over3}\right)\right).</math>
For an ordinary computer, GNFS is the best published algorithm for large ''n'' (more than about 100 digits). 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(''b''<sup>3</sup>) 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.
When discussing what [[complexity class]]es the integer factorization problem falls into, it's necessary to distinguish two slightly different versions of the problem:
* The [[function problem]] version: given an integer N, find an integer d with 1 < d < N that divides N (or conclude that N is prime). This problem is trivially in [[FNP (complexity)|FNP]] and it's not known whether it lies in [[FP (complexity)|FP]] or not. This is the version solved by most practical implementations.
* The [[decision problem]] version: given an integer N and an integer M with 1 ≤ M ≤ N, does N have a factor d with 1 < d < M? This version is useful because most well-studied complexity classes are defined as classes of decision problems, not function problems. This is a natural decision version of the problem, analogous to those frequently used for [[optimization problem]]s, because it can be combined with [[binary search]] to solve the function problem version in a logarithmic number of queries.
It is not known exactly which [[computational complexity theory|complexity classes]] contain the decision version of the integer factorization problem. It is known to be in both [[NP (complexity)|NP]] and [[co-NP]]. This is because both YES and NO answers can be trivially verified given the prime factors (we can verify their primality using the [[AKS primality test]], and that their product is N by multiplication). 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 (complexity)|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.
In contrast, 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 [[randomized algorithm|probabilistic algorithm]]s that can test primality very quickly if one is willing to accept the small possibility of error. The ease of [[primality test]]ing is a crucial part of the [[RSA]] algorithm, as it is necessary to find large prime numbers to start with.
==Factoring algorithms==<!-- This section is linked from [[Factorization]] -->
===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. For example, trial division is considered special purpose because the running time is roughly proportional to the size of the smallest factor.
* [[Trial division]]
* [[Pollard's rho algorithm]]
* [[Algebraic-group factorisation algorithms]] amongst which are [[Pollard's p - 1 algorithm|Pollard's ''p'' − 1 algorithm]], [[Williams' p plus 1 algorithm|Williams' p+1 algorithm]] and [[Lenstra elliptic curve factorization]]
* [[Fermat's factorization method]]
* [[Euler's factorization method]]
* [[Special number field sieve]]
===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 number]]s. 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)
===Other notable algorithms===
* [[Shor's algorithm]], for [[quantum computer]]s
==External links==
*Richard P. Brent, "Recent Progress and Prospects for Integer Factorisation Algorithms", ''Computing and Combinatorics"'', 2000, pp.3-22. [http://citeseer.ist.psu.edu/327036.html download]
* [[Manindra Agrawal]], Neeraj Kayal, Nitin Saxena, "PRIMES is in P." Annals of Mathematics 160(2): 781-793 (2004). [http://www.cse.iitk.ac.in/users/manindra/algebra/primality_v6.pdf August 2005 version PDF]
* [ftp://ftp.computing.dcu.ie/pub/crypto/factor.exe] is a public-domain integer factorization program for Windows. It claims to handle 80-digit numbers. See also the web site for this program [http://www.shamus.ie/ MIRACL]
* [http://www.alpertron.com.ar/ECM.HTM 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.
* [http://www.rsasecurity.com/rsalabs/node.asp?id=2093 The RSA Challenge Numbers] - a factoring challenge.
* Eric W. Weisstein, [http://mathworld.wolfram.com/news/2005-11-08/rsa-640/ “RSA-640 Factored,”] ''MathWorld Headline News'', November 8, 2005, http://mathworld.wolfram.com/news/2005-11-08/rsa-640/
* [http://www.thorstenreinecke.de/qsieve/ Qsieve], a suite of programs for integer factorization. It contains several factorization methods like Elliptic Curve Method and MPQS.
* [http://ardoino.com/maths-factoring-pollard/ Pollard p-1 method], summary of the algorithms and C source code
==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.
* {{cite book|author = Richard Crandall and [[Carl Pomerance]] | year = 2001 | title = Prime Numbers: A Computational Perspective | publisher = Springer | edition = 1st edition | id = 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.
{{Number theoretic algorithms}}
[[Category:Integer factorization algorithms|*]]
[[Category:Computational hardness assumptions]]
[[ar:مشكلة التفكيك إلى جداء عوامل أولية]]
[[de:Faktorisierungsverfahren]]
[[es:Factorización de enteros]]
[[eo:Entjera faktorigo]]
[[fr:Décomposition en produit de facteurs premiers]]
[[ko:소인수분해]]
[[is:Þáttun]]
[[nl:Priemfactor]]
[[ja:素因数分解]]
[[pl:Faktoryzacja]]
[[ro:Factorizarea întregilor]]
[[ru:Факторизация]]
[[sl:Praštevilski razcep]]
[[sv:Primtalsfaktorisering]]
[[tr:Çarpanlara ayırma]]
[[uk:Факторизація]]
[[zh:整数分解]]