Exercises

advertisement
Secret History: The Story of Cryptology
by Craig Bauer
cryptoauthor@gmail.com
Exercises
Chapter 1
1. Codes can be found everywhere. Give an example of a code (it needn’t be a secret code) that
wasn’t mentioned in this chapter.
2. Encipher the following using a Polybius cipher with keyword ARCHIMEDES.
GIVE ME A PLACE TO STAND AND I WILL MOVE THE EARTH.
3. Decipher the following using a Polybius cipher with keyword ARCHIMEDES.
23 41 35 41 44 23 15 24 44 45 12 25 21 54 13 15 12 13 34 22 24
4. Encipher the following using a Polybius cipher with keyword PLATO.
ONE OF THE PENALTIES OF REFUSING TO PARTICIPATE IN POLITICS IS
THAT YOU END UP BEING GOVERNED BY YOUR INFERIORS.
5. Decipher the following using a Polybius cipher with keyword THUCYDIDES
22 11 22 24 13 24 23 35 23 24 24 11 43 25 11 11 25 14 34 41 23
42 53 12 43 14 43 13 35 21 42 43 11 31 23 14 43 42 11 51 43 35
35 23 21 23 52 23 42 22 32 14 43 42 45 13 23 51 23 21
6. Encipher the following using a Polybius cipher with keyword EPICTETUS.
IN ORDER TO PLEASE OTHERS, WE LOOSE OUR HOLD ON LIFE’S PURPOSE.
7. Decipher the following using a Polybius cipher with keyword ARISTOPHANES.
12 45 12 25 42 54 54 21 45 33 21 24 15 31 25 42 13 25 51 25 13
24 15 23 25 35 21 33 14 52 23 11 15 14 54 21 45 12 11 12 35 45
43 25 24 15 52 23 25 12 25 14 54 21 45 12 22 12 21 21 34
8. Encipher the following using a Polybius cipher with keyword ARISTOPHANES.
QUICKLY BRING ME A BEAKER OF WINE SO THAT I MAY WET MY MIND AND SAY
SOMETHING CLEVER.
9. Decipher the following using a Polybius cipher with the keyword
MENANDER.
13 35 32 45 43 44 41 12 21 43 35 13 12 51 12 21 22 12 23 14 11
12 42 45 32 23 33 34 54 21 32 23 31
10. The following Polybius cipher appeared in the novel The Cipher Detective by Anthony P.
Morris, Beadle & Adams, New York, 1885. The alphabet was placed in the grid in the normal
order, omitting Z. Recover the message.
11. Can you think of a way to make the Polybius cipher more secure?
Chapter 2
1. Use a Caesar shift of 3 to encipher the following
I HAVE CROSSED THE RUBICON
2. The following ciphertext was obtained using a Caesar shift of 10. Shift back to recover the
original message.
YXO NKI K MYYU SX DSTEKXK RKN DY ZBOZKBO CYWO WOKVC LED RO
GKC YED YP KVWYCD OFOBIDRSXQ KVV RO RKN GKC LBOKN MROOCO
KXN VODDEMO RO WKNO MBYDYXC CRBONNON DRO MROOCO KXN WSHON
LYDR GSDR DRO VODDEMO ZOYZVO VYFON SD DREC GKC LYBX DRO
MKOCKB CKVKN
3. Decipher the message below that arose from a Caesar shift for some unknown value.
ZNA UNF ABG RIBYIRQ NA VAPU SEBZ GUR FYVZR GUNG FCNJARQ UVZ
4. As Stage 2 of his Cipher Challenge for $15,000, Simon Singh presented readers with a Caesar
Shift Cipher. One of the students in a past cryptology class of mine came to me saying he
couldn’t get it. I laughed at first, since it is a simple matter of trying all 25 keys and proceeded to
break it for him. I quickly saw why he got stuck and was then able to help him read the message.
What could the catch be? See for yourself:
MHILY LZA ZBHL XBPZXBL MVYABUHL HWWPBZ JSHBKPBZ JHLJBZ
KPJABT HYJHUBT LZA ULBAYVU
5. Use the keyphrase HIGHLANDER to encipher THERE CAN BE ONLY ONE.
6. The following was enciphered using the keyphrase BON JOVI. Recover the original message
(it will give you Bon Jovi’s way of defining isomorphic).
DSR BGG SCV RBHV LKGY SCV KBHVR CBUV NCBKAVJ
7. Use the keyphrase MARCUS AURELIUS to decipher
FJJD AMRD JVUO QLU KMPQ, WIQL IQP RLMHEIHE UGKIOUP QLMQ
OJPU MHC SUFF, MHC YJT RMH SJOUPUU QLU STQTPU, QJJ.
Since the Vikings also used encryption, exercises 8 through 11 give you some bits of Viking
philosophy to decipher.1
8. Use the key HAMTHESMAL to decipher
JKJEK URGCV EQRBE JCLBR WBEJR BEJKP JQBHV EQNKF EJ.
9. Use the VIKINGR to decipher
BGWCS BVQBL PSEJC RGHTQ SSPYS PYVAV CJ.
10. Use the key JORVIK to decipher
SBIFL HAIPS BIUIH AIJHR ICQVP JWHLT SSBIG LPIQJ SCQKY CHACS
WCFFO I.
11. Use the key VOLSUNGA to decipher
WAILV HPVYW AVQPI MMIWP UUFBH GEYLV MUNMU UNIED OUVMQ IQAUB
MEBNU PUHS.
12. Use technology to compare the values of n! to those given by Stirling’s approximation. How
does the absolute error grow with n? How does the percentage error grow with n? This exercise
should give you a better idea of what the ~ means in Stirling’s formula.
13. Decipher the text shown on the dust jacket of The Fellowship of the Ring.
1
The plaintexts were found at http://evagirly.tripod.com/wright/id29.html.
14. Decipher the secret message on the cover of Ozzy Osbourne’s Speak of the Devil album. You
will need to find an image of this album cover online first!
15. Decipher Mozart’s cipher (retyped by Nicholas Lyman). Hint: the message was written at age
18 for a young English girl with whom he was in love. His father disapproved, hence the secret
cipher. Expect a (mostly) English plaintext.
16. Can you decipher the message and its response placed in The Times “agony columns” in
February, 1853?2
CENERENTOLA. N bnxm yt ywd nk dtz hfs wjfi
ymnx fsi fr rtxy fschtzx yt. Mjfw ymf esi, bmjs dtz
wjyzws fei mtb qtsldtz wjrfns, ncjwj. lt bwnyf f kjb
qnsjx jfuqnsl uqjfxy. N mfaj xnsbj dtz bjsy fbfd.
CENERENTOLA. Zsyng rd n jtwy nx xnhp mfaj n y
wnj, yt kwfrj fs jcugfifynts ktw dtz lgzy hfssty.
Xnqjshj nx nf jny nk ymf ywzj bfzxy nx sty xzx jhyji;
nk ny nx, fgg xytwpjx bngg gj xnkyji yt ymjgtyytr. It
dtz wjrjgjw tzw htzxns’x knwxy nwtutxnynts:
ymnsp tk ny. N pstb Dtz.
17. The following cipher has been reprinted several times.3 It deserves to appear again! It was
originally found in the prison yard of a penitentiary. Can you solve it?
2
Found in McCormick, Donald, Love in Code or How to Keep Your Secrets, Eyre Methuen Ltd., London, 1980, p.
83.
3
1) Signal Corps Bulletin, September-October 1930 p. 55.
2) William F. Friedman, editor, Cryptography and Cryptanalysis Articles Volume I, Aegean Park Press, Laguna
Hills, California, 1976, p.55.
18. The last lines from a cipher message by Dr. Benjamin Church, a double agent working for
the British during the Revolutionary War, is reproduced below from page 175 of The
Codebreakers. Can you crack it?
The portion reproduced begins near the end of a sentence. That sentence (after deciphering)
begins “I wish you could contrive to write me largely in cipher, by the way of Newport,
addressed to Thomas.” Like many other real ciphers, typos are present.
3) There and There, Cryptologia, Vol. 2, No. 2, April 1978, p. 193.
19. Murderer Heriberto Seda, posing as the Zodiac killer, sent ciphers to the police, just as the
original had. Seda’s ciphers were simpler. Decipher the one that follows.
Note: The Daily News published a decipherment of this that was completely bogus. New York
Post published the correct decipherment and mocked their competitor’s incompetence.
New York Post mocks incompetent cryptanalysts.4
20. Solve the ciphertext below from Chambers, Robert W. 1906. The Tracer of Lost Persons.
New York: Appleton and Company, p. 104. This book is available online at
http://www.gutenberg.org/etext/13180, but the cipher isn’t included!
4
Crowley, Kieran, New York Post, Monday, August 8, 1994, p. 5.
21. The Gold Bug cipher – The cipher from Poe’s famous story follows below. Can you crack it?
"53++!305))6*;4826)4+)4+).;806*;48!8]60))85;1+8*:+(;:+*8!83(88)5*!;
46(;88*96*?;8)*+(;485);5*!2:*+(;4956*2(5*-4)8]8*;4069285);)6!8)4++;
1(+9;48081;8:8+1;48!85;4)485!528806*81(+9;48;(88;4(+?34;48)4+;161;:
188;+?;"
22. The following ciphertext message was produced by a confederate agent during the Civil War.
The Union’s codebreakers solved it – can you? (reproduced from page 219 of The Codebreakers)
23. The Shadow, a pulp hero of days gone by, faced the cipher reproduced below in one of his
crime-fighting adventures.5 Can you crack it?
24. Crack the following monoalphabetic substitution cipher in Spanish6 and then use an online
translation program such as Yahoo! Babel Fish®, http://babelfish.yahoo.com/, to render it into
English:
XW YNCAWGNUJ ZJ XW GNARWR ZY RZYRZ SWGZ RNWY RZYZYTZQWRW.
WXHAJUY IWQQNUY MAZQUJ GWYN RZYCQANRUY TUQ GUOTXZCU. XUY
GUOIWCZY NHJUQWQUJ, RZYRZ GAWJRU GUOZJLWQUJ ZX RUONJHU
TWYWRU, CQZGZ “GZYZY RZ MAZHU.
25. Crack the following monoalphabetic substitution cipher in Portuguese7 and then use an
online translation program such as Yahoo! Babel Fish®, http://babelfish.yahoo.com/, to render it
into English:
5
Gibson, Walter (writing as Maxwell Grant), #058, Chain of Death, The Shadow Magazine, Vol. 10, No. 4, July, 15,
1934, available online at http://www.apprendre-en-ligne.net/crypto/bibliotheque/shadow/shadow340715.pdf.
6
Taken from Wayne G. Barker’s Cryptograms in Spanish, Aegean Park Press, Laguna Hills, California, 1985, p.1.
7
Taken from Stewart Todd’s Cryptograms in Portuguese, Aegean Park Press, Laguna Hills, California, 1986, p.1.
26. Crack the following monoalphabetic substitution cipher in German and then use an online
translation program such as Yahoo! Babel Fish®, http://babelfish.yahoo.com/, to render it into
English. Note: umlauts have been replaced by the same letter without an umlaut, followed by an
e. For example, ue was substituted for ü prior to encipherment. The message is an Albert
Einstein quote.
DKM VYNOXN WNXDTCYTCGIQG ENXNT UODNCGXDNTGJ PNOVNDCNOT YTX
VYNOXN PNOGYKMNT ANDTN SONYTXN RYO NDTTLMAN XNO CINDKMNT
ZQGDJDQT RY YNWNORNYCNT
27. Crack the following monoalphabetic substitution cipher in French8 and then use an online
translation program such as Yahoo! Babel Fish®, http://babelfish.yahoo.com/, to render it into
English:
STNXYTJ H’PETLS, STNXYTJ HT WI NILST, R’IWWTJ ZIY I WI
VXTSST, STNXYTJ HT ZISULS.
Y’LW NIXU HPRRTS YPR YIRV, IWWTJ HPRRTS WT APUST, APXY TUTY
EPR IZPUST, QPRYLTXS WT ZSTYLHTRU.
28. Apply Sukhotin’s Method to the following text and record which letters it categorizes as
vowels.
“The evil incident to invasion of privacy of the telephone is far greater than that involved
in tampering with the mails. Whenever a telephone line is tapped, the privacy of persons
at both ends of the line is invaded, and all conversations between them upon any subject,
although proper, confidential and privileged, may be overheard. Moreover, the tapping of
one man’s telephone line involves the tapping of the telephone of every other person
whom he may or who may call him. As a means of espionage, writs of assistance and
general warrants are but puny instruments of tyranny and oppression when compared
with wiretapping.”9
29. Apply Sukhotin’s Method to the following text and record which letters it categorizes as
vowels. Use every letter, including those in names.
“Senator Herman Talmadge: Do you remember when we were in law school, we studied
a famous principle of law that came from England and also is well known in this country,
that no matter how humble a man’s cottage is, that even the King of England cannot enter
without his consent.
Witness John Ehrlichman: I am afraid that has been considerably eroded over the years,
has it not?
8
Thanks to Mary Boldt for suggesting the plaintext.
Justice Louis Brandeis, dissenting opinion in Olmstead v. United States (277 U.S. 438, 1928, pp. 475-476), quoted
here from Diffie, Whitfield, and Susan Landau, Privacy on the Line: The Politics of Wiretapping and Encryption,
The MIT Press, Cambridge, Massachusetts, 1998.
9
Senator Talmadge: Down in my country we still think of it as a pretty legitimate piece of
law.”10
30. For all ciphers (except the one-time pad, which we’ll discuss later) there is an amount of
ciphertext that can have only one possible plaintext solution. If the cryptanalyst has enough time,
it can be found, through brute-force, if not by other means. This length of ciphertext is referred to
as the unicity point. For a monoalphabetic substitution cipher, this length is 27-30 characters (30
according to Claude Shannon’s “Communication Theory of Secrecy Systems” October 1949, p.
660 using H(K)/D, log base 10, D=.7 – but Deavours page 54 says 24 letters (backed by formula)
and he mentions Friedman who estimated 25). Monoalphabetic substitution ciphers shorter than
this may have more than one solution and the cryptanalyst might not be able to decide which is
right. How many solutions can you find for the following?
H PHDM RVOS WJJDF
31. How many monoalphabetic substitution ciphers are there in which no letter is enciphered as
itself? In other words, how many derangements are there on a 26 letter alphabet? (Recall that a
derangement is a rearrangement of objects such that none occupies its original position.) An
outline of how to solve this problem is presented below.
a) Often solving a simpler problem gives insight into the harder problem.
For a two letter alphabet, ab, there are two arrangements: ab and ba.
Thus, we have 1 arragement and 1 derangement.
Now consider three letters, abc. There are 3! = 6 arrangements. Listing them all:
abc, acb, bac, bca, cab, cba, we see that 2 are derangements.
Keep enlarging the alphabet and be careful to count each possibility. You won’t get to the
answer for the full 26 letter alphabet, but a pattern will emerge, so that you don’t need to.
b) Use your answers from a) to fill in as many rows of the table below as needed, until you
see the pattern that emerges in the final column. What do you think the limit as n
approached infinity of An/Dn is?
N
1
2
3
10
Arrangements
1
2
6
Derangements
0
1
2
Arr/Der
NA
2
3
United States Senate, Select Committee on Presidential Campaign Activities, Hearings, Phase 1: Watergate
Investigation, Ninety-Third Congress, First Session, 1973, p. 2601, quoted here from Diffie, Whitfield, and Susan
Landau, Privacy on the Line: The Politics of Wiretapping and Encryption, The MIT Press, Cambridge,
Massachusetts, 1998.
The answer can be found at http://mathworld.wolfram.com/Subfactorial.html, but work on it
yourself first!
32. Refer back to the sample cipher from the original Zodiac killer. Give some evidence
supporting the conclusion that it isn’t a monoalphabetic substitution cipher.
33. Suppose you attack a monoalphabetic substitution cipher by using brute force. That is, every
possible substitution alphabet is tried without any attention being paid to the statistics. How long
will it take, on average, to find the solution if
a) a different key is tested every second?
c) a million distinct keys are tested every second?
34. Make up a cipher of your own, like the ones discussed in this chapter, and challenge a friend
to break it!
35. When using Morse code, it is important to leave spaces between the letters. Can you come up
with a message in Morse code, like the example in this chapter, that has two possible decodings
if the spacing is altered?
36. Can you find the secret message in the seemingly innocent sketch of San Antonio’s
Riverwalk below? It was made in the 1940s at the San Antonio postal censorship station and uses
Morse code.11
11
Kahn, David, The Codebreakers, 2nd ed., Scribner, New York, 1996, p. 1134.
San Antonio’s Riverwalk12
37. Encipher the following using an affine cipher with the key (15, 9).
TOO MANY MATH AND SCIENCE MAJORS END UP WORKING FOR SKYNET
38. Encipher the following with an affine cipher using the key (3, 18).
WE MATHEMATICIANS ARE ALL A LITTLE BIT CRAZY
39. If an affine cipher uses the key (21, 4) for enciphering, what key pair can be used to
decipher?
40. If an affine cipher uses the key (11, 5) for enciphering, what key pair can be used to
decipher?
41. Crack the following affine cipher (using any technique you like) and recover the key.
05 25 04 00 02 14 14 22 12 18 04 05 02 09 04 05 05 04 17 00 22 17
01 23 06 24 14 22 12 23 22 15 05 03 12 05 12 03 00 06 05 25 24 12
09 24 05 02 15 23 02 17 23 02 15 14 05 25 06 15 18
12
Picture from Kahn, David, The Codebreakers, Second edition, Scribner, New York, 1996, p. 523.
42. Crack the following affine cipher (using any technique you like) and recover the key.
10 18 24 22 04 17 24 22 01 02 06 14 19 01 02 13 24 11 04 16 24 01
19 15 06 01 19 04 18 10 08 04 22 10 01 04 17 17 24 09 24 20
10 23 20 04 22 01 02 17
43. Consider the alphabet portion of a nomenclator and the homophones. If there are N
homophones for each letter, the unicity point is given by (log((26*N)!/(N!)26))/1.11.13 Typically
one would have more homophones for more frequent letters, rather than the same number for all.
If the Zodiac, in his 340 character unsolved cipher, distributed the homophones evenly, should a
unique solution exist?
44. If I wish to send a message 1,000 letters long, how many homophones should I have for each
letter, if I want the unicity point to exceed the message length? Note: If I continue to send
messages in this system, I’m in danger when the total length of all messages exceeds the unicity
point. It isn’t sufficient to have each individual message beneath the unicity point – they will be
attacked as a group!
45. Below is a message sent by General Charles Cornwallis less than a year before he
surrendered to General George Washington at Yorktown in 1781, ending the Revolutionary War.
It uses homophones and nulls, but some words are unenciphered, providing a bit more context.
Can you break it?14
Charlottetown, Oct. 7th 1780
Sir,
The state of the lower boundary, and the absolute necessity of preventing the enemy from being
in quiet possession of the East bank of the Santee obliges me to change the destination of the 63rd
Regiment. I will therefore explain my plan to you and the part you are to bear in it. 19,3,4,101,14,2,44,15,19- 31,60,18- 24,8,22,15,3,42,29,21- 72,29,19,1- 29,61,22,19,70,315,48,22,71,5,2,29,8- 52,6,31,29,35,37- 19,80,71- 22,68,62,6,4- 24,64,29- which from every
account I have received 31,18,19,73,74- 29,39,24,14,4,22- 1,18,71,99,2218,22,60,32,44,29,26,6- there is great reason to hope may be done 19,91,8,17,74,22,7715,1,29,6,2,26,4,22,8,14,55,64- 68,24,71,69,29,19- For this purpose I shall 24,1,17,60,432,50,29- 8,14,1,9,19- 19,44,29- 31,22- 19,13,40,4,35,17,74- 26,68,7,6- 10,80,8136,38,35,2,6,14,9,22,7- 8,29,26,18,22,1,24- 19,3,4,29,15,44- 32,29,17,2,19,4- 38,855,1,7,8,45,2,66,19,6,31,18- 19,3,74,70- 29,4,2,21,33,14,71,9,22,42,29,21- 15,1,9,29,19,57,619,91- 22,54,25,8,2,22,90- 19,1,51,49,22- 6,19,8,29,26,38,22,26- to be formed into Provincial
Corps and armed, clothed and appointed as soon as we can do it- From 19,3,4,29,15,80,8432,24,4,8,29- 19,1,24,71,17,84,24,7- 13,33,31,5,54- 18,41,22,15,4- 26,1,13,70,29- 19,115,22,1,6,60,80,15,22,4,11,90- 8,6,2,19,13,42,5- 19,33,74,29- 14,4,8,14,1,9,19- 19,3,424,2,26,35,34,1,18- 29,51,17,4,24,14,74,22- 2,3,1,25,4- the 5,1,13,4,22,15,41,9,29,19,90,22,3713
The formulas for the unicity point were taken from Deavours, C. A., Unicity Points in Cryptanalysis, Cryptologia,
Vol. 1, No. 1, January 1977.
14
The original resides in the National Archives, Papers of the Continental Congress, Microcopy No. 247, Roll 65,
Frame 4818. It was taken here from Fagone, Peter P., A Message in Cipher Written by General Cornwallis During
the Revolutionary War, Cryptologia, Vol. 1, No. 4, 1977, pp. 392-395.
13,32,5,14,4- 73,74,48,5,19,3,7- I shall then be in 18,9,5- 15,1,24,9,29,2,15,8,19,32,51,2913,2,19,33,1,9,22,6,3,2,25,32,29,21- 8,29,26- 6,33,38,5- 22,4,15,54,42,17,4448,35,19,3,4,8,22,24,6- 68,29,26- 15,5,1,19,3,32,29,2119,3,58,19- 15,3,8,22,5,4,66,19,31,13,29- 15,48,60,29- 38,18,41,22,26- I would have you
24,1,9,29,19- 7,51,59,22- 13,3,31,5,4- 22,34,21,2,24,54,29,19- 8,29,26,2,18- 37,31,9919,3,2,29,11- 7,41,39,22,6,4,5,19- 19,31,1- 13,4,8,11,19,98,11,4- 24,4,29- 18,22,1,2419,9,22,29,14,79,5,35- 26,4,6,2,22,42,29,21- 33,2,34- to detain in 19,3,44,2,22,60- 25,5,8,15,48,6,24,8,29,37- 31,18,1,9,22- convalescents, and proceed into 19,33,70,44- 15,1,9,29,19,22,78,6,66,1,31,29,88,56- 25,51,6,2,14,5,4- I can give you 29,1- 25,8,22,19,2,15,9,5,78,2226,42,22,4,15,19,62,71,29,6- 24,60,7- 31,14,32,4,15,19- 72,6,19,1- 20,25,22,44,17,4,29,1919,33,44- 4,29,74,24,7- 10,18,22,31,24- 19,3,1,22,71,9,21,33,55,77- 24,8,6,19,54,22,761,18,19,3,54- 15,1,9,29,19,22,60,7- 77,51,99- 73,78,17,4- 35,64,18,19- 57,41,9- 13,2,5,3519,3,4,22,74, 18,1,22,94- 8,15,19- 78,15,1,22,26,2,29,21- to your 26,2,6,15,22,4,19,2,1,2938,29,26,19,3,44- 2,29,19,4,5,82,21,74,29,15,34- you may 22,4,15,84,52,17,94,604,2,19,344,22- 31,18,74,29,66,42,17,4,5,7- 70,1,22- 26,4,18,34,29,6,32,17,34,35,979,29,19,32,5- 37,1,9- 3,4,8,22- 1,18,24,67- 24,8,22,15,3- 19,71- 15,22,31,6,15,22,4,1113,3,44,29- 57,51,59,13,2,5- 32,61,2,29- 24,4- We may correspond by means of cypher- You
will please give a copy of the cypher to Turnbull and send another by a safe conveyance to
Balfour. Tell Turnbull that I address this letter to you as he is ill, and show him the contentsYou will of course take Harrison’s Corps, and what Militia you please- You will send a copy of
this letter to Balfour, which, you may, I suppose venture without cypher as the only danger is
near this place and you will afterwards correspond with him when you think it necessaryI am
Sir
To Major Win (?)
Your most obedient
63rd Regiment
Humble Servant
Camdan
Cornwallis
Note: line breaks have not been preserved from the original here. An average word length
calculation will indicate if nulls are part of this cipher. Fagone has corrected enciphering errors
that were present in the original.
Chapter 3
1. For the Lewis and Clark Expedition, Thomas Jefferson instructed Lewis to “communicate to
us, seasonable at intervals, a copy of your journal, notes and observations, of every kind, putting
into cipher whatever might do injury if betrayed.” Jefferson had the Vigenère cipher in mind, but
it was never used.15 Pretend that you are the expedition cryptographer and encipher the following
message using the key EXPLORE.
I discovered immense ranges of high mountains still to the
West of us with their tops partially covered with snow.
15
http://www.loc.gov/exhibits/lewisandclark/preview.html
2. Decipher the following message using the key EXPLORE.
SKTZT
ETWCU
ISSTL
YOCSR
KLITP
KICDC
MBUYS
DRPFV
CFZSV
AZRKX
OXTOD
QSKNZ
PISSE
HXOCP
OITIH
TKLIM
TYIAP RLTXE TRFRW WFCEV VGIKI PFFJX
GFGNZ VSJXQ ZIKXA LUPSK MRAXL AVXIO
EXDDZ TIXCO BRXMS TECSE GZDLB UFIDP
XAS
3. Encipher the following message using the key GRAFFIN.
I’m a twenty-first century digital boy.
I don’t know how to read, but I’ve got a lot of toys.
4. Decipher this much discussed couplet from the Necronomicon by applying the key
CTHULHU.
VAHN TZ HQM KYLK QJBJB NHH GMLLYHF NBL
UYK QKMO MEYUPZL UPVHU XCYY KYCMO GLF XKX
5. How many keys are possible if the keyword is known to be of length 5? Consider two cases:
1) The keyword really is a word (in English).
2) The keyword doesn’t really have to be a word; it can be any combination of letters.
3) The keyword doesn’t really have to be a word, but it cannot contain repeated letters.
6. Assume that the length of the key is known. What is the smallest value this can take and still
have the number of possible keys exceed the keyspace of a monoalphabetic substitution cipher?
7. Encipher some texts (choose your own favorites) with keywords of various lengths and
compute the index of coincidence for each. How accurate is this test? A classroom full of
students with examples will demonstrate clearly the results one typically obtains from this test.
How does the Kasiski test compare?
8. This chapter began with a cipher that Poe concluded wasn’t a monoalphabetic substitution
cipher. He determined this by looking at a particular word and showing that any possibility for it
generated substitutions that led to non-words elsewhere. Try this approach yourself to prove the
cipher isn’t monoalphabetic and then, under the (correct) assumption that it is a Vigenère cipher,
break it.
9. The Civil War cipher that Kent Boklan cryptanalysed over a century later is reproduced below
– can you crack it and find the 4th key?16
16
Image from Boklan, Kent, How I Broke the Confederate Code (137 Years Too Late), Cryptologia, Vol. 30, No. 4,
October 2006, pp. 340–345.
10. Jules Verne devoted a fair portion of his 1882 novel La Jangada (London, Sampson Low,
Marston, Searle and Rivington), available online at
http://www.gutenberg.org/dirs/etext02/8001g10.txt (at least the part called The Cryptogram), to
the cryptanalysis of a Vigenère cipher. The Kasiski test was not used even though it existed at
the time! The hero’s method of solution won’t be revealed here, so as to preserve some mystery.
You are invited to try to crack it with any of the tools at your disposal. But be warned, there’s an
extra challenge – the plaintext is French. The ciphertext reads:
Phyjslyddqfdzxgasgzzqqehxgkfndrxujugiocytdxvksbxhhuypo
hdvyrymhuhpuydkjoxphetozsletnpmvffovpdpajxhyynojyggayme
qynfuqlnmvlyfgsuzmqiztlbqgyugsqeubvnrcredgruzblrmxyuhqhp
zdrrgcrohepqxufivvrplphonthvddqfhqsntzhhhnfepmqkyuuexktog
zgkyuumfvijdqdpzjqsykrplxhxqrymvklohhhotozvdksppsuvjhd.
If you cannot solve it, consult the book itself or one of the following articles on it (and other
Verne cryptography).
Hooker, C.W.R., The Jules Verne Cipher. Police Journal, Jan. 1931, pp. 107-119
Bleiler, E. F., Jules Verne and Cryptography, Extrapolation, Vol. 27 No. 1, 1986, pp. 5-18.
Gass, Frederick, Solving a Jules Verne cryptogram, Mathematics Magazine, 59 February 1986,
pp.3-11.
http://www.bibmath.net/crytpo/concret/jangada.php3 This website provides a discussion of
Verne’s cryptogram in French.
11. Decipher the message below, which was Stage 4 of Simon Singh’s cipher challenge.
12. Ross King included the cipher below as part of his 1998 novel Ex-Libris (Walker &
Company, New York, p.66). Can you crack it? Of course, reading pages 1-65 might help…
FUWXU KHW HZO IKEQ LVIL EPX ZSCDWP YWGG
FMCEMV ZN FRWKEJA RVS LHMPQW NYJHKR
KHSV JXXE FHR QTCJEX JIO KKA EEIZTU
AGO EKXEKHWY VYM QEOADL PTMGKBRKH
On the plus side, we have word divisions, but on the other hand, I’ll warn you that the key is
long and it’s in Latin! The message, however, is in English.
13. The Vigenère cipher may be simply described using the tableau of alphabets, but it also has a
representation mathematically as C=M+K, where the value of K depends on the position of M
modulo the key length and the addition is done (modulo 26) using the numerical values of the
letters. Charles Babbage was the first to take this approach. There are other cipher systems that
he also described mathematically:
C = K – M (Beaufort)
C = M – K (Variant Beaufort)
How would these work in terms of the tableau? What would their tableaus look like? More than
one correct answer exists for each, but to make the solutions unique, please run the plaintext
alphabet across the top in alphabetical order, and place the substitution alphabets beneath in the
order K=A, K=B, K=C, etc.
14. Once the length of a Vigenère key has been determined, there are 26 possible ways in which
the substitutions using a straight alphabet could have been made. The technique used in this book
was to maximize the sum of the frequencies of plaintext E, T, and A. Another technique
minimizes the frequencies of the rare plaintext letters V, W, X, Y, and Z. A third technique
maximizes the dot product of the ciphertext letter frequencies and the frequencies of a plaintext
alphabet (for each of the 26 possible shifts). Using the examples generated by your class,
compare these three techniques to see which works best.
15. Break the following Vigenère autokey ciphertext, which used the ciphertext as the key. You
cannot trust word spacing! The standard groups of five have been used. However, I will reveal
that the initial key is of length three.
RFZPT TQKNJ OSXFU BYBJQ XRJER LSDAM WED
16. a) The unicity point17 for a Vigenère cipher using straight alphabets and having period P (i.e.
the key is of length P) is 1.27P.18 Thus, if the key is of length 33, a 42 character message should
have only one decipherment that appears as valid English. A shorter message may have more
than one potential solution. Can you find the decipherment for DFIII VWLVK CSAHY MSQRB
OWAIY LAEZV PGYQU CRSZL KR using a key of length 33?
b) If the alphabets used are not straight, but scrambled (all in the same way), then the unicity
point rises to 23.97+1.27P.19 If you allow scrambled alphabets for the previous problem, can you
find another possible solution?
c) If independently scrambled alphabets are used (i.e., shifting one alphabet needn’t turn it into
another), then the unicity point is even higher: 23.97N+ 1.27P, where N is the number of
17
Recall that the unicity point for a cipher system is the length for which a ciphertext can be expected to have only
one possible plaintext solution.
18
Claude Shannon put it at 2P. See Shannon, Claude E., Communication Theory of Secrecy Systems, The Bell
System Technical Journal, Vol. 28, No. 4, October, 1949, pp. 656-715, p.695 cited here. The discrepancy is due to a
different value used for the entropy of English.
19
For independently mixed alphabets, Shannon put the unicity point at 53P. See Shannon, Claude E.,
Communication Theory of Secrecy Systems, The Bell System Technical Journal, Vol. 28, No. 4, October, 1949, pp.
656-715, p. 698 cited here.
independent alphabets. Again, find as many solutions as you can under this weaker constraint.
This problem foreshadows an unbreakable cipher, which will be discussed later.20
17. Decipher the following
ZCDJG
FUMWQ
VJCRI
VVWMQ
LJMSM
SFAJD
KQZYW
FIBMM
GWVTB
WUPFA
FGUTB
EKVYP
PVOJV
WPQYP
XRCGT
HTWLZ
AEMIB
SEPFZ
AQVXI
WQZNO
WTIYQ
APSYP
AEAJZ
SOA
ZCBJD
SEBJZ
FFVJM
APIQA
GPQYE
AUEFA
NKKJN
WTGXB
LJIYL
VUBTP
WTQJA
SULFB
VQVJQ
GTBMM
STBWM
GGASW
SXMYP
AVEFA
SFMJX
FVMSB
WPONV
CVMQM
LWVIM
WOMCX
KRWHS
KRIHM
AQVFT
WGZXE
NKANW
JUBFV
DCQSM
SPLNV
FKVJP
DAIXI
SVKMQ
TICEF
VRAVW
CFRRB
LZBXI
ZTXJG
RTMMB
BKGYG
YCKVU
SLPYM
VYMHJ
TQTJN
YGPKT
WZQTX
UQHDC
CHGJX
HLJWS
DYMYC
CFRHH
HJQBS
KFXDY
PXVUB
MYGGX
UGWER
CTCMM
FRRBT
IQMYY
JXRLW
MZALT
KFMYG
HNJRU
WFRAZ
CCLJN
QTMMB
MICJL
NMNCB
MNIQX
LRNII
VATLQ
LZJRA
XFNEV
18. Decipher the following
LFKXJ
UGMCG
GKVYL
VVPMR
JYLXC
MTTFR
XPMNI
VWPVP
RNUCG
DVRAV
CGMKJ
GGCWG
GVPTC
FSLYM
CGFRZ
XERZF
KQPYM
NEREN
XDYMY
FRVFL
CEVAM
NCBGF
FMWRR
MWRRM
19. Abraham Sinkov, an American cryptanalyst during WWII and NSA Hall of Honor member
included the following Vigenère cipher as an exercise (number 44) in his book on
cryptanalysis.21 Find the plaintext.
SBPRT
YQEKU
RVCYG
YDVGK
NZWBP
GNDMA
LHMWW
HWTBR
GOKES
YFLGX
RIAJE
ZATTX
OAHHE
XJOTI
LNCEK
NXLCQ
CCZIQ
ARIJS
SCNQO
IAJHV
VFPHW
OPRUU
BSBNZ
ENTBT
RWDPM
PIWZK
GKDMT
SLIMA
LUEHC
YVTYL
UVZKG
FOHCQ
OMAGT
BAFZI
ECMFK
RTABE
NDMAZ
PNHFP
ZPNUN
URTLO
KBPZL
CMBIW
AGENB
QQBAK
TLCMZ
YYBBL
RJLCC
OYYMR
BBASH
ZJXWH
KBSWO
GFXPT
ZDRGD
VK
20. During the 1920s the Irish Republican Army (IRA) used a variant of the Vigenère cipher, in
which the cipher alphabets are written in reverse alphabetical order, to encipher a list of keys (to
be used for transpositions ciphers).22 The ciphertexts thus produced are extremely short, but
taken as a group, along with the assumption that the same Vigenère key was used on each, and
from the start each time, the transposition keys may be recovered. I’ve presented the enciphered
20
The formulas for the unicity point were taken from Deavours, C. A., Unicity Points in Cryptanalysis, Cryptologia,
Vol. 1, No. 1, January 1977.
21
Sinkov, Abraham, Elementary Cryptanalysis A Mathematical Approach, Mathematical Association of America,
1966.
22
The list of enciphered keys is reproduced here from Mahon, Tom, and James J. Gillogly, Decoding the IRA,
Mercier Press, Cork, Ireland, 2008.
keys in a format that should look familiar from the present book – take the hint and see what you
can do!
SDRDPX
VVQDTY
WXGKTX
SJMCEK
LPMOCG
MVLLWK
HMNMLJ
VDBDFX
UMDMWO
GGCOCS
MMNEYJ
KHAKCQ
LPQXLI
HMHQLT
IJMPWG
DDMCEX
HVQDSU
OISOCX
DXNXEO
IJLWPS
IJNBOO
OIREAK
21. Consider a message enciphered using Vigenère and then enciphered using Vigenère again
with a different key. For each pair of keys given below, parts a) through e), determine the net
effect. That is, find a single key that would, with only one encipherment, produce the same
ciphertext as using both of the original keys. Do you notice a pattern in the lengths of original
two keys and the lengths of the keys you found?
a) key 1 = CODE,
b) key 1 = NSA,
c) key 1 = AMS,
d) key 1 = BEER,
e) key 1 = HACKER,
key 2 =CIPHER
key 2 = GCHQ
key 2 = MAA
key 2 = WINE
key 2 = SPY
22. For the Vigenère cipher cryptanalysed in this chapter, the Index of Coincidence gave an
incorrect value. However, there is another manner in which this test may be applied. Write out
the ciphertext on a single horizontal line. Now do this again and place one copy below the other.
If they are lined up perfectly, each letter of the first ciphertext has itself just below it in the
second copy. Now shift one of the papers one letter to the right (physically – not alphabetically!).
Now, how many letters of the top ciphertext have a matching letter below? Shift by another letter
and count again. Keep doing this. The shift that maximizes this count should be the keylength.
Divide this maximum value by the number of characters in the ciphertext. Do you see the
connection with the index of coincidence?
23. Verify that solving for L in
N 
N

  1.066  
1
L 

.038
I .C. 
 1  L
N 1
N 1 





does yield
L
.028 N
( I .C.)( N  1)  .038 N  .066
24. Encipher the following message using the first paragraph of this chapter (In a previous
chapter, we saw how Edgar Allan Poe…) as your running key
I’D RATHER HAVE MY WORK IMPROVED UPON THAN IGNORED.
25. Encipher the following text by Henry Rollins using the first paragraph of this chapter (In a
previous chapter, we saw how Edgar Allan Poe…) as your running key.23
HE DOESN’T GET ALONG WITH ANYONE. HE DOESN’T FIT IN
ANYWHERE. I MEAN NOWHERE. EVERYBODY HATES HIM. MAYBE
EVERYBODY IN THE WHOLE WORLD. FOR A KID FROM THE MIDWEST HE
SURE GETS AROUND.
26. The ciphertext below relates a mean trick I sometimes play during final exams. It has been
enciphered using a running key from a novel that many math and computer science students have
read. Try to recover the message, but be warned that this one is harder than the example worked
out above. That’s why I gave you some clues. 
XODSN BURLH LUYHO OLKMQ UOCPE NTPVP ORBSP MNDTA TMGHP USIRN
IHJKH TWYKX AYVUW AKUOE EFGKB SPCIE HXEYI WZIFS OQEYR KLOLC
DHGGR ZYSDG OE
27. Here is the ciphertext of a running key cipher for which all vowels have been eliminated
from both the message and the key before enciphering. Cy Deavours challenged the readers of
Cryptologia to break it in the first issue of that journal.24 Can you do it?
AAETU GPDLZ MOEEK KOKAA PXFIE PZFP
28. Scott Keech included some Vigenère ciphers as part of the plot in his 1980 novel Ciphered
(New York: Harper & Row). The keys, which are actually full sentences, exceed the lengths of
23
24
Rollins, Henry, Black Coffee Blues, 2.13.61 Publication, Los Angeles, California, 1992, p. 8.
Deavours, Cipher. A., Unicity Points in Cryptanalysis, Cryptologia, Vol. 1, No. 1, January 1977, pp. 46-68.
the messages, so I’m including them here, as running key ciphers. The people exchanging these
messages all had Vigenère tableaus as well as the following
A
25
26
77
78
B
24
27
76
79
C
23
28
75
80
D
22
29
74
81
E
21
30
73
82
Message 1:
(page 79)
Message 2:
(page 164)
F
20
31
72
83
G
19
32
71
84
H
18
33
70
85
I
17
34
69
86
J
16
35
68
87
K
15
36
67
88
L
14
37
66
89
M
13
38
65
90
N
12
39
64
91
O
11
40
63
92
P
10
41
62
93
Q
09
42
61
94
R
08
43
60
95
S
07
44
59
96
T
06
45
58
97
U V W X Y Z
05 04 03 02 01 00
46 47 48 49 50 51
57 56 55 54 53 52
98
In the novel, the ciphers are broken by finding the keys. Your challenge is to solve them by one
of the methods discussed above.
29. Having several messages enciphered with the same key makes decipherment easier. Can you
crack the following ciphers that all arose from the same running key?
Message
Message
Message
Message
Message
Message
Message
Message
Message
Message
Message
Message
Message
Message
Message
Message
Message
Message
Message
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
DZTHXAVAGWQGUNENEJSCYPTCDJCAWFERVNTTUBMPSFJAJBGRGJCOI
WPQWYEPOQRMEBKVKADEDUBWAPWANFYNCTTSZQGHNHUTMSNUKMQH
ISLRFYLIXMFYAHSMTKLQNTNCDQBTYZPVQDUIIOUWIGIPCMNIER
LPEGWNSIAYLSLOIFSWSHHCPAGLQBFHVBFKHXQCGEVNIEGDHFA
OYWMYALKAZWJNSIFTTSKFRUUBTRFGRVHTBUKFVBAITAG
PCTAJGBQNIJKIIEFTSIBCSOEBLWQFYJSQBAFQTHZS
IGPUTMHTDILLYLMFETSBFSVTBWBBXUFFZHNVMDAG
BFEGMXZPUTHWDATVIURJMVXSAMQEGXJSPMOIXWGM
WTEVYAVWQRMEBKVKTYIHICFSAWIYVGVGMYL
IEDGTFLVUGZHSEGZOJIDNSKTTQBZWSK
IEDADCVFFSJWAJTWOGPUFWDETVLESD
IXYCYWFMZKAFALYUKZRWLOMMTHS
STYUQXIYXPWLTNIGRPVYAVMOG
HPDSSWHRSIJANMXZEGESE
WSLHFKLCAYZASISSTIESE
AYSCZKPWMWDGNMEKIJEO
IDLMBXJVAWKLHKFATTL
GTGSZLALQFGGTESMPZK
YZFRTGAAMRLLHKFGOK
30. Encipher the following message using the one-time pad key YDBVH IKHWP YJXSC OR
HELL IS OTHER PEOPLE
Now find a different key that would make this ciphertext come out as something else that still
makes sense in English, perhaps your own philosophy, if different from Sartre’s.
Answers will vary. One possibility is
31. A message enciphered by a one-time pad follows below, along with the key. Recover the
message.
Key
Cipher
OTJSG BRNGL WSUVN RMXPH HIAEV LRNFU QLXUH GYKSL
ATWZG TSRIZ IWUGV VZXIL KNRSH SZFTQ DMXMP ILKLF
Key
Cipher
ROEAH EVUGH TCSLR JGPPA LRBCS IDWF
ISFYA LZUXA BHANZ JRXIY ZWTQU QHPD
32. Given the following ciphertexts formed by (mis)using a page of a one-time pad twice,
recover both messages.
Message 1
Message 2
XXOQI
FWKBA
TXKXD
RBYDT
PKDUR
WCSAK
IMVZP
PGEEQ
GCXYM KXCRM KVBWU FZBYA FGIOC
JQUF
DKEBD LJASI GSSVF VNXUH YYVZF
EPIG
Exercises 33 through 57 get progressively harder. How far can you go? Warning: Number
57 is impossible and the answers you get are less and less likely to be correct as you
progress down the list!
33. Each letter in the ciphertext below arose from a shift of 0 or 1. What was the message?
IUUBL ESBCJ GMANT ODRZC VUITT ALESA BJHGF RNBNT OMBUG
HBTTH AUNBN
34. Each letter in the ciphertext below arose from a shift of 0, 1, or 2. What was the message?
VOSIP YIOWK MRORU ANVUK NFJUP FPRNG TCATK MEITM ONFZC
UVUJJ SJSDU NNUJJ UTIMF IUNUD JOQRF KMROR VCOTU JANNP
OGZUI OFISZ QWSLK GE
35. Each letter in the ciphertext below arose from a shift of 0, 1, 2, or 3. What was the message?
KKAWGCTPUEHDXVKPRKUZBSVHHPOPHKMWTWGONUHBWGCSMCNAQFRRLGYJQEFNKGVG
IT
36. Each letter in the ciphertext below arose from a shift by some value between 0 and 4. What
was the message?
XIFHV GEWBO HTJDD QPRXH MKSKQ IQNCI PXKKW KXOEY EBNUP
RTTWQ FR
37. Each letter in the ciphertext below arose from a shift by some value between 0 and 5. What
was the message?
RIEQQ ISGTQ XJBWF YJGIS IELUU YZNJD
38. Each letter in the ciphertext below arose from a shift by some value between 0 and 6. What
was the message?
PZLHR OJTNB BFAPX DBYOL RLGGD SBHUA X
39. Each letter in the ciphertext below arose from a shift by some value between 0 and 7. What
was the message?
WIPIW IUISR JSVKF OIXPQ MFVJS HVJKR AYVLT
40. Each letter in the ciphertext below arose from a shift by some value between 0 and 8. What
was the message?
XOMOU QFYGZ WWQHP SVBJV HIMRP YDEOL TBJNS KTVMH VFDSL
PLFIT MRQTF ROWAV DFFCZ NMOPA S
41. Each letter in the ciphertext below arose from a shift by some value between 0 and 9. What
was the message?
LHFOY ITRVB ERCVJ IOIIZ JIXWY KQQBJ VKXS
42. Each letter in the ciphertext below arose from a shift by some value between 0 and 10. What
was the message?
VGHLY MMABW RQXBP UON
43. Each letter in the ciphertext below arose from a shift by some value between 0 and 11. What
was the message?
MWPMH ERMEN OQKAL JWCWH PYAKJ OYSWK
44. Each letter in the ciphertext below arose from a shift by some value between 0 and 12. What
was the message?
JHJVO MRMNN TRLVM SZLNX QHOCS QEVID SRCKC GJKLB VNLYK
SMRGW RROZI JPA
45. Each letter in the ciphertext below arose from a shift by some value between 0 and 13. What
was the message?
AKQDN LYKBY PGYCW OYKHC OEPVT LLXD
46. Each letter in the ciphertext below arose from a shift by some value between 0 and 14. What
was the message?
PZQERPKPAUZXMDQVITWGRQSHTEFZGBQSWJIOJGIRLPJEDXOY
47. Each letter in the ciphertext below arose from a shift by some value between 0 and 15. What
was the message?
CWPGM TGSGU NPSEK FLMDG YTJGH PRAEA OAQXA BHNSQ JUSGS
MWVTT JWGST LCLBF IICCI WGSAE GMNQC TVMMU RCRXS ITEFF
YTMBC UIPKD SATWL WJ
48. Each letter in the ciphertext below arose from a shift by some value between 0 and 16. What
was the message?
IEVZG BPXQN NYCGJ SODOC RXOXV UJKKP BDSPY RRPMY SACOR
NQTNP PDSPN AIVOO UNQ
49. Each letter in the ciphertext below arose from a shift by some value between 0 and 17. What
was the message?
XFHYR AHLIA WVBIK AXFQO IRIVW RRISI XTXIZ EEKQQ NFFEV
VDDYB AXZOB ROVUI GXCSV YSKAT HUWSV CSEZN BVI
50. Each letter in the ciphertext below arose from a shift by some value between 0 and 18. What
was the message?
TEEFA WSKQQ TDQIY XWZEV NVMLL ZCGOU ULPVQ DNZWU YSNOW
ZTJBK JQOWC TRSOS LSAV
51. Each letter in the ciphertext below arose from a shift by some value between 0 and 19. What
was the message?
ITMVB RRYKC KBREA DRFAA HOCHU ZZZDP XDLMC FTSRY FYOWN
FOZSA ZKDFC NNDRI NWAGH
52. Each letter in the ciphertext below arose from a shift by some value between 0 and 20. What
was the message?
SKISJ OOBRD KCGVW JSBPD LBKBR FPMQX OSY
53. Each letter in the ciphertext below arose from a shift by some value between 0 and 21. What
was the message?
JKTBI INXFJ CLPKP NZYNW BQMSB MMDMO URPKM KSJBX WRFCU
NTZBJ RYFLH OAMDW VWYQK GSGPQ ZDV
54. Each letter in the ciphertext below arose from a shift by some value between 0 and 22. What
was the message?
AXWSX DBQTQ OIJKM QTASX LSKRM KMRLC
55. Each letter in the ciphertext below arose from a shift by some value between 0 and 23. What
was the message?
XCTCM DZCBC XYMHP IDNIZ RZXGX NVIRZ OEZH
56. Each letter in the ciphertext below arose from a shift by some value between 0 and 24. What
was the message?
WMHKQ NDIZI TMWRB THQIS AWSQW MUWMV ETYSU RLAJU PEOLP
IDJTT XGA
57. Each letter in the ciphertext below arose from a shift by some value between 0 and 25. What
was the message?
CAIVS EXQUI XFHOK TNVHU SGVFO ZBSDE VRVPO JUEAW
MWCIP CGDLP GTXZQ
58. When using two key tapes to generate longer keys using less paper, Vernam wrote:
“The tapes should differ in length by one character or by some number which is not a
factor of the number of characters in either tape.”25
So, if tape 1 has length 10 and tape 2 has length 30, the difference between them is 20, which is
not a factor of either tape length. What do you think about using these tapes? Rewrite the
restriction on tape lengths given above to prevent this sort of situation.
Chapter 4
1. Use rail fence transposition with three rails to encipher
CRIMINALS ARE A SUPERSTITIOUS COWARDLY LOT
2. Decipher the following message that arose from a rail fence transposition with two rails.
WTGET OETEE UTLOO ERARS OSBLT IHRAP WRHRMS ASCMG ETEPN IIIY
Vernam, G. S. “Cipher Printing Telegraph Systems for Secret Wire and Radio Telegraphic Communications”,
Journal of the American Institute of Electrical Engineers, v. XLV, pp. 109–115, 1926, p.114 cited here.
25
3. Decipher the following message that arose from a rail fence transposition with three rails.
TEMNS RIEEZ AUPMO LSPAS ILRPI HIHRI AOETF HEPNC HNRAI EHTAL
AATET VROKT EAKNI OVOSY OEXES VTAMN ESMOE AWILT PSRNE OHRDB
UMENE NE
4. Can you decipher the following text from Loyd C. Douglas’s 1929 novel Magnificent
Obsession?26 It arose from a rail fence cipher.
5. Use columnar transposition with the keyword WEIERSTRASS to encipher
IT IS TRUE THAT A MATHEMATICIAN WHO IS NOT SOMEWHAT OF A
POET WILL NEVER BE A PERFECT MATHEMATICIAN.27
6. The following ciphertext was transposed using a keyword of length 5. Recover the message.
LAFEE NANLS EHSOE TAIRO SFTTA RSTSI WHWRO PSOLE
7. Recover the message below, which was enciphered using columnar transposition.
26
Douglas, Loyd C., Magnificent Obsession, Houghton Mifflin Company, New York, 1929.
Quoted here from Moritz, Robert Edouard, Memorabilia Mathematica or the Philomaths Quotation Book, The
Macmillan Company, New York, 1914, p.121.
27
INREO
OEWOI
EOORW
HEEYS
GW
TUDAU
ADDSN
NAMWL
AENII
TNISA
VTOOV
VDMAO
RASIN
TUUEM
HLROS
TRYYA
AWAAN
UFLFO
DTUHB
WYWTV
UTLMS
YYHFE
VEHEL
ROUUO
EEHOI
ALFEI
EDONO
ACTYO
YENLG
IERHH
ODUHS
EENAL
HEOSV
DTTYD
MSHHD
DKTYM
OOIIE
8. The special illustrated edition of Dan Brown’s The Da Vinci Code contains an example of a
transposition cipher, which is reproduced below without the solution that’s provided there.28
Code:
TIARHSEBIASOSCAX
First identify the error in the two lines above, then recover the message and identify the error it
contains!
9. J. J. Connington presented the following transposition cipher in his 1933 novel Gold Brick
Island.29 Can you solve it without any further context?
TEIIL
LOVTU
OFRGH
THRDL
NTSNT
AHNOM
OTPCA
EMCOU
OIRBT
NNRUO
LFILH
GCHAN
PELPE
NITFO
COOUE
FINHE
MOTIE
VSFHE
RTXET
GOTGP
TCETU
NOATN
HASLE
SSWSG
AODNT
YLMFD
FMONG
ELMPN
PEIZN
ENETP
FDHSO
AEHAT
GASTH
NYILE
IUTSI
ATTTS
IMCLA
NCTAW
RSCSA
SYANS
OENPR
ISUWE
HGSMR
EFALT
TIOOM
MANHH
TTCHB
ETRWO
TIKOH
Z
YYUGO
ETFST
LHLAR
ODECT
LEANR
OFEII
YIMNN
OAHEE
NITHT
HNGOF
GSCAD
ARNIF
IESOL
IIGOT
ETODD
ETROX
IYCNA
EMFNE
10. Laurence Dwight Smith is known best to cryptologists for his book Cryptography the
Science of Secret Writing30, but he also wrote fiction. He included the following short
transposition cipher in his 1939 novel The G-Men Trap the Spy Ring.31 Correctly deciphered it
reveals an address. Can you crack it?
TLEEMOESWRTT
11. Earlier you saw how the IRA deciphered their messages in the 1920s. Determine the
plaintext for the following (part of the message pictured in this chapter).
84: ETNEU OIKLD IYTTE UOTOI HBRUA EYTHY DHHOA SESRR NIPEO
ITNNS ESROS OISIE ERBTL TTTSG OTSRA OTACC CPAU
28
Brown, Dan, The Da Vinci Code Special Illustrated Edition, Doubleday, New York, 2004, p. 206.
Connington, J. J., Gold Brick Island, Little, Brown, and Company, Boston, 1933, p.142-143.
30
Smith, Laurence Dwight, Cryptography the Science of Secret Writing, Dover Publications, Inc., New York, 1955.
(Originally published in 1943 by W. W. Norton and Company)
31
Smith, Laurence Dwight, The G-Men Trap the Spy Ring, Grosset & Dunlap, New York, 1939, p. 128-129.
29
12. The American Cryptogram Association (ACA) publishes The Cryptogram, which contains
articles on codes and ciphers, as well as challenging ciphers for their members. The following is
a Playfair cipher that was contributed by REVLOS DALG32 and appeared on page 28 of the
March/April 2011 issue. It was given the title “Art isn’t life.” and the crib “istheotherway.” Can
you solve it?
MO WP AD ZP ES OP LI PX YM BL QS ZC DR KO OL SW BK FK IX YP DC
BL QS ZC DR KO HD CQ AG ES OB NC PN PX FU IX FU EV BM DA QS KF.
For more on the ACA, see http://cryptogram.org/.
13. The following cipher, dated January 15, 1918, was found on the famous German spy Lothar
Witzke (alias Pablo Waberski) when he was arrested. Whether or not he could be held depended
on what the message said.33 Herbert O. Yardley took credit for cracking it34 and Witzke became
the only German spy in America to receive the death sentence during WWI. However, he was
not in fact executed, but rather sent back to Germany in 1923. Can you recover the message?
Warning – it is in German.
SEOFNATUPK
LRSEGGIESN
ASUEASRIHT
INSNRNVEGD
KOLSELZDNN
IHUKTNAEIE
HSDAEAIAKN
ESZADEHPEA
NEUIIURMRN
NIUSNRDNSO
EATGRSHEHO
CICXRNPRGA
ERRREOHEIM
EEFIGHIHRE
ZNAI
32
ASIHEIHBBN
NKLEZNSIMN
HTEURMVNSM
ESNBTBBRCN
AUEBFKBPSA
TIEBAEUERA
ETHNNNEECD
BBILSESOOE
ZWHNEEGVCR
DRGSURRIEC
ETRUSEELCA
AWSUTEMAIR
EAHKTMUHDT
LITFIUEUNL
UERSDAUSNN
EHNESHMPPB
EAINCOUASI
DTDRZBEMUK
TASECISDGT
THNOIEAEEN
CKDKONESDU
ETNOUZKDML
EODHICSIAC
EGRCSUASSP
UMTPAATLEE
NASNUTEDEA
COKDTGCEIO
EELSERUNMA
ACA members adopt code names.
Yardley, Herbert O., The American Black Chamber, Espionage / Intelligence Library (paperback edition),
Ballantine Books, New York, 1981, pp.84-85.
34
Despite Yardley’s claim, it is generally believed that John Matthews Manly is actually the one who broke it. It
was Manly who testified at Witzke’s trial on how it was broken. On the other hand, Edith Rickert claimed she was
the one who solved it. Thanks to Betsy Smoot for pointing this out!
33
Lothar Witzke / Pablo Waberski 35
14. Here’s another historic cipher for you to break.36 Once again, the message is in German. It
was sent by the German Consul-General in Mexico to all German Consuls on January 10, 1919,
a few weeks after the Armistice.
NOGAAAIMUE
HEUAMAOEID
ECEUTNNINB
TDSCMOOROB
FCEUMLRERI
DRISRRBNLE
ANVESCALRR
BKRNNOEEQE
EETREEGDMP
STTHEETDBE
UMTRALGTNU
KLTZEDRKII
THITZMSRMD
NHVDNVHBVN
EORTSGESIE
ISRHWLFTEN
CRSEAMILNB
MNEOUHSLCU
BGFIREUBLI
UFOHUNNDBN
DSUKOUIUST
SCECFAONEN
INCNEINFEE
IBHIDEEREE
35
SAEESNTRAA
ZCDKEFTEDT
MHBEBANAIS
AEUOERMOTD
EEOEMFFCEA
ENZNUHBTPF
ADNGDCEOEU
HHANANVSDF
EILSBIHLNU
UGMUAUDNUU
REHNEMENBE
RHFICNVAKS
LGHIREICSC
NRSNECNEMN
ENEONFIEND
AMUCNOSAZR
EUTCESZRTH
NMENENEFAE
ROZNNSSEUZ
BETFMMCIRT
BMGDRENINU
EHSMNRGOOT
ETKSTNBIKA
AEUNEINZET
SEIENEWWEI
EDGEIGUNRI
ITEAARUKSS
HZZZDIBGTT
IQEIRENUEF
KGTINEENEL
TIAILUIORL
NIEMINEIEE
HODCIAGEEF
DNSFNENENN
MNTNGEFSAE
ONBTGUHEWN
ENPNEIETTE
NGEPNICEUH
WNPKCEVEMD
AHELNEHILN
RSAEOSZCLX
ECKERGLNRA
CSTHPUSICA
UNFRNSRBNA
LUSNEADASH
ERZRUIERNE
ZEUGDEDNKR
DENDAOEREA
Picture from NARA, RG 165, Entry 65, Box 3453.
Yardley, Herbert O., The American Black Chamber, Espionage / Intelligence Library (paperback edition),
Ballantine Books, New York, 1981, pp. 91-92.
36
IGHUEUOANU
TEANCHCHDD
EMIEHDEADE
RHKTENDEND
FHBMKTTEMN
EHZEUESESG
RAHDHENNJH
UDZSGIFMRI
EKAMHCEANT
NFPBHMNFON
TMAURRWINI
OSEDLSUCTB
NGNEDUMIIS
NSINLEIMGR
EAAEEGTERO
EEIKDNSPNI
HARAVNTSEE
IPITNNDARK
IRBDNSAEND
NTZEOMTIER
ESWGOWGEEN
CEERNSNRTA
UZASRUODDI
IGRRRRRNSO
NHDTHMNOSM
UOCKEHAETE
LEDSETUEHL
SNMEUHAIMD
OSESEDFHIN
UOISOEHSNA
EAOABEUNOU
GUSDIPORTH
ULNEZSKNTS
CTIDAFSAUE
VEURAKKLNE
IEHNLEMNLG
ARUSRELARI
RIBHHPKUZE
IPREICSEUU
NALCCSSGLE
RECOETEIAN
NUKWMTTCKE
NOTZREASNU
LGGHCUE
EEEMCUTIEE
ESIEREERDE
ELOLMEENND
ERESFJHOUK
ENIMLIAERN
RRENSSHIKH
MEERNEASEH
DIETFEEBSA
FLRNNEIZUA
FHRSMDNDRL
HDRSDBBNIP
TTUNWIRHBR
ENRCMTDTEA
GKHEGDATEE
GRAENUINBI
TKFSESHDNE
EMOZUSMUDH
URSTTRLECP
MDTNNHEAMT
UCEBDIHTNF
CAAHNBGEIL
15. How many distinct turning grilles can be made, if the dimensions are
a. 2 by 2
b. 4 by 4
c. 6 by 6
d. 8 by 8
e. 10 by 10 (as in our example)
f. 2n by 2n for any positive integer n
Only count grilles that result in every space being filled in once all of the rotations have been
made.
16. How many distinct COMPLETE turning grilles can be made, if the dimensions are
a.
b.
c.
d.
e.
3 by 3
5 by 5
7 by 7
9 by 9
2n+1 by 2n+1 for any positive integer n
Only count grilles that result in every space being filled in once all of the rotations have been
made.
17. The next page reproduces a challenge that appeared as the back cover to a piece of recruiting
literature for the “Director’s Summer Program” at NSA. A variety of cipher systems were used,
but you have now seen them and ought to be able to meet the challenge.
Chapter 5
For problems 1 through 6, please keep in mind that Bacon’s original biliteral cipher used an
alphabet that didn’t contain J or U. Thus, he began with A = aaaaa and ended with Z = babbb.
It’s up to you to decide if a given biliteral cipher uses Bacon’s alphabet or our 26 letter version.
1. What secret does the castle pictured below conceal?
A biliteral cipher disguised as a castle.37
2. The Friedmans used Bacon’s cipher to conceal a message in a paragraph of their book, which
argued (convincingly) that no such messages were hidden in Shakespeare’s folios. The paragraph
is reproduced below. What is the hidden message?
37
Image from
http://www.easyproxy.org/index.php?url=uggc%2Sjjj.ratyvfu.ohssnyb.rqh%2S%2Ssnphygl%2Szppnssrel%2Strbss
%2Ssevrqzna.wct
3. Friedman also incorporated a secret message in the group photo reproduced below. Notice that
some individuals are looking to the side, rather than at the camera. What is the message?
Warning: 80 people were supposed to be in the photo, but only 71 showed up. Some clerks filled
in, but there still weren’t enough to complete the last letter! Also, one fellow looked the wrong
way (whoops).38 The message starts in the back row and reads from left to right.
As the message above is obscured by reduction needed to fit this page, enlarged sections follow
below.39
38
Kruh, Lou, The Day the Friedmans had a Typo in Their Photo, Cryptologia, Vol. 3, No. 4, October 1979, pp. 236241.
39
Thanks to René Stein, National Cryptologic Museum librarian, for digging through the collection to find this
image!
4. The Friedmans had an Afterpiece in a 1962 issue of Philological Quarterly.40, The editor used
two fonts to hide a message in it. Can you recover the message? The point of the message was to
credit those who helped create the figure shown in the exercise that follows this one. Warning:
the plaintext is in Latin.
5. The point of the Afterpiece mentioned in the previous exercise was to present an image (newly
constructed in the old style) that truly contained a biliteral cipher. It follows below. Can you
recover the message? Warning: the plaintext is in Latin.
40
Friedman, William, and Elizebeth Friedman, Philological Quarterly, Vol. 41, No. 1, 1962, pp. 359-361.
6. What’s wrong with this picture from The Chronicle of Higher Education? What will
enciphering with this wheel be equivalent to? If you’re stumped, the answer may be found in the
1977 Greg Mellen paper (p. 8) cited in the References / Further Reading list in this chapter.
7. Consider the following ciphertext generated by a wheel cipher with unknown alphabets.
UFANQWGTOPUEEAXSMRLVSRDSEFKNF
Could the phrase ATTEMPTED MURDER appear somewhere in the plaintext? Why or why not?
8. Suppose you intercept the following (in order) encrypted using a cipher wheel:
a) the ciphertext DYXZU CGVVP NQCJQ QXSRG LRFKW sent from an enemy nation
to an unidentified terrorist they have undercover here;
b) a plaintext message from the spy stating I HAVE NOT YET RECEIVED THE
DAILY KEY TODAY. PLEASE REPEAT USING ANOTHER CIPHER SYSTEM IF
RECEIPT IS URGENT. I SHOULD HAVE THE NEW KEY BY THIS AFTERNOON;
and after the message is repeated in the older cipher (one which you’ve already broken – it reads
X PICK UP STASHED EXPLOSIVES X), you intercept
c) another ciphertext WWEVC PHKJH LOWCY TXPLI XAYZB sent late that afternoon from
the enemy base to the outpost.
Use the information you have to first recover the order of the disks and then decipher the
final message. Assume the alphabets on the disks are ordered as in the example.
9.How could the cipher wheel be improved to block against the attack described in this chapter?
10. Encipher the following message using a Playfair cipher with key RICHARD LOVELACE
UPDATED.
I COULD NOT LOVE THEE DEAR SO MUCH
LOVED I NOT CRYPTOLOGY MORE
11. Encipher the following message using a Playfair cipher with keyword SCARFACE
SAY HELLO TO MY LITTLE FRIEND
12. The ciphertext below arose from a Playfair system with the key RICHARD ARMOUR.
Recover the original message.
PAKFA NCFND DBDVR PLOIC KCPZA RSAHT HRKYN ESAGV LNMCE
QAPGV
13. The ciphertext below arose from a Playfair system with the key THE BIG UNIVERSITY.
Recover the original message.
HENWL ZTAGP ZDOFK TTREB NIYRD CHTLR
14. Solve the Playfair cipher given below, which played a role in Dorothy Sayers’s 1932 novel
Have His Carcase: A Lord Wimsey Mystery, Brewer, Warren & Putnam, New York.
15. Can you crack the Playfair cipher that formed Stage 6 of the cipher challenge from Simon
Singh’s The Code Book?41
Stage 6
OCOYFOLBVNPIASAKOPVYGESKOVMUFGUWMLNOOEDRNCFORSO
CVMTUUTYERPFOLBVNPIASAKOPVIVKYEOCNKOCCARICVVLTS
OCOYTRFDVCVOOUEGKPVOOYVKTHZSCVMBTWTRHPNKLRCUEGM
SLNVLZSCANSCKOPORMZCKIZUSLCCVFDLVORTHZSCLEGUXMI
FOLBIMVIVKIUAYVUUFVWVCCBOVOVPFRHCACSFGEOLCKMOCG
EUMOHUEBRLXRHEMHPBMPLTVOEDRNCFORSGISTHOGILCVAIO
AMVZIRRLNIIWUSGEWSRHCAUGIMFORSKVZMGCLBCGDRNKCVC
PYUXLOKFYFOLBVCCKDOKUUHAVOCOCLCIUSYCRGUFHBEVKRO
ICSVPFTUQUMKIGPECEMGCGPGGMOQUSYEFVGFHRALAUQOLEV
KROEOKMUQIRXCCBCVMAODCLANOYNKBMVSMVCNVROEDRNCGE
SKYSYSLUUXNKGEGMZGRSONLCVAGEBGLBIMORDPROCKINANK
VCNFOLBCEUMNKPTVKTCGEFHOKPDULXSUEOPCLANOYNKVKBU
OYODORSNXLCKMGLVCVGRMNOPOYOFOCVKOCVKVWOFCLANYEF
VUAVNRPNCWMIPORDGLOSHIMOCNMLCCVGRMNOPOYHXAIFOOU
EPGCHK
41
Stage 6 may be found online at http://www.simonsingh.net/Stage_6.html.
16. Robert H. Thouless, a Cambridge don who lived from 1894-1984 was interested in finding a
way to test whether or not the dead could communicate with the living. He settled on composing
ciphers that could not be broken without his communicating the keys, which he refused to do
while alive. The attempt reproduced below was a failure, as it was solved while he was still
alive.42 Can you solve it? Hint: there’s a reason it’s in this chapter!
CBFTM HGRIO TSTAU FSBDN WGNIS BRVEF BQTAB QRPEF BKSDG MNRPS
RFBSU TTDMF EMA BIM
17. Have you solved the previous cipher? If so, Thouless isn’t through with you! Since this
cipher was solved while he was still alive, he tried again and created a double Playfair43 cipher
message to serve his initial purpose. The first enciphering step used a Playfair square, where the
alphabet was scrambled by a keyword. Next, Thouless placed the same letter at the start and end
of his ciphertext. Finally, the result was enciphered again using Playfair, but with a different
keyword. This cipher was solved in 1996 by James J. Gillogly and Larry Harnisch.44 Although
they claim to have not received any help from the deceased, they do admit to having used a
computer. Can you solve it?
BTYRR OOFLH KCDXK FWPCZ KTADR GFHKA HTYXO ALZUP PYPVF AYMMF
SDLR UVUB
Note: the middle enciphering step (placing the same letter to the start and end of the message)
was done to break up the digraphs. This was a good idea, but it would have been better for
Thouless to use two different letters in this step.
18. Consider an arbitrary digraphic substitution cipher where each pair of letters is replaced by
some other pair of letters. Is there guaranteed to be an ordering of the alphabet in a Playfair
square that realizes such a cipher? That is, can any digraphic substitution that uses letter pairs for
the ciphertext be obtained by some Playfair square? Hint: compare keyspaces.
19. Here’s another Playfair message concerning JFK’s shipwrecked crew.45 Decipher it using the
key PHYSICAL EXAMINATIONS.
XELWA OHWUW YZMWI HOMNE OBTFW MSSPI AJLUO EAONG OOFCM FEXTT
CWCFZ YIPTF EOBHM WEMOC SAWCZ SNYNW MGXEL HEZCU FNZYL NSBTB
DANFK OPEWM SSHBK GCWFV EKMUE
20. John Rhode included Playfair ciphers in his 1930 novel Peril at Cranbury Hall, New York,
Dodd, Mead & Company. Can you crack them?
42
The ciphertext has been reproduced here from Gillogly, James J. and Larry Harnisch, Cryptograms from the
Crypt, Cryptologia, Vol. 20, No 4, pp. 325-329, October, 1996, where a solution is given. The authors were not the
first to solve this one. Indeed, the original solver’s identity is not known.
43
There are several different ways to carry out “double Playfair” encipherment. This is just one example.
44
Gillogly, James J. and Larry Harnisch, Cryptograms from the Crypt, Cryptologia, Vol 20, No 4, pp. 325-329,
October, 1996.
45
From Kahn, David, The Codebreakers, Second edition, Scribner, New York, 1996, p. 593.
Message 1:
TR KNV GCV SEQUS VU OUR YOYCE N NP VCRT PEL DYOXK LEE
Q NLT BAM YOKAVD
Message 2:
RND MBFUVP ND MQPZ VMZQ POD CYNRIV VD VROD NVTSP CYCAN
LECOY V TRVDNV DOUOAG NX.
Note: The second message contains three words in Italian, with the rest in English. Also,
although it looks like word spacing has been preserved, it hasn’t! Spaces were inserted in the
ciphertext at random. However, you do have a useful hint in the following scrap of paper that
was found.
Chapter 6
1. Encipher the MC Hawking quote
I’VE GOT MORE DEGREES THAN A THERMOMETER
using ADFGX and the keys
A
D
F
G
X
A
M
T
P
A
D
D
X
B
H
W
L
F
G
N
E
Q
C
G
V
S
U
K
I
X
Z
F
Y
O
R
2. Decipher
DADDG
FAGFX
XXFAX
DDGDX
ADDDA
AFDFF
FGFGA
FDGGA
DADDX
FFAXA
AAGAD
AFXDG
AAAAX
XDDGA
AAXFX
GDDDD
XFAFD
AFDGD
DFXAF
FFFDG
FAFAA
GGAXA
FDXDX
ADDGA
GXXFF
DDXXA
DXAFA
XFGDD
DDAFX
DGDAD
XDXFA
XFDAX
DAAFA
AAXFF
AXFGX
XGADD
AAFFF
DADDX
AXDGA
FDDXF
FXXFX
FGAXA
FXFAA
AAFDD
GADAF
AAXFG
XAFAG
FAXXD
GAGDF
GXGAD
ADXXG AFFXG FDFDG GDADD DAFGA FAGGF XADAG FFGFG XXXDG AADAG
AAXGA D
using ADFGX and the keys
A
D
F
G
X
16 3
8
13 2
A
T
H
A
K
S
D
W
Z
B
M
U
F
I
O
C
P
V
G
L
N
D
Q
X
15 11 4
X
G
E
F
R
Y
12 17 10 5
9
18 14 6
FADGG
DXGGG
GXDGG
XXADX
DDXXF
DXGAD
FGDGG
XGDDF
XFXDA
FXGGF
AXAGG
DGFFA
AXGDD
XFGXD
XGADA
XXAGD
1
7
3. Decipher
GGGXG
AXGXD
GXDXF
XFXXX
XXFDX
XXGGF
GDAGF
GGGXX
AAGGG
XFGGG
DFGFF
GDDGA
FDDFF
FGFGD
AXXXG
DFGDF
GAAGF
DAGGG
XGDFX
GDFXF
AGAAG
DXAAG
XDDXG
XXDDX
AAADF
XGDGD
XGXDF
XXAXX
FXFGD
XDXGD
DXDXX
DXAGA
FXXDG
XAXFD
XGDGA
GFXFF
DAGGX
GGGFG
GGXGG
FGDXA
DDFGX
DGGXG
GGXGG
AAGAG
GXXGA
AFXGG
ADDAG
XXXFG
ADXXD
DDFGG
FXGGD
DFFGD
GDGFG
XDFGD
GDXAA
GGAGA
XGXDD
XGAAX
GDAGG
DFFAG
XGXGX
XXFAG
GADXA
GGGFG
using ADFGX and the keys
A
D
F
G
X
A
Q
C
K
I
T
D
G
Z
D
Y
L
F
X
V
P
R
B
G
U
H
S
A
E
X
F
O
W
N
M
16 7 5 9 19 3 14 1 15 18 11 2 12 20 8 4 13 10 6 17
4. Encipher
THE FAMOUS CRYPTANALYST CASANOVA SPENT THE LAST 13 YEARS OF
HIS LIFE AS A LIBRARIAN
using ADFGVX and the keys
A
D
F
G
V
X
A
E
U
5
D
A
H
D
V
3
O
X
F
7
F
P
0
I
R
1
T
G
K
G
4
2
Y
S
V
B
Z
9
J
6
C
X
L
M
8
W
N
Q
9 2 12 7 4 8 11 10 3 6 5 1
Note: The rectangle won’t be completely filled in, but that’s okay!
5. Decipher
VDGVF VGFVV XAGXA XGGAV XGVVD VAFDX AFGAF FGAAV AAXXA GDGDD
FVAGA VVFAG VDAAG FGDVV VAFAX XFAXG ADGXG VDDGA ADXGA AXDFF
FAVVD FVAFV XAXFV GFGAD AXVFX GXDAX GFXGF ADVGA AAAVX DFFFD
XVVA
using ADFGVX and the keys
A
D
F
G
V
X
A
S
5
L
1
G
V
D
2
C
7
U
4
6
F
M
I
Z
B
P
T
G
D
9
0
3
8
R
V
A
E
H
N
X
F
X
O
K
W
Q
Y
J
13 7 2 6 8 10 4 3 9 14 5 1 12 11
6. Decipher
ADVGG XXDFV FADGD XAXAX DFXGX AAADA AGDDD VAGDA XGDVX VAVGD
AFDGX XAGDF FDFVX FAGDG GGAVD ADAXF AADXD FXFFV AGAXX GDDAD
DFXDD FAFGV GXFGD GD
using ADFGVX and the keys
A
D
F
G
V
A
Y
U
G
X
Q
D
D
E
J
P
Z
F
R
O
5
4
7
G
I
9
S
H
M
V
6
K
0
C
8
X
A
N
V
3
2
X L B 1 F T W
3 8 7 2 1 4 9 6 5
7. Suppose for an intercepted ADFGVX cipher, testing indicates an odd number of columns.
Then we know the form of the message following the Polybius substitution, but prior to
transpositions is
B E B E B E… B E B
E B E B E B… E B E
B E B E B E… B E B
E B E B E B… E B E

 : :
(form of last row depends on number of rows)
How could we determine the exact number of rows?
8. Complete the decipherment of the example in this chapter. It is, by the way, the final
paragraphs of one of Dean Koontz’s darkest short stories.
9. Break the following ADFGX ciphertext. Like the example in this chapter, the Polybius square
used was very poorly chosen from a security standpoint!
AADAD
GAAAA
DGFDF
XAFDG
DXGFG
DAAAA
FGFAA
GAAFA
AAAGX
XFFXF
ADXFX
FXXFG
XFGGX
AXAXA
AGADD
XDXAA
DXXAA
DXFXD
XAGAX
AAAXD
AXGAA
DADAG
GFDFF
FDGFX
FFFXD
FGXXX
XDAAA
XDXAA
DAAXA
AAGDF
DGGDF
ADDXF
ADDDX
XFXGD
ADFAD
XXXAF
FDFFG
XGGFD
FFFFG
DGXDA
DDAXA
DDAAA
GAADA
DDXXD
FXDGA
DGXDF
XAGAX
FAAFF
FDFFX
GGGGF
FDFXD
FXGXX
DDDDF
ADAAD
DFGGA
AXAAG
FDGXG
DDGAF
AXXXG
DDAAA
DDADX
XDXXX
GFXXF
FGXGG
XFFXX
DDAFG
AXDAA
XFAAD
DFDXF
XXXFX
AFGDD
FXDXG
GAFGG
XADDD
FGXXX
DFDDF
XXDXX
GGDXF
AAFDX
DGDXG
AFADA
DDADA
GXXFG
DXADD
FFXGD
GAGAD
ADFXX
DXXDA
DFDDD
XGGFX
FGDFX
FADDD
GFGXD
XAAXA
AAGAX
FFGXG
XAAAD
GFDDF
XDAFX
GFFFG
DGXXF
GFGGX
DGXDF
GXFDX
DAGAF
XDGFF
DXXFF
FDGFX
FFXAA
DAADX
GFGGF
DAAAA
GXDFX
DGFXX
DDGXF
DAFGF
GAFXG
FAGAA
DFFGX
DDDAD
DGXDX
DDFXA
FDGFA
FGDFF
FADAX
GXGFG
FXXGF
GFFFG
FFFDX
FFF
10. Break the following ADFGX ciphertext. Once again, the Polybius square used was very
poorly chosen from a security standpoint! This message is shorter than the one in exercise 9, so it
will likely be the harder of the two for you.
GDAGD
GAFGD
GFFXG
AFAXA
XDGXX
ADDAD
GGGGX
FDDDF
FAGDG
FGAXA
GFGDX
XXFDD
XXFFG
XGGGD
AAGAF
DDGGF
DFXXF
DAXAA
XGGGX
GADFF
XGFAA
DFXGF
XDADA
DDGXG
AGDGX
FGDAD
GGGGD
ADFGA
DFGDX
FFGAD
DXDAX
FXDAA
XAAXG
DGFFD
FFDAA
ADAGA
GFDXD
ADADA
XGXXF
DADAD
GAAAD
XDGAA
AFFAA
DXDXF
AXDFF
GXDFD
GFGGG
AGFAA
DFXFX
ADGFA
AFAXX GGGFF DXXAG AGDDD XAAFD DGXDX DDXXF DFDFX XDFDG DDXDD
AADAA AAAAF XFDAA DDFAF GXXXA GAAAD ADDFA DDAAD AAAFX AAGFG
FDXDA DADXA FFADD AAA
11. The following ADFGX ciphertext used a typical Polybius square – neither particularly easy
nor specially constructed for maximum security. Recover the message.
GGXGD
FXFFF
AFAAA
FXGAG
GAADA
FAGFX
AXAXA
XAXAF
XDFFD
FGFFG
GAFAG
AGAGA
XGDDA
AGGXF
GXXGG
DDAAG
FFFDX
AAAFD
XAXFG
GFGAG
GXFAX
FXFAG
FGAXD
FGAFA
AXGXG
GFAFD
AADFD
GFGFF
AXGDF
FAGAA
DXDFF
AGFXA
AAGFD
FDAAD
GDDXD
AADFG
XFFAF
ADDDA
FADXA
FGXGF
FAFGG
XAAAA
AXADF
DAXAA
GGAGA
XDXFF
XAAAD
DAFDA
FAADF
GADXF
XXGFX
DADDX
AXDFA
AFGGF
DXFXF
FFXGX
ADAFA
FFDAF
FXGFF
AAAFA
XDXAF
XFFGD
GGXXG
XXAXX
DFFGG
AXADF
DDFFA
XAGXX
GFDDA
AAXAX
GFXAA
AFXXG
XXGXD
GXAFX
AAFAA
XGADA
XXXGD
GAXAA
AGFAG
GAGGD
FXADX
AXGXF
FDDXF
FAAAG
FGGXG
XDXDD
GGXFX
XDFAD
Download