Lecture 05 AES
Lecture 05 AES
Standard
Topics
Origin of AES
Basic AES
Inside Algorithm
Final Notes
DES cracking
Part 1 Cryptography
Origins
A replacement for DES was needed
Key size is too small
final criteria
general security
ease of software & hardware implementation
implementation attacks
flexibility (in en/decrypt, keying, other factors)
AES Shortlist
After testing and evaluation, shortlist in Aug-99
MARS (IBM) - complex, fast, high security margin
RC6 (USA) - v. simple, v. fast, low security margin
Rijndael (Belgium) - clean, fast, good security
margin[selected as AES
Serpent (Euro) - slow, clean, v. high security margin
Twofish (USA) - complex, v. fast, high security margin
Rijndael design:
simplicity
has 128/192/256 bit keys, 128 bits data J. Daemen
resistant against known attacks
speed and code compactness on many CPUs
Topics
Origin of AES
Basic AES
Inside Algorithm
Final Notes
AES Conceptual Scheme
10
Multiple rounds
Rounds are (almost) identical
First and last round are a little different
11
High Level Description
No MixColumns
Overall Structure
128-bit values
1 byte
14
Data Unit
Unit Transformation
Changing Plaintext to State
Topics
Origin of AES
Basic AES
Inside Algorithm
Final Notes
Details of Each Round
SubBytes: Byte Substitution
A simple substitution of each byte
provide a confusion – làm cho relationship between Ciphertext
and Key become more complex
RotWord[b0,b1,b2,b3] = [b1,b2,b3,b0]
Basic AES
Inside Algorithm
Final Notes
AES Security
AES was designed after DES.
Most of the known attacks on DES were already
tested on AES.
Brute-Force Attack
AES is definitely more secure than DES due to the
larger-size key.
Statistical Attacks
Numerous tests have failed to do statistical analysis of
the ciphertext
Differential and Linear Attacks
There are no differential and linear attacks on AES as
yet.
Implementation Aspects
The algorithms used in AES are so simple
that they can be easily implemented using
cheap processors and a minimum amount
of memory.
Very efficient
AES animation:
http://www.cs.bc.edu/~straubin/cs381-05/blockciphers/
rijndael_ingles2004.swf
A Few Other Block Ciphers-
READING
Symmetric Key Cryptography
A Few Other Block Ciphers
Briefly…
IDEA
Blowfish
RC6
More detailed…
TEA
Part 1 Cryptography
IDEA
Invented by James Massey
One of the giants of modern crypto
IDEA has 64-bit block, 128-bit key
IDEA uses mixed-mode arithmetic
Combine different math operations
IDEA the first to use this approach
Frequently used today
Part 1 Cryptography
Blowfish
Blowfish encrypts 64-bit blocks
Key is variable length, up to 448 bits
Invented by Bruce Schneier
Almost a Feistel cipher
Ri = Li1 Ki
Li = Ri1 F(Li1 Ki)
The round function F uses 4 S-boxes
Each S-box maps 8 bits to 32 bits
Key-dependent S-boxes
S-boxes determined by the key
Part 1 Cryptography
RC6
Invented by Ron Rivest
Variables
Block size
Key size
Number of rounds
An AES finalist
Uses data dependent rotations
Unusual for algorithm to depend on plaintext
Part 1 Cryptography
Time for TEA…
Part 1 Cryptography
TEA Encryption
Assuming 32 rounds:
(K[0], K[1], K[2], K[3]) = 128 bit key
(L,R) = plaintext (64-bit block)
delta = 0x9e3779b9
sum = 0
for i = 1 to 32
sum += delta
L += ((R<<4)+K[0])^(R+sum)^((R>>5)+K[1])
R += ((L<<4)+K[2])^(L+sum)^((L>>5)+K[3])
next i
ciphertext = (L,R)
Part 1 Cryptography
TEA Decryption
Assuming 32 rounds:
(K[0], K[1], K[2], K[3]) = 128 bit key
(L,R) = ciphertext (64-bit block)
delta = 0x9e3779b9
sum = delta << 5
for i = 1 to 32
R = ((L<<4)+K[2])^(L+sum)^((L>>5)+K[3])
L = ((R<<4)+K[0])^(R+sum)^((R>>5)+K[1])
sum = delta
next i
plaintext = (L,R)
Part 1 Cryptography
TEA Comments
Part 1 Cryptography