You may also like

problem icon

The Best Card Trick?

Time for a little mathemagic! Choose any five cards from a pack and show four of them to your partner. How can they work out the fifth?

problem icon

Secret Transmissions

How can Agent X transmit data on a faulty line and be sure that her message will get through?

problem icon

Secondary Cipher Challenge Part 1

Here is the start of a six-part challenge. Can you get to the end and crack the final message?

Substitution Cipher

Stage: 3 and 4 Challenge Level: Challenge Level:1


In any language some letters tend to appear more often than others.

Which letters do you think are the most common in English?

 

Is the frequency of letters in the following sentence representative?

The quick brown fox jumps over the lazy dog.


In the coded text below, every letter in the original message was switched with  another letter. Find out which are the most (and least) common letters used in English to help you crack this coded message:
 

Vfj Uzyj fxc pjjw nzkrgwi tjkl fxkc xyy vfj uzkwgwi, qbkgwi-dyjxwgwi fgq ygvvyj fzuj. Hgkqv ngvf pkzzuq, vfjw ngvf cmqvjkq; vfjw zw yxccjkq xwc qvjbq xwc dfxgkq, ngvf x pkmqf xwc x bxgy zh nfgvjnxqf; vgyy fj fxc cmqv gw fgq vfkzxv xwc jljq, xwc qbyxqfjq zh nfgvjnxqf xyy ztjk fgq pyxdr hmk, xwc xw xdfgwi pxdr xwc njxkl xkuq. Qbkgwi nxq uztgwi gw vfj xgk xpztj xwc gw vfj jxkvf pjyzn xwc xkzmwc fgu, bjwjvkxvgwi jtjw fgq cxkr xwc yznyl ygvvyj fzmqj ngvf gvq qbgkgv zh cgtgwj cgqdzwvjwv xwc yzwigwi. Gv nxq quxyy nzwcjk, vfjw, vfxv fj qmccjwyl hymwi cznw fgq pkmqf zw vfj hyzzk, qxgc 'Pzvfjk!' xwc 'Z pyzn!' xwc xyqz 'Fxwi qbkgwi-dyjxwgwi!' xwc pzyvjc zmv zh vfj fzmqj ngvfzmv jtjw nxgvgwi vz bmv zw fgq dzxv. Qzujvfgwi mb xpztj nxq dxyygwi fgu gubjkgzmqyl, xwc fj uxcj hzk vfj qvjjb ygvvyj vmwwjy nfgdf xwqnjkjc gw fgq dxqj vz vfj ixtjyjc dxkkgxij-ckgtj znwjc pl xwguxyq nfzqj kjqgcjwdjq xkj wjxkjk vz vfj qmw xwc xgk. Qz fj qdkxbjc xwc qdkxvdfjc xwc qdkxppyjc xwc qdkzzijc xwc vfjw fj qdkzzijc xixgw xwc qdkxppyjc xwc qdkxvdfjc xwc qdkxbjc, nzkrgwi pmqgyl ngvf fgq ygvvyj bxnq xwc umvvjkgwi vz fguqjyh, 'Mb nj iz! Mb nj iz!' vgyy xv yxqv, bzb! fgq qwzmv dxuj zmv gwvz vfj qmwygifv, xwc fj hzmwc fguqjyh kzyygwi gw vfj nxku ikxqq zh x ikjxv ujxczn. 'Vfgq gq hgwj!' fj qxgc vz fguqjyh. 'Vfgq gq pjvvjk vfxw nfgvjnxqfgwi!' Vfj qmwqfgwj qvkmdr fzv zw fgq hmk, qzhv pkjjojq dxkjqqjc fgq fjxvjc pkzn, xwc xhvjk vfj qjdymqgzw zh vfj djyyxkxij fj fxc ygtjc gw qz yzwi vfj dxkzy zh fxbbl pgkcq hjyy zw fgq cmyyjc fjxkgwi xyuzqv ygrj x qfzmv. Emubgwi zhh xyy fgq hzmk yjiq xv zwdj, gw vfj ezl zh ygtgwi xwc vfj cjygifv zh qbkgwi ngvfzmv gvq dyjxwgwi, fj bmkqmjc fgq nxl xdkzqq vfj ujxczn vgyy fj kjxdfjc vfj fjcij zw vfj hmkvfjk qgcj.

Javkxdv hkzu 'Vfj Ngwc gw vfj Ngyyznq' pl Rjwwjvf Ikxfxuj

Xtxgyxpyj vz kjxc gw hmyy xv nnn.imvjwpjki.zki

 

If you want to work on a computer to solve the problem, you can download the message as a text file which doesn't contain any line breaks.

Here is a Cipher Challenge Toolkit you can use to find the distribution of the letters in the message; this technique is called Frequency Analysis.


Inspector Morse is another problem with a similar theme.

If you are interested in code breaking you might enjoy the Secondary Cipher Challenge.

 

You can read about Substitution Ciphers and Frequency Analysis on Simon Singh's website: http://www.simonsingh.net/The_Black_Chamber/crackingsubstitution.html