Ask Your Question
1

Multiplicative order of elements in a finite field defined by QuotientRing

asked 4 years ago

klx gravatar image

updated 2 years ago

FrédéricC gravatar image

I've defined the AES's GF(28) field as follows;

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

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 4 years ago

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()
255
Preview: (hide)
link

Comments

Oh, great, thanks.

klx gravatar imageklx ( 4 years ago )

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

Stats

Asked: 4 years ago

Seen: 2,294 times

Last updated: Oct 20 '20