Selecting a finite field for polynomial factorization

54 Views Asked by At

This is a very specific question about factoring standard polynomials in the field of rationals. I have a module written which does the whole chain of square-free factoring to distinct-degree factoring in a finite field to Cantor–Zassenhaus factorization to Hensel lifting back to the field of rationals. It all works great but I don't have a good handle on how to select the prime field in which to do the finite factorization. Currently through empirical testing I use the next largest prime above the largest absolute value coefficient in the polynomial multiplied by $4$. My question is how to select the minimum prime finite field to maximize the chances of the CZ algorithm working while at the same keeping efficiency relatively high?