0% found this document useful (0 votes)
12 views21 pages

Info Sec Running AES

This is the aes lecture

Uploaded by

zohaibch00777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views21 pages

Info Sec Running AES

This is the aes lecture

Uploaded by

zohaibch00777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Information Security

CS-497

Dr. Saif Ur Rehman


Todays Contents
 Running Example-AES
AES - Example
 Four different stages are used, one of permutation and three of
substitution:

– Substitute bytes: Uses an S-box to perform a byte-by-byte


substitution of the block

– ShiftRows: A simple permutation

– MixColumns: A substitution that makes use of arithmetic over


GF(28)

– AddRoundKey: A simple bitwise XOR of the current block with a


portion of the expanded key
Step- 1 Substitute bytes
• S-Box
Step- 1 Substitute bytes
 Here is an example of the SubBytes transformation (Look for each
value in S-Box)

EA 04 65 85
83 45 5D 96
5C 33 98 B0
F0 2D AD C5

?
Step- 1 Substitute bytes
 Here is an example of the SubBytes transformation (Look for each
value in S-Box)

EA 04 65 85
83 45 5D 96
5C 33 98 B0
F0 2D AD C5

87
Step- 1 Substitute bytes
 Here is an example of the SubBytes transformation (Look for each
value in S-Box)

EA 04 65 85
83 45 5D 96
5C 33 98 B0
F0 2D AD C5

87 F2 4D 97
EC 6E 4C 90
4A C3 46 E7
8C D8 95 A6
AES - Example
 Step- 2 Shift Rows

87 F2 4D 97
EC 6E 4C 90
4A C3 46 E7
8C D8 95 A6

87 F2 4D 97
6E 4C 90 EC
46 E7 4A C3
A6 8C D8 95
AES - Example
 Step- 3 Mix Column
AES - Example
 Step- 3 Mix Column
Pre-defined Matrix

02 03 01 01
01 02 03 01
01 01 02 03
? ? ? ?
03 01 01 02
= ?
?
?
?
?
?
?
?

87 F2
* 4D 97
? ? ? ?

6E 4C 90 EC
46 E7 4A C3
A6 8C D8 95
AES - Example
 Step- 3 Mix Column
Pre-defined Matrix

02 03 01 01 87 F2 4D 97 ?
01 02 03 01
01 01 02 03 *
6E
46
4C
E7
90
4A
EC
C3
=
03 01 01 02 A6 8C D8 95

(02} * {87} XOR {03} * {6E} XOR {01} * {46} XOR {01} * {A6}
X7 + X6 + X5 + X4 + X3 + X2 + X1 + 1
(02} * {87} = X * (X7 + X2+ X + 1)
02 = 0000 0010
= X8 + X3+ X2 + X)
87= 10000 0111
Use irreducible Polynomial Theorem

X8 = X4 + X3+ X + 1)
AES - Example
 Step- 3 Mix Column
Pre-defined Matrix

(02} * {87} XOR {03} * {6E} XOR {01} * {46} XOR {01} * {A6}

X7 + X6 + X5 + X4 + X3 + X2 + X1 + 1
02 = 0000 0010
(02} * {87} = X * (X7 + X2+ X + 1)
87= 10000 0111
= X8 + X3+ X2 + X)

= X4 + X3+ X + 1 + X3+ X2 + X)

= X4 + X3+ X + 1 + X3+ X2 + X)

= X4 + X2 + 1
= 0001 0101
Use irreducible Polynomial Theorem X8 = X4 + X3+ X + 1
AES - Example
 Step- 3 Mix Column
Pre-defined Matrix

(02} * {87} XOR {03} * {6E} XOR {01} * {46} XOR {01} * {A6}

X7 + X6 + X5 + X4 + X3 + X2 + X1 + 1
02 = 0000 0010
(02} * {87} = X * (X7 + X2+ X + 1)
87= 10000 0111
= X8 + X3+ X2 + X)

= X4 + X3+ X + 1 + X3+ X2 + X)

= X4 + X3+ X + 1 + X3+ X2 + X)

= X4 + X2 + 1
= 0001 0101
Use irreducible Polynomial Theorem X8 = X4 + X3+ X + 1
AES - Example
 Step- 3 Mix Column
Pre-defined Matrix

03 * 6E = 1011 0010

Use irreducible Polynomial Theorem X8 = X4 + X3+ X + 1


AES - Example
 Step- 3 Mix Column
AES - Example
 Step- 3 Mix Column

0100 0111 = 47
AES - Example
Step- 3 Mix Column

Pre-defined Matrix

02 03 01 01 87 F2 4D 97 47
01 02 03 01
01 01 02 03 *
6E 4C 90 EC
46 E7 4A C3
=
03 01 01 02 A6 8C D8 95
AES - Example
Step- 3 Mix Column

Finally, We will get

02 03 01 01 87 F2 4D 97 47 40 A3 4C
01 02 03 01
01 01 02 03 *
6E
46
4C
E7
90
4A
EC
C3
= 37
94
D4
E4
70
3A
9F
42
ED A5 A6 BC
03 01 01 02 A6 8C D8 95
AES - Example
 AES Add Round Key

47 40 A3 4C AC 19 28 57 ?
37
94
D4
E4
70
3A
9F XOR
42
77
66
FA
DC
D1
29
5C
00
=
ED A5 A6 BC F3 21 41 6A
AES - Example
 AES Add Round Key

47 40 A3 4C AC 19 28 57 EB
37
94
D4
E4
70
3A
9F XOR
42
77
66
FA
DC
D1
29
5C
00
= ?

ED A5 A6 BC F3 21 41 6A

--------------
1110 1011
E B
AES - Example
 AES Add Round Key, Finally Result is shown below

47 40 A3 4C AC 19 28 57 EB 59 8B 1B
37
94
D4
E4
70
3A
9F XOR
42
77
66
FA
DC
D1
29
5C
00
= 40
F2
2E
38
A1
13
C3
42
ED A5 A6 BC F3 21 41 6A 1E 84 E7 D6

You might also like