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:
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:
Method: Construct the following table and look for the encryption of ray (a trigram is usually sufficient):
Char Maps-to... ----+---------------------------------------- r | s t u v w x y z a b c d e f g h i j k... a | b c d e f g h i j k l m n o p q r s t... y | z a b c d e f g h i j k l m n o p q r...The shift a |-> k is found at the beginning of the third row (i.e.,
ray
|-> BKI
). In English,
modifiers appear before nouns, so look at the last ten characters
of the second line of ciphertext. The last five letters,
which are QKWWK
, decrypt to gamma. [1pt] How many small Detectors were used? Ans: 3x3 array = 9 detectors
Method: Find the numbers (e.g., 600, 8, 3H3). Look at the text around them, and decrypt the surrounding ciphertext using the shift deduced above. You find that a 3x3 array of small detectors was used. Since 3x3 = 9, there were nine detectors employed.
[3pt] Now that you have all the important clues, write the first four plaintext sentences.
Ans: A crystal diffraction lens was construct at Argonne National Laboratory for use as a telescope to focus nuclear gamma rays. It consisted of 600 single crystals of germanium arranged in 8 concentric rings. The mounted angle of each crystal was adjusted to intercept and diffract the incoming gamma rays with an accuracy of a few arc sec. The performance of the lens was tested in two ways.
Method: If you don't already know the shift, you can use the brute-force method of trying the 26 possible decryptions of, say, the first ten characters in the message. Recognizable words will appear when the correct shift position is discovered.
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_NWanting 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:
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...
The following message in Hawaiian: "okoualohanoaikaikalani" "lhnln" is a line from a famous song. Compute its:
[1pt] d) mean character
[1pt] e) standard deviation about the mean, assuming F
is indexed by {1,2,...,N}.
(h) =
(N-1 ·
[(6-1.833)2 + (4-1.833)2 +
2 · (3-1.833)2 +
2 · (2-1.833)2
+
2 · (1-1.833)2
4 · (0-1.833)2])1/2,
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 nctauscseteoshttgiresenocnairgtonehwtahahesodecsnniezzMethod: One approach is to perform the following steps:
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
). 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
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.
Additionally, the Steckerboard is inverted as the last step of the Enigma encryption. Denoting the plaintext as a, the rotor cipher as f, and the Steckerboard substitution as S, we express the Enigma encryption as:
e(a) = S-1(f[S(a)]),
which implies that the inverse Steckerboard substitution is included in the ciphertext. This clearly provides information on S to an adversary, which decreases the security of the Enigma machine.[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).
0 shift: (0.16,0.48,0.72,0.64) -- taken twice -1 shift: (0.24,0.36,0.32,0.08) -2 shift: (0.36,0.32,0.08,0.24) ------------------------------- -- Add Pointwise b = (0.76,1.16,1.12,0.96) -- Non-normalized resultNormalizing the sum of b to 1.0, we obtain Pr(c) = (0.19,0.29,0.28,0.24) .
[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.
In practice, we search the ciphertext for pairs of identical segments and tabulate the distance between the starting points of each element in a given pair. Thus, we have two primary implementational problems if the cipher period N is too long, namely,
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?
The other place PCs are used is in the S-boxes, where the 48-bit expanded right half of the (partially encrypted data) is selected down to 32 bits (after combining it with the 48-bit cycle key). This is not so much a PC as a 32-bit encoding of a 48-bit quantity that has in it some redundancy. (That is, there is not really a mapping of some of the input bits to the output bits with some inputs dropped, but all of the input bits help select the output bits....)
[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.
DES alternates transposition with substitution in each cycle, along with the XOR with the cycle key. If we simplified DES to use 32-bit cycle keys, then we would have an XOR with the cycle key, then a substitution (only one, not one of 4), followed by a transposition (the P-box). DES complicates this slightly with the EP/PC/S-Box approach which uses 48-bit intermediate results, but the basic scheme of each cycle is a product cipher.