Lecture#04-Advanced Encryption Standard
Lecture#04-Advanced Encryption Standard
Lecture#04
Advanced Encryption Standard
(AES)
Course: Cryptography & Network Security (CE-408)
Course Teacher: Dr. Rukaiya
Contact Info:
Email: [email protected]
1
Origins of AES
• In 1999, NIST issued a new standard that is said 3DES,
168-bit key length
Algorithm is the same as DES
• In 1997, NIST issued a calls for proposals for the new Advanced
Encryption Standard (AES)
security strength >= 3DES
improved efficiency
• The Previous algorithms like DES were not secure enough after
the inclusion of fastest computing technologies.
X AES Y
128 bit
K
128/192/256 bit
3
Rounds of Evaluation
K No. of Rounds
128 10 (Commercial Application)
192 12 (More Secure)
256 14
4
What makes Rijndael Stand out?
5
AES Structure
6
AES Structure
7
AES Basic Operations
• The Rijndael Algorithm is a block cipher that encrypt blocks of 128 bits
• Uses symmetric keys of 128, 192 or 256 bits.
• It consists of an initial round (AddRoundKey), and r standard rounds,
r is 10,12 or 14 depending on the block and key length.
• The first r-1 rounds are similar and they consist of 4 transformations,
called
ByteSub (Substitution Bytes)
ShiftRow (Shift Rows)
MixColumn (multiply columns)
AddRoundKey (XOR by key )
• The last round have only the transformations
ByteSub
ShiftRow
AddRoundKey
8
Plaintext Plaintext
Round 10
Substitute Bytes Expand Key Inverse sub bytes
Round 1
Shift Rows Inverse shift rows
Mix Columns Inverse mix cols
Round 9
Add round key w[4,7] Add round key
. Inverse sub bytes
.
.
Inverse shift rows
Substitute Bytes .
.
Round 9
Shift Rows .
Round 1
Add Round Key w[36,39] Add round key
Substitute Bytes Inverse sub bytes
Round 10
Ciphertext Ciphertext
9
Terms Detail
Terms Used
10
11
Algorithm Parameters, Symbols, and Functions
12
13
Working of Algorithm
• The number of rounds for the algorithm depends on the key length
and Block size
14
Plaintext Plaintext
Round 10
Substitute Bytes Expand Key Inverse sub bytes
Round 1
Shift Rows Inverse shift rows
Mix Columns Inverse mix cols
Round 9
Add round key w[4,7] Add round key
. Inverse sub bytes
.
.
Inverse shift rows
Substitute Bytes .
.
Round 9
Shift Rows .
Round 1
Add Round Key w[36,39] Add round key
Substitute Bytes Inverse sub bytes
Round 10
Ciphertext Ciphertext
15
KEY GENERATION (128-Bit)
16
Example
• Plaintext = 00112233445566778899AABBCCDDEEFF
• Key = 000102030405060708090A0B0C0D0E0F
00 44 88 CC
• Plain Text 11 55 99 DD
22 66 AA EE
33 77 BB FF
• Key
17
Example- KEY GENERATION
Key
K = 000102030405060708090A0B0C0D0E0F
00 04 08 0C
01 05 09 0D
KEY =
02 06 0A 0E
03 07 0B 0F
18
KEY GENERATION
• Steps to perform sub-key generation
19
KEY GENERATION
Rot Word Subword Rcon Xor Xor
𝐖𝐢 Temp W[i-4]
(RW) (SW) (R) 𝐓𝟏 =(SW^R) (W[i-4] ^T)
0
1
2
3
4
5
6
8
9
10
11
..
43
20
Encryption Process
• Pre-round Transformation
• Round 01
Substitute Bytes (use S-box on Slide 21)
Shift Rows
1st row – No shift
2nd row – 1 byte left shift
3rd Row – 2 byte left shift
4th Row – 3 byte left shift
Mix Column
Constant matrix
02 03 01 01
01 02 03 01
01 01 02 03
03 01 01 02
21
S-box for
Encryption
22
Decryption Process
• Pre-round Transformation
• Round 01
Inverse Shift Rows
1st row – No shift
2nd row – 1 byte right shift
3rd Row – 2 byte right shift
4th Row – 3 byte right shift
25
Advantages
• Implementation aspects:
Rijndael can be implemented to run at speeds unusually fast for a block cipher on a
Pentium (Pro). There is a trade-off between table size/performance.
As the cipher does not make use of arithmetic operations, it has no bias towards big
or little endian processor architectures.
26
Advantages
• Simplicity of Design:
The cipher is fully “self-supporting”. It does not make use of another cryptographic
component, S-boxes “lent” from well-reputed ciphers.
The cipher does not base its security or part of it on obscure and not well understood
interactions between arithmetic operations.
The tight cipher design does not leave enough room to hide a trapdoor.
The block length of 128 bits is not considered sufficient for this purpose nowadays.
27
Advantages
• Extensions:
The design allows the specification of variants with the block length and key length
both ranging from 128 to 256 bits in steps of 32 bits.
28
Limitations
• The inverse cipher is less suited to be implemented on a smart card than the cipher
itself: it takes more code and cycles. (Still, compared with other ciphers, even the
inverse is very fast)
• In software, the cipher and its inverse make use of different code and/or tables.
• In hardware, the inverse cipher can only partially re-use the circuitry that implements
the cipher.
29