Section 2.9 Keyword Columnar Ciphers
We started with some interesting mathematical ways to produce monoalphabetic ciphers. Recall that a monoalphabetic cipher is any permutation of the alphabet. While a completely random permutation of the letters is the most secure it is also the hardest to remember. So what are some ideas for how to determine the monoalphabetic permutation? One idea that was used historically is to use a keyword to define the permutation. For example, MATHEMATICS. Eliminating repeated letters we have MATHEICS. We can now use this to define the cipher as follows:
Using the keyword and starting at the beginning of the alphabet isn't such a good technique because so many letters at the end of the alphabet get encrypted as themselves. They aren't very common letters, but still this would make it easier to break. So a better option is to start the alphabet at whatever the last letter of the keyword was. So for the same keyword this technique would define the cipher:
This is better since fewer letters are encrypted as themselves, but there are decent chunks of the alphabet that are just shifts now so that is still a weakness of this system. An even better way to use a keyword is with a keyword columnar transposition to determine the substitution cipher.
We use the columns to determine the substitution:
To encrypt a message we use the table to make the usual assignment between plaintext and ciphertext.
To decrypt a message we have to remember to reverse the process. So we have to find the letter in the CT row to see what PT letter it corresponds to.
The Sage code below will implement a keyword monoalphabetic cipher.
Sage Computation 2.9.6. Keyword Monoalphabetic Cipher.
Time for you to explore keyword monoalphabetic ciphers in Investigation: Keyword Monoalphabetic Ciphers and Using a Crib.