ACCESS-UGS 1430
week 1 Math Portion 2011
Frequency analysis for substitution ciphers


College of Science
Math Department
ACCESS Math 2011



As poor Mary Queen of Scots found out, you can solve any monoalphabetic substitution cipher by hand if you have enough encrypted data to work with. (And even if your substitution cipher works on packets of 2 letters, or 7 letters, etc., frequency analysis will eventually yield answers, especially because nowadays cryptologists can use computer technology.)

Since part of the point of summer ACCESS is to make sure you're comfortable using technology at the U, we have a good excuse to use it now, to illustrate frequency analysis. We'll stay at the monoalphabetic level, but for fun some other time you could read about Vigenere's Chiffre Indechiffrable (Chapter 2 in "The Code Book") which actually was dechiffrable, and then use and modify the MAPLE code below to break the stage 4 cipher on page 355.

Stage 0

Try this Caesar shift code. (It has an important message for you.)

Stage 1

Now let's do a somewhat more complicated example together.
If you're using Firefox (not Explorer), open a new tab with substitution.mw.
Also open a new browser tab with the letter frequency table.

Now, open Maple 13 from the Engineering/Science directory inside the applications directory. Then, use the "open URL" option from Maple menu and paste in the URL of substitution.mw, and it should open right up in Maple. We'll use Maple to do some preliminary frequency analysis on our mystery message.

Then let's cut and paste the CIPHER text from substitution.mw, into a Word document, make a duplicate copy of the file (so we can make mistakes) and use the Find & Replace feature of Word to convert to plain text as we figure out the key. Remember to tell Word to match the case of the letters it is replacing. The decrypted message might seem a bit ironic depending on the weather we've been having recently.

Stage 2

Prof. Emina Alibegovic was once the graduate student TA during this week of ACCESS. She found an essay you might find interesting. It's been chopped into seven parts and encrypted using a secret substitution cipher. According to your group number, download the section of the essay into Word and start deciphering! Your group should recreate the plain text, and as well, create the encryption key. Print out a hard copy of your work. If you have time, notice the encryption key uses a keyword.....use the internet to figure out find out something about the person whose name this keyword was made from (by eliminating duplicate letters).

group1.doc
group2.doc
group3.doc
group4.doc
group5.doc
group6.doc
group7.doc

Stage 3

After all your hard work, let's read our results out loud to the class to hear the whole story.

If this story is indeed interesting to you and you would like to find out more on women in Mathematics, please visit the Women in Math Project, maintained by Professor Marie Vitulli of the University of Oregon. This is the most comprehensive site on the subject. (Thanks to Emily Putnam, who helped with ACCESS a number of years ago, for this link.)