Vidyalelo
Data Structure · Q307

Miscellaneous on Data Structures

Programming · Data Structure · question 307

Q307

What will be the plain text corresponding to cipher text "IWRWHS" if running key cipher is used with keyword as "DATASTRUCTURE"?

A.
EVYVOY
Answer
B.
ETXSOX
C.
EXWZOY
D.
EYYVOY

Answer: Option A

Solution

Answer: Option A
Solution:
Running Key Cipher is a polyalphabetic substitution cipher where the ciphered text is combined with a keyword to retrieve the plaintext. The keyword is often as long as or longer than the ciphered text.

Given:
Ciphered Text: "IWRWHS"
Keyword: "DATASTRUCTURE"

Step 1: Convert each letter of the ciphered text and keyword to its corresponding position in the alphabet:
I = 9, W = 23, R = 18, W = 23, H = 8, S = 19
D = 4, A = 1, T = 20, A = 1, S = 19, T = 20

Step 2: Subtract the position of the keyword letter from the ciphered text letter position:
(9 - 4), (23 - 1), (18 - 20), (23 - 1), (8 - 19), (19 - 20)
= 5, 22, -2, 22, -11, -1

Step 3: If the result is negative, add 26 to get the position within the alphabet:
5, 22, 24 (because -2 + 26 = 24), 22, 15 (because -11 + 26 = 15), 25 (because -1 + 26 = 25)

Step 4: Convert these positions back to letters:
5 = E, 22 = V, 24 = Y, 22 = V, 15 = O, 25 = Y

Plain Text:
The final plain text is "EVYVOY".

Conclusion:
The newly created option that corresponds to the plain text is:
Option A: EVYVOY