This preview shows page 1. Sign up to view the full content.
Unformatted text preview: a. consider your student number as three 3-digit numbers b. use a prime number greater than 100, for example, 101 8. Given two prime numbers, 23 and 31. Find public and private key 9. You were given two algorithms to compute a b mod N for large values of a, b, N a. Which algorithm is faster? Why? b. Which algorithm breaks first as N increases in size? Why? while (file still open) let n = size of file for every 100,000 kilobytes of increase in file size double the amount of memory reserved modexp1(a,b,N) set ans=1 for i=1 . . . b ans=ans*a mod N return ans modexp2(a,b,N) if b=0 return 1 ans=modexp2(a, floor(b/2), N) if b is even return ans 2 mod N else return a * ans 2 mod N...
View Full Document
- Spring '12