In: Computer Science
Cryptography:
Using columnar cipher, find the plaintext and the key that generated this ciphertext: ykccjosaiawiekhriogrrlrni Keep in mind that only letter j was used for padding. (Show your detailed work)
In Column cipher the plain text will be divided into multiple rows each having the length of the key. If there is any row with length less than key size then it is padded with characters. Then the key is alphabetically order and in that order the columns of plain text are swapped.
Then we get the encrypted text by reading the characters row wise.
Here it is given that j is the only letter used for padding. So definitely it belongs to the last row last element.
Since the ciphertext obtained by reading the characters of plain text columnwise. The letters till j is the last column.
From this we get the last column of that plain text as
y
K
C
C
j
All the rows and columns are equal in columnar cipher. So we divide the cipher into blocks of length 5. So we will get 5 columns
O w. r. r
S . I. i . l
a . e. o . r
I . k. g. n
a . h. r. i
Since we don't know the key . We don't know how these 4 columns are to be ordered . So we can try for trial and error method.
The easy method to try to make a meaningful first word using the first elements of each column in some order.
When we try that we will get the the word worry.
Now order the columns in that order.we will get it as
W. O R .R. Y
I S L. I. K
E . A. R. O C
K I N G .C
H A. I. R . J
That is the plan text is worry is like a rocking chair. The key can be word of length 5 which is having the alpabetic order 32541(the order in which column were sorted) like
CBEDA