Top Banner
Advanced Encryption Standard
30
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: AES Algorithm

Advanced Encryption Standard

Page 2: AES Algorithm

The AES Cipher

• Block length is limited to 128 bit• The key size can be independently specified to

128, 192 or 256 bits

Key size (words/bytes/bits) 4/16/128 6/24/192 8/32/256

Number of rounds 10 12 14

Expanded key size (words/byte) 44/176 52/208 60/240

Page 3: AES Algorithm

Key-block-rounds combinations

Page 4: AES Algorithm

The AES Cipher• Key received as input array of 4 rows and Nk columns• Nk = 4,6, or 8, parameter which depends key size• Input key is expanded into an array of 44/52/60 words

of 32 bits each• 4 different words serve as a key for each round

k0 k4 k8 k12

k1

k2

k3

k5

k6

k7

k9

k10

k11

k13

k14

k15

w0 w1 w2 …… w42 w43

Page 5: AES Algorithm

The AES Cipher

• Single 128 bit block as input• Copied to a State array with Nb columns

– (Nb= block length / 32 = 128/32 = 4)

Page 6: AES Algorithm

The AES Cipher

• Number of rounds, Nr, depends on key size• Each round is a repetition of functions that

perform a transformation over State array• Consists of 4 main functions: one permutation

and three substitutions

Substitute bytes, Shift rows, Mix columns, Add round key

Page 7: AES Algorithm

Addition / SubtractionXOR operation on the bits

Page 8: AES Algorithm

Multiplication

Irreducible polynomial

Page 9: AES Algorithm

Irreducible polynomial

SubBytes Transformation[b ] is the multiplicative inverse of [sr,c]

b’r,c = sr,c mod m(x)

Page 10: AES Algorithm

SubBytes()Transformation Substitution Bytes

Page 11: AES Algorithm

S - Box

Page 12: AES Algorithm

For example,

if s 1,1 = {53}, then the substitution value would be determined by the intersectionof the row with index ‘5’ and the column with index ‘3’ in the S-Box.

This would result in s’ 1,1 {ed}.

SubBytes()Transformation

Page 13: AES Algorithm

InvSubBytes() Transformation

Page 14: AES Algorithm

ShiftRows() Transformation

Page 15: AES Algorithm

InvShiftRows() Transformation

Page 16: AES Algorithm

MixColumns() Transformation

Page 17: AES Algorithm

MixColumns() Transformation

Page 18: AES Algorithm

InvMixColumns() Transformation

Page 19: AES Algorithm

AddRoundKey() Transformation

Page 20: AES Algorithm

Key Expansion

Page 21: AES Algorithm

Key Expansion

Page 22: AES Algorithm

The AES Cipher

• AddRoundKey() – round key is added to the State using XOR operation

• MixColumns() – takes all the columns of the State and mixes their data, independently of one another, making use of arithmetic over GF(2^8)

• ShiftRows() – processes the State by cyclically shifting the last three rows of the State by different offsets

• SubBytes() – uses S-box to perform a byte-by-byte substitution of State

Page 23: AES Algorithm

The AES Cipher

Add round key

Substitute bytes

Shift rows

Mix columns

Add Round key

Substitute bytes

Shift rows

Mix columns

Add round key

Substitute bytes

Shift rows

Add round key

plaintext

Cipher text

keyW[4,7] W[36,39] W[40,43]

Round 1

Round 9

Page 24: AES Algorithm

The AES Cipher

• Only Add round key makes use of the key• Other three functions are used for diffusion

and confusion • Final round consists of only three stages

Page 25: AES Algorithm

The AES Inverse Cipher

Add round key

Inv. Shift rows

Inv. Sub bytes

Add round key

Inv. Mix Columns

Inv. Shift rows

Inv. Sub bytes

Add round key

Inv. Mix columns

Inv. Shift rows

Inv. Sub bytes

Add round key

ciphertext

plaintext

keyW[36,39] W[4,7] W[0,3]

Round 1

Round 9

Page 26: AES Algorithm

The AES Inverse Cipher

• Decryption algorithm uses the expanded key in reverse order

• All functions are easily reversible and their inverse form is used in decryption

• Decryption algorithm is not identical to the encryption algorithm

• Again, final round consists of only three stages

Page 27: AES Algorithm

Cipher Example

Page 28: AES Algorithm
Page 29: AES Algorithm
Page 30: AES Algorithm