This preview shows pages 1–2. Sign up to view the full content.
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 Fermats 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
 Spring '12
 Frances

Click to edit the document details