ROT13 is a Caesar cipher, a type of substitution cipher. In ROT13, the alphabet is rotated 13 steps.Bust of Julius Ceasar

The Caesar or Shift Cipher

In cryptography, a Caesar cipher, also known the shift cipher, or Caesar shift, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 3, A would be replaced by D, B would become E, and so on. The method is named after Julius Caesar, who used it to communicate with his generals (wikipedia)


In the example on the left the 26 letters of the alphabet are shifted by 13 letters.  The interactive demonstration below includes the 94 available ASCII characters. The first ASCII character " " (i.e. the space)  has an ASCII value of 32. The final ASCII character "~" has an ASCII value of 125.


Execute an encryption by typing in a plain text message, an integer key, and clicking the "Encrypt" button.  The arithmetic to execute the shift is performed in mod 94, so any integer from 1 to 93 will do. In mod 94, 94=0, 95=1, etc. You can decrypt the message by cutting and pasting the result into the plain text box and entering the negative of the original key. Now you may use this page to send secret messages to your friends  and colleagues.


Enter Plain Text:        Enter Key:     


Below are histograms of the two sets of ASCII code.  From these, the weakness of the Caesar Cipher is quickly ascertained.  In a typical message, the space (ASCII code 32) occurs most often.  By comparing the peaks in the two histograms, one can quickly determine the key.  Besides the shift, the two histograms are identical.


 Plain Text ASCII Histogram

Encrypted Text ASCII Histogram


Based on the above description, cut and paste the encrypted text below into the plain text box.  Guess a key.  From the resulting histograms, can you ascertain the actual key and decrypt the message.  If you get it, let me know at F9>35F:p=C>^3?= (this is my email encrypted using the same key used to encrypt the message below).  Good Luck!!


Hit Counter