<<

Math 135, Summer 2007 1.2 Crypto; Models, Maxims, and Mystique

3. Let A(x) be the (see page 3) encipherment of a text string x. That is A −→ Z, B −→ Y , and so on. Show that A is its own inverse. Such a function is called an involution. Give another example of a simple substitution that is an involution.

Solution: The table below has as its rows: plaintext characters, characters enciphered by one applica- tion of Atbash, and characters enciphered with 2 applications of Atbash.

x ABCDEFGHIJKLMN ··· UVWXYZ A(x) ZYXWVUTSRQPONM ··· FEDCBA A(A(x)) ABCDEFGHIJKLMN ··· UVWXYZ It is easy to see that the first and third rows contain identical elements (except the names of the rows). A is its own inverse since A ◦ A is the identity map.

ROT13 is another simple substitution scheme which is its own inverse.

6. Let P (x) be the Polybius checkerboard (see page 5) encipherment of a plaintext string x, and let s(x) be the function defined in Example 1.2.2. 1. Show by example that, in general, (P ◦ s)(x) 6= (s ◦ P )(x). 2. By looking at two similar plaintexts such as TEST and PEST, show that s ◦ P is not a substitution. Is P ◦ s a substitution? 3. Explain why, in contrast with the composition of two simple substitutions, this composition is a stronger cryptosystem than either substitution or transposition. Solution: 1. Consider the word BE. P (s(BE)) = P (EB) = 1512, while s(P ((BE)) = s(1215) = 2151. 2. s(P (TEST)) = s(44154344) = 44513444 while s(P (PEST)) = s(35154344) = 53513444. It seems like a substitution to me. However, P (s((TEST )) = P (ETTS) = 15444443 while P (s(PEST)) = P (EPTS) = 15354443 so this is not a substitution. 3. The composition of two simple substitutions is again a simple substitution. In the grand scheme of things one random simple substitution is as good (or bad) as any other. So composing two simple substitution cryptosystems doesn’t result in a stronger cryptosystem...just a different one. On the other hand composing a transposition then a substitution adds to the complexity of the cryptosystem. We have done something qualitatively different with our two operations. Since neither of these two operations “cancels” the other out (either in total or partially) we have made the method more complex. 2.1 Shift and Modular Arithmetic

1. The following are produced with the Caesar . Decipher them. 1. HOYLV ZDV VLJKWHG DW PDLQ DQG XQLRQ 2. SUHVL GHQWD QGFRQ JUHVV UHDFK EXGJH WDJUH HPHQW Solution: 1. Elvis was sighted at Main and Union. 2. President and Congress reach budget agreement. 3. In each of the following, find and r such that b = qm + r, according to the division principle. 1. b = 127, m = 7 2. b = 473, m = 26 3. b = -43, m = 4 Solution: 1. q = 127 DIV 7 = 18 and r = 127 MOD 7 = 1. 2. q = 473 DIV 26 = 18 and r = 473 MOD 26 = 5. 3. q = −43 DIV 4 = 11 and r = −43 MOD 4 = 1. 11. The formula y = (x + 12) MOD 26 was used to encipher a message to obtain URKAG OMZFN QWUZP MFXQM EFNQH MSGQ Find the formula for decryption and decipher.

Solution: The formula for decryption will be obtained by solving the above equation for x. The result is x = y − 12 MOD 26 = y + 14 MOD 26. The decrypted message is If you can’t be kind at least be vague. 12. Use a modular arithmetic formula to decipher the message OZWF QGM UGEW LG S XGJC AF LZW JGSV LSCW AL which was enciphered with an 18-shift.

Solution: When you come to a fork in the road take it. The formula to decipher was x = y + 8 MOD 26 where y stands for the encrypted character and x for the plaintext character.

13. The following method was enciphered by a shift. Using letter frequency and other facts about the English language, identify one plaintext- letter pair and use it to obtain the and a decipher- ment of the message. BZCM EWZBP QA QV JMQVO VWB AMMUQVO Solution: The two two-letter encrypted words “QA QV” are ripe for attacking. Using our knowledge of two-letter English words and the most common letters in the English language we should be able to reduce the likely choices for key down to a fairly small number. There are no two-letter words that start with E so we throw that out. There aren’t many choices of two-letter words starting with T and they don’t fit together in a sentence so we throw that one out too. The remaining likely choices for Q’s plaintext buddy are A, O, and I. The two letter words starting with A are: ad, an, as, at (sorted alphabetically). The two letter words starting with O are: of, on, or. The two letter words starting with I are: if, in, is, it. If A −→ Q under our shift cipher then the shift is 16. And “QA QV” decrypts as “AK AF.” Since this is not English we safely discard A as Q’s plaintext buddy. If O −→ Q under our shift cipher then the shift is 2. And “QA QV” decrypts as “OY OT.” This is not English so we discard the thought of O as Q’s plaintext buddy. If I −→ Q under our shift cipher then the shift is 8. And “QA QV” decrypts as “IS IN.” This is English and it looks like I might be Q’s plaintext buddy. Next we try 8 as the key and obtain True worth is in being, not seeming.