I am trying to implement Elliptic Curve Cryptography on software in GF(2^m). To do this, I need to be able to solve a quadratic equation, namely $x^2 + x = c$.
After a lot of research, I know the following:
- To solve this equation, I need the Trace of c to be 0. Tr(c) = $\sum_{i=0}^{m-1}$ $c^{2^{i}}$
- After ensuring that Tr(c) = 0, and if m is odd, then the solution to the quadratic equation is given by the half trace, H(c) = $\sum_{i=0}^{\frac{m-1}{2}}$ $c^{2^{2i}}$
- The above representation of the half trace and trace are in normal basis (and not polynomial basis)
I am used to working with polynomial representation, i.e: a polynomial in GF(2^5) is represented as a string of 1's and 0's. e.g: 10101 = $x^4 + x^2 + 1$
I searched around a lot to try and find a definition of the trace and the half trace in polynomial representation, but with no luck. So my only solution was to transform my element from polynomial to normal representation, compute the trace and the half trace, and then transform back my element to polynomial representation.
After doing some research, I found algorithms that would do this transformation; however, they require having the generator of the GF in both representations. I understand that the generator in a polynomial representation is such that it satisfies the condition given by the irreducible polynomial. e.g: GF(2^3) with irreducible polynomial $x^3 + x + 1 = 0$, then the generator must satisfy $g^3 = g + 1$.
This is what I have so far. The bottom line is, if anyone can answer one of the two questions below, then my problem would be one step closer to being solved and I would really, really appreciate it:
- What is the definition of a generator in normal basis?
- Is there any other (easier) way to solve a quadratic equation in GF(2^m)?
Thank you.