In English and other alphabetic languages certain letters
appear with a greater frequency than others. Anyone who has watched Wheel of Fortune knows
that the consonants r, s, and t are guessed before others, and vowel e is the most popular
purchase. In English, the ranking of letters from most frequently occurring to least
frequently occurring is: E T O A N I R S H D L C W U M F Y G P B V K X Q J Z
The NetAdventure Super decoder operates on this principle. It assumes that text has
been encoded with a simple random replacement scheme (in other words, each letter is
replaced with another randomly selected letter, everywhere it appears in the text). The
NetAdventure Super decoder finds the number of times each letter appears in the encoded
text and ranks the letters according to their relative frequencies. Then it replaces the
most common letter in the text with E, the most frequently occurring letter in English,
the second most common letter in the text with T, and so on.
This decoding method would work perfectly if the encoded document had exactly the same
relative letter frequencies as the English language as a whole. If the sample of encoded
text is small, the chance that it would have exactly the same letter frequencies as the
English language as a whole is not very good.
For example, if the encoded text is an article on the migratory habits of quail, the
relative frequency of the letter that replaced q in the code will be higher than is
typical for English. The decoder will then replace that letter with the letter of
corresponding frequency in English, which will not be correct. The larger the encoded
sample, however, the more likely for the frequencies to parallel those in English, and
thus the more likely the decoder will decode correctly.
We wrote a program for NetAdventure called "Super EnDec Simulation," which
encodes and decodes messages using the simple replacement code scheme we've been talking
about. There are two parts to the EnDec Simulation: an Encoder mode and a Decoder mode.
When the simulation starts the EnDec will be in the Encoder mode, which allows you to
either load a sample message into the Encoder or type in a message of your own. By
swapping letters around you can create your own replacement code - the resulting encoded
message will appear in the lower window.
1) Encryption
The EnDec Simulation has three sample uncoded messages which you will need to encrypt
to complete this challenge. Before attempting to do this, however, you may wish to use the
EnDec to create your own encoded messages, so you can get a feel for the entire encryption
/ decryption process.
When you have encoded the three sample messages using the Decoder portion of the EnDec
Simulator answer the following questions:
a) Enter the translation keys for the three encoded messages.
b) Explain any strategies you used.
c) Explain any problems you had with encryption.
2) Decryption
The EnDec Simulation has three sample coded messages which you will need to decode to
complete this challenge. Before attempting to do this, however, you may wish to use the
EnDec to create your own encoded messages, so you can get a feel for the entire
encryption/decryption process.
When you have decoded the three sample messages using the Decoder portion of the EnDec
Simulator answer the following questions:
a) Enter the translation keys for the three coded messages.
b) Explain any strategies you used.
c) Explain any problems you had with decryption.