Another version of the columnar transposition cipher is the cipher using a key word. In this cipher, we encrypt as follows: Given a key word, we remove all the duplicate characters in the key word. For example, if the key word is ‘SECRET’, we remove the second ‘E’ and use ‘SECRT’ as the key word. To encrypt, we form a table as follows: In the first row, we write down the key word. In the following rows, we write the plaintext. Suppose we want to encrypt the text ‘ATTACKATDAWN’. We make a table as follows:
| S | E | C | R | T |
| A | T | T | A | C |
| K | A | T | D | A |
| W | N | X | X | X |
Then we read off the columns in alphabetical order. We first read the column under ‘C’, followed by the columns under ‘E’, ‘R’, ‘S’ and ‘T’. We get the cipher text TTX TAN ADX AKW CAX. To decrypt, we reverse the process. Note that, since we know the length of the keyword, we can find the length of the columns by dividing the length of the message by the length of the keyword.
Given the ciphertext ‘HNDWUEOESSRORUTXLARFASUXTINOOGFNEGASTORX’ and the key word ‘LANCE’, find the plaintext.
The given ciphertext is: ``` HNDWUEOESSRORUTXLARFASUXTINOOGFNEGASTORX ``` The key word is LANCE. First, remove duplicates (none here), so the key remains LANCE. Step 1: Determine the column order Alphabetically, the letters in the key LANCE are: ``` A C E L N ``` So the column order is: 1. A → 2nd column 2. C → 3rd column 3. E → 5th column 4. L → 1st column 5. N → 4th column Step 2: Determine column lengths Ciphertext length = 42 Keyword length = 5 Rows = ceil(42 / 5) = 9 (since 5 × 8 = 40 < 42, so we need 9 rows) So the table has 9 rows × 5 columns = 45 cells. Ciphertext has 42 letters, so last 3 cells are padding (X or empty). Step 3: Determine number of letters per column Columns corresponding to the alphabetical order: * Columns A, C, E, L, N → assign letters evenly from ciphertext. Let’s distribute 42 letters into 5 columns: 42 ÷ 5 = 8 full letters each + 2 extra letters in the first 2 columns. So columns length: * Column A → 9 letters * Column C → ____ ______ ______ _________ _____ _____ ________ _____.
_____ ___ _____ ____ _____ ____ ___.
__________ ________ _______ ___ __________ ___ ________ __________ ________ ___.
__________ ___ _________ _______ _________ ____ ____ ___ _________ ______ ________.
______ _____ __________ ______ _____ ______.
________ ______ ______ ____ _______ __________ __________.
______ ______ ______ ________ __________ ____.
__________ ___ _____ __________ _______.
________ _____ _____ _____ _________ _____ ___ _____ ___ ____ ______ _________.
_____ _________ ___ ________ ____ ________ ______ _______ _______ ______.
___ _________ ______ _______ ______ _________ _______.
_____ ____ ________ ____ __________ _______ ______ ________.
_______ _____ ___ __________ ______ ______ ____ ________.
__________ _________ _________ _______ ______ ________.
______ ___ _________ ___ _______ ______ ________ _____ _________ ___.
______ __________ ___ ____ _________ ______ _____ _____.
_____ _____ ___ __________ ______.
_________ _____ ______ ____ _____ ____ _________ ________.
_____ ___ ____ ___ _____.
___ __________ _____ ______ _____ ___.
___ ________ ___ ________ ________ _________ ______ _________.
______ _______ _______ ________ ______ _____ _________.
_______ ______ ___ ____ _______ ___ ___ ___ ____ ____ _________ __________.
________ ________ _____ _____ ________.
____ ___ ________ _______ ____.
______ ____ _______ _________ _______ ______ ________ _______ _____.
________ _______ __________ ________ ________ _________ _________ ______ _____ _________ ____.
____ _____ ______ ___ ______.
__________ _______ __________ ____ ___ ______ _______ _______ ___ ________ _________ ____.
_____ _________ __________ ___ ___ __________ ____ ________ ______.
____ _____ _________ _____ _____ __________ ________ __________.
______ ____ _________ ________ _________ ______ ________.
____ ___ ______ _________ ____ ____ ________ ____ __________ _______ __________ _______.
________ _________ _________ __________ ________ _______.
__________ __________ __________ _________ __________ _______ ___ _______ ________ __________ _______ ____.
_________ _______ _________ ______ __________.
________ ____ ____ ___ ______ _____ ____ ___ _______ __________ ____ ________.
________ ______ ___ _______ ___ __________ _________ _________ ______ ______ _______ __________.
_________ ___ ______ __________ _______ ________ ___ ___ ___.
_______ _______ ____ ________ _____.
___ _____ _______ _____ _________ ________ _______ ___.
_____ ____ ________ __________ _________ ________ _______ _____ __________ _____ ___.
_______ ________ ________ __________ ___ __________ _________ ______ ______.
______ _______ ____ ___ _________ ________ ______ ___.
_____ _____ ________ ____ ____ _________ _________ ________ __________.
______ _______ ______ ________ _____ ___ _________ _______ _____ ________.
________ __________ ___ _________ __________.
__________ __________ ____ ______ ______ ___ ____ _________ ______ _______ __________.
____ _________ ___ ____ ______ ___ ______ _____ ________ ______ ______.
__________ _________ ____ ________ ________ _________.
______ _________ ___ ________ _____ _________ _____ _____ ___ ___ ___ ____.
_________ ___ __________ __________ __________ ____ ________ _____.
___ _______ ____ _______ _______ _______ ________ ____ ____ ____ ________ ____.
_________ _________ _____ _____ __________ _________ __________.
_____ __________ _____ __________ _______ ____ ____ ___ _______ _____.
_____ ________ ________ _____ ___ _____ ________ _______.
_________ ______ ______ _______ ____ ____.
_________ ________ _________ _________ ___ __________ ______ ___ ________ ________.
______ __________ __________ ____ _______ _______ _______ ________.
__________ _____ _________ _______ ________ _______.
______ ______ ____ ______ ______ _____ ___ _________ __________ ___.
_________ _________ _________ ____ _____ __________.
___ ______ ___ ___ ________ ___ ________ ________ ________ __________.
_________ ______ ___ _______ _______ __________.
_________ ______ ______ ____ _____ ___ ________.
_______ __________ ________ _______ _______ _________ _______ ___.
_________ ____ __________ _____ __________ ________ ___ ____ _______ __________.
_____ ___ _____ ____ ___ __________ ____.
__________ _______ _______ ______ _______ ___ ___ ___ ___.
_________ ________ ________ __________ _______ ___ ___ _________ _________ _______ ___ _________.
______ ____ ________ _____.
Get Full Answer on WhatsApp