The Cantor-Zassenhaus algorithm takes as input a squarfreesquarefree polynomial <math>f(x)</math> (i.e. one with no repeated factors) of degree <math>n</math> with coefficients in a finite field <math>\mathbb{F}_q</math> whose [[irreducible polynomial]] factors are all of equal degree (algorithms exist for efficiently factorising arbitrary polynomials into a product of polynomials satisfying these conditions, so that the Cantor-Zassenhaus algorithm can be used to factorise arbitrary polynomials). It gives as output a polynomial <math>g(x)</math> with coefficients in the same field such that <math>g(x)</math> divides <math>f(x)</math>. The algorithm may then be applied recursively to these and subsequent divisors, until we find the decomposition of <math>f(x)</math> into powers of [[irreducible polynomial|irreducible polynomials]] (recalling that the [[ring_(mathematics)|ring]] of polynomials over a finite field is a [[unique factorisation ___domain]].
All possible factors of <math>f(x)</math> are contained within the [[factor ring]]