## The Caeser Cipher

• ```The Caeser Cipher
----------------

History:
One of the first ciphers ever created was the Caeser cipher, so named because Juilius Caeser was the creator of it. He used it to encrypt his messages to his generals so that spys and the enemy would not be able to read it. They were however mostly iliterate which fortunatly for caeser allowed his messages to go about unciphered. A caeser cipher is an extremely basic form of encryption and extremely easy to break, therefore it is not really used today for any serious puposes. Childrens toys and prehaps "joke spoilers" might incorporate it - this is called a ROT13 cypher, and shifts 13 to the right usually, hence the name. There has also been reports that lovers have left messages in newspapers for each other using this cypher :P lol. Caeser used a shift of 3, and what that means will be explained below.

How it works:
Basically, a Caeser Cipher is the re-arranging of the alphabet. Different shift values can be used to create different message encodings. The number of shifts is as it sounds, the number of letters shifted across (right or left) to create the encrypted message. Here is a practical example using a shift of 5 to the right.

English:  I love hairy monkeys
Encripted: N qtaj mfnwd rtspjdx

Shifting the alphabet was like this:

normal:   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
shift(5): F G H I J K L M N O P Q R S T U V W X Y Z A B C D E

The message above can be easily decrypted by brute-forcing - trying every combination of letters until one finally makes sense.

More complicated cyphers have been created on this principle such as The Vigenere Cipher or the The Gronsfeld Cipher but they all basically have the same idea in mind.

Now, decyphering this by hand can be a royal pain in the ass as there are 26 different combinations and things could be more complicated - such as each letter acts as value changing the shift pattern.

e.g

english: HELLO
encrypted: PJXXD

In this case, "H" has a numberic value of 8, so the shift is 8 letters to the right. Next is "E" with a numberic value of 5 resulting in 5 shifts to the right, and "L" having the numberic value of 12 etc etc. This could be a real pain to try decypher, and letting a computer do it wouldnt be too helpful either because a computer cant really read english, so  it would now know if it were to stumble on the answer. Another method used which is more successful and time efficient is using frequency analysis to break the code. Frequency analysis takes the frequency in which characters appear and compare them to a grid of approximate values for the appearance of letters in 1000 lines of english text. The English languages fequencey grid is:

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
73 9 30	44 130 28 16 35	74 2 3 35 25 78	74 27 3	77 63 93 27 13 16 5 19 1

using this grid and comparing it to the grid you made from the encrypted text, it is more visible which letters correspond to the correct one.

eg.

K DKVO DYVN LI KX SNSYD, PEVV YP CYEXN KXN PEBI, CSQXSPISXQ XYDRSXQ

The frequency grid below corresponds to the appearances of letters in the encrypted text:

K L M N	O P Q R	S T U V	W X Y Z	A B C D	E F G H	I J
4 1 0 4	1 4 3 1	6 0 0 4	0 7 4 0	0 1 2 4	3 0 0 0	3 0

A TALE TOLD BY AN IDIOT, FULL OF SOUND AND FURY, SIGNIFIYING NOTHING

Thats it for this tutorial. Good luck!

Invas10n - ask the experienced, not the learned```