Assignment #2 Total marks:100
Due Date: 27th April (In Class)
Note: There will be a quiz (50%) in the class on the day of
submission and the other 50% will be from submission.
Question#1 (20 Marks)
1. Write a C/C++ code that can encrypt and decrypt using a 2 * 2 Hill cipher
2. Differentiate between secret-key encryption and public-key encryption.
3. What is the difference between a block cipher and a stream cipher?
4. What are the two general approaches to attacking a cipher?
5. What is a transposition cipher?
6. Briefly define the terms substitution and permutation?
7. What is confusion and diffusion in DES and how this can be achieved?
8. Show that DES decryption is, in fact, the inverse of DES encryption?
9. Write all relative prime numbers in mod55?
10.Find the multiplicative inverse of at least five elements in mod 87?
11.Determine the inverse mod 26 of the given matrix?
Question#2 (15 Marks)
Question#3 (10 Marks)
Encrypt the message by using the Rail Fence transposition cipher with the
secret is the last digit of your registration number except(0 and 1: if 0 or 1
then move to next digit greater than 1)
e.g
I. L1F14BSSE0123 so secret is 3
II. L1F14BSSE0321 so secret is 2
Plaintext: “Symmetric encryption also referred to as conventional encryption
or single-key encryption, was the only type of encryption in use prior to the
development of public key”
Question#4 (10 Marks)
Encrypt the given message by using the columnar transposition cipher with
the key “5341276”
Plaintext: Symmetric encryption also referred to as conventional
encryption or single key
Question#5 (10 Marks)
Encrypt the message first with key1 ”7136254” and then the obtained
ciphertext will again be encrypted with key2:6251347
Plaintext: Symmetric encryption also referred to as conventional
encryption or single key
Can you get back the plaintext from the ciphertext? If yes then write the
procedure and if no then write the reason?
Question#6 (10 Marks)
Hill cipher encryption and decryption pairs are
Plaintext: Cryptography
Ciphertext: odynhxafebrj
find the key matrix which is used for encryption?
Question#7 (25 Marks)
What is the output if the input Plaintext: “CRYPTOGR” (Ascii All capital) is
passed through the given diagram?
Note: Use all standard tables given in the book