0% found this document useful (0 votes)
6 views15 pages

CNS-PPT Batch-1

The document discusses the Advanced Encryption Standard (AES), a symmetric encryption algorithm developed by NIST in 2001, which enhances security and efficiency over the older DES algorithm. It outlines the AES encryption process, including key expansion, encryption rounds, and a comparison with DES, highlighting AES's robustness in securing digital data. Additionally, it demonstrates a hybrid encryption method combining AES and RSA to encrypt the phrase 'COMPUTER SCIENCE.'

Uploaded by

poojaboppana99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views15 pages

CNS-PPT Batch-1

The document discusses the Advanced Encryption Standard (AES), a symmetric encryption algorithm developed by NIST in 2001, which enhances security and efficiency over the older DES algorithm. It outlines the AES encryption process, including key expansion, encryption rounds, and a comparison with DES, highlighting AES's robustness in securing digital data. Additionally, it demonstrates a hybrid encryption method combining AES and RSA to encrypt the phrase 'COMPUTER SCIENCE.'

Uploaded by

poojaboppana99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

CRYPTOGRAPHY AND

NETWORK SECURITY

Batch-01

221FA04337-B.Pooja
221FA04473 –B.Bindu
221FA04585 – G.Sai
221FA04671-T.Akash
Abstract

The Advanced Encryption Standard (AES) is a symmetric encryption


algorithm used for securing digital data. Developed by NIST in 2001,
AES replaces the older DES algorithm due to its enhanced security and
efficiency. It operates on 128-bit data blocks and supports key lengths
of 128, 192, and 256 bits. AES is widely used in applications such as
secure communications, file encryption, and financial transactions due
to its strong resistance against cryptographic attacks.
Introduction

In the digital age, securing sensitive data is crucial. The Advanced


Encryption Standard (AES) is a widely adopted encryption algorithm
designed to protect information from unauthorized access. AES is a
block cipher that encrypts and decrypts data in fixed-size blocks of 128
bits using a symmetric key. It supports key sizes of 128, 192, or 256 bits,
making it highly secure against brute-force attacks. Due to its
robustness, AES is widely implemented in areas such as secure internet
transactions (TLS/SSL), encrypted messaging, VPNs, and disk
encryption.
Question

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.

c) Compare AES to DES for the following:

i. XOR of subkey material with the input to the f function


ii. XOR of the f function output with the left half of the block

iii. F function

iv. Permutation P

v. Swapping of halves of the block

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.

Step 2: AddRoundKey (First Round Key Addition)

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.

Step 4: ShiftRows (Row Shifting in the Matrix)


Each row in the matrix is shifted to the left by a certain number of positions:
1st row: No shift
2nd row: Shift left by 1 position
3rd row: Shift left by 2 positions
4th row: Shift left by 3 positions

Step 5: MixColumns (Column Mixing)


Each column in the state matrix is transformed using mathematical operations to mix the data
further.
This makes it harder to figure out the original data.
(Note: This step is not used in the final round.)
Continue this steps until last round
Step 8: Final Round (No MixColumns Step)
The last round does not include MixColumns but includes:
1)SubBytes
2)ShiftRows
3)AddRoundKey

Step 9: Ciphertext is Ready


After the final round, the state matrix is converted back into a 16-byte block,
which is the encrypted data (ciphertext).
B)
AES Round Key Generation (Key Expansion) – Short Summary
1.Divide the Key:

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

Multiply each column by the inverse MixColumns matrix in GF(2⁸):


Example for Column 0

3D, 4C, 9D, 4F → A7, 9D, 2E, 2B (after GF operations).

Final State After 1 Round:

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

AES (Advanced Encryption Standard) DES (Data Encryption Standard)

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“

Step 1: Generate AES Key

000102030405060708090A0B0C0D0E0F

Step 2: Encrypt Plaintext with AES

Plaintext: "COMPUTER SCIENCE"


434F4D505554455220534349454E43( ASCII)
Ciphertext :
C1A8F1A2B3C4D5E6F7A8B9C0D1E2F3A

Step 3: Encrypt AES Key with RSA


Encrypted AES Key :2B7E151628AED2A6ABF7158809CF4F3C
Conclusion

We summarized the AES encryption process, covering key


expansion, encryption rounds, and decryption. We compared AES to
DES, focusing on operations like XOR, the F-function, and
permutations. We also demonstrated AES's effectiveness for
encrypting large data and implemented a hybrid encryption method
for the phrase "COMPUTER SCIENCE." AES proves to be secure
and efficient for large data encryption.

You might also like