Information Security slide
Information Security slide
The order in which these four steps are executed is different for encryption
and decryption
So, unlike DES, the decryption algorithm differs substantially from the
encryption algorithm
Advanced Encryption Standard
The input to the AES is a single 128-bit block, consisting of a 4×4 matrix of
bytes, arranged as follows:
Four column words of the key matrix are expanded into a schedule of 44
words
Advanced Encryption Standard
AES Encryption Process
The input state array is XORed
with the first four words of the
key schedule
1) Substitute bytes
2) Shift rows
3) Mix columns
4) Add round key
Substitution byte (for each input byte) is found by using the same lookup
table
Advanced Encryption Standard
Substitute Bytes
Advanced Encryption Standard
Substitute Bytes
Advanced Encryption Standard
Shift Rows
Rotation or transformation consists of;
not shifting the first row of the state array at all
circularly shifting the second row by one byte to the left
circularly shifting the third row by two bytes to the left
circularly shifting the last row by three bytes to the left
Advanced Encryption Standard
Mix Columns
This step replaces each byte of a column by a function of all the bytes in the
same column
Advanced Encryption Standard
Mix Columns
Lookup Table
Advanced Encryption Standard
Key Expansion
128 bits of the state array are bitwise XORed with the 128 bits of the round
key
AES Key Expansion algorithm is used to derive the 128-bit round key from
the original 128-bit encryption key
The algorithm first arranges the 16 bytes of the encryption key in the form
of a 4 × 4 array of bytes
Advanced Encryption Standard
Key Expansion
First four bytes of the encryption key constitute the word w0, the next four
bytes the word w1, and so on
The algorithm subsequently expands the words [w0, w1, w2, w3] into a 44
word key schedule that can be labeled w0, w1, w2, w3, ...., w43
Words [w0, w1, w2, w3] are bitwise XORed with the input block before the
round-based processing begins
The remaining 40 words are used four words at a time in each of the 10
rounds
Advanced Encryption Standard
Key Expansion
Now comes the interesting part;
How does the Key Expansion Algorithm expand four words w0, w1, w2, w3
into the 44 words w0, w1, w2, w3, w4, w5, ...., w43 ?
Advanced Encryption Standard
Key Expansion
Key expansion takes place on a four-word to four-word basis
Each grouping of four words decides what the next grouping of four words
will be
Advanced Encryption Standard
Key Expansion
Let’s say that we have the four words of the round key for the ith round;
wi wi+1 wi+2 wi+3
For these to serve as the round key for the ith round, i must be a multiple of 4
For example, [w4, w5, w6, w7] is the round key for round 1, [w8, w9, w10,
w11] round key for round 2, and so on
Advanced Encryption Standard
Key Expansion
Now (for example) we need to determine the words [w4 w5 w6 w7] from the
words [w0 w1 w2 w3]
We have
w5 = w4 ⊗ w1
w6 = w5 ⊗ w2
w7 = w6 ⊗ w3
Note that except for the first word in a new 4-word grouping, each word is
an XOR of the previous word and the corresponding word in the previous 4-
word grouping
Advanced Encryption Standard
Key Expansion
So now we need to figure out w4 (or the beginning word of each 4-word
grouping in the key expansion)
It is obtained by:
w4 = w0 ⊗ g(w3)
That is, XORing the first word of the last grouping with what is returned by
applying a function g() to the last word of the previous 4-word grouping
Advanced Encryption Standard
Key Expansion
The function g() consists of the following three steps:
Then put this result through a Sub Box, which replaces each 8 bits of the
matrix with a corresponding 8-bit value from S-Box
Advanced Encryption Standard
Key Expansion
To generate the first column (w4) of the key, this result is XOR-ed with the
first column of the key (w0) as well as a constant (Rcon) which is dependent
on i
This continues for the other two columns in order to generate the entire
round key
Advanced Encryption Standard
What makes AES a strong cipher
Round constant is for the purpose of destroying any symmetries that may
have been introduced by other steps in the key expansion algorithm
Note that if you change one bit of the encryption key, it will affect the round
key for several rounds
AES was published with a probability that it will stay secure for at least 20
years
With 128 bit, (2128 = 3.4 x 1038) possible keys, a computer that tries 255 keys
per second needs 149 billion years to break AES
Advanced Encryption Standard
AES vs DES
AES Key expansion algorithm ensures that AES has no weak keys
A weak key reduces the security of a cipher in a predictable manner
For example, DES is known to have weak keys (alternating ones and zeros), that produce
identical round keys for each of the 16 rounds
A weak key causes all round keys to become identical, which, in turn, causes
the encryption to become self-inverting
That is, plain text encrypted and then encrypted again will lead back to the same plain
text
Since the small number of weak keys of DES are easily recognized, it is not
considered to be a problem with that cipher
References
AES official documentation
http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
Rijndael Cipher Animation
http://www.codeplanet.eu/files/flash/Rijndael_Animation_v4_eng.swf
Test AES encryption
https://www.openssl.org/
Simplified AES
http://edipermadi.files.wordpress.com/2008/09/s-aes-spec.pdf
“Cryptography and Network Security: Principles and Practice”, 6th edition, by William
Stallings
“Network Security: Private Communication in a Public World”, by Charlie Kaufman, Radia
Perlman, Mike Speciner (chapter 3)
References
Attacks on AES
State of AES attacks as of late 2010:
A. Kaminsky, M. Kurdziel, and S. Radziszowski. An overview of cryptanalysis research for the Advanced
Encryption Standard. IEEE Military Communications Conference 2010 (MILCOM 2010), pages 1853-1859,
San Jose, CA, USA, November 2010.
http://www.cs.rit.edu/~ark/20101102/milcom2010paper.pdf
http://www.cs.rit.edu/~ark/20101102/milcom2010v2.pdf
In August 2011, a key recovery attack (not a related key attack) on the full AES (not reduced-round AES)
better than brute force (but just a little) was published:
A. Bogdanov, D. Khovratovich, and C. Rechberger. Biclique cryptanalysis of the full AES. Cryptology ePrint
Archive, Report 2011/449, August 31, 2011.
http://eprint.iacr.org/2011/449
Breaks AES-128 with 2126.1 work
Breaks AES-192 with 2189.7 work
Breaks AES-256 with 2254.4 work
Also includes new breaks on reduced-round AES and on AES-based hash functions
AES is now (theoretically) broken!
THANKS