# Caesar Cipher – Introduction

In 2006, the Mafia boss for the whole of the island of Sicily was on the run. In fact, he had been in hiding for over 40 years, having been linked to a murder back in 1963. The only photographs that the authorities possessed of him dated from the 1950's, and although he was tried and convicted for many murders in his absence, they were no closer to catching him. In fact, they were not even sure that he was alive. But then in 2005, whilst arresting other members of the mafia, they came across some coded notes which turned out to have been written using a form of the Caesar cipher. The authorities could not believe their luck because, when it comes to cryptography, a Caesar cipher is incredibly easy to crack. The fact that Julius Caesar used it over two thousand years ago, long before computers or even the serious development of mathematics, tells you much about its simplicity. Using a Caesar cipher to disguise your messages today is about as useful as writing your message in huge letters on the wall of a building.

#### How does the Caesar cipher work?

It takes a letter in the original message and then jumps a fixed number of letters forward in the alphabet. Let us assume that the 'jump' size is 3: an 'A' in the original message would become a 'D', a 'G' would become a 'J' and so on. When you were near the end of the alphabet, you need to wrap back round to the start. So a 'Y', for example, jumps over 'Z' then 'A' to be written down as a 'B'.

According to the Roman historian Suetonius, Caesar always shifted each letter three places in the alphabet. But other shift sizes are possible. His nephew, Caesar Augustus, just shifted one space each time.

In fact, there are as many possible shifts as there are letters in the alphabet being used. So, at the time of Caesar, the classical Latin alphabet had 23 letters: there were no J's, U's or W's. This meant that there were 23 possible shifts that could be used.

One of those 23 shifts was pointless, because it would leave the original alphabet unchanged. You can see that in this table: a shift of zero obviously leaves the original alphabet unchanged:

A shift of 23, the whole size of the classical Latin alphabet, would also leave us back where we had started. Both of these are still theoretically possible shifts but, if referring to the full set of '23' possible shifts for the classical Latin alphabet, then it is the first of these (shift size 0) that is included. When we start to look at the maths behind cryptography in more detail, we will see that it is very useful to start counting your shift sizes from zero, rather than from 1.

In modern English, of course, there are 26 letters in the alphabet, so here are all the possible shifts for modern English. Notice that by including the shift size of 0, I only need to go up to 25 to show all of the possible 26 shifts.

Swedish has 29 letters, so that means 29 shifts. For the Affine cipher, by the way, having 29 letters makes Swedish a better option than English.

But even having 29 shifts is nowhere near enough. If the person you are trying to hide your message from knows that you are using a Caesar cipher, it would not take them long to try out the 29 different options to discover your message, and that is if they are not using a computer. A computer can work out the 26 or 29 or whatever number of options just about instantly.

Cipher Challenge competition    Leave feedback