+ All Categories
Home > Documents > Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William...

Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William...

Date post: 17-Jan-2016
Category:
Upload: annabella-dorsey
View: 245 times
Download: 2 times
Share this document with a friend
27
Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings
Transcript
Page 1: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Cryptography and Network SecurityChapter 5 - Advanced Encryption Standard

Fifth Edition

by William Stallings

Page 2: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Why AES?

Symmetric block cipher, published in 2001 Intended to replace DES and 3DES

DES is vulnerable to differential attacks

3DES has slow performances

Page 3: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

AES - key size

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 4: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

AES Encryption Process

http://www.cs.bc.edu/~straubin/cs381-05/blockciphers/rijndael_ingles2004.swf

Page 5: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

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 6: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

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 7: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

AES Structure

Page 8: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Some Comments on AES

1. An iterative rather than Feistel cipher processes data as block of 4 columns of 4 bytes operates on entire data block in every round

2. key expanded into array of 32-bit words four words form round key in each round

3. 4 different stages are used as shown4. has a simple structure5. only AddRoundKey uses key6. AddRoundKey a form of Vernam cipher7. each stage is easily reversible8. decryption uses keys in reverse order9. decryption does recover plaintext10. final round has only 3 stages

Page 9: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Substitute Bytes

a simple substitution of each byte uses one table of 16x16 bytes containing a permutation

of all 256 8-bit values each byte of state is replaced by byte indexed by row

(left 4-bits) & column (right 4-bits) eg. byte {95} is replaced by byte in row 9 column 5 which has value {2A}

S-box constructed using defined transformation of values in GF(28)

designed to be resistant to all known attacks

Page 10: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Substitute Bytes

Page 11: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Substitute Bytes Example

Page 12: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Shift Rows

a circular byte shift in each each 1st row is unchanged 2nd row does 1 byte circular shift to left 3rd row does 2 byte circular shift to left 4th row does 3 byte circular shift to left

decrypt inverts using shifts to right since state is processed by columns, this step permutes

bytes between the columns

Page 13: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Shift Rows

Page 14: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Mix Columns

each column is processed separately each byte is replaced by a value

dependent on all 4 bytes in the column effectively a matrix multiplication in GF(28)

using prime poly m(x) =x8+x4+x3+x+1

Page 15: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Mix Columns

Page 16: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Mix Columns Example

Page 17: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Add Round Key

XOR state with 128-bits of the round key again processed by column (though

effectively a series of byte operations) inverse for decryption identical

since XOR own inverse, with reversed keys designed to be as simple as possible

a form of Vernam cipher on expanded key requires other stages for complexity / security

Page 18: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Add Round Key

Page 19: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

AES Key Expansion

takes 128-bit (16-byte) key and expands into array of 44 32-bit words

start by copying key into first 4 words then loop creating words that depend on

values in previous & 4 places back in 3 of 4 cases just XOR these together 1st word in 4 has rotate + S-box + XOR round

constant on previous, before XOR 4th back

Page 20: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

AES Key Expansion

Page 21: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Key Expansion Rationale

designed to resist known attacks design criteria included

knowing part key insufficient to find many more invertible transformation fast on wide range of CPU’s use round constants to break symmetry diffuse key bits into round keys enough non-linearity to hinder analysis simplicity of description

Page 22: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

AES Example

Key Expansion

Page 23: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

AES Example

Encryption

Page 24: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

AES Example

Avalanche

Page 25: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

AES Decryption

AES decryption is not identical to encryption since steps done in reverse

but can define an equivalent inverse cipher with steps as for encryption but using inverses of each step with a different key schedule

Page 26: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

AES Decryption

Page 27: Cryptography and Network Security Chapter 5 - Advanced Encryption Standard Fifth Edition by William Stallings.

Summary

have considered: the AES selection process the details of Rijndael – the AES cipher looked at the steps in each round the key expansion implementation aspects


Recommended