Handout 7

advertisement
Public Key Cryptosystems
Modular Arithmetic: The Basics
Multiplicative Inverse
1
Modular Exponentiation: a key step in RSA
Fermat’s Little Theorem. Let p be a prime number and x be a positive number
less than p. Then xp−1 mod p = 1.
Proof:
Euler’s Theorem. Let n be a positive integer, and let x be a positive integer relatively prime to n. Then xφ(n) mod n = 1.
Proof Sketch:
Corollaries:
2
The RSA Cryptosystem. Named after Ron Rivest, Adi Shamir and Len Adleman
who came up with the scheme in the mid-1970’s. They received a patent for it in
1983. Interestingly, it turns out that an English mathematician Clifford Cocks had
invented an equivalent scheme in 1973 but his work was classified. It wasn’t until
1997 that the public knew about it.
Review of a public key cryptosystem.
How RSA works.
3
Why RSA works.
4
Implementing RSA.
• Generating large primes
• Finding the encryption exponent e that is relatively prime to φ(n)
• Computing d = e−1 mod n.
• Doing modular exponentiation: me mod n, C d mod n.
The Extended Euclidean Algorithm
Theorem 1 (Euclid) Let a and b be non-negative integers with a ≥ b. Then
GCD(a, b) = GCD(b, a mod b).
Example.
Theorem 2 Let a > 0 and b ≥ 0 be integers and d = GCD(a, b). Then d is the
smallest positive integer that can be expressed as a linear combination of a and b; i.e.,
d = ia + jb
for some integer i and j.
Example cont’d.
5
Let ExtGCD(a, b) output (d, i, j) where d = GCD(a, b) and d = ia + jb. How might
this be designed as a recursive algorithm?
How it can be used to find d = e−1 mod φ(n).
6
Modular exponentiation.
Security of RSA.
7
Download