Caesar Ciphers

A Caesar cipher, named after the Roman general Julius Caesar, for the English alphabet can be implemented by picking any number between 1 and 25, as well as a direction (left or right). The number plus the direction are combined and used as an extremely primitive and weak symmetric key. Once the key is determined, we can encrypt any English message by shifting every character in the message by the value of the key.

Example

Say that we decide to use a key of 6-right, and wish to encrypt the message Zettelkasten.
Then we would get the cyphertext Ejyyjqpfxyjs.

To decrypt the message, we would simply apply the key in the opposite direction, shifting every character of the ciphertext backward by 6.

Caesar-ciphers keys like this one are often identified with the "ROT" prefix, because they rotate each letter by N places in the alphabet. ROT13 is a particularly popular cipher since the English alphabet is composed of 26 letters. Since 13 is halfway through 26, we no longer need to care about the direction of the cipher: shifting a character either forward or backward will produce the same output. Therefore, both encryption and decryption can be done by shifting in either direction.


Relevant Note(s): Symmetric-Key Encryption