Ask Your Question
1

How to create GF(2^8) and multiply by 8 by 8 matrix?

asked 2020-12-20 16:50:58 +0100

koroz91 gravatar image

updated 2020-12-20 18:50:53 +0100

slelievre gravatar image

How i can create GF(2^8) and Multiplication with matrix 8 by 8 and Multiplication with matrix 1 by 8?

edit retag flag offensive close merge delete

Comments

Was the answer helpful? Did it answer the question you had in mind?

slelievre gravatar imageslelievre ( 2020-12-22 10:00:30 +0100 )edit

Follow-up question at

slelievre gravatar imageslelievre ( 2020-12-22 10:04:28 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-12-20 18:48:42 +0100

slelievre gravatar image

updated 2020-12-20 18:50:05 +0100

The question seems to be asking

  • 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$

Sage allows to compute with elements in $F$ either via field algebra or via linear algebra.

Examples of 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
edit flag offensive delete link more

Comments

i can't computing inverse GF(2^8) and Multiplication whith matrix 8 by 8

koroz91 gravatar imagekoroz91 ( 2020-12-22 10:24:27 +0100 )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

Stats

Asked: 2020-12-20 16:50:58 +0100

Seen: 681 times

Last updated: Dec 20 '20