TITLE: How can I solve a cubic equation in a finite field with characteristic 2?
QUESTION [6 upvotes]: I need to solve the usual cubic equation $x^3 + ax^2 + bx + c = 0$ over a finite field $GF(2^n)$. This is to avoid doing a brute-force Chien search in a BCH decoder.
I read in a paper about an easy way to reduce the equation to $z^3 + z + k = 0$ where $k = (a b + c) / (a^2 + b)^{3/2}.$ Then a lookup table can be used for all the values of $k$. However as far as I can tell this approach will not work when $(a^2 + b)$ happens to not have a square root in the field. An example for $GF(2^5)$ would be $x^3 + 08*x + 1a = 0.$
Can someone help?
Regards,
-Dimitri

REPLY [28 votes]: An alternative approach that works even when $n$ is too large to
store a table of size $2^n$: translate $x$ by $a$ to get $z^3+pz+q = 0$
where $z=x+a$; then multiply by $z$ to get $z^4 + pz^2 + qz = 0$.
The point of this last step is that the map $z \mapsto z^4 + pz^2 + qz$ is
$({\bf Z} / 2{\bf Z})$-linear because the exponents $1,2,4$
are all powers of $2$.  Therefore the problem is reduced to
finding the kernel of an $n \times n$ matrix over $({\bf Z} / 2{\bf Z})$.
The equation $z^3+pz+q=0$ (without the factor of $z$) 
then has $2^d - 1$ solutions where $d \in \{0,1,2\}$
is the dimension of the kernel.