Currently there may be errors shown on top of a page, because of a missing Wiki update (PHP version and extension DPL3). |
Topics | Help • Register • News • History • How to • Sequences statistics • Template prototypes |
SNFS polynomial selection
For the SNFS factorization you need two polynomials with small coefficients and a common root modulo N, the number to be factored. Typically one polynomial is of degree 4, 5 or 6 (the algebraic side) and the other one is linear (the rational side).
Cyclotomic numbers
For cyclotomic numbers, there are four standard operations you can perform on the number to derive suitable polynomials:
- Multiplying by a constant
- Increasing or decreasing a power
- Dividing out algebraic factors
- halving the degree of a symmetric polynomial
1. Suppose you want to factor a number of the form
2. If you want to factor
You can use both methods to get the exponent a multiple of the degree you want to use, choose the one that minimises the largest coefficient of the algebraic polynomial.
You can also combine both methods if the base is composite. If you want to factor, say,
But you can also first multiply N by
3. If your exponent is divisible by 3, 5 or 7, you can divide out an algebraic factor and immediately get a polynomial of suitable degree and small coefficients.
which can be converted to a quadratic with root . However, a quadratic has too small degree, the coefficients on the rational side would become huge. Instead, if k is odd, we write and can convert to a quartic in . If you want a sextic, tweak the exponents accordingly by 2., perhaps multiplying by a power of a (as in 1.) to get small coefficients. , which is a useable quartic in . , which is a useable sextic in .
4. For
We can multiply this by
and regroup
(1)
Now we'd like to replace
Fortunately, those extra terms are again of the form
Handle the term
In the end, you'll have a polynomial
.
Thus, you can use the quintic
The siever input file wants the root as an integer, so you have to do a modular inversion: in Pari/GP, use Mod(b+1/b,N)
where you assigned N=(cofactor of
- Mod(M,N)
where the value in place of M is the desired root.
The linear poly will be
Now the coefficients b and
The method for getting the coefficients of the algebraic polynomial above shows why we should do a change of variable to
,
and writing the difference
- f(b+1/b)*b^5 - (b^11-1)/(b-1)
in Pari/GP (with b as a variable, not the value of
and we want the difference to be zero, so we can immediately set
Evaluating the difference again yields
so we set
Now the difference is
so we set
This produces the polynomials
with common root
Similarly for numbers of the form