









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Part 1 Cryptography 1
Part 1 Cryptography 2
Two keys
o Sender uses recipient’s public key to encrypt o Receiver uses his private key to decrypt
Based on trap door, one way function o Easy to compute in one direction o Hard to compute in other direction o “Trap door” used to create keys o Example: Given p and q, product N=pq is easy to compute, but given N, it is hard to find p and q
Part 1 Cryptography 4
Invented by Cocks (GCHQ), independently, by Rivest, Shamir and Adleman (MIT) Let p and q be two large prime numbers Let N = pq be the modulus Totient(N) or (N) = (p-1)(q-1) o Number of positive integers ≤ N that are relatively prime to N Choose e relatively prime to (p1)(q1) Find d s.t. ed mod (p1)(q1) = 1 Public key is (N,e) Private key is d
Part 1 Cryptography 5
To encrypt message M<N compute
o C = Me^ mod N
To decrypt C compute
o M = Cd^ mod N
Recall that e and N are public
If attacker can factor N, he can use e to easily find d since ed mod (p1)(q1) = 1
Factoring the modulus breaks RSA
It is not known whether factoring is the only way to break RSA
o M < N; that is M can be at most pq o M needs to be relatively prime to N
o pq-(p-1)(q-1) = pq-pq+p+q-1=p+q- o A diminishing value as n (i.e. pq) increases Part 1 Cryptography 7
Part 1 Cryptography 8
o Select “large” primes p = 11, q = 3 o Then N = pq = 33 and (p1)(q1) = 20 o Choose e = 3 (relatively prime to 20) o Find d such that ed mod 20 = 1, we find that d = 7 works
Part 1 Cryptography 10
Part 1 Cryptography 11
Invented by Williamson (GCHQ) and,
independently, by D and H (Stanford)
A “key exchange” algorithm
o Used to establish a shared symmetric key
Not for encrypting or signing
Security rests on difficulty of discrete log
problem: given g, p, and gk^ mod p find k
Part 1 Cryptography 13
Suppose that Bob and Alice use gab^ mod p as a symmetric key
Trudy can see ga^ mod p and gb^ mod p
Note ga^ gb^ mod p = ga+b^ mod p gab^ mod p
If Trudy can find a or b, system is broken
If Trudy can solve discrete log problem, then she can find a or b
Part 1 Cryptography 14
Public: g and p
Secret: Alice’s exponent a, Bob’s exponent b
Alice, a Bob, b
ga^ mod p gb^ mod p
Alice computes (gb)a^ = gba^ = gab^ mod p Bob computes (ga)b^ = gab^ mod p Could use K = gab^ mod p as symmetric key
Part 1 Cryptography 16
o Encrypt DH exchange with symmetric key o Encrypt DH exchange with public key o Sign DH values with private key o Other?
Part 1 Cryptography 17
Public key notation o Sign message M with Alice’s private key [M]Alice o Encrypt message M with Alice’s public key {M}Alice o Then {[M]Alice}Alice = M and [{M}Alice]Alice = M Symmetric key notation o Encrypt plaintext P with symmetric key K C = E(P,K) o Decrypt ciphertext C with symmetric key K P = D(C,K)