Ask Your Question

Multiplicative order of elements in a finite field defined by QuotientRing

asked 2020-10-20 20:05:43 +0200

klx gravatar image

updated 2022-10-06 16:15:53 +0200

FrédéricC gravatar image

I've defined the AES's $\operatorname{GF}(2^8)$ field as follows;

R.<x> = PolynomialRing(GF(2), 'x')
S.<y> = QuotientRing(R, R.ideal(x^8+x^4+x^3+x+1))

When I added the below and run it

print("y+1 = ",(y+1).multiplicative_order())

I've got this error;

   2671         if not self.is_unit():
-> 2672             raise ArithmeticError("self (=%s) must be a unit to have a multiplicative order.")
  • How one can easily find the multiplicative order?

I've seen this question How to find the multiplicative order of an element in a quotient ring over finite field ? but that is too complex to build. Is there an easy method?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2020-10-20 20:35:07 +0200

tmonteil gravatar image

You can define S directly as a field, by defining its modulus by hand (in case the point is to define it explicitely):

sage: R.<x> = PolynomialRing(GF(2), 'x')
sage: S.<y> = GF(2^8, modulus=x^8+x^4+x^3+x+1)                                                                                                                                                     
sage: S                                                                                                                                                                                                      
Finite Field in y of size 2^8
sage: (y+1).multiplicative_order()
edit flag offensive delete link more


Oh, great, thanks.

klx gravatar imageklx ( 2020-10-20 21:31:55 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-10-20 20:05:43 +0200

Seen: 1,650 times

Last updated: Oct 20 '20