## Step 2: Playfair Cipher

The playfair cipher was used extensively in the Boer war and WWI. To my knowledge, it is one of the easiest poly alphabetic ciphers there is. It does not need any props or long tables to use like some ciphers - just a knowledge of the keyword and a 5x5 grid.

1. To start, pick a keyword that has no repeating letters. This example will use the word "codes."

2. Next, take the plaintext message (the message you want to encode) and split it into pairs of letters. If there is an odd number of letters, add an X to the end. If there are two of the same letter paired up, split them up by inserting an X. This is shown in the example "Tonight is not possible":
Plaintext: TONIGHT IS NOT POSSIBLE
Split into pairs: TO NI GH TI SN OT PO SX SI BL EX

3. Next, draw a 5x5 grid, and fill in the first boxes with your keyword. Then, fill in the rest of the boxes with the rest of the alphabet, putting I and J in the same box (as shown in the photos).

4. Now you are ready to start encoding. The rule to remember is "Right, and Down." Take the first pair of letters and find them on the grid. They will either be:

Not in the same row or column - this means that the letters will form two corners of a square. The code letters will be the other two corners. In other words, for the pair TO, go right from T until you are in O's column. In this case, this means that the code letter for T is Q. Look at the pictures to get a visual on what is happening (photo 1).

They are in the same row - go right one letter. For the pair NI, go right one letter from N to give you I. Go right from I one letter to give you J (see photo 2).

They are in the same column - Go down one letter. For the pair DL, go down one letter from D to get F. Go down one letter from L to get R. This case does not occur in the example "tonight is not possible," however photo 3 shows how it would work.

5. Finished! The final message for "Tonight is not possible" is "QEIJ HAUM EQQC DZCN FKDY"

Decoding
To decode the message, just reverse the process in step 4 above. This means that to decode you will use split the coded message into pairs, follow the rule "Left, and Up", and remove the extra X's when you are finished.
&quot;2. <strong>Break coded messages into groups of 4 letters.</strong> <br /> Example: AFRT CGTJ VGTY SFVT.&quot;<br /> <br /> I took this to the next level. Instead of making every group four letters, add fake word lengths and punctuation.<br /> Example: A FRTC GTJ VG TYSFVT!!
<p>A FRTC GTJVG TYSFVT!! Donald Trump will be elected in 2016!! WOW I solved it.</p>
makes it even harder but i have an idea that wrkos lkie so you put the frist lteter, and the lsat letetr in teihr aissgned palces tehn put the ohter lteters jmubeld up in a rnadom odrer if you can't read this then it probly means you have dyslexia<br />
hee hee hee<br />
<p>its pig Latin it says &quot;sorry but i read it</p>
I did, it was easy.
thats the one problem with piglatin. (anybody can read it)
Some people can't translate it fast enough when it's spoken.
me and my friends used to speak in it no problem.
Then you aren't some people, you are most people.
I wonder how long it took you to type that.
about 3 minutes, i had to think of how i could jumble the letters, and to make sure that i had the right ones in the word
<p>How about using &quot;text speak&quot; for the message? Honestly I probably couldn't read the typical 15-year-olds text message anyway!</p><p>HRU? Yo hu u b wit 2nit? Ur gr8 bf or ur bro? RUOK? </p>
<p>I can't help but feel that using a phonetic code would make cracking a cipher far more difficult.</p>
When I made a code on ms word, i made sure to wipe out the file for good when i was done!
Can you make this easier?<br />
is it on gromit's left ear? or is that just a yellowish speck?
Nah, it doesn't work like that. It doesn't effect one specific part, it's embedded in the entire file.<br /> <br /> I've seen the &quot;yellow speck&quot; method on things like Zest puzzles and in Lost TV show hints (Blue eyed girl has brown eyes and you zoom in on her eyes to find a secret message) and it's really cool but this is a little different kind of cool.<br /> <br /> In this case it wouldn't be noticeable to the eye. If it was (because the message was to big) the entire image (not just a speck) would degrade a little.<br />
Oh, allright. Thank you very much. This is definitely an interesting code. So, assuming that you are trying to send this message to someone (say the instructable robot), and you want them to figure it out, but obviously no-one else, how does that person decrypt it?<br />
Error in encoding per two sites: <br/><a rel="nofollow" href="http://www.purplehell.com/cgi-bin/riddles/playfair.pl">http://www.purplehell.com/cgi-bin/riddles/playfair.pl</a><br/><a rel="nofollow" href="http://www.braingle.com/brainteasers/codes/playfair.php">http://www.braingle.com/brainteasers/codes/playfair.php</a><br/>Should be .. qe ik ha pm hu eq qc dz cn fk dy<br/>
ooohhh... I get it! Very cool! I can't believe this doesn't have more views.
There is another really good book by Herbie Brennan called code breaker, I think. It gives loads of examples of different codes, like yours. It also gave ways of cracking almost every code imaginable. I think your instructable is really good, it shows you know A LOt about differnent codes and ciphers, and secret ways to hide messages. I think the most ingenious method ever used was back millenia ago: On a man/woman's shaven head, they would tatoo a message. Once the hair grew back, they would send the messanger to the reciever. The messanger would pass under enemy radar. Once they reached their destination, their head was again shaved to reveal the message. Cool eh? By the way, do you know why morse code is called a code? It's a cipher, isn't it?
I tried decoding your playfair cipher but I think you have some errors in it
Thank you for your comment - I just tried to decipher it, and it seemed to be working. May I ask at what part the deciphered message stopped making sense? Perhaps I need to buff up the section on decoding.