Presentation is loading. Please wait.

Presentation is loading. Please wait.

Assignment #1 Solutions

Similar presentations


Presentation on theme: "Assignment #1 Solutions"— Presentation transcript:

1 Assignment #1 Solutions
January 10, 2006

2 Problem #1 Show that ((a mod m) + b) mod m = (a + b) mod m and
Practical Aspects of Modern Cryptography February 28, 2019

3 Answer #1 Let r1 = a mod m, r2 = (a + b) mod m, and r3 = ((a mod m) + b) mod m. Then there exist integers q1, q2, and q3 such that a = q1m + r1, a + b = q2m + r2, and ((a mod m) + b) = q3m + r3. Practical Aspects of Modern Cryptography February 28, 2019

4 Answer #1 (cont.) r2 – r = ((a + b) – q2m) – ((a mod m) + b) – q3m) = ((a + b) – q2m) – ((r1 + b) – q3m) = ((a + b) – q2m) – (((a – q1m) + b) – q3m) = (q1 – q2 + q3)m But 0 ≤ r2 < m and 0 ≤ r3 < m, so |r2 – r3| < m. Thus, (q1 – q2 + q3) = 0, and therefore r2 = r3. Practical Aspects of Modern Cryptography February 28, 2019

5 Answer #1 (cont.) Let r1 = a mod m, r2 = (a  b) mod m, and r3 = ((a mod m)  b) mod m. Then there exist integers q1, q2, and q3 such that a = q1m + r1, a  b = q2m + r2, and ((a mod m)  b) = q3m + r3. Practical Aspects of Modern Cryptography February 28, 2019

6 Answer #1 (cont.) r2 – r = ((a  b) – q2m) – ((a mod m)  b) – q3m) = ((a  b) – q2m) – ((r1  b) – q3m) = ((a  b) – q2m) – (((a – q1m)  b) – q3m) = (bq1 – q2 + q3)m But 0 ≤ r2 < m and 0 ≤ r3 < m, so |r2 – r3| < m. Thus, (bq1 – q2 + q3) = 0, and therefore r2 = r3. Practical Aspects of Modern Cryptography February 28, 2019

7 Problem #2 Find the mod 11 multiplicative inverse of each value x in the range 0 < x < 11. Practical Aspects of Modern Cryptography February 28, 2019

8 Answer #2 1 2 3 4 5 6 7 8 9 10 Practical Aspects of Modern Cryptography February 28, 2019

9 Answer #2 (cont.) 1 2 3 4 5 6 7 8 9 10 Practical Aspects of Modern Cryptography February 28, 2019

10 Answer #2 (cont.) The same cannot be done mod 12.
For example, 2Y mod 12 is even regardless of the value of Y. Therefore 2 does not have a mod 12 multiplicative inverse. Practical Aspects of Modern Cryptography February 28, 2019

11 Problem #3 Compute mod 11. Practical Aspects of Modern Cryptography February 28, 2019

12 Answer #3 31 mod 11 = 3 36 mod 11 = 3 32 mod 11 = 9 37 mod 11 = 9
Practical Aspects of Modern Cryptography February 28, 2019

13 Problem #4 Compute mod 33. Practical Aspects of Modern Cryptography February 28, 2019

14 Answer #4 21 mod 33 = 2 26 mod 33 = 31 22 mod 33 = 4 27 mod 33 = 29
Practical Aspects of Modern Cryptography February 28, 2019

15 Problem #5 If p is a prime, then for integers a such that 0 < a < p, then a p - 1 mod p = 1. Use this fact to show that 65 is not prime. Practical Aspects of Modern Cryptography February 28, 2019

16 Answer #5 Thus 65 is not prime. 21 mod 65 = 2 216 mod 65 = 16
Practical Aspects of Modern Cryptography February 28, 2019


Download ppt "Assignment #1 Solutions"

Similar presentations


Ads by Google