← LibraryNumber Field Sieve: Polynomial Selection and StructureEngineering · MathematicsLesson 379/385← PrevNext →
ArticlePublished 7 Aug 20263 min readBy Kevin Joginnumber field sievepolynomial selectionNFSalgebraic side

Modern Factoring Methods

Number Field Sieve: Polynomial Selection and Structure

How the number field sieve achieves its complexity, why polynomial selection matters so much, and the role of number field arithmetic.

Engineering / MathematicsModern Factoring Methods2 min readKV-MATH-0676

The number field sieve is the fastest known general factoring algorithm. Its advantage comes from examining much smaller numbers for smoothness, and how small those numbers are is determined entirely by the polynomial chosen.

The idea

Work simultaneously in the integers and in a number field, seeking pairs that are smooth on both sides. Combining such relations produces a congruence of squares as before.

Select polynomialsSieve both sidesLinear algebraSquare rootFactor

Why the values are smaller

The source of the improvement
MethodSize of values tested
Quadratic sieveAround the square root of the target
Number field sieveAround a sub-exponential function far below that
Complexity ~ L_n(1/3, c)Against L(1/2) for the quadratic sieve.

Polynomial selection

Two polynomials with a common root modulo the target are chosen. One defines the number field; the other is typically linear. The quality of the choice dominates the total running time.

Polynomial selection

  1. Search a large spaceMany candidate polynomial pairs are generated.
  2. Score by sizeHow small the values will be over the sieving region.
  3. Score by root propertiesWhether many small primes divide values often — this substantially raises smoothness.
  4. Optimise locallyRefine the best candidates by small adjustments.
  5. SelectThe best-scoring pair.

The algebraic side

Smoothness on the number field side means the corresponding ideal factors over a base of prime ideals. This is where the machinery of this collection enters directly.

Where it wins

The special variant

For targets of special algebraic form, a polynomial with very small coefficients is available immediately, and the method runs considerably faster. This is why numbers of special form are factored well beyond the general record size.

Source. Henri Cohen, A Course in Computational Algebraic Number Theory, Springer GTM 138 — 10.5. Structural reference unverified: the source file was not available during authoring; chapter and section numbers are taken from the published edition and have not been checked against a physical copy.

Continue learning

The Quadratic Sieve: Linear Algebra StageArticle · MathematicsNEXT LESSON →Number Theory Software PackagesArticle · MathematicsThe Multiple Polynomial Quadratic SieveArticle · MathematicsPublished Tables of Fields and CurvesArticle · Mathematics