Simple Substitution Cipher
Substitution Ciphers is a method of encryption that has been in use for hundreds of years. To encrypt a message so no one else can read it you change every letter in your message for a different letter.
Here is an example of how encrypt a message using a Substitution Cypher. The text we are encryptiing 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 : abcdefghijklmnopqrstuvwxyz cipher alphabet: phqgiumeaylnofdxjkrcvstzwb
An example encryption using the above key ...
plaintext : defend the east wall of the castle ciphertext: giuifg cei iprc tpnn du cei qprcni
You can see that a letter from your original message is replaced by another letter.
Decrypting the message is just as easy! You just need to replace the cypher character with the plaintext character.
Have a Go