Lably
Skip to content

General number field sieve

  • 6 min read
  • 4 chapters

Related on Lably

Through Algorithm, Integer factorization and Googol

exp⁡(((64/9)1/3+o(1))(log⁡n)1/3(log⁡log⁡n)2/3)=Ln[1/3,(64/9)1/3]

in O and L-notations. It is a generalization of the special number field sieve: while the latter can only factor numbers of a certain special form, the general number field sieve can factor any number apart from prime powers (which are trivial to factor by taking roots).

The principle of the number field sieve (both special and general) can be understood as an improvement to the simpler rational sieve or quadratic sieve. When using such algorithms to factor a large number n, it is necessary to search for smooth numbers (i.e. numbers with small prime factors) of order n1/2. The size of these values is exponential in the size of n (see below). The general number field sieve, on the other hand, manages to search for smooth numbers that are subexponential in the size of n. Since these numbers are smaller, they are more likely to be smooth than the numbers inspected in previous algorithms. This is the key to the efficiency of the number field sieve. In order to achieve this speed-up, the number field sieve has to perform computations and factorizations in number fields. This results in many rather complicated aspects of the algorithm, as compared to the simpler rational sieve.

The size of the input to the algorithm is log2 n or the number of bits in the binary representation of n. Any element of the order nc for a constant c is exponential in log n. The running time of the number field sieve is super-polynomial but sub-exponential in the size of the input.

Number fields

Suppose f is a k-degree polynomial over Q (the rational numbers), and r is a complex root of f. Then, f(r) = 0, which can be rearranged to express rk as a linear combination of powers of r less than k. This equation can be used to reduce away any powers of r with exponent e ≥ k. For example, if f(x) = x2 + 1 and r is the imaginary unit i, then i2 + 1 = 0, or i2 = −1. This allows us to define the complex product:

(a+bi)(c+di)=ac+(ad+bc)i+(bd)i2=(ac−bd)+(ad+bc)i.

In general, this leads directly to the algebraic number field Q[r], which can be defined as the set of complex numbers given by:

ak−1rk−1+⋯+a1r1+a0r0, where a0,…,ak−1∈Q.

The product of any two such values can be computed by taking the product as polynomials, then reducing any powers of r with exponent e ≥ k as described above, yielding a value in the same form. To ensure that this field is actually k-dimensional and does not collapse to an even smaller field, it is sufficient that f is an irreducible polynomial over the rationals. Similarly, one may define the ring of integers OQ[r] as the subset of Q[r] which are roots of monic polynomials with integer coefficients. In some cases, this ring of integers is equivalent to the ring Z[r]. However, there are many exceptions.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication