This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 2. O(n 2 ) 3. No, O(n) using dictionary Modular Exponentiation Prove Â± Â²Â³Â´ÂµÂ²Â¶ Â· Â¸ Â²Â³Â´ÂµÂ²Â¶Â¹ Â± Â²Â³Â´ÂµÂ²Â¶ Solution: See lecture note on mod Modular Inverse Find the modulo inverse of 103 in base 4 (Hint: 103 is in base 4) Solution: 1: 3+3 = 6, 6 mod 4 = 2 2: 2+3 = 5, 5 mod 4 = 1 Modulo inverse is 3 Key Generation Given two prime numbers, 61 and 53 1. Find public key 2. Let e = 17, encrypt a message m, m = 3 Solution: 1. N = 61 x 53 = 3233, e is a small prime < (p1)(q1) = 3120, choose e = 17 2. 3^17 mod 3233 = 1211 Test for Prime Number Use Fermatâ€™s little theorem to test if 23 is a prime number (Hint: avoid rounding) Solution: Test with a=2: 2^(231) mod 23 = 1 (pass) Test with a=3: 3^(231) mod 23 = 1 (pass) Test with a=5: 5^(231) mod 23 = 1 (pass) Thus, 23 is a prime number...
View
Full
Document
This note was uploaded on 03/31/2012 for the course MIE 335 taught by Professor Frances during the Spring '12 term at University of Toronto.
 Spring '12
 Frances

Click to edit the document details