Two Mark Questions
1. Define Stegnography.
- Steganography is a technique for hiding a secret message within a larger one in such a way that others cannot discern the presence or contents of the hidden message.
- While cryptography renders a message unintelligible to outsiders using various text transformations, steganography focuses on concealing the very existence of the message itself.
2. What are the two basic functions used in encryption algorithms?
- All encryption algorithms are fundamentally based on two basic functions (or building blocks) for transforming plaintext into ciphertext
- Substitution: This is a technique in which each element in the plaintext (such as a bit, letter, or group of bits or letters) is uniquely mapped into or replaced by another element.
- Transposition (or Permutation): This is a technique in which the elements in the plaintext are systematically rearranged or transposed in their positions. No elements are added, deleted, or replaced; only their order is changed.
3. List the attacks on Block Ciphers.
- Symmetric block ciphers can be subjected to several types of attacks depending on the information available to the cryptanalyst, the mathematical properties of the algorithm, and the physical implementation of the cipher
- The primary attacks identified in your sources include:
- Brute-Force Attacks (Exhaustive Key Search): The attacker tries every possible key on a piece of ciphertext until an intelligible translation into plaintext is obtained.
- Cryptanalytic Attacks: Cryptanalysis relies on exploiting the mathematical or structural characteristics of the encryption algorithm, sometimes combined with statistical properties of the plaintext or sample plaintext-ciphertext pairs.
4. Write the difference between public key and private key.
- In asymmetric (public-key) cryptography, a user possesses a paired set of mathematically related keys: a public key and a private key.
- These keys perform complementary cryptographic operations,but they differ fundamentally in their accessibility, confidentiality, and specific roles in securing communications:
- Public Key: This key is made publicly available. It is placed in a public register, directory, or other accessible file, allowing any participant in the network to access it
- Private Key: This key must be kept strictly secret. It is generated locally and is known only to the individual owner who created it; it is never distributed over the network
Five Mark Questions
2.A) Explain the Play Fair cipher algorithm? Encrypt the message 'MY BALOON' using the key 'MONACRY'.
The Playfair cipher is a symmetric encryption technique that encrypts pairs of letters (digraphs) instead of individual letters. It uses a 5 × 5 matrix containing the letters of the alphabet (I and J are treated as the same letter).
Encryption Steps:
1. Choose a key and remove duplicate letters.
2. Construct a 5 × 5 matrix:
a. Write the unique letters of the key first.
b. Fill the remaining cells with the unused letters of the alphabet.
c. Combine I and J into one cell.
3. Prepare the plaintext:
a. Remove spaces.
b. Split the message into pairs of letters.
c. If both letters in a pair are the same, insert X between them.
d. If one letter remains at the end, append X.
4. Encrypt each pair using these rules:
a. Same row: Replace each letter with the letter to its right (wrap around if necessary).
b. Same column: Replace each letter with the letter below it (wrap around if necessary).
c. Different row and column: Replace each letter with the letter in the same row but in the column of the other letter (rectangle rule).
Solution:
Key: MONARCHY (assuming "MONACRY" is a typo; the standard Playfair key is "MONARCHY")
Step 1: Construct the Matrix
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
Step 2: Prepare the Plaintext
Plaintext: MY BALLOON
Remove spaces: MYBALLOON
Form digraphs:
MY
BA
LX (insert X because of repeated LL)
LO
ON
Step 3: Encrypt Each Pair
1. MY
M → (1,1)
Y → (2,3)
Rectangle rule:
M → N
Y → C
MY → NC
2. BA
B → (2,4)
A → (1,4)
Same column:
B → I
A → B
BA → IB
3. LX
L → (4,1)
X → (5,4)
Rectangle rule:
L → S
X → U
LX → SU
4. LO
L → (4,1)
O → (1,2)
Rectangle rule:
L → P
O → M
LO → PM
5. ON
O → (1,2)
N → (1,3)
Same row:
O → N
N → A
ON → NA
Ciphertext
NC IB SU PM NA
Final Ciphertext: NCIBSUPMNA
2.B) Define Monoalphabetic Cipher. What is the difference between monoalphabetic cipher and a polyalphabetic cipher?
3.A) Explain the Hill cipher. Consider the plaintext “paymoremoney” and use the encryption key K given below to find the cipher text:
3.B) Discuss any four substitution techniques of encryption and list their merits and demerits.
4.A) Compare and contrast stream ciphers and block ciphers.