CX 103 Introduction To Computers

Spring 2001

Assignment 31: Due Friday, May 4

Cryptology Worksheet

1. Perform the following arithmetic in Z26: 7 + 7, 7 + 19; 7 + 17, 5*7, 7 - 17, 7*7.

2. Perform the following in Z11: 7 + 8, 7 + 10, 5*7, 7 - 9, 7*7.

3. What is the additive inverse of 5 mod 7? (We are looking for the number x such that x + 5 = 0 in Z7. Another way to write this fact is (x + 5) %7 = 0).

4. What is the additive inverse of 3 mod 26?

5. Encrypt the word JAVASCRIPT using a Caesar cipher and shift 5.

6. The following message (created by Professor Bob Martin) was encrypted using a Caesar Cipher with shift 20 Decrypt this message:

NBCM WFUMM CM GILY ZOH NBUH MYR!

7. Break the following using a frequency analysis. It was encrypted using a generalized Caesar Cipher.

HUFDHF, P RLLW WPJABYPUN HSS AOLzl SPAASL RPKZ WSHFPUN ZVTL NHTL PU AOPZ IPN MPLSK VM YFL HUK HSS. AOVBZHUKZ VM SPAASL RPKZ, HUK UVIVKFZ HYVBUK - UVIVKF IPN, P TLHU - LEJLWA TL. HUK P'T ZAHUKPUN VU AOL LKNL VM ZVTL JYHGF JSPMM. DOHA P OHCL AV KV, P OHCL AV JHAJO LCLYFIVKF PM AOLF ZAHYA AV NV VCLY AOL JSPMM - P TLHU PM AOLF'YL YBUUPUN HUK AOLF KVU'A SVVR DOLYL AOLF'YL NVPUN P OHCL AV JVTL VBA MYVT ZVTLDOLYL HUK JHAJO AOLT. AOHA'Z HSS P'K KV HSS KHF. P'K QBZA IL AOL JHAJOLY PU AOL YFL, HUK HSS. P RUVD PA'Z JYHGF, IBA AOHA'Z AOL VUSF AOPUN P'K YLHSSF SPRL AV IL. P RUVD PA'Z JYHGF.

8. Break the following using a frequency analysis. It was encrypted using a generalized Caesar Cipher.

ODOQVS KSRRWBU DFOMSF BCK MCI KWZZ TSSZ BC FOWB, TCF SOQV CT MCI KWZZ PS GVSZHSF HC HVS CHVSF. BCK MCI KWZZ TSSZ BC QCZR, TCF SOQV CT MCI KWZZ PS KOFAHV HC HVS CHVSF. BCK HVSFS WG BC ACFS ZCBSZWBSGG, TCF SOQV CT MCI KWZZ PS QCADOBWCB HC HVS CHVSF. BCK MCI OFS HKC PCRWSG, PIH HVSFS WG CBZM CBS ZWTS PSTCFS MCI. UC BCK HC MCIF RKSZZWBU DZOQS HC SBHSF WBHC HVS ROMG CT MCIF HCUSHVSFBSGG OBR AOM MCIF ROMG PS UCCR OBR ZCBU IDCB HVS SOFHV.

9. Suppose you and a friend wish to communicate in secret but are worried that a simple Caesar cipher is insecure. Instead, you agree to encode your message twice, first by shifting by 8 and then by shifting the result by 21. Is this new scheme more secure? Why?
 
 

10. The following cryptogram was produced using a keyword to generate a mixed alphabet as described in class. Decode the cryptogram and find the keyword that was used.

PF YPCC AX QPHX FK BK IKJX TQO BXF EKJX ECXXD. FIXSX TSX QK XGTJE TF IKJX TQO FIX UKKO PE T CKF AXFFXS FITQ DSKHFKS.

Some letter frequencies: X(15) F(11), K(11), T(7), S(6), I,Q (5), P,J,E(4)

Digraphs: AX, FI, KJ, TQ, XF all occur 3 times.

11. Decode the following cryptogram and find the keyword that was used:

FIX SCFQPS'T FIQUN DCUBXTF HPJELFXU HPJECSM TIPHYXN QSVXTFPUT MXTFXUNCM OQFI FIX SXOT FICF QFT XCUSQSBT ICN RCDDXS OXDD TIPUF PR EUPZXHFQPST NXTEQFX TFUPSBXU FICS XGEXHFXN TCDXT

Some letter frequencies: X(20), T(15), F(18), S(11), C,P,U (10), I(9)

Digraphs FI(6), TF(5), FX(4), IC(3), PS(3), QF(3)

12. What is the multiplicative inverse of 5 mod 7? (We are looking for the number x such that 5x = 1 in Z7)

13. What is the multiplicative inverse of 3 mod 26?

14. Does 7 have a multiplicative inverse mod 12? If so, what is it?

15. Does 4 have a multiplicative inverse mod 12? If so, what is it?

16. Which numbers have multiplicative inverses mod 12?

17. In "regular arithmetic" numbers such as 4, 9, 16 and 36 are known as "perfect squares" since each is the square of another integer. In "regular arithmetic," 2 and 3 are not perfect squares. What are the perfect squares in Z7? Is 2 a perfect square mod 7? How about 3 mod 7? Is 3 a perfect square in Z11?

18. Is 15 prime? Is 15 relatively prime to 26? (An integer M greater than 1 is prime if it has no integer factors other than 1 and M).Two integers are relatively prime if there largest common factor is 1.

19. What is GCD(24, 42)? The GCD (greatest common divisor) of two integers is the largest integer which is a factor of both of them.

20. According to the website www.mersenne.org, what is the largest known prime? How many digits does it have?