Sie sind auf Seite 1von 2

Homework 1 of CS549 Cryptography and Network Security

Assigned: Sept. 5th, 2004 Due Date: 5PM, Oct. 4th, 2004 Fall 2004, CS Department, IIT There are 8 questions in HW2. Please type your answer. You can either print it and give TA the hardcopy or send TA the electronic le in PDF or Postscript format. Put your name on your solution and name your le as lastname-HW1.pdf, where lastname is your last name. Notice: We do not accept MS WORD le and we prefer electronic submission. 1. (10 points) Find the smallest positive integer x such that x 31 = 1 mod 73. Answer: To solve this, we use the Extended Euclid method. It is equivalent to nd the inverse of 31 when modular 73. First of all, gcd(31, 73) = gcd(11, 31) = gcd(9, 11) = gcd(2, 9) = gcd(1, 2) = 1. Thus, 311 mod 73 does exist. We now show how to compute 311 mod 73 using extended Euclid method. 11 31 9 11 2 9 1 2 Thus, we have 1 2 = 4 1 1 0 1 1 1 0 2 1 1 0 2 1 1 0 31 73 = 2 1 1 0 2 1 1 0 1 1 1 0 4 1 1 0 31 73 11 31 9 11 2 9

By simple calculation, we have 1 2 = 33 7 14 3 31 73

Then we have 33 31 14 73 = 1. So 311 = 33 mod 73. 2. (10 points) Find the smallest positive integer x such that x 31 = 4 mod 73 and x 7 = 5 mod 12. Answer: To solve this, we need use the Chinese Remainder Theorem. First we transform the two equations to the standard form of the Chinese Remainder Theorem. Equation x 31 = 4 mod 73 is equivalent to say x 31 (31 1 mod 73) = 4 (31 1 mod 73) mod 73. From the previous computation, we know 31 1 mod 73) = 33. Thus, rst equation becomes x = 59 mod 73. Equation x 7 = 5 mod 12 is equivalent to say x 7 (71 mod 12) = 5 (71 mod 12) mod 12. We can use extended Euclid method to nd that 71 mod 12 = 7. Thus, the second equation becomes x = 11 mod 12. Thus, we need solve the following CRT problem x = 59 x = 11 mod 73 mod 12

Using the CRT, we know that x = 59 12 (121 mod 73) + 11 73 (731 mod 12) mod 12 73

We again use the Extended Euclid method to nd 121 mod 73. 1 12 = 6 1 1 0 12 73

Thus, 1 = (6) 12 + 1 73. It implies that 121 mod 73 = 6 mod 73 = 67 and 731 mod 12 = 1. Then x = 59 12 (121 mod 73) + 11 73 (731 = 59 12 67 + 11 73 1 mod 876 = 59 mod 876 mod 12) mod 12 73

3. Prove that an integer b is quadratic-residue for Answer: We prove the statement as follows.
p1

mod p if and only if b

p1 2

= 1 mod p.

First: b is quadratic-residue for mod p b 2 = 1 mod p. By denition, b is quadratic-residue for p1 mod p implies that there exists an integer a such that b = a2 mod p. Thus, b 2 = ap1 , which is 1 mod p from the Fermat theorem. Second: b 2 = 1 mod p b is quadratic-residue for mod p. Notice that for Zp there always exists a primitive root. Let g Zp be such a primitive root. Then by denition of the primitive root, integer b can be expressed in format b = g i mod p for some integer 0 i p 1. If i is an even number, say i = 2j, then clearly b = g 2j = (g j )2 mod p. In other words, b is a quadratic-residue for mod p. If i is an odd number, say i = 2j + 1, then clearly b
p1 p1 2 p1

= (g 2j+1 )

p1 2

= (g j )p1 g

p1 2

mod p.

Notice that b 2 = 1 mod p be assumption and (g j )p1 = 1 mod p from the Fermat theorem. Thus, p1 we have 1 = 1g 2 mod p. Thus, the order of g when mod p is at most p1 , which is a contradiction 2 to the fact that we choose g to be a primitive root mod p. In other words, it is impossible that i is an odd number. This nishes the proof. 4. Compute the value of 20052003 mod 11. Answer: We compute the value based on the Euler theorem. Notice that a(n) = 1 mod n when gcd(a, n) = 1. It is easy to show that 20052003 mod 11 = (2005 mod 11)2003 mod 11 = 32003 mod 11.

Since gcd(3, 11) = 1, we have 310 = 1 mod 11 due to (11) = 10. Thus, 20052003 mod 11 = 32003 mod 11 = 33 mod 11 = 5.

5. What will be 20082008 mod 12? It is dicult than previous one. Clearly, 20082008 mod 12 = 42008 mod 12. But now, gcd(4, 12) = 1 so we cannot use Euler theorem. Answer is 4 since 42 = 4 mod 12. Thus, 4x = 4 mod 12 for any positive integer x.

Das könnte Ihnen auch gefallen