Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Things are not so simple.

First of all, the y inside GF(16, modulus=y^2 + x * y + 1) is not defined. If the R.H.S. is not defined, the code will crash for the one or the other reason. For my taste, the simplest mode to construct the field $K$ with $16$ elements and in it two elements $x,y$ that satisfy $x^2+x+1=0$ and $y^2+xy+1=0$ is as follows:

sage: K = GF(2^4)
sage: x_list = [ x for x in K if x^2 + x + 1 == 0 ] 
sage: x = x_list[0]    # we pick one element in the above list...
sage: x.multiplicative_order()
3
sage: y_list = [ y for y in K if y^2 + x*y + 1 == 0 ] 
sage: y = y_list[0]    # we pick one element in the above list...
sage: y.multiplicative_order()
5
sage: set( yy.minpoly() for yy in y_list )
{x^4 + x^3 + x^2 + x + 1}