# Modular reduction in Galois fields

I want to compute x^6 mod x^5+x^2+1 in the Galois Field GF(2^5). Does anyone know how to do this in SAGE?

Modular reduction in Galois fields

add a comment

3

First, define `k`

to be the field GF(2^5), whose generator is named `a`

:

```
sage: k.<a> = FiniteField(2^5); k
Finite Field in a of size 2^5
```

Alternatively :

```
sage: k = GF(2^5, 'a'); k
Finite Field in a of size 2^5
```

Then, define the polynomial ring `k[x]`

:

```
sage: R.<x> = PolynomialRing(k); R
Univariate Polynomial Ring in x over Finite Field in a of size 2^5
```

Alternatively:

```
sage: R = k['x']; R
Univariate Polynomial Ring in x over Finite Field in a of size 2^5
```

Then, do your computation in R:

```
sage: P = R(x^6)
sage: P.mod(x^5+x^2+1)
x^3 + x
```

Asked: **
2013-04-28 00:04:04 -0600
**

Seen: **597 times**

Last updated: **Apr 28 '13**

pre-reduction multiplication result in binary field

calculating the modulo of a "number" in a binary finite field

Solving modular systems of equation

residocity of elements in an extension of $\mathbb{F}_p$

Can't multiply two variables together due to type (I think)

Finding order of a polynomial over finite field

Defining Polynomial Basis and Generic Polynomials

Extension/coercion of finite rings & fields

Elliptic Curve on FF points are expressed as 3 numbers?

Transform a list of coefficients to polynomial (in GF(2^8)) [closed]

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.