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
.
I have no clue to the second. I have tried in vain to find some help online but was unable to, so if you have any resources that could point me in the right direction, I'll be very thankful for your help!