An efficient algorithm for factorising cyclotomic polynomial over a finite field

45 Views Asked by At

I need to factor a cyclotomic polynomial $\Phi_m(X)$ modulo $\mathbb{Z}_{p^e}$ where $p$ is a relatively small (at most 8 bits) prime number, and $e$ is a positive integer. As far as I know, the easiest way to achieve this is,

  1. Factor $\Phi_m(X)$ modulo $\mathbb{Z}_p$ using Berlekamp algorithm or Cantor-Zassenhaus algorithm.
  2. Use Hensel lifting to lift the factors to $\mathbb{Z}_p[X]$.

However, according to a research (https://dl.acm.org/doi/10.1145/800206.806394), the running time of Berlekemp algorithm for cyclotomic polynomials is super-polynomial. Indeed, my implementation using Hecke.jl library takes too much time to factor a high-degree cyclotomic polynomials. So, I was trying to devise an efficient method to factor a cyclotomic polynomial. Thankfully, we have a useful information that $\Phi_m(X) = (X-\zeta_{i_1})(X-\zeta_{i_2})\cdots(X-\zeta_{i_n})$ where $n = \phi(m)$ and $gcd(m, i_j) = 1~(1\le j \le n)$, and the Frobenius automorphism $X \mapsto X^p$ is the automorphism group for the finite fields $\mathbb{Z}_p[X]/F_i(X)\cong GF(p^d)~(1\le i \le \ell)$ where $\Phi_m(X) = \prod_{i=1}^\ell F_i(X)$ where $p^d = 1\pmod m$ and $d \cdot \ell = n$.

Therefore, we can set $F_i(X) = (X-\zeta_{\gamma_i \cdot 1})(X-\zeta_{\gamma_i \cdot p})\cdots (X-\zeta_{\gamma_i \cdot p^{d-1}})$ where $\gamma_i \in \mathbb{Z}_m^{\times}/(p)$. I am stuck here since these roots of unity does not exist in the finite field $\mathbb{Z}_{p}$, and therefore it is hard to compute the exact representation of this polynomial $F_i(X)$ modulo $p$. It would be really helpful if someone could help me out with this problem.

In addition, if I should use Berlekemp algorithm instead, how can you match the factors from the Berlekemp algorithm and $F_i(X)$'s above? (i.e. how would you know a polynomial factor obtained from the factoring algorithm is associated with certain roots of unity?)

To summarise,

  1. Is there a direct method to factor $\Phi_m(X)$ modulo $p^e$ instead of factoring it modulo $p$ and then lift it to $\mathbb{Z}_{p^e}$?
  2. How can one find the representation of the factors $F_i(X)$ of $\Phi_m(X)$ modulo $p$ using the roots of unity?
  3. (Additional) If you are given the factors of $\Phi_m$ modulo $p$, how can you associate them with the corresponding roots of unity?

Thanks in advance.