# Caesar Cipher

The simplest cipher (and one of the oldest) the Caesar shift is named after Julius Caesar.

The month of July is named after Julius, and he also has his own salad, his own method of having been delivered as a baby (which makes no sense as his mother and the surgeons deserve credit before him) and now — if you want the complete set — here is the code as well!

Before explaining the dazzling mechanisms of the Caesar-Cipher, we need to define a few terms.

Code-making — the exquisite art of turning some meaningful piece of information — into code — is known as "encoding" — and turning it back into the original is called "decoding". Both of these are types of translation, but in the case of "decoding" we are translating from a "Cipher Text" and in the case of encoding we are translating from a source that we can refer to as the "plain text". The art of encoding and decoding is more broadly called "cryptography".

Now the sneaky counterpart to "cryptography" — the art of decoding without any help from the people who did the original encoding — this parallel branch of study - that overlaps with and yet is somehow distinct from "cryptography" — this is called "cryptanalysis". Another name for it (or for one activity or goal within this field) is "code breaking".

In reality a student of one is also a student of the other. A cryptographer must also be versed in cryptanalysis and vice versa. They differ in their goals and the way that their knowledge is applied, and someone can be one, the other, or both, sometimes on the same afternoon.

But before we stop we need to define exactly what this "Caesar Cipher" chap is all about.

Here is a brief rundown.

You take your plain text message, e.g.

We attack at dawn!

And go through each letter of the message, replacing it with a different letter, according to this very clever translation table....

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

Okay, let's do this. "We attack at dawn!" The first letter is 'W'. Let's look in our translation table.

 `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M` `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `↓` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M` `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z` `A`
```Tb xqqxzh xq axtk!
```
```We attack at dawn!
```