# Prime factorization difficulty

From Wikipedia:

Not all numbers of a given length are equally hard to factor. The hardest instances of these problems (for currently known techniques) are semiprimes, the product of two prime numbers.

There are no references to this claim.

Why is a prime factorization harder than a not-prime factorization?

• What is a "not-prime-factorization" ? – Peter May 3 '16 at 8:57

## 1 Answer

When the best factoring algorithms are analyzed, their runtimes turn out to be a function of the size of the smallest prime factor of the number being factored. We define "harder to factor" as requiring longer runtimes for factorization algorithms. So to maximize the runtime of the algorithm, you need to maximize the size of the smallest prime factor. This hapopens when you have a semiprime with 2 factors, both of which are of similar magnitudes.

• For a complete factorisation, the important criterion is the size of the second-largest prime factor (which for a semiprime is just the smallest prime factor, as you say). – TonyK Nov 10 '14 at 17:31
• So, is it only a proof by example? – gliderkite Nov 11 '14 at 14:44
• We have upper bounds on factoring difficulty established by known algorithms. When you look at lower bounds you run into issues similar to those found in P=NP research. Most think it's likely that there is some superpolynomial lower bound (probably exponential) for factorization difficulty, and most people think there's an exponential lower bound for NP-complete problems. But no one has actually come out and proven it yet. – NovaDenizen Nov 11 '14 at 17:01