𝐒𝐢𝐦𝐩𝐥𝐞 𝐒𝐮𝐛𝐬𝐭𝐢𝐭𝐮𝐭𝐢𝐨𝐧 𝐂𝐢𝐩𝐡𝐞𝐫

51 0 0
                                    

Here is a quick example of the encryption and decryption steps involved with the simple substitution cipher. The text we will encrypt is 'defend the east wall of the castle'.

Keys for the simple substitution cipher usually consist of 26 letters (compared to the caeser cipher's single number). An example key is:

plain alphabet : abcdefghijklmnopqrst­uvwxyz

cipher alphabet: phqgiumeaylnofdxjkrc­vstzwb

An example encryption using the above key:

plaintext : defend the east wall 
of the castle

ciphertext: giuifg cei iprc tpnn du cei qprcni

It is easy to see how each character in the plaintext is replaced with the corresponding letter in the cipher alphabet. Decryption is just as easy, by going from the cipher alphabet back to the plain alphabet. When generating keys it is popular to use a key word, e.g. 'zebra' to generate it, since it is much easier to remember a key word compared to a random jumble of 26 characters. Using the keyword 'zebra', the key would become:

cipher alphabet: zebracdfghijklmnopqs­tuvwxy

This key is then used identically to the example above. If your key word has repeated characters e.g. 'mammoth', be careful not to include the repeated characters in the cipher alphabet.


~~~CTTRO

𝐂𝐨𝐝𝐞𝐬 𝐚𝐧𝐝 𝐂𝐢𝐩𝐡𝐞𝐫𝐬Where stories live. Discover now