Binary fields
Hello, I would like to perform the following on a binary field, i.e. GF(2^m)
.
- Define a polynomial and solve the polynomial over a binary field.
- Convert an element of the binary field into a bit string.
For the first, I've tried the following:
K = GF(2^7,'a');
PK.<x>=K[]; #I've also tried "x = PolynomialRing(GF(2^7,'a'),'x').gen"
f = (a^6 + a^3 + a)*x^2 + (a^6 + a^4 + a^3)*x + (a^5 + a^4 + a^3 + a^2 + 1);
print f.roots();
But the error is TypeError: unable to coerce from a finite field other than the prime subfield
.
For the second, I would like to know how finite field elements are stored in SAGE, are they stored as vectors?
If you have any resources that could point me in the right direction, I'll be very thankful for your help!
What version of Sage are you using exactly, and were there any other commands before this? The `a` seems to be missing.
@kcrisman The version that I'm using is 5.11. The `a` comes from the first line; it is used to generate the finite field of prime power. See http://www.math.ucla.edu/~jimc/mathnet_d/sage/reference/sage/rings/finite_rings/constructor.html