←Back to Subject
Notes
Notes
Study material and explanations
Diagrams
Diagrams
Visualize concepts easily
Mnemonics
Mnemonics
Tricks to remember faster
One Night Prep
One Night Prep
Short and focused revision
Revision
Revision
Quick summary and key points
Important Questions
Important Questions
Practice most relevant questions
Notes

Advanced Encryption Standard (AES): Architecture, Rounds & DES vs AES

Study material and explanations for Unit 2

Symmetric Key Algorithms and AES (Advanced Encryption Standard)

What is AES? (In Simple Words)

When DES became too weak due to its small 56-bit key and Triple DES (3DES) proved too slow in software, the US National Institute of Standards and Technology (NIST) held a global competition in 1997 to find a brand-new encryption standard.

In 2001, NIST selected the Rijndael algorithm—created by two Belgian cryptographers, Joan Daemen and Vincent Rijmen—and named it the Advanced Encryption Standard (AES).

💡 Real-Life Relevance:
Today, AES is the #1 most widely used symmetric encryption algorithm on Earth. It protects WhatsApp messages, Wi-Fi (WPA2/WPA3), HTTPS websites, UPI banking apps, and even top-secret government files!


1. Key Specifications of AES

Unlike DES (which uses a Feistel structure), AES is a Substitution-Permutation Network (SPN) that operates on a 128-bit block (16 bytes) arranged as a 4 × 4 grid of bytes called the State Matrix.

AES supports three different key lengths, and the number of rounds depends on the key size:

AES Variant Block Size Secret Key Size Number of Rounds (Nr) Number of Subkeys
AES-128 128 bits (16 bytes) 128 bits (16 bytes) 10 Rounds 11 Subkeys
AES-192 128 bits (16 bytes) 192 bits (24 bytes) 12 Rounds 13 Subkeys
AES-256 128 bits (16 bytes) 256 bits (32 bytes) 14 Rounds 15 Subkeys

2. The 4 × 4 Byte “State Matrix”

AES takes 128 bits of Plain Text (which equals 128 ÷ 8 = 16 bytes: b0, b1, …, b15) and places them column by column into a 4 × 4 square table called the State Array:

State Matrix (4 × 4 Bytes):
| b0   b4   b8   b12 |
| b1   b5   b9   b13 |
| b2   b6   b10  b14 |
| b3   b7   b11  b15 |

Every round of AES modifies all 16 bytes of this 4 × 4 matrix at once!


3. The 4 Operations Inside Each AES Round

Before Round 1 starts, AES performs an initial AddRoundKey step (XORing the State Matrix with Key K0).
Then, each standard round of AES (Rounds 1 to 9 in AES-128) executes 4 distinct transformations in sequence:

The 4 Transformations Inside an AES Round
1. SubBytesByte-by-Byte S-Box Substitution
➔
2. ShiftRowsCyclically Shift Rows Left
➔
3. MixColumnsMatrix Math on Each Column
➔
4. AddRoundKeyXOR with 128-bit Round Key

1. SubBytes (Substitute Bytes — Non-Linear Substitution)

  • Each of the 16 bytes in the 4 × 4 State Matrix is independently replaced by looking it up in a fixed 16 × 16 lookup table called the AES S-Box.
  • For example, if a byte is 53 (in hex), the S-Box looks up Row 5, Column 3 and replaces it with ED.
  • Purpose: Provides Confusion (hides the relationship between the Plain Text and Cipher Text).

2. ShiftRows (Row Permutation)

  • The rows of the 4 × 4 State Matrix are cyclically shifted to the Left:
    • Row 0 (1st row): Not shifted at all (0 bytes shift).
    • Row 1 (2nd row): Shifted left by 1 byte.
    • Row 2 (3rd row): Shifted left by 2 bytes.
    • Row 3 (4th row): Shifted left by 3 bytes.
  • Purpose: Spreads bytes across different columns (provides Diffusion).

3. MixColumns (Column Mixing)

  • Each column of 4 bytes is multiplied by a fixed 4 × 4 mathematical matrix in finite field arithmetic (GF(2^8)).
  • As a result, every output byte in a column becomes a combination of all 4 input bytes of that column.
  • ⚠️ Important Exam Note: The Final Round (Round 10 in AES-128) skips the MixColumns step! It only performs SubBytes → ShiftRows → AddRoundKey.

4. AddRoundKey (Key Mixing)

  • The 16 bytes (128 bits) of the State Matrix are simply XORed (⊕) with the 128-bit Round Subkey derived from the main secret key.

4. Comparison: DES vs. AES (100% Exam Favorite!)

This comparison table is one of the most frequently asked questions in DAVV BCA Unit 2:

Parameter DES (Data Encryption Standard) AES (Advanced Encryption Standard)
1. Year Adopted 1977 (Developed by IBM) 2001 (Developed by Daemen & Rijmen)
2. Block Size 64 bits (8 bytes) 128 bits (16 bytes)
3. Key Length 56 bits (effective key from 64-bit input) 128, 192, or 256 bits
4. Design Structure Feistel Cipher Structure (splits block into Left & Right halves) Substitution-Permutation Network (SPN) (encrypts entire 4 × 4 State Matrix in every round)
5. Number of Rounds 16 Rounds (fixed) 10, 12, or 14 Rounds (depending on key length)
6. Round Operations Expansion, Key XOR, 8 S-Boxes, P-Box SubBytes, ShiftRows, MixColumns, AddRoundKey
7. Security Status Broken / Obsolete (56-bit key can be cracked in hours) Extremely Secure (2^128 to 2^256 keys cannot be brute-forced even by supercomputers)
8. Speed Slower in software (designed for 1970s hardware) Very fast in both modern hardware and software

💡 DAVV Exam Preparation Tips

5-Mark / 10-Mark Question: “Explain the AES (Advanced Encryption Standard) algorithm and its round operations. Differentiate between DES and AES.”

  • Draw the AES key/round table (128-bit → 10 rounds, 192-bit → 12 rounds, 256-bit → 14 rounds).
  • Draw the 4 × 4 State Matrix and the 4 Round Operations diagram (SubBytes → ShiftRows → MixColumns → AddRoundKey).
  • Mention that the final round omits MixColumns.
  • Write the 8-point DES vs. AES comparison table.