Integer factorization: Difference between revisions

Content deleted Content added
WikiCleanerBot (talk | contribs)
m v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation)
Bender the Bot (talk | contribs)
m External links: HTTP to HTTPS for SourceForge
 
(23 intermediate revisions by 17 users not shown)
Line 3:
{{unsolved|computer science|Can integer factorization be solved in polynomial time on a classical computer?}}
 
In [[number theorymathematics]], '''integer factorization''' is the decomposition of a [[positive integer]] into a [[Product (mathematics)|product]] of integers. Every positive integer greater than 1 is either the product of two or more integer [[divisor|factors]] greater than 1, in which case it is called a [[composite number]], or it is not, in which case it is called a [[prime number]]. For example, {{math|15}} is a composite number because {{math|1=15 = 3 · 5}}, but {{math|7}} is a prime number because it cannot be decomposed in this way. If one of the factors is composite, it can in turn be written as a product of smaller factors, for example {{math|1=60 = 3 · 20 = 3 · (5 · 4)}}. Continuing this process until every factor is prime is called '''prime factorization'''; the result is always unique up to the order of the factors by the [[prime factorization theorem]].
 
To factorize a small integer {{mvar|n}} using mental or pen-and-paper arithmetic, the simplest method is [[trial division]]: checking if the number is divisible by prime numbers {{math|2}}, {{math|3}}, {{math|5}}, and so on, up to the [[square root]] of {{mvar|n}}. For larger numbers, especially when using a computer, various more sophisticated factorization algorithms are more efficient. A prime factorization algorithm typically involves [[primality test|testing whether each factor is prime]] each time a factor is found.
 
When the numbers are sufficiently large, no efficient non-[[quantum computer|non-quantum]] integer factorization [[algorithm]] is known. However, it has not been proven that such an algorithm does not exist. The presumed [[Computational hardness assumption|difficulty]] of this problem is important for the algorithms used in [[cryptography]] such as [[RSA (cryptosystem)|RSA public-key encryption]] and the [[Digital Signature Algorithm|RSA digital signature]].<ref>{{Citation |last=Lenstra |first=Arjen K. |title=Integer Factoring |date=2011 |url=http://link.springer.com/10.1007/978-1-4419-5906-5_455 |encyclopedia=Encyclopedia of Cryptography and Security |pages=611–618 |editor-last=van Tilborg |editor-first=Henk C. A. |place=Boston, MA |publisher=Springer US |language=en |doi=10.1007/978-1-4419-5906-5_455 |isbn=978-1-4419-5905-8 |access-date=2022-06-22 |editor2-last=Jajodia |editor2-first=Sushil }}</ref> Many areas of [[mathematics]] and [[computer science]] have been brought to bear on thethis problem, including [[elliptic curve]]s, [[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, the product of two prime numbers. When they are both large, for instance more than two thousand [[bit]]s long, randomly chosen, and about the same size (but not too close, for example, to avoid efficient factorization by [[Fermat's factorization method]]), even the fastest prime factorization algorithms on the fastest classical computers can take enough time to make the search impractical; that is, as the number of digits of the integer being factored increases, the number of operations required to perform the factorization on any classical computer increases drastically.
 
Many cryptographic protocols are based on the presumed difficulty of factoring large composite integers or a related problem—forproblem {{Ndash}}for example, the [[RSA problem]]. An algorithm that efficiently factors an arbitrary integer would render [[RSA (algorithm)|RSA]]-based [[public-key]] cryptography insecure.
 
== Prime decomposition ==
Line 24:
Among the {{math|''b''}}-bit numbers, the most difficult to factor in practice using existing algorithms are those [[semiprimes]] whose factors are of similar size. For this reason, these are the integers used in cryptographic applications.
 
In 2019, Fabrice Boudot, Pierrick Gaudry, Aurore Guillevic, Nadia Heninger, Emmanuel Thomé and Paul Zimmermann factored a 240-digit (795-bit) number ([[RSA-240]]) was factored by a team of researchers including [[Paul Zimmermann (mathematician)|Paul Zimmermann]], utilizing approximately 900 core-years of computing power.<ref>{{cite web| url = https://lists.gforge.inria.fr/pipermail/cado-nfs-discuss/2019-December/001139.html| url-status = dead| archive-url = https://web.archive.org/web/20191202190004/https://lists.gforge.inria.fr/pipermail/cado-nfs-discuss/2019-December/001139.html| archive-date = 2019-12-02| title = [Cado-nfs-discuss] 795-bit factoring and discrete logarithms}}</ref> TheThese researchers estimated that a 1024-bit RSA modulus would take about 500 times as long.<ref name=rsa768>{{cite journalconference
| last1 = Kleinjung | first1 = Thorsten
| url = http://eprint.iacr.org/2010/006.pdf
| last2 = Aoki | first2 = Kazumaro
| title = Factorization of a 768-bit RSA modulus
| last3 = Franke | first3 = Jens
| author = Kleinjung| publisher = [[International Association for Cryptologic Research]]
| last4 = Lenstra | first4 = Arjen K.
| date = 2010-02-18
| last5 = Thomé | first5 = Emmanuel
| access-date = 2010-08-09
| last6 = Bos | first6 = Joppe W.
|display-authors=etal}}</ref>
| last7 = Gaudry | first7 = Pierrick
| last8 = Kruppa | first8 = Alexander
| last9 = Montgomery | first9 = Peter L.
| last10 = Osvik | first10 = Dag Arne
| last11 = te Riele | first11 = Herman J. J.
| last12 = Timofeev | first12 = Andrey
| last13 = Zimmermann | first13 = Paul
| editor-last = Rabin | editor-first = Tal
| titlecontribution = Factorization of a 768-bitBit RSA modulusModulus
| contribution-url = httphttps://eprint.iacr.org/2010/006.pdf
| doi = 10.1007/978-3-642-14623-7_18
| pages = 333–350
| publisher = Springer
| series = Lecture Notes in Computer Science
| title = Advances in Cryptology - CRYPTO 2010, 30th Annual Cryptology Conference, Santa Barbara, CA, USA, August 15-19, 2010. Proceedings
| volume = 6223
| year = 2010| isbn = 978-3-642-14622-0
}}</ref>
 
The largest such semiprime yet factored was [[RSA numbers#RSA-250|RSA-250]], an 829-bit number with 250 decimal digits, in February 2020. The total computation time was roughly 2700 core-years of computing using Intel [[Skylake (microarchitecture)#Xeon Gold (quad processor)|Xeon Gold]] 6130 at 2.1&nbsp;GHz. Like all recent factorization records, this factorization was completed with a highly optimized implementation of the [[general number field sieve]] run on hundreds of machines.
Line 125 ⟶ 143:
 
=== Schnorr–Seysen–Lenstra algorithm ===
Given an integer {{mathmvar|''n''}} that will be factored, where {{mathmvar|''n''}} is an odd positive integer greater than a certain constant. In this factoring algorithm the discriminant {{math|Δ}} is chosen as a multiple of {{mathmvar|''n''}}, {{math|1=Δ = −''dn''}}, where {{mathmvar|''d''}} is some positive multiplier. The algorithm expects that for one {{mathmvar|''d''}} there exist enough [[smooth number|smooth]] forms in {{math|''G''<sub>Δ</sub>}}. Lenstra and Pomerance show that the choice of {{mathmvar|''d''}} can be restricted to a small set to guarantee the smoothness result.
 
Denote by {{math|''P''<sub>Δ</sub>}} the set of all primes {{mathmvar|''q''}} with [[Kronecker symbol]] {{math|({{pars|s=150%|{{sfrac|Δ|''q''}})}} {{=}} 1}}. By constructing a set of [[Generating set of a group|generators]] of {{math|''G''<sub>Δ</sub>}} and prime forms {{math|''f''<sub>''q''</sub>}} of {{math|''G''<sub>Δ</sub>}} with {{mathmvar|''q''}} in {{math|''P''<sub>Δ</sub>}} a sequence of relations between the set of generators and {{math|''f''<sub>''q''</sub>}} are produced.
The size of {{mathmvar|''q''}} can be bounded by {{math|''c''<sub>0</sub>(log{{abs|Δ}})<sup>2</sup>}} for some constant {{math|''c''<sub>0</sub>}}.
 
The relation that will be used is a relation between the product of powers that is equal to the [[group (mathematics)|neutral element]] of {{math|''G''<sub>Δ</sub>}}. These relations will be used to construct a so-called ambiguous form of {{math|''G''<sub>Δ</sub>}}, which is an element of {{math|''G''<sub>Δ</sub>}} of order dividing 2. By calculating the corresponding factorization of {{math|Δ}} and by taking a [[Greatest common divisor|gcd]], this ambiguous form provides the complete prime factorization of {{mathmvar|''n''}}. This algorithm has these main steps:
 
Let {{mathmvar|''n''}} be the number to be factored.
{{ordered list
| Let {{math|Δ}} be a negative integer with {{math|1=Δ = −''dn''}}, where {{mathmvar|''d''}} is a multiplier and {{math|Δ}} is the negative discriminant of some quadratic form.
| Take the {{mathmvar|''t''}} first primes {{math|''p''<sub>1</sub> {{=}} 2, ''p''<sub>2</sub> {{=}} 3, ''p''<sub>3</sub> {{=}} 5, ..., ''p''<sub>''t''</sub>}}, for some {{math|''t'' ∈ '''N'''}}.
| Let {{math|''f''<sub>''q''</sub>}} be a random prime form of {{math|''G''<sub>Δ</sub>}} with {{math|({{pars|s=150%|{{sfrac|Δ|''q''}})}} {{=}} 1}}.
| Find a generating set {{mathmvar|''X''}} of {{math|''G''<sub>Δ</sub>}}.
| Collect a sequence of relations between set {{mathmvar|''X''}} and {{math|{{mset|''f''<sub>''q''</sub> : ''q'' ∈ ''P''<sub>Δ</sub>}}}} satisfying:
: <math>\left(\prod_{x \in X_{}} x^{r(x)}\right).\left(\prod_{q \in P_\Delta} f^{t(q)}_{q}\right) = 1.</math>
| Construct an ambiguous form {{math|(''a'', ''b'', ''c'')}} that is an element {{math|''f'' ∈ ''G''<sub>Δ</sub>}} of order dividing 2 to obtain a coprime factorization of the largest odd divisor of {{math|Δ}} in which {{math|1=Δ = −4''ac''}} or {{math|1=Δ = ''a''(''a'' − 4''c'')}} or {{math|1=Δ = (''b'' − 2''a'')(''b'' + 2''a'')}}.
| If the ambiguous form provides a factorization of {{mathmvar|''n''}} then stop, otherwise find another ambiguous form until the factorization of {{mathmvar|''n''}} is found. In order to prevent useless ambiguous forms from generating, build up the [[Sylow theorems|2-Sylow]] group {{math|Sll<sub>2</sub>(Δ)}} of {{math|''G''(Δ)}}.
}}
To obtain an algorithm for factoring any positive integer, it is necessary to add a few steps to this algorithm such as trial division, and the [[Adleman–Pomerance–Rumely primality test|Jacobi sum test]].
Line 172 ⟶ 190:
 
== External links ==
* [httphttps://sourceforge.net/projects/msieve/ msieve] – SIQS and NFS – has helped complete some of the largest public factorizations known
* Richard P. Brent, "Recent Progress and Prospects for Integer Factorisation Algorithms", ''Computing and Combinatorics"'', 2000, pp.&nbsp;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]