Skip to main content

Exercises 2.4 Bringing it all Together

For exercises Exercise 2.4.1 to Exercise 2.4.4 you will review the ideas we have explored in this chapter. When you are done you should have generated for yourself a guide which you can use when you are attempting to analyze a piece of cipher text. To begin find a new piece of relatively typical English text which is at least 1000 characters long. Then, you can use the n-gram counter, word counter, and string counter at the bottom of the page to help you examine the text for the following information:

1.

letter frequencies

2.

bi-gram (two letter combination) and tri-gram (three letter combination). frequencies

3.

Common words

4.

prefixes and suffixes

Now, finally, put together all the information you have just gathered into a neat one page analysis guide. You should type this up neatly, in a reasonably sized font. If you want you can print out a copy of Figure C.0.4 and use it to help organize the information. It should include:

  • A list of frequencies for all the individual letters in the alphabet.
  • The frequencies for at least the top 25 bi-grams and tri-grams.
  • A list of the top 25 most common words.
  • A list of your top 25 most common prefixes and suffixes.
  • And, any other types of information you think might be useful which you have looked at in this chapter.
5.

Use the skills we have been practicing in class together with the cheat sheet you just put together in order to crack this cipher. (It may also help to take a look at Appendix E.)

LU ZOO GSZG RH TLLW, HFYORNRGB RH HFKIVNV. HFXXVVWRMT RH GSV
XLNRMT GLTVGSVI LU ZOO GSZG RH YVZFGRUFO. UFIGSVIZMXV RH GSV
ZTIVVNVMG LU ZOO GSZG RH QFHG. KVIHVEVIZMXV RH GSV ULFMWZGRLM
LU ZOO ZXGRLMH. - OZL GAF
Hint

Be sure to look at repeated common words. Also, as you uncover cipher letters try writing them down in Table 1.1.2 and looking for a pattern.

Answer

“of all that is good, sublimity is supreme. succeeding is the coming together of all that is beautiful. furtherance is the agreement of all that is just. perseverance is the foundation of all actions.” - lao tzu

Solution

When you look at the frequencies you see that G and V are most common, next most common are R and Z. So we know that one of the first two is probably e while the other is t, and one of the latter two is likely a, assuming the frequencies are fairly normal.

Then we see that GSV and GSZG appear frequently, and GS is the most common bi-gram (so that it is likely th). Putting this together we see that e is V, t is G, a is Z, and h is S. So that GSV and GSZG represent the and that.

We can also see that ZOO appears four times with Z replaced by a this looks like aOO, the likely candidate is that ZOO is all, so that O is l.

At this point we can start writing down the letters we have in the monoalphabetic substitution table (Table 1.1.2). When you do that you will hopefully notice that the cipher letters are in reverse alphabetic order, so this was likely enciphered with atabash which we learned about in Exercise 1.3.4.

6.

Use the skills we have been practicing in class together with the cheat sheet you just put together in order to crack this cipher. (It may also help to take a look at Appendix E.)

SNE ORGGRE VF VG GB QNER ZVTUGL GUVATF, GB JVA TYBEVBHF GEVHZCUF,
RIRA GUBHTU PURPXRERQ OL SNVYHER ... GUNA GB ENAX JVGU GUBFR CBBE
FCVEVGF JUB ARVGURE RAWBL ABE FHSSRE ZHPU, ORPNHFR GURL YVIR VA N
TENL GJVYVTUG GUNG XABJF ABG IVPGBEL ABE QRSRNG. - GURBQBER
EBBFRIRYG
Hint

Be patient, the letter frequencies are ... abnormal.

Answer

“far better is it to dare mighty things, to win glorious triumphs, even though checkered by failure ... than to rank with those poor spirits who neither enjoy nor suffer much, because they live in a gray twilight that knows not victory nor defeat.” - theodore roosevelt

Solution

Looking at a basic frequency analysis we see that the most common single letters are G, R, B, E, V, U, A, F, N, H, the most common bi-gram is GU, and the most common tri-gram is GUR; from this we may conclude that G is t, U is h, and R is e.

Since the word spacing is preserved we also have the two letter words VF, VG, GB, and VA, and the one letter word N, these allow us to deduce the ciphertext-plaintext pairs N - a, B - o, V - i, and F - s.

When we start writing down the ciphertext we have worked out under the plaintext alphabet (use Table 1.1.2) we can see that the letters we have discovered are in the correct order and with the correct spacing so that we appear to have a shift, trying this as a possible solution we see that we are correct and that a was shifted to N.

7.

Use the skills we have been practicing in class together with the cheat sheet you just put together in order to crack this cipher. (It may also help to take a look at Appendix E.)

WKSTD QJUTJ OTKLE JGGJI DQUQU SFFYS CUDRL PSTKL PTKSI SKDIR

PSIEL DIQJF VDICS MPJHF LGJOT KDQQJ PTTKL CPSIR TKDIC DQTJH

LSHFL TJPLS QJIHS EBWSP RTKST DQSVL PYUQL OUFSE EJGMF DQKGL

ITSIR SVLPY LSQYJ ILHUT MLJMF LRJIJ TMPSE TDELD TGUEK DITKL

LVLPY RSYSO OSDPQ JOFDO LDTDQ GJPLU QLOUF TJPLS QJIOJ PWSPR

SIRQJ TKLJT KLPEJ GLQTJ HLILC FLETL RTKLP LSPLO DOTYW KJESI

PLSQJ IQYIT KLTDE SFFYO JPJIL WKJES IPLSQ JISIS FYTDE SFFYG

JQTML JMFLD OYJUR LQEPD HLSTP SDIJO LVLIT QTJTK LGWDF FTLFF

YJUWK STTKL PLQUF TWJUF RHLTK LYESI MUTTK JQLLV LITQT JCLTK

LPDIT KLDPG DIRQS IRSPC ULOPJ GTKLG TKSTQ JGLTK DICWD FFEJG

LTJMS QQTKL PLSPL OLWML JMFLK JWLVL PWKJD OYJUT JFRTK LGSPL

QUFTW JUFRH LSHFL TJLVJ FVLOP JGTKL DPJWI DIILP EJIQE DJUQI

LQQWK STTKL QTLMQ WLPLW KDEKF LRUMT JTKST PLQUF TTKDQ MJWLP

DQWKS TDGLS IWKLI DTSFB JOPLS QJIDI CHSEB WSPRJ PSISF YTDES

FFYSQ TURYD IQESP FLTQK LPFJE BKJFG LQ
Hint

This is a quote from a famous fictional nineteenth century detective and makes use of a keyword cipher.

Answer

“... what is out of the common is usually a guide rather than a hindrance. In solving a problem of this sort, the grand thing is to be able to reason backwards. That is a very useful accomplishment, and a very easy one, but people do not practice it much. In the every-day affairs of life it is more useful to reason forwards, and so the other comes to be neglected. There are fifty who can reason synthetically for one who can reason analytically.” - Sherlock Holmes in Study in Scarlet by Sir Arthur Conan Doyle

Solution

As always you need to start with a basic frequency analysis. From this you immediately get that the ten most common letters are L, T, J, S, Q, P, I, K, F, D, the most common bi-gram and tri-gram are TK and TKL, L appears frequently before and after other letters (in particular P), and finally TKLPL and TKLDP appear multiple times; from all of this we get the ciphertext-plaintext pairs L - e, T - t, H - k, P - r, and D - i.

Then we can start filling in bits and pieces of the message and looking for more clues, for example LVLPY becomes eVerY which we reasonably assume is every. Also, with the hint that it is a keyword cipher we can line up the ciphertext letters we have worked out underneath a copy of the plaintext alphabet (Table 1.1.2) and look for patterns. Continuing in this way we can finally arrive at the solution and the key is KEYWORD: SHERLOCKED, key letter: a.

8.

Consider the following comment from John Falconer:

I have not meddled here with any language but English; ... However, by a little practice of decyphering in one language, you may decipher an epistle in any, even tho the plain speech itself be a mystery to you, if you first observe the frequency of the letters, the terminal letters, what letters can be doubled in the beginning, middle, and end of words; and such general rules.[4, p. 12]

Find a large piece of typical text written in a language other than English; it needs to be native to that language not a translation from another language. Perform an analysis of this text and then create a cheat sheet just like you did for English (exercises Exercise 2.4.1 to Exercise 2.4.4). Finally, encipher a message written in this new language which your classmates can try to decipher using your cheat sheet.

9.

A lot of the general advice that Falconer gave us was good, but his specifics didn't match what we expect to see when we read a more modern text. Find a typical piece of text or literature from seventeenth century England (or better yet Scotland) and analyze this text to create a cheat sheet like the one you did for modern English (exercises Exercise 2.4.1 to Exercise 2.4.4). How do your findings match what Falconer told us to expect?

N-Gram Counter:

Figure 2.4.1. N-Gram Analysis Tool

Word Counter:

Figure 2.4.2. Word Counter Tool

String Counter Tool: You can use this tool to look for specific combinations of letters in you text rather than gathering gerneral information. This is helpful for looking for prefixes, suffixes, and double letters.

Figure 2.4.3. String Counter Tool