  We present a novel randomized algorithm to factor polynomials over a finite
field $\F_q$ of odd characteristic using rank $2$ Drinfeld modules with complex
multiplication. The main idea is to compute a lift of the Hasse invariant
(modulo the polynomial $f \in \F_q[x]$ to be factored) with respect to a random
Drinfeld module $\phi$ with complex multiplication. Factors of $f$ supported on
prime ideals with supersingular reduction at $\phi$ have vanishing Hasse
invariant and can be separated from the rest. Incorporating a Drinfeld module
analogue of Deligne's congruence, we devise an algorithm to compute the Hasse
invariant lift, which turns out to be the crux of our algorithm. The resulting
expected runtime of $n^{3/2+\varepsilon} (\log q)^{1+o(1)}+n^{1+\varepsilon}
(\log q)^{2+o(1)}$ to factor polynomials of degree $n$ over $\F_q$ matches the
fastest previously known algorithm, the Kedlaya-Umans implementation of the
Kaltofen-Shoup algorithm.

Computational Geometry;Symbolic Computation;Number Theory