0% found this document useful (0 votes)
3 views

Advanced Encryption Standards

Advanced Encryption Standard (AES) is a symmetric key algorithm established by NIST in 2001, superseding DES. It encrypts data in 128-bit blocks and supports key lengths of 128, 192, and 256 bits, with the number of rounds varying based on key length. The encryption process involves several steps including byte substitution, row shifting, mixing columns, and adding round keys, while decryption reverses these steps.

Uploaded by

fehopox550
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)
3 views

Advanced Encryption Standards

Advanced Encryption Standard (AES) is a symmetric key algorithm established by NIST in 2001, superseding DES. It encrypts data in 128-bit blocks and supports key lengths of 128, 192, and 256 bits, with the number of rounds varying based on key length. The encryption process involves several steps including byte substitution, row shifting, mixing columns, and adding round keys, while decryption reverses these steps.

Uploaded by

fehopox550
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/ 39

Advanced Encryption standards

AES
Advanced Encryption standards
• AES was established by the U.S. National
Institute of standards and Technology NIST in
2001
• AES is been adopted by the US government
and is now used world wide.
• It supersedes the DES which was published in
1977
• The AES is a symmetric key algorithm.
• AES is a block cipher
Advanced Encryption standards
• AES encrypts messages in blocks of 128bits
• AES allows three different key lengths 128,192
and 256 bits.
• The number of rounds in Encryption and
Decryption is dependent on the key length
• 128 bit key → 10 rounds
• 192 bit key → 12 rounds
• 256 bit key → 14 rounds
Message Message Message Message
(128 bits) (128 bits) (128 bits) (128 bits)

Key= 128 bits

Sub key 0 = 128 bits

Round 1 Sub key 1 = 128 bits

Sub key 2== 128 bits


Round 2

Sub key 10== 128 bits


Round 10

AES ENCRYPTION
CIPHER TEXT
Key expansion in AES
• Key in Text= satishcjisboring

• Convert the above key into hexadecimal by


considering 4 bits at a time
• Considering the first byte 0111 0011
• Hexadecimal→ 7 3
• 73 61 74 69 73 68 63 6a 69 73 62 6f 72 69 6e 67
• all together 16 bytes
Key expansion in AES
73 61 74 69 73 68 63 6a 69 73 62 6f 72 69 6e 67

b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 b16


b#→ byte Number
Convert it into a 4 X 4 matrix

b1 b5 b9 b13 73 73 69 72
b2 b6 b10 b14 61 68 73 69
b3 b7 b11 b15 74 63 62 6e
b4 b8 b12 b16 69 6a 6f 67
Key expansion in AES
b1 b5 b9 b13 • Size of each value
b2 b6 b10 b14 in the byte is 8
b3 b7 b11 b15 bits e.g. b1
b4 b8 b12 b16 • So b1 + b2 + b3 +b4
= 32 bits

Word 0 Word 3
Word 1 Word 2 • Expand the key
from 4 words i.e.
Word = 32 bits w1,w2,w3,w4 to
w43 words
• Expand the key from 4 words i.e. w1,w2,w3,w4 to
w43 words

Sub Key -0 Sub Key -1


W0 W1 W2 W3 W4 W5 W6 W7 W43
How to generate subkeys for Round 1
Sub Key -0
W0 W1 W2 W3
g

W4 W5 W6 W7
• What is the Function g ? W4=W0 XOR g(W3)

W3 • Perform a circular cyclic left shift by 1 byte


i.e. [B0,B1,B2,B3] will be transformed to
[B1,B2,B3,B0]
Rotword
X1 • Now find sub word from the
RotWord.
• Subword performs a byte
substitution on each byte of its
input word, using S-box
Rotword Subword
X1 Y1
f9
Rotword Subword
X1 Y1
f9
9f
• The result Y1 is XORed with a round constant, Rcon[j]
Rotword Sub word
X1 Y1

f9
9f
85
40are in generating key for Round 1 XOR R1
• Since we
with Y1
8b
fe
= g(W3) f1
29
How to generate subkeys for Round 1
Sub Key -0
W0 W1 W2 W3
g
73 73 69 72
61 68 73 69
74 63 62 6e
69 6a 6f 67

W4 W5 W6 W7

8b f8 91 e3
fe 96 e5 8c
f1 92 f0 9e
29 43 2c 4b
Message Message Message Message
(128 bits) (128 bits) (128 bits) (128 bits)

Key= 128 bits

Sub key 0 = W0 W1 W2 W3

Round 1 Sub key 1 = W4 W5 W6 W7

Sub key 2= W8 W9 W10 W11


Round 2

Sub key 10=W40 W41 W42 W43


Round 10

AES ENCRYPTION
CIPHER TEXT
Add Round Key
Message
(128 bits) secretmessagenow =128bits

Convert to 16 bytes
• 73 65 63 72 65 74 6d 65 73 73 61 67 65 6e 6f 77

73 65 73 65 73 73 69 72
65 74 73 6e 61 68 73 69
63 6d 61 6f 74 63 62 6e
72 65 67 77 69 6a 6f 67
w0 w1 w2 w3
subkey 0
Add Round Key
73 65 73 65 73 73 69 72
65 74 73 6e 61 68 73 69
63 6d 61 6f 74 63 62 6e
72 65 67 77 69 6a 6f 67

Input Message w0 w1 w2 w3
subkey 0
00 16 1a 17
04 1c 00 07
Output → 17 0e 03 01
1b 0f 0f 10
• Need to understand a round ?

• What are the steps in a Round?


Details of a Round
1. Substitute Bytes
2. Shift rows
3. Mix Columns
4. Add Round Key
Message Message Message Message
(128 bits) (128 bits) (128 bits) (128 bits)

Key= 128 bits


Round 1
Sub key 0 = W0 W1 W2 W3
Byte substitution
Round 1
Shift Rows
Round 2 Mix Columns
Sub key 2= W8 W9 W10 W11

Add Round Key


Sub key 10=W40 W41 W42 W43
Round 10

Sub key 1 = W4 W5 W6 W7

AES ENCRYPTION
CIPHER TEXT
Message Message Message Message
(128 bits) (128 bits) (128 bits) (128 bits)

Key= 128 bits


Round 2
Sub key 0 = W0 W1 W2 W3
Byte substitution
Round 1 Sub key 1 = W4 W5 W6 W7
Shift Rows
Round 2 Mix Columns
Add Round Key
Sub key 10=W40 W41 W42 W43
Round 10

Sub key 2= W8 W9 W10 W11

AES ENCRYPTION
CIPHER TEXT
Message Message Message Message
(128 bits) (128 bits) (128 bits) (128 bits)

Key= 128 bits


Round 10
Sub key 0 = W0 W1 W2 W3
Byte substitution
Round 1 Sub key 1 = W4 W5 W6 W7
Shift Rows
Round 2 Mix Columns
Sub key 2= W8 W9 W10 W11

Add Round Key


Round 10
Sub key 10=W40 W41 W42 W43

AES ENCRYPTION
CIPHER TEXT
Step-1:Byte Substitution
• Does a simple replacement of each byte of the block data using a
S-box
• Left 4 bits determine the row, right four bits determine the column

00 16 1a 17
04 1c 00 07
17 0e 03 01
1b 0f 0f 10
63
Step-1:Byte Substitution
• Does a simple replacement of each byte of the block data using a
S-box
• Left 4 bits determine the row, right four bits determine the column

00 16 1a 17
04 1c 00 07
17 0e 03 01
1b 0f 0f 10
63 47
Step-1:Byte Substitution
• Does a simple replacement of each byte of the block data using a
S-box
• Left 4 bits determine the row, right four bits determine the column

00 16 1a 17
04 1c 00 07
17 0e 03 01
1b 0f 0f 10
63 47 a2 f0
f2 9c 63 c5
f0 ab 7b 7c
af 76 76 ca
Step 2: Shift Rows
• Shift Rows ,simply byte shift the rows
1. First Row: No Change
2. Second Row: one byte cyclic left shift
3. Third Row: Two byte cyclic left shift
4. Fourth Row: Three byte cyclic left shift
Step 2: Shift Rows

63 47 a2 f0
f2 9c 63 c5
f0 ab 7b 7c
af 76 76 ca

63 47 a2 f0
9c 63 c5 f2
7b 7c f0 ab
ca af 76 76
Step 3:Mix Columns
• Multiply the matrix from the previous step with a
standard matrix

r1 r5 r9 r13
r2 r6 r10 r14 • Finite Field
r3 r7 r11 r15 Arithmetic
r4 r8 r12 r16
Step 4: Add round Key

W4 W5 W6 W7

8b f8 91 e3
fe 96 e5 8c
f1 92 f0 9e
29 43 2c 4b
•Similar operation
from round 2 to
round 9
•Round 10 Does not
support Mix Columns
Decryption
Decryption
Decryption Round
• Round has the following step
1. Substitution Bytes
2. Shift Rows
3. Mixing Columns (Not applicable for round 10)
4. Add round key
Decryption Round-Substitution Bytes
• Substitution Bytes- An inverse S box is used for
byte substitution
Decryption Round- Shift Rows
• Shift rows- Rows are shifted right in
decryption
• Shift Rows ,simply byte shift the rows
1. First Row: No Change
2. Second Row: one byte cyclic right shift
3. Third Row: Two byte cyclic right shift
4. Fourth Row: Three byte cyclic right shift
Decryption Round- 2 .Shift Rows
63 47 a2 f0
9c 63 c5 f2
7b 7c f0 ab
ca af 76 76

63 47 a2 f0
f2 9c 63 c5
f0 ab 7b 7c
af 76 76 ca
Decryption Round- 3 . Mix columns
Decryption Round- 4 . Add Round Key

W36 W37 W38 W39

Round number 1 above


Decryption

You might also like