CNS-PPT Batch-1
CNS-PPT Batch-1
NETWORK SECURITY
Batch-01
221FA04337-B.Pooja
221FA04473 –B.Bindu
221FA04585 – G.Sai
221FA04671-T.Akash
Abstract
a) Summarize the main steps in the AES encryption process and the generation of round
keys.
b) Decrypt the ciphertext "A1B2C3D4" using AES with a given key, explaining each step.
iii. F function
iv. Permutation P
d)Assess AES's effectiveness for encrypting large data volumes and implement a hybrid
encryption method with AES to encrypt "COMPUTER SCIENCE," providing the cipher
text.
Answer
a) AES Encryption Process:-
AES works in multiple rounds
key size Rounds
128 10
192 12
256 14
Step 1: Convert the Plaintext into a State Matrix
The input text (16 bytes) is arranged in a 4x4 grid called the state matrix.
Each byte in this matrix will go through transformations in the encryption
process.
The initial key is added to the state matrix using the XOR operation (a
bitwise operation that flips bits when they are different).
This step mixes the original data with the key.
221FA04473
Step 3: SubBytes (Byte Substitution using S-Box)
Each byte in the state matrix is replaced using a predefined lookup table called the S-Box.
This makes the data more complex and resistant to attacks.
The original key (128-bit, 192-bit, or 256-bit) is split into 4-byte words.
2.Generate New Words:
Every 4th word undergoes a transformation called g():
Rotate Left (Shift bytes left).
Substitute Bytes (Using S-Box).
XOR with Round Constant (Rcon).
3.Compute New Words:
Other words are generated using XOR:
W[i] = W[i-4] ⊕ g(W[i-1]) (for every 4th word).
W[i] = W[i-4] ⊕ W[i-1] (for others).
4.Continue Until All Round Keys Are Generated:
AES-128: 44 words (11 round keys)
AES-192: 52 words (13 round keys)
AES-256: 60 words (15 round keys)
1. Ciphertext to State Matrix
Convert the ciphertext to a 4x4 column-major state matrix
A1 A1 A1 A1
B2 B2 B2 B2
C3 C3 C3 C3
D4 D4 D4 D4
2. AddRoundKey
XOR the state with the first round key(same as the key in ECB mode):
2B 28 AB 09
7E AE F7 CF
15 D2 15 4F
16 A6 88 3C
XOR Result:
A1 ⊕ 2B = DA | A1 ⊕ 28 = D9 | A1 ⊕ AB = 5A | A1 ⊕ 09 = F8
B2 ⊕ 7E = CC | B2 ⊕ AE = 1C | B2 ⊕ F7 = 45 | B2 ⊕ CF = 7D
C3 ⊕ 15 = D6 | C3 ⊕ D2 = 11 | C3 ⊕ 15 = D6 | C3 ⊕ 4F = 8C
D4 ⊕ 16 = C2 | D4 ⊕ A6 = 72 | D4 ⊕ 88 = 5C | D4 ⊕ 3C = E8
DA D9 5A F8
CC 1C 45 7D
D6 11 D6 8C
C2 72 5C E8
5. InvMixColumns
A7 63 2B 7F
9D 47 99 1F
2E 8D 2B 4C
2B 1F 4C 7F
Final Plaintext:-
A7632B7F9D47991F2E8D2B4C2B1F4C7F
C)Difference between AES and DES
Not applicable – AES does not have an "f The subkey is XORed with the expanded right
function" like DES. Instead, it uses the half of the block before being processed by the
AddRoundKey step, where the state matrix is S-boxes in the f function.
XORed with the round key
Not applicable – AES does not use Feistel The output of the f function is XORed with the
structure; instead, it applies transformations left half of the block in each Feistel round.
directly to the state matrix.
AES does not have an f function. Instead, it uses The f function in DES consists of Expansion (E),
SubBytes, ShiftRows, MixColumns, and Key Mixing (XOR with subkey), S-Box
AddRoundKey. substitution, and Permutation P.
AES uses a ShiftRows transformation, which DES applies Permutation P after the S-Box
shifts bytes in a specific pattern, but it does not substitution in the f function
have a dedicated Permutation P step like DES.
No swapping of halves occurs in AES. The entire Swapping of halves occurs after each round
128-bit state matrix is transformed directly. except the final round in DES.
D)Hybrid Encryption Implementation (AES + RSA):
Hybrid encryption combines AES (symmetric) for data encryption and RSA (asymmetric) for
key exchange. Below is a conceptual implementation to encrypt "COMPUTER SCIENCE“
000102030405060708090A0B0C0D0E0F