Assignment 2
Assignment 2
Assignment # 2
Course Teacher: Miss Shagufta Iftikhar
Date Given: Feb. 28, 2025 Deadline for Submission: Mar. 7, 2025
Instructions:
This assignment is to be solved by hand in your own handwriting. Use blue or black ink pen or
ballpoint pen to solve your assignment.
Use of any other color ballpoint or ink pen, or lead pencil is prohibited.
The assignment must have a title page containing (a) Course code (b) Course title (c) Your
registration number (d) Your name (e) Assignment number.
The assignment must be submitted at the start of class on the due date. Late submitted assignments
will not be accepted.
Avoid copying your assignment, copied assignments will be awarded zero marks.
Q1. Compare the following ciphers by providing a detailed explanation of how each cipher
works, and list their strengths, and vulnerabilities.
1. Substitution Ciphers:
Monoalphabetic Ciphers (Single alphabet substitution)
Caesar Cipher
ROT13
Affine Cipher
Polyalphabetic Ciphers (Multiple alphabets substitution)
Vigenère Cipher
One-Time Pad (OTP)
2. Transposition Ciphers:
Rail Fence Cipher
Columnar Transposition Cipher
3. Product Ciphers:
Rotor Machines (e.g., Enigma Machine)
Q2. List all above encryption algorithms where frequency analysis can be used effectively
and explain why it works for each. Also, mention any encryption algorithms where
frequency analysis is ineffective and justify your answer.