349 Crypto Homework 3 Solutions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Math 349 Cryptography, Fall 2011 Homework 3 solutions

(1) (3 pts/part) Use Fermats Little Theorem to do the following. (a) Find the least residue of 9794 modulo 73. (b) Find the solution to the congruence x86 6 (mod 29), if it exists. (c) Find the solution to the congruence x39 3 (mod 13), if it exists. Solution: (a) Since 73 is prime and 9 73, Fermats Little Theorem gives 972 1 (mod 73). Then 9794 = (972 )11 92 92 (mod 73) 8 (mod 73). (b) Since 29 is prime, Fermats Little Theorem gives x28 1 (mod 29). Then x86 = (x28 )3 x2 x2 (mod 29) and the solutions to the original equation are thus the same as the solutions to x2 6 (mod 29). By inspection, the solutions to this equation are x = 8 and x = 21. (c) Much like in the previous problem, we get, by Fermats Little Theorem, x39 = (x12 )3 x3 x3 (mod 13) so the solutions to the original equation are the same as the solutions to x3 3 (mod 13). However, by inspection we see that this equation has no solutions. (2) (5 pts) The congruence 71734250 1660565 (mod 1734251) is true. Can you conclude that 1734251 is a composite number? Solution: If 1734251 were prime, Fermats Little Theorem would apply since 1734251 7, and we would have 71734250 1 (mod 1734251). It would then follow that 1660565 1 (mod 1734251) since both 1660565 and 1 are congruent to 71734250 modulo 1734251. But this is clearly not true since 1734251 > 1660565 1 so it cannot be that 1734251 divides 1660565 1. (3) (5 pts) Use Eulers Formula to nd the least residue of 22007 modulo 15. Solution: (This is the same kind of a problem as (1)(a).) Since gcd(2, 15), Eulers Formula applies. We have (15) = (3)(5) = 2 4 = 8, so 28 1 (mod 15). Then 22007 = (28 )250 27 27 (mod 15) 8 (mod 15). (4) (3 pts/part) (a) Find the value of (97). (b) Find the value of (8800).

Solution: (a) Since 97 is a prime, (97) = 96. (b) Since 8800 = 25 52 11, we have (8800) = (25 )(52 )(11) = (25 24 ) (52 5) 10 = 3200. (5) (5 pts) If m 3, explain why (m) is always even. Solution: Suppose p is a prime factor of m and suppose it appears a times in the factorization of m, with a 1. Then (m) must contain a factor of pa pa1 by a formula we proved in class. But pa pa1 = pa1 (p 1) is necessarily even since if p is an odd prime, p 1 is even so the product is even, and if p is 2, then the product is again clearly even. Thus (m) contains a factor of 2 and is therefore even. (6) Suppose that p1 , p2 , ..., pr are the distinct primes that divide m. (a) (5 pts) Show that 1 1 1 1 1 (m) = m 1 p1 p2 pr (b) (3 pts) Use the formula from part (a) to compute (1, 000, 000). Solution: (a) Suppose m = pa1 pa2 par for some primes pi and positive integers ai . Then by properties of the Euler r 1 2 Phi Function, we have (m) = (pa1 pa2 par ) r 1 2 = (pa1 )(pa2 ) (par )) r 1 2 = (pa1 pa1 1 )(pa2 pa2 1 ) (par par 1 ) r r 2 1 2 1 = pa1 1 1 1 p1 pa2 1 2 1 1 p2 par r 1 1 pr

= pa1 pa2 par r 1 2 =m 1 1 p1

1 1 1 1 1 p1 p2 pr 1 1 1 1 . p2 pr

(b) Since 2 and 5 are the only primes dividing 1,000,000, we have (1, 000, 000) = 1, 000, 000 1 1 2 1 1 5 = 400, 000.

(We already computed (1, 000, 000) in class and this conrms what we found then.) (7) (5 pts/part) Find all n satisfying the following equalities. (a) (n) = n (Hint: Use the previous problem.) 2 (b) (n) = (2n) (c) (n) = 12 Solution: (a) If (n) = n , then, from the previous problem, 2 n 1 =n 1 2 p1 or 1 = 2 1 1 p1 1 1 p2 1 1 pr . 1 1 p2 1 1 pr

But this can only be true if the only prime factor of n is 2. Thus n must be of the form n = 2k for k N.

(b) If n is odd, then gcd(2, n) = 1, so (2n) = (2)(n) = 1 (n) = (n). If n is even, then it can be written as n = 2k m where k N and m is odd. Then (n) = (2k m) = (2k )(m) = (2k 2k1 )(m) = 2k1 (m). On the other hand, (2n) = (2 2k m) = (2k+1 m) = (2k+1 )(m) = (2k+1 2k )(m) = 2k (m). so (n) = (2n). Thus the equality we want holds if and only if n is odd. (c) First consider the following. Let n = pa . Using (pa ) = pa (p 1), it is not hard to see that (n) = 12 n = 13, (n) = 6 n = 7 or n = 9, (n) = 2 n = 3 or n = 4, (n) = 1 n = 2, (n) = 3 has no solution. Then if n = pa q b and (n) = (pa q b ) = (pa )(q b ) = 12, the possibilities are (pa ) = 6 and (q b ) = 2 = n = 7 3 = 21 or n = 7 4 = 28 or n = 9 4 = 36, (pa ) = 12 and (q b ) = 1 = n = 13 2 = 26. If n = pa q b rc and (n) = (pa q b rc ) = (pa )(q b )(rc ) = 12, then the only possibility is given by (pa ) = 1, (q b ) = 2, and (q b ) = 6 = n = 2 3 7 = 42. Since we cannot obtain 12 as a product of 4 distinct integers, these are the only possibilities. The complete list is thus n = 13, 21, 26, 28, 36, 42. (8) (4 pts/part) For each of the following, either prove the statement if it is true or provide a counterexample if it is false. (a) For all positive integers m and n, if gcd(m, n) = 1, then gcd((m), (n)) = 1. (b) For all integers n 2, if n is composite, then gcd(n, (n)) > 1. (c) For all positive integers m and n, if m and n have the same prime divisors, then n(m) = m(n). Solution: (a) This is false. Take m = 3 and n = 4. Then gcd(3, 4) = 1 but gcd((m), (n)) = gcd(2, 2) = 2. (b) This is false. Take n = 15. Then n is composite and gcd(n, (n)) = gcd(15, 8) = 1. (c) This is true. If m and n have the same prime divisors, then, from an earlier problem, (m) = m which is exactly what we want. (9) (5 pts) Find the smallest number which leaves a remainder of 3 when divided by 7 and leaves a remainder of 12 when divided by 17. (You might use this problem as an opportunity to look up and learn the Linear Congruence Theorem. Otherwise, mimic the way we solved a problem of this sort in class.) Solution: This problem is asking for a solution to the system of congruences x 3 (mod 7) x 12 (mod 17). Since 7 and 17 are relatively prime, Chinese Remainder Theorem says that this system has a solution (and there is only one solution x with 0 x 7 17). From the rst equation we have that x = 7y + 3 for some y Z. 1 1 p1 1 1 p2 1 1 pr = (n) , n

Plugging this into the second equation gives 7y + 3 12 (mod 17) or 7y 9 (mod 17). By Linear Congruence Theorem or inspection, the solution is easily found to be y = 11. Thus x = 7 11 + 3 = 80 is a solution to the original system.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy