Definition: “is congruent to” Equivalence: If there is an integer k such that .
Definition of a prime number
p integer so that the only factor of p are
Fast Modular Exponentiation
In relation to RSA Cryptography
- todo
Problem 1
- todo
Problem 2
Repeated multiplication by y takes multiplications.
Solution: Compute reducing mod N each time
Ask how long do we have? ) times
function ModExp(y, d, N)
if d = 0, return 1
else compute z = ModExp(y, d/2, N)
if d is even, return y * z^2 (mod N)
if d is odd, return y * z^2 (mod M)*
Running time: calls to the function) How long does each square take? Either one or two multiplications of bits.
Running time> where is the time to multiply two n-digit numbers.