1 | initial version |

The question seems to be about - how to create the finite field (or "Galois field") $F$ with $2^8$ elements - how to view an element in $F$ as a vector with 8 coordinates describing it as a linear combination of the generator's first 8 powers - how to associate an 8 by 8 matrix to the operator of multiplication by an element in $F$

Here is some code to illustrate how Sage allows to compute with elements in $F$ either via field algebra or via linear algebra, how to go back and forth, and how the results match.

```
sage: F.<a> = GF(2^8)
sage: a
a
sage: va = vector(a)
sage: va
(0, 1, 0, 0, 0, 0, 0, 0)
sage: ma = a.matrix()
sage: ma
[0 0 0 0 0 0 0 1]
[1 0 0 0 0 0 0 0]
[0 1 0 0 0 0 0 1]
[0 0 1 0 0 0 0 1]
[0 0 0 1 0 0 0 1]
[0 0 0 0 1 0 0 0]
[0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 1 0]
sage: a_a = a * a
sage: a_a
a^2
sage: vaa = vector(a_a)
sage: vaa
(0, 0, 1, 0, 0, 0, 0, 0)
sage: ma_va = ma * va
sage: ma_va
(0, 0, 1, 0, 0, 0, 0, 0)
sage: F(ma_va)
a^2
```

2 | No.2 Revision |

The question seems to be ~~about
- ~~asking

- how to create the finite field (or "Galois field") $F$ with $2^8$
~~elements -~~elements - how to view an element in $F$ as a vector with 8 coordinates
~~powers -~~powers - how to associate an 8 by 8 matrix to the operator of multiplication by an element in $F$

~~Here is some code to illustrate how ~~Sage allows to ~~compute
~~compute with elements in $F$ either via field ~~algebra ~~algebra
or via linear ~~algebra,
~~algebra.

Examples of how to go back and forth, and how the results ~~match.~~match:

```
sage: F.<a> = GF(2^8)
sage: a
a
sage: va = vector(a)
sage: va
(0, 1, 0, 0, 0, 0, 0, 0)
sage: ma = a.matrix()
sage: ma
[0 0 0 0 0 0 0 1]
[1 0 0 0 0 0 0 0]
[0 1 0 0 0 0 0 1]
[0 0 1 0 0 0 0 1]
[0 0 0 1 0 0 0 1]
[0 0 0 0 1 0 0 0]
[0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 1 0]
sage: a_a = a * a
sage: a_a
a^2
sage: vaa = vector(a_a)
sage: vaa
(0, 0, 1, 0, 0, 0, 0, 0)
sage: ma_va = ma * va
sage: ma_va
(0, 0, 1, 0, 0, 0, 0, 0)
sage: F(ma_va)
a^2
```

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.