Cryptology - I: Exam 1 - Classical Cryptology + DES

Instructors: R.E. Newman-Wolfe and M.S. Schmalz


Exam 1 covered from the beginning of the class up to and including the discussion of the DES encryption algorithm. Cryptanalysis of DES was not included.

Rules. The following constraints hold for Exam 1:

Problem 1. Shift Cipher.

Given: Polish cryptography has reportedly declined in sophistication since their "glory days" with the Enigma Machine. They are now reduced to industrial espionage. A man named von Barjinsky has been accused of passing industrial secrets from a major nation to terrorists in the Middle East. You are the agent in charge of the crypto room when the following message comes in, complete with inter-word spaces.

The message is ciphertext generated from English plaintext by mono- alphabetic shift cipher. The numbers (e.g., 600) are unencrypted. You are told that this is a secret message about a crystal lens that is being used to focus dangerous radiation. Your assignment is to decrypt the message using statistics of single-symbols and digrams. Given the clues, this is an easy task if you think about the known structure of the English language, as well as properties of the shift cipher. A few facts from high-school physics might also be helpful.

Ctxt:

The following questions contain keywords to search for:

Problem 2. Traffic Analysis with Substitution Cipher.

Given: You are a WWII spy assigned to watch the Five Islands area, which consists of Islands A, B, C, D, and E (actual names). You are on Island A and can see Islands B, C, and E. The latter is uninhabited, with a small harbor but no water. You suspect that there is an island (D) over the horizon, since you can see puffs of smoke that spell out Roman letters in Morse Code. There are frequent exchanges of messages between Islands B and C, who occasionally send armed vessels cruising around the waters, but appear not to be conducting warfare. Later that day, you see the following message that appears to be Javanese [a real language] coming from island D, then what looks like a garbled alphabet coming from island B, the one closest to you.

 Ctxt-D: luiyyihaiiyoile  Ctxt-chars (order of use): luiyhaole
 Ctxt-B: aeiouoklmnptyoa  Ctxt-chars (order of use): aeiouklmnpty
 Ptxt-B: WEGOTOISLND_NOW  Ptxt-chars (order of use): WEGOTISLND_N
Wanting to make a good impression your first week on the job, you consult your handy Javanese dictionary and fail to find words that make sense. You guess that the first message must be decrypted, but can't immediately find the key. Instead, you recall your Crypto-I class discussion of traffic analysis and find that Ctxt-B is easily decrypted using a substitution, as shown above, except for one character, which you think may be a vowel. You guess that Ctxt-D has a similar encryption scheme but a simpler ciphertext (ctxt) alphabet, and a different key. You also know that the plain- text used by Island D's chief uses a vowel (an island name) as its most frequent letter. The island in question is the one on which he had a love affair for several years. Complete Ptxt-B correctly, decrypt Ctxt-D, and choose the safest appropriate action, based on givens, alternatives A-N, as well as common sense :)

Scoring: 1 point for Ptxt-B and 3 points for Ptxt-D, 1 point for the correct answer chosen from the list below (there is only one correct answer).

Actions: (Choose only one)

Method: The following steps suffice to produce a solution via traffic analysis and a small amount of cryptanalysis:

  1. There are five islands, A-E, of which B and C communicate regularly and send ships back and forth, but not for warfare. Thus, we can hypothesize that B and C are either friendly or neutral toward each other.
  2. Signals come from Island D, which are acknowledged (or replied to by Island B as: "We go to Island __ now". One can hypothesize that D and B know each other, and are headed for another island, i.e., A, C, or E. However, island E has a small harbor but no water and is uninhabited, so more reasonable choices for destinations are A and C.
  3. The givens say that the island name in Ptxt-B is likely a vowel. This narrows the choice to A, which is your island. Also, if we note (from the givens) that A is the most frequent character in the alphabet of Ctxt-D, then we have the following trial decryption of Ctxt-D:
                     Ctxt-D: luiyyihaiiyoile
    		 Ptxt-D? --a--a--aa--a--
    		
    Noting the oddity of the double letters between the first two a's, we observe that y in Ctxt-D could only be a consonant in English. A dictionary search yields y = T to be common choice. This gives:
                     Ctxt-D: luiyyihaiiyoile
    		 Ptxt-D? --atta--aat-a--
    		
    which can be hypothesized to mean:
                     Ctxt-D: luiyyihaiiyoile
    		 Ptxt-D? --attackaat-a--
    		
    i.e., ...attack A at...
  4. Now, it appears that B and D are headed toward island A, with hostile intent. What does one do? One cannot escape safely to island C, since C and B appear to have a non-hostile relationship. Since A and E are the sole remaining choices, and you want to leave A, E is the only choice. Since we do not know if B or D can see E, it is best to move to E by hidden route (answer F).
Problem 3. Histogram Manipulations (moments)

The following message in Hawaiian: "okoualohanoaikaikalani" "lhnln" is a line from a famous song. Compute its:

Problem 4. PROBLEM 4. Transposition Cipher

[5pt] Use your knowledge of digram and trigram statistics to decrypt the following transposed ciphertext. Show your work to obtain credit.

     Ctxt: htiwelhresunegoaarthenteastuerpirrowlvduaherbuigothnts 
	   nctauscseteoshttgiresenocnairgtonehwtahahesodecsnniezz
	
Method: One approach is to perform the following steps:
  1. Observe that there are two z's at the end of the ciphertext (a giveaway). Assuming the last two characters are "padding", we see that N = 108.
  2. Factoring N, we obtain 2x94, 3x36, 4x47, 6x18, and 9x12.
  3. Trying 2 and 4 as blocklengths, we see that no intelligible text results from any permutation. The same is true of a blocklength of 6.
  4. However, looking at the introductory text, we see that the phrase while there might be present in the first ten letters. Let's try to fit that hypothesis to a block length of 9:
         Index: 123456789 123456789 123456789 123456789 ...
         Ctxt.: htiwelhre sunegoaar thenteast uerpirrow ...
         Xpos1: 4736-21-8 473652198 473652198 
         Ptxt1: whilether eanogusra naeethtts (Wrong!)
         Xpos2: 4136-27-8 413652798 413652798 413652798 ...
         Ptxt2: whilether esnoguara nteethats purrierwo ...
    	
    On the first attempt, (Xpos1,Ptxt1), we recognize that there are two h's and two e's, and put dashes in the e positions. By permuting the h positions, we can obtain recognizable plaintext on the second attempt (Xpos2,Ptxt2).
  5. Dividing the ciphertext into blocks of nine characters and applying the transposition Xpos2, we obtain the plaintext:
    
            "While there's no guarantee that Spurrier would
            have brought instant success to the Tigers, one
            can't ignore what he has done since."
    
                          -- From the Alligator 10/96
    		
A similar result could have been obtained by marking the h's with dashes first, then permuting the positions corresponding to e's.

Problem 5. Rotor Machine

[1pt] a) What is the role of the Steckerboard in the Enigma Machine?

[2pt] b) How effective is the Steckerboard? Justify your answer mathematically.

[2pt] c) What function did the reflector perform in the Enigma machine? Give an example.

Problem 6. Vigenere Cipher (histogram attack)

[2pt] a) Given the following probability distribution of a plaintext corpus that has an alphabet of four letters:

Pr(f) = (0.08,0.24,0.36,0.32), f in {A,B,C,D},

construct the likely ciphertext probability distribution if the key has the following shifts: k = (-1,-2,0,0).

[1pt] b) If the ciphertext frequency distribution is nearly even, then what characteristics do you expect the key to have? Illustrate your answer with a numerical example.

[2pt] c) Under what conditions is the Kasiski attack infeasible? Justify your answer with supporting arguments.

Problem 7. Data Encryption Standard

DES has expansion permutations and permuted choices (PCs). We would normally lose info with permuted choices, which are used twice in each DES cycle.

[1pt] a) Where and how are PCs used?

[2pt] b) Show that information is not lost when PCs are used in DES.

[2pt] c) Relate DES to Shannon's observations about product ciphers. Be specific in showing how DES satisfies the desired properties.