The Caesar Shift

The Caesar Cipher is one of the simplest monoalphabetic substitutions one may use, and it's also one of the easiest to break.

It is said that Julius Caesar wrote to his friends using a simple substitution cipher, where the plaintext letter was replaced by the ciphertext three places down the alphabet, so that the letter M is replaced by P and so on.

The Caesar cipher may be summarised in a table, shown below. It is now the case that any cipher whose cipher alphabet consists of the letters in their normal order is called a Caesar cipher.

```PLAINTEXT   a b c d e f g h i j k l m
CIPHERTEXT  D E F G H I J K L M N O P
PLAINTEXT   n o p q r s t u v w x y z
CIPHERTEXT  Q R S T U V W X Y Z A B C
```

As there are only 26 Caesar alphabets it is trivial to solve a caesar cipher by exhaustive search. This is can be done by listing the alphabet under each letter of a section of the ciphertext. The line which contains legible plaintext is the correct one.

``` CIPHER:  K H P G Y H Q C N F I L H O X K M A X..
=====================================
L I Q H Z I R D O G J M I P Y L N B Y
M J R I A J S E P H K N J Q Z M O C Z
N K S J B K T F Q I L O K R A N P D A
O L T K C L U G R J M P L S B O Q E B
P M U L D M V H S K N Q M T C P R F C
Q N V M E N W I T L O R N U D Q S G D
SOLUTION: R O W N F O X J U M P S O V E R T H E
S P X O G P Y K V N Q T P W . S U I F
T Q Y P H Q Z L W O R U Q X . T   J G
U . . Q I R K M X P S V R Y .     .
V . . R J S L N Y Q T . S . .     .
. . . S K T M O Z R U . . .
. . . .   U N P A S V .   .
. .   .   V O Q B T . .   .
. .       W P R     . .
.       X Q S       .
.       Y   T
Z
```

To save time a series of strips could be prepared. Each with 52 letters, the letters would be in alphabetical order twice over. The strips would be aligned so that the ciphertext read in one position. They would then be scanned to reveal the plaintext.

If you use usenet you may very well may see a caesar cipher used as "spoiler protection". That cipher is called ROT13, so called because it 'rotates' the alphabet by 13 places, i.e. A becomes N, B becomes O, etc. If ROT 13 is applied twice then the plaintext is obtained again. Your newsreader may well have a ROT13 function.

The next section has some text coded with ROT13, try to decode it before you move on.

Guvf obl gung fubhyq or zlfrys nsgre zr
Jbhyq or zlfrys orsber zr, naq va urng
Bs gung nzovgvba oybbqvyl ehfurq va
Vagraqvat gb qrcbfr zr va zl orq.

(Gur Qhxr - Npg VV Fprar vvv - Gur Eriratref Gentrql)

For your assistance I include the relevant substitution table.

```
PLAINTEXT   a b c d e f g h i j k l m
CIPHERTEXT  N O P Q R S T U V W X Y Z
PLAINTEXT   n o p q r s t u v w x y z
CIPHERTEXT  A B C D E F G H I J K L M
```

Did you manage to decode it?

The text was, of course(!) from the Play "The Revenger's Tragedy", it is the part where the Duke's son, upon being tricked by Vindice into believing that his mother was having an affair, decided to have vengeance upon the adulterer, only to discover that it was the Duke himself in bed with her!

"This boy that should be myself after me
"Would be myself before me, and in heat
"Of that ambition bloodily rushed in
"Intending to depose me in my bed."

(The Duke - Act II Scene iii - The Revengers Tragedy)

Now you've mastered that simplest of ciphers you're now equipped to move on to more complex substitutions.