Main Page | See live article | Alphabetical index

General number field sieve

In mathematics, the general number field sieve is the most efficient algorithm known for factoring integers. It uses O(exp( ((64/9) n)1/3 (log n)2/3 )) steps to factor integer n.

It is an improvement of older sieving method which factors n by finding numbers ki such that ri=ki2-n factor completely over a fixed set (called basis) of small primes. Then, having enough such ri - which are called smooth relative to the chosen basis of primes, using Gauss elimination method of linear algebra we can choose exponents ci equal to 0 or 1 such that product of rici is a square, say x2. On the other hand, if the product of kici is y, then x2-y2 is divisible by n and with probability at least one half we get a factor of n by finding greatest common divisor of n and x-y. In this method, the idea was to choose ki close to the square root of n - then ri is of the order of magnitude of square root of n too and there are enough smooth values there.

The general number field sieve''' works as follows:

The second-best-known algorithm for integer factorization is the Lenstra elliptic curve factorization method. It is better than the general number field sieve' when factors are of small size, as it works by finding smooth values of order of the smallest prime divisor of n'', and its running time depends on the size of this divisor.