Wednesday, October 3, 2007

A Simple Cipher

So, before I give out the actual cipher (which is a simple Caesar shift with a keyword), I think it'd be useful if I gave a tutorial on how a Caesar shift cipher is made. This way, I bet people would probably at least give it a try first before going "wtf?!". :D

The Caesar Cipher is a simple encryption method that scrambles a message by shifting the alphabet in a certain way.

For example, if you want to scramble "the phantom awaits" using the Caesar cipher, you could:
1) write out the alphabet, then the shifted alphabet* below it:
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
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

2) scramble the message according to the shifted alphabet:
"the phantom awaits" --> "YMJ UMFSYTR FBFNYX"

3) to add another degree of difficulty, you can group the words into 5-letter groups**. This way, it's harder to guess a word based on its length. (i.e. in the above example, if I left the message like that, someone could easily guess that "YMJ" = "the"). So the result is:
YMJUM FSYTR FBFNY X

To decipher a Caesar Cipher, one could use frequency analysis. First you note the most frequently occurring letter in the scrambled message, and compare that to the most frequently occurring letter in regular English text (which is "e"). And based on that, you'd be able to figure out what the rest of the scrambled alphabet looks like (if the shift is a simple shift).

The Caesar shift with a keyword***, say, "bigcat" would be something like:
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 I G C A T D E F H J K L M N O P Q R S U V W X Y Z


Now here's one for you to try:

PAOBQ RBNHR OJYBQ NHNOP BQQBQ RBPQU XNTTB PR

(Hint: the keyword is the name of a TV show that's two words)




*you can shift the alphabet how ever you want
**When deciphering, it's best to write out the scrambled message in a line, with no spaces, so that, after scrambling, the message looks like this: "thephantomawaits" instead of "theph antom await s", which can be harder to figure out.
***Note that keywords can't contain duplicate letters.

1 comment:

Unknown said...

****Spoiler Alert****


************************************
christian troy is a narcissistic sex addict