200 likes | 432 Views
Public Key Cryptography. Bryan Pearsaul. Outline. What is Cryptology? Symmetric Ciphers Asymmetric Ciphers Diffie-Hellman RSA (Rivest/Shamir/Adleman) Moral Issues. Outline. Summary References. What is Cryptology?. The science of keeping data secure. Two transformation algorithms:
E N D
Public Key Cryptography Bryan Pearsaul
Outline • What is Cryptology? • Symmetric Ciphers • Asymmetric Ciphers • Diffie-Hellman • RSA (Rivest/Shamir/Adleman) • Moral Issues
Outline • Summary • References
What is Cryptology? • The science of keeping data secure • Two transformation algorithms: Enciphering and Deciphering • Symmetric ciphers • Asymmetric ciphers
Symmetric Ciphers • Also known as private key • Both parties must agree on the key in advance • D_K(E_K(P)) = P • Not very computationally intensive • Key must be securely sent to both parties
Symmetric Cipher Example D E E_K(X) Deciphering Enciphering D_K(E_K(X)) = X X K • k = 4 • Turn plaintext SECRET into ciphertext • S+4=W, E+4=I, C+4=G, R+4=V, E+4=I, T+4=X
Symmetric Cipher Example • Much more elaborate transformations are available • Some that are so complicated that even if the transformation was public a key would still be needed • Still require a distributed key
Asymmetric cipher • Also known as public key • Two keys: public k, private k’ • Private key not required for both parties • More computationally intensive D E E_K(X) Deciphering Enciphering D_K’(E_K(X)) = X X K K’
Diffie-Hellman • One of the first public key cryptographic systems • Developed by Martin Hellman, Ralph Merkle, and Whitfield Diffie at Stanford University in 1976
Diffie-Hellman • Based on a special case of the subset-sum, or knapsack, problem 20 11 8 6 5 4 Subset-sum Problem
Diffie-Hellman Example • Block cipher • Block size of 7 bits. Possible 27 combinations • Private key (a’1, a’2, … , a’n) of 7 integers: (1, 2, 5, 11, 32, 87, 141) • Chose two special integers, w and m,such that w and m are relatively prime, • meaning gcd(w,m) = 1: w = 901, m = 1234 • Public key (a1, a2, … , an)of 7 integers using the equation: ai = w * a’i mod m: • (901, 568, 803, 39, 450, 645, 1173) • Partition SECRET into 7 bit blocks each block consisting of xn bits (x1, x2, …, xn) S 1010011 E 1000101 C 1000011 R 1010010 E 1000101 T 1010100 n • Bx = ∑ xiai i=1 • S = 1 X (901) + 0 X (568) + 1 X (803) + 0 X (39) + 0 X (450) + 1 X (645) + 1 X (1173) • S = 3522
Diffie-Hellman Example • Encrypted blocks Bx received. Special version of subset-sum problem • Which subset of (a’1, a’2, … , a’n) sums to B’x where B’x = Bx*w-1 mod m • w-1 is the modular inverse of w for m, w*w-1 mod m = 1 • B’x = 3522 X (901)-1 mod 1234 • B’x = 3522 X 1171 mod 1234 • B’x = 234 • 1. sum← 0 • 2. for i = n step -1 until 1 do • if ai + sum <= B’x • then sum←sum + ai; • subset(i) ← 1 • else subset(i) ← 0 • 3. if sum = B’x then exit with subset • else exit with “failure” • Private key (1, 2, 5, 11, 32, 87, 141), B’x = 234, find subset (1, 0, 1, 0, 0, 1, 1) = S
Diffie-Hellman • An algorithm that solves the particular problem on which a cryptographic system is based. • Two possible points of vulnerability • An algorithm which solves NP-complete problems quickly
RSA • Factorization so far is unsolvable in polynomial-time • Developed by Ron Rivest, Adi Shamir, and Leonard Adleman at MIT in 1977. • Based on the difficulty of factoring large numbers
RSA Example • Find two large prime integers, p and q, and form product n = pq • Find a random integer, e, that is relatively prime to Ф(n) = (p-1)(q-1) • p and q are kept private, (n,e) are the public key • Message is partitioned into blocks, b, such that b < n • Each block is encrypted using the equation: c = be mod n • For the private key, calculate integer d which is the modular inverse of e • for Ф(n), or e * d mod Ф(n) = 1 • Once d is calculated it becomes your private key and all records of • p and q should be destroyed • Each encrypted block, c, is decrypted using the equation: b = cd mod n • p = 61, q = 53, n = 3233, Ф(n) = 3120, e = 17, d = 2753 • encrypt(123) = 12317 mod 3233 = 855 • decrypt(855) = 8552753 mod 3233 = 123
RSA • Factorization cannot be done in polynomial-time • Security of RSA relies on two assumptions • Factoring is required to break the system
Moral Issues • Information Theft • Privacy • Who does the data belong to?
Summary • Diffie-Hellman and RSA • Cryptology • Symmetric and Asymmetric ciphers • Pros and Cons • Moral Issues
References • A.K. Dewdney, The New Turning Omnibus, pp. 250-257, Henry Holt and Company, 2001. • RSA Cryptosystem, http://primes.utm.edu/glossary/page.php?sort=RSA. • Cryptology FAQ, http://www.faqs.org/faqs/cryptography-faq/part06/. • The Extended Euclidian Algorithm, http://www.grc.nasa.gov/WWW/price000/pfc/htc/zz_xeuclidalg.html. • A. Shamir, “A Polynomial-Time Algorithm for Breaking the Basic Merkle-Hellman Cryptosystem", Advances in Cryptology - CRYPTO '82 Proceedings, pp. 279-288, Plenum Press, 1983. IEEE Transactions on Information Theory, Vol. IT-30, pp. 699-704, 1984.