Advanced Encryption Standard (AES)
Advanced Encryption Standard (AES)
Advanced Encryption Standard (AES)
Encryption Standard
(AES)
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
• 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
• resistant against known attacks
• speed and code compactness on many CPUs J. Daemen
Applications
Rounds.
Note
12
AES Block Cipher
The AES Algorithm:
AES operates on a 4 × 4 column-wise order array of bytes, called the state. For
instance, if there are 16 bytes, these bytes are represented as this two-dimensional
array:
The key size used for an AES cipher specifies the number of transformation rounds that
convert the plaintext into the ciphertext . The number of rounds are as follows:
10 rounds for 128-bit keys.
12 rounds for 192-bit keys.
14 rounds for 256-bit keys.
Each round consists of several processing steps, including one that depends on the
encryption key itself. A set of reverse rounds are applied to transform ciphertext back
into the original plaintext using the same encryption key. 13
High Level Description
• Round keys are derived from the cipher key
Key Expansion using Rijndael's key schedule
• SubBytes
Final Round • ShiftRows No MixColumns
• AddRoundKey
General design of AES encryption cipher
• Process the entire data block in parallel during each round using
substitutions and permutation.
• The key that is provided as input is expanded into an array of forty-
four 32-bit words, w[i]. Four distinct words (128 bits) serve as a
round key for each round;
AES Key Expansion
• The key is copied into the first four words of the expanded key.
• The remainder of the expanded key is filled in four words at a
time.
• Each added word w[i] depends on the immediately preceding
word, w[i -1], and the word four positions back,w[i-4].
• The function g consists of the following subfunctions:
• RotWord performs a one-byte circular left shift on a word. This
means that an input word [b0, b1, b2, b3] is transformed into
[b1, b2, b3, b0].
• SubWord performs a byte substitution on each byte of its
input word, using the S-box
• The result of steps 1 and 2 is XORed with a round constant,
Rcon[j].
• The round constant is a word in which the three rightmost
bytes are always 0.
• Thus the effect of an XOR of a word with Rcon is to only
perform an XOR on the leftmost byte of the word.
• The round constant is different for each round and is defined
as Rcon[j] = (RC[j], 0, 0, 0), with RC[1] = 1, RC[j] = 2 · RC[j - 1]
Key Matrix
Key is expanded in words of 4 bytes (32
bits) w1,w2,w3,w4
State array (4x4 matrix)
Structure of Each Round
Structure of each round at the encryption site
7.37
TRANSFORMATIONS
• the 128 bits of State are bitwise XORed with the 128 bits of
the round key.
Example continued:
From Slide 35
Result of Add Round Key
Mix Coumns
State array
Security