Sage Code - Primitive Elements
sage: F.<u> = GF(2^8)
sage: F.multiplicative_generator ()
u
sage: u.multiplicative_order ()
255
sage: u.minimal_polynomial ()
x^8 + x^4 + x^3 + x^2 + 1
sage: F.modulus ()
x^8 + x^4 + x^3 + x^2 + 1
sage: x = polygen(2)
sage: f = x^4+x^3+x^2+x+1
sage: F.<u> = GF(16, modulus=f)
sage: u.multiplicative_order ()
5
sage: F.multiplicative_generator ()
u + 1
sage: x = polygen(3)
sage: f = x^3 + 2*x+2
sage: F.<u> = GF(3^3, modulus=f)
sage: u.multiplicative_order ()
13
sage: F.multiplicative_generator ()
2*u
sage:
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License