Find All Irreducible Polynomials in Z (X) of Degree 4. Justify Your Answer
Find All Irreducible Polynomials in Z (X) of Degree 4. Justify Your Answer
4. Compute 1100 0011 * 0011 0011 in GF(256) using the AES irreducible polynomial.
1100 0011 * 0011 0011 = (x7 + x6 + x + 1) * (x5 + x4 + x + 1) = x12 + x11 + x8 + x7 + x11 + x10 + x7
+ x6 + x6 + x5 + x2 + x + x5 + x4 + x + 1 = x12 + 2x11 + x8 + 2x7 + x10 + 2x6 + 2x5 + x2 + 2x + x4 + 1
= x12 + x10 + x8 + x4 + x2 + 1 mod 2 (use long division to mod by x8 + x4 + x3 + x + 1)
x4 + x2
x8 + x4 + x3 + x + 1 | x12 + x10 + x8 + x4 + x2 + 1
- x12 + x8 + x7 + x5 + x4
= 0 + x10 - x7 - x5 + x2 + 1
- 0 + x10 +x6 + x5 + x3 + x2
= 0 + 0 - x7 - x6 - x5 - x5 + x2 - x3 + 1 - x2 lower degree, done dividing
- x7 - x6 - x5 - x5 + x2 - x3 + 1 - x2 = x7 + x6 + x3 + 1 mod 2 = (1100 1001)2
5. Find the multiplicative inverse of (72)16 using the AES irreducible polynomial, EEA for
polynomials and long division.
(72)16 = (01110010)2 = x6 + x5 + x4 + x
step q r s t
3 x x3 + x2 + x + 1 1 - x (x) = x2 + 1 (x2 + x) - x (x3 + x2 + 1) = (x2) - (x4 + x3) =
x4 + x3 + x2
5 x2 + x + 1 1 x2 + 1 - (x2 + x + 1) * x3 x4 + x3 + x2 - (x2 + x + 1) * (x5 + x4 + x2 + 1)
= x2 + 1 - (x5 + x4 + x3) = = (x4 + x3 + x2) - (x7 + x3 + x + 1) =
x5 + x4 + x3 + x2 + 1 x7 + x4 + x2 + x + 1
6. Compute the S-Box (the ByteSub layer) value for the following input bytes:
Recall that in order to do this, you should first look up the inverses in table 4.2 to obtain
intermediary value B’ . Next, perform the affine mapping by computing the matrix-vector
multiplication and addition mod 2. (Verify results with table 4.3)
a. (29)16
The inverse of (29)16 is (0A)16 = (0000 1010)2. Perform affine mapping:
[affine matrix] [inverse vector] [constant vector] [result vector]
(1 0 0 0 1 1 1 1) (0) (1) (1)
(1 1 0 0 0 1 1 1) (1) (1) (0)
(1 1 1 0 0 0 1 1) (0) (0) (1)
(1 1 1 1 0 0 0 1) * (1) + (0) mod 2 = (0)
(1 1 1 1 1 0 0 0) (0) (0) (0)
(0 1 1 1 1 1 0 0) (0) (1) (1)
(0 0 1 1 1 1 1 0) (0) (1) (0)
(0 0 0 1 1 1 1 1) (0) (0) (1)
In proper form: (1010 0101)2 = (A5)16
b. (F3)16
The inverse of (F3)16 is (34)16 = (0011 0100)2. Perform affine mapping:
[affine matrix] [inverse vector] [constant vector] [result vector]
(1 0 0 0 1 1 1 1) (0) (1) (1)
(1 1 0 0 0 1 1 1) (0) (1) (0)
(1 1 1 0 0 0 1 1) (1) (0) (1)
(1 1 1 1 0 0 0 1) * (0) + (0) mod 2 = (1)
(1 1 1 1 1 0 0 0) (1) (0) (0)
(0 1 1 1 1 1 0 0) (1) (1) (0)
(0 0 1 1 1 1 1 0) (0) (1) (0)
(0 0 0 1 1 1 1 1) (0) (0) (0)
In proper form: (0000 1101)2 = (0D)16