|
singingbanana code challenge 2012: solutionIn February 2012 I set a code breaking challenge. This was part of 'Code Month' on the nrich website (http://nrich.maths.org/thismonth/all/2012/02). Here was the cipher: VA BT LS EG OT XK PB BH CI FV GA YC QG BP UW IH QD OE DI HL CQ YC QG BP EI LZ GA GB IZ PS AZ DQ NI CY UY EA AI UA BF BV OVQA ZS DP QD PG QM PS WL QY DH BD TL VZ PL LW AH GZ BP IM NI KP DZ QU DH FP CI FV RT SB BP BV XO BE BQ PG KO GE IK KO NA OSDG DG DA OX PO GE LZ GA OP FL WU PU UT WF BV IC HF EQ SP NA UX DC BV I also gave the clue that the message contained the phrase 'EXTRA LARGE FRENCH FRIES' (known as a 'crib'): See the video of me setting the
challenge here: http://youtu.be/laCupCrZNx8 Below is a more detailed explantion. How the code works:This time I used a 'Playfair cipher'. http://en.wikipedia.org/wiki/Playfair_cipher You need to use a 5 x 5 square containing a mixed up alphabet. The letters I and J are combined:
An easy way to create such a square is to start it using a keyword, without repeated letters, this time I used I used the word AWESOMETASTIC . Fill in the remaining boxes with the rest of the alphabet, in order. Let's send the message 'HELLO WORLD'. First split the message into pairs 'HE LL OW OR LD' . There are now three rules: If a pair are in the same column, move
each letter down one place. So the pair OR becomes BZ
. If you have a double letter, change the
second letter to an X. So the pair LL
above, becomes LX
. Nows apply the
same rules. Altogether we get:
How I broke the code:Here is the cipher again: VA BT LS EG OT XK PB BH CI FV GA YC QG BP UW IH QD OE DI HL CQ YC QG BP EI LZ GA GB IZ PS AZ DQ NI CY UY EA AI UA BF BV OVQA ZS DP QD PG QM PS WL QY DH BD TL VZ PL LW AH GZ BP IM NI KP DZ QU DH FP CI FV RT SB BP BV XO BE BQ PG KO GE IK KO NA OSDG DG DA OX PO GE LZ GA OP FL WU PU UT WF BV IC HF EQ SP NA UX DC BV
There are two ways to break up the crib into pairs: EX TR AL AR GE FR EN CH FR IE S* or, *E XT RA LA RG EF RE NC HF RI ES It is the first option that is the most interesting. Since FR appears twice, there is only one place where this can fit into the code above, namely:
s
N E G P
We now know EX are not in the same column. So EX= BV means EB XV
or E
B B is definitely in the same row and to the right of E. V and X are in the same row, but we don't know which way round.
If VX were in the same row as EB the row would have six letters. So VX is in a row below EB
We have filled a column! Exciting!
AB QR
A guess of PQR is very tempting since they are consecutive letters - assuming none of these letters are in the keyword.
Using TR=XO we can see T and R are not next to each other in the same row or column. So we must have T diagonal of R : O R
or
RO
and most likely
And there we have it. We have completely deduced the square used to send the cipher. If we use it to decode the message, we get: "Well done for breaking the cipher! It was a playfair cipher, and the key word was unicycle. I will keep this message short as I am about to eat. I am very hungry, so I am going to order extra large french fries. Remember to send the solution to the enigma project. Bye."
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This Web Page Created with PageBreeze Free HTML Editor