assignment8_sol - MATH 135 Fall 2005 Assignment 8 Solutions...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: MATH 135 Fall 2005 Assignment 8 Solutions Hand-In Problems Exercise 7-1: The following is known to be a simple substitution cipher. Break the code. PCTPG ANJHT GDURG NEIDV GPEWN LPHYJ AXJHR PTHPG BTHHP VTHHT CIIDW XHIGD DEHLT GTSXH VJXHT SQNIW TUDAA DLXCV HXBEA TBTIW DS Solution: The given ciphertext has 102 letters. Analyzing it we see that the letter T appears 10 times, and this is one the most repeated letters. Because the letter E is so common in the english language, an educated guess is to try the substitution cipher f that sends E to T . This corresponds to the function f : A A defined by f ( x ) x + 15 (mod 26), where A 1, B 2, . . . . The inverse of this function would be f- 1 ( x ) x- 15 (mod 26). Applying f- 1 to the message we get PCTPG ANJHT GDURG NEIDV GPEWN LPHYJ AXJHR PTHPG Ciphertext ANEAR LYUSE ROFCR YPTOG RAPHY WASJU LIUSC AESAR Plaintext BTHHP VTHHT CIIDW XHIGD DEHLT GTSXH VJXHT SQNIW Ciphertext MESSA GESSE NTTOH ISTRO OPSWE REDIS GUISE DBYTH Plaintext TUDAA DLXCV HXBEA TBTIW DS Ciphertext EFOLL OWING SIMPL EMETH OD Plaintext With the correct spacing it would be an early user of cryptography was Julius Caesar messages sent to his troops were disguised by the following simple method . Exercise 7-11: Given n = pq , p > q , and ( n ) = ( p- 1)( q- 1) prove that p + q = n- ( n ) + 1 and p- q = p ( p + q ) 2- 4 n. Solution: For the first part, n- ( n ) + 1 = pq- ( p- 1)( q- 1) + 1 = pq- ( pq- p- q + 1) + 1 = p + q. For the second part, ( p + q ) 2- 4 n = p 2 + 2 pq + q 2- 4 pq = p 2- 2 pq + q 2 = ( p- q ) 2 . Since p- q > , we have p ( p + q ) 2- 4 n = p- q . Exercise 7-14: Each integer n is the product of two primes p and q , and the Euler phi function ( n ) = ( p- 1)( q- 1). Determine the prime factors p and q . n = 71531, ( n ) = 70992 Solution: From Exercise 7-11, p + q = n- ( n ) + 1 = 71531- 70992 + 1 = 540 p- q = p ( p + q ) 2- 4 n = p 540 2- 4(71531) = 74 Adding the two equations, 2 p = 614 so p = 307. Since p- q = 74 and p = 307, then q = 233. Check: (233)(307) = 71531 and (232)(306) = 70992. Exercise 7-28: Encrypt each message M , using the RSA public key ( e, n ) and the square and multiply algorithm. M = 2041, ( e, n ) = (13 , 3599) Solution: To encrypt the message M we have to calculate [ M 13 ] in Z 3599 . Using the square and multiply algorithm, 13 = (1101) 2 = 8 + 4 + 1 and 2041 2 1638 (mod 3599) 2041 4 1638 2 1789 (mod 3599) 2041 8 1789 2 1010 (mod 3599) 2041 13 = 2041 8 2041 4 2041 1010 1789 2041 (mod 3599) 192 2041 (mod 3599) 3180 (mod 3599) So the enciphered message of M is C = 3180. Exercise 7-36: Use the Chinese Remainder Theorem to decrypt each received ciphertext C , using the RSA private key ( d, n ) where n = pq ....
View Full Document

This homework help was uploaded on 04/18/2008 for the course LINEAR ALG MATH135 taught by Professor Vanderburgh during the Spring '08 term at Waterloo.

Page1 / 9

assignment8_sol - MATH 135 Fall 2005 Assignment 8 Solutions...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online