Integer Factoring: Difference between revisions

From Algorithm Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
== Parameters ==  
== Parameters ==  


n: number of bits in the integer
$n$: number of bits in the integer


B: bound parameter (if needed)
$B$: bound parameter (if needed)


== Table of Algorithms ==  
== Table of Algorithms ==  
Line 22: Line 22:
|-
|-


| [[Trial division (First Category Integer Factoring Integer Factoring)|Trial division]] || 1202 || $O({2}^{n/2})$ || $O(n)$ auxiliary || Exact || Deterministic ||   
| [[Trial division (First Category Integer Factoring Integer Factoring)|Trial division]] || 1202 || $O({2}^{n/2})$ || $O(n)$ || Exact || Deterministic ||   
|-
|-
| [[Wheel factorization (First Category Integer Factoring Integer Factoring)|Wheel factorization]] || 1940 || $O({2}^{n/2})$ || $O(n)$ auxiliary || Exact || Deterministic ||   
| [[Wheel factorization (First Category Integer Factoring Integer Factoring)|Wheel factorization]] || 1940 || $O({2}^{n/2})$ || $O(n)$ || Exact || Deterministic ||   
|-
|-
| [[Pollard's rho algorithm (First Category Integer Factoring Integer Factoring)|Pollard's rho algorithm]] || 1975 || - || $O(n)$ auxiliary || Exact || Deterministic || [https://link.springer.com/article/10.1007%2FBF01933667 Time]
| [[Pollard's rho algorithm (First Category Integer Factoring Integer Factoring)|Pollard's rho algorithm]] || 1975 || - || $O(n)$ || Exact || Deterministic || [https://link.springer.com/article/10.1007%2FBF01933667 Time]
|-
|-
| [[Pollard's p − 1 algorithm (First Category Integer Factoring Integer Factoring)|Pollard's p − 1 algorithm]] || 1974 || $O(B*log B*log^{2}(n)$)? || $O(n+B)$ auxiliary || Exact || Deterministic || [https://www.cambridge.org/core/journals/mathematical-proceedings-of-the-cambridge-philosophical-society/article/theorems-on-factorization-and-primality-testing/6762E84DBD34AEF13E6B1D1A8334A989 Time]
| [[Pollard's p − 1 algorithm (First Category Integer Factoring Integer Factoring)|Pollard's p − 1 algorithm]] || 1974 || $O(B*log B*log^{2}(n)$)? || $O(n+B)$ || Exact || Deterministic || [https://www.cambridge.org/core/journals/mathematical-proceedings-of-the-cambridge-philosophical-society/article/theorems-on-factorization-and-primality-testing/6762E84DBD34AEF13E6B1D1A8334A989 Time]
|-
|-
| [[Williams' p + 1 algorithm (First Category Integer Factoring Integer Factoring)|Williams' p + 1 algorithm]] || 1982 || $O({2}^ (n))$ || $O(n)$ auxiliary? || Exact || Deterministic || [https://www.jstor.org/stable/2007633?origin=crossref Time]
| [[Williams' p + 1 algorithm (First Category Integer Factoring Integer Factoring)|Williams' p + 1 algorithm]] || 1982 || $O({2}^n)$ || $O(n)$? || Exact || Deterministic || [https://www.jstor.org/stable/2007633?origin=crossref Time]
|-
|-
| [[Lenstra elliptic curve factorization (First Category Integer Factoring Integer Factoring)|Lenstra elliptic curve factorization]] || 1987 || $O(e^{(\sqrt(({1}+o({1}))n*log n))})$ || $O(n)$ auxiliary? || Exact || Deterministic || [https://www.jstor.org/stable/1971363?origin=crossref&seq=1 Time]
| [[Lenstra elliptic curve factorization (First Category Integer Factoring Integer Factoring)|Lenstra elliptic curve factorization]] || 1987 || $O(e^{(\sqrt(({1}+o({1}))n*log n))})$ || $O(n)$? || Exact || Deterministic || [https://www.jstor.org/stable/1971363?origin=crossref&seq=1 Time]
|-
|-
| [[Fermat's factorization method (First Category Integer Factoring Integer Factoring)|Fermat's factorization method]] || 1894 || $O({2}^n)$ || $O(n)$ auxiliary || Exact || Deterministic || [https://archive.org/details/oeuvresdefermat02ferm Time]
| [[Fermat's factorization method (First Category Integer Factoring Integer Factoring)|Fermat's factorization method]] || 1894 || $O({2}^n)$ || $O(n)$? || Exact || Deterministic || [https://archive.org/details/oeuvresdefermat02ferm Time]
|-
|-
| [[Euler's factorization method (First Category Integer Factoring Integer Factoring)|Euler's factorization method]] || 1940 || $O({2}^{(n/{2})})$ || $O(n)$ auxiliary || Exact || Deterministic ||   
| [[Euler's factorization method (First Category Integer Factoring Integer Factoring)|Euler's factorization method]] || 1940 || $O({2}^{(n/{2})})$ || $O(n)$ || Exact || Deterministic ||   
|-
|-
| [[Dixon's algorithm (Second Category Integer Factoring Integer Factoring)|Dixon's algorithm]] || 1981 || $O(e^{({2} \sqrt({2}) \sqrt(n*logn))}){4} || $O(n+(B/logB)$^{2})? || Exact || Deterministic || [https://www.ams.org/journals/mcom/1981-36-153/S0025-5718-1981-0595059-1/home.html Time]
| [[Dixon's algorithm (Second Category Integer Factoring Integer Factoring)|Dixon's algorithm]] || 1981 || $O(e^{({2} \sqrt({2}) \sqrt(n*logn))}){4} || $O(n+(B/logB)$^{2})? || Exact || Deterministic || [https://www.ams.org/journals/mcom/1981-36-153/S0025-5718-1981-0595059-1/home.html Time]
Line 46: Line 46:
| [[Rational sieve (Second Category Integer Factoring Integer Factoring)|Rational sieve]] || 1993 || $O(e^{sqrt(({2}+o({1})$)n*logn)}) || $O(n+(B/logB)$^{2})? || Exact || Parallel || [https://www.ams.org/journals/mcom/1993-61-203/S0025-5718-1993-1182953-4/S0025-5718-1993-1182953-4.pdf Time]
| [[Rational sieve (Second Category Integer Factoring Integer Factoring)|Rational sieve]] || 1993 || $O(e^{sqrt(({2}+o({1})$)n*logn)}) || $O(n+(B/logB)$^{2})? || Exact || Parallel || [https://www.ams.org/journals/mcom/1993-61-203/S0025-5718-1993-1182953-4/S0025-5718-1993-1182953-4.pdf Time]
|-
|-
| [[Shanks's square forms factorization (SQUFOF) (Second Category Integer Factoring Integer Factoring)|Shanks's square forms factorization (SQUFOF)]] || 2007 || $O({2}^{(n/{4})$}) || $O(n)$? || Exact || Deterministic || [https://www.ams.org/journals/mcom/2008-77-261/S0025-5718-07-02010-8/S0025-5718-07-02010-8.pdf Time]
| [[Shanks's square forms factorization (SQUFOF) (Second Category Integer Factoring Integer Factoring)|Shanks's square forms factorization (SQUFOF)]] || 2007 || $O({2}^{n/4})$ || $O(n)$? || Exact || Deterministic || [https://www.ams.org/journals/mcom/2008-77-261/S0025-5718-07-02010-8/S0025-5718-07-02010-8.pdf Time]
|-
|-
| [[Special number field sieve (First Category Integer Factoring Integer Factoring)|Special number field sieve]] || 1940 || $O(exp(({1}+o({1})$)({32}n/{9})^{({1}/{3})}(log n)^{({2}/{3})}) heuristically? || $O(n^{2/3})$ || Exact || Deterministic || [http://www.ams.org/notices/199612/pomerance.pdf Space]
| [[Special number field sieve (First Category Integer Factoring Integer Factoring)|Special number field sieve]] || 1940 || $O(exp(({1}+o({1})$)({32}n/{9})^{({1}/{3})}(log n)^{({2}/{3})}) heuristically? || $O(n^{2/3})$ || Exact || Deterministic || [http://www.ams.org/notices/199612/pomerance.pdf Space]
Line 59: Line 59:


[[File:Integer Factoring - Time.png|1000px]]
[[File:Integer Factoring - Time.png|1000px]]
== Space Complexity Graph ==
[[File:Integer Factoring - Space.png|1000px]]
== Space-Time Tradeoff Improvements ==
[[File:Integer Factoring - Pareto Frontier.png|1000px]]

Latest revision as of 09:07, 28 April 2023

Description

Given an $n$-bit integer $N$, find a non-trivial factorization $N=pq$ (where $p, q>1$ are integers) or return that $N$ is prime. For "first category" algorithms, the running time depends on the size of smallest prime factor.

Related Problems

Related: Smallest Factor

Parameters

$n$: number of bits in the integer

$B$: bound parameter (if needed)

Table of Algorithms

Name Year Time Space Approximation Factor Model Reference
Trial division 1202 $O({2}^{n/2})$ $O(n)$ Exact Deterministic
Wheel factorization 1940 $O({2}^{n/2})$ $O(n)$ Exact Deterministic
Pollard's rho algorithm 1975 - $O(n)$ Exact Deterministic Time
Pollard's p − 1 algorithm 1974 $O(B*log B*log^{2}(n)$)? $O(n+B)$ Exact Deterministic Time
Williams' p + 1 algorithm 1982 $O({2}^n)$ $O(n)$? Exact Deterministic Time
Lenstra elliptic curve factorization 1987 $O(e^{(\sqrt(({1}+o({1}))n*log n))})$ $O(n)$? Exact Deterministic Time
Fermat's factorization method 1894 $O({2}^n)$ $O(n)$? Exact Deterministic Time
Euler's factorization method 1940 $O({2}^{(n/{2})})$ $O(n)$ Exact Deterministic
Dixon's algorithm 1981 $O(e^{({2} \sqrt({2}) \sqrt(n*logn))}){4} $O(n+(B/logB)$^{2})? Exact Deterministic Time
Continued fraction factorization (CFRAC) 1931 $O(e^{\sqrt({2}n*logn)})$ $O(n+(B/logB)$^{2})? Exact Deterministic Time
Quadratic sieve 1981 - $O(n+(B/logB)$^{2})? Exact Deterministic Time
Rational sieve 1993 $O(e^{sqrt(({2}+o({1})$)n*logn)}) $O(n+(B/logB)$^{2})? Exact Parallel Time
Shanks's square forms factorization (SQUFOF) 2007 $O({2}^{n/4})$ $O(n)$? Exact Deterministic Time
Special number field sieve 1940 $O(exp(({1}+o({1})$)({32}n/{9})^{({1}/{3})}(log n)^{({2}/{3})}) heuristically? $O(n^{2/3})$ Exact Deterministic Space
General number field sieve 1996 $O(exp(({1}+o({1})$)({64}n/{9})^{({1}/{3})}(log n)^{({2}/{3})}) heuristically? $O(n^{2/3})$ Exact Deterministic Time & Space
Shor's algorithm Quantum Implementation 1994 $O(n)$ $O(n)$ Exact Quantum Time & Space

Time Complexity Graph

Integer Factoring - Time.png