lecture16

lecture16 - Great Theoretical Ideas In Computer Science...

Info iconThis preview shows pages 1–22. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Great Theoretical Ideas In Computer Science COMPSCI 102 Fall 2010 Lecture 16 October 27, 2010 Duke University Modular Arithmetic and the RSA Cryptosystem p-1 1 Starring Rivest Shamir Adleman Euler Fermat The RSA Cryptosystem R ivest, S hamir, and A delman (1978) RSA is one of the most used cryptographic protocols on the net. Your browser uses it to establish a secure session with a site. Pick secret, random large primes: p,q Publish: n = p*q (n) = (p) (q) = (p-1)*(q-1) Pick random e Z * (n) Publish: e Compute d = inverse of e in Z * (n) Hence, e*d = 1 [ mod (n) ] Private Key: d Mumbo jumbo More Mumbo jumbo n,e is my public key. Use it to send me a message. p,q random primes, e random Z * (n) n = p*q e*d = 1 [ mod (n) ] n, e p,q prime, e random Z * (n) n = p*q e*d = 1 [ mod (n) ] message m m e [mod n] (m e ) d n m But how does it all work? What is (n)? What is Z (n) * ? Why do all the steps work? To understand this, we need a little number theory... MAX(a,b) + MIN(a,b) = a+b n|m means that m is an integer multiple of n. We say that n divides m . Greatest Common Divisor: GCD(x,y) = greatest k 1 s.t. k|x and k|y. Least Common Multiple: LCM(x,y) = smallest k 1 s.t. x|k and y|k. Fact: GCD(x,y) LCM(x,y) = x y GCD(x,y) LCM(x,y) = xy MAX(a,b) + MIN(a,b) = a+b (a mod n) means the remainder when a is divided by n. If a = dn + r with 0 r < n Then r = (a mod n) and d = (a div n) Defn: Modular equivalence of integers a and b a b [mod n] (a mod n) = (b mod n) n|(a-b) Written as a n b, and spoken a and b are equivalent modulo n 31 81 [mod 2] 31 2 81 n is an equivalence relation In other words, Reflexive: a n a Symmetric: (a n b) (b n a) Transitive: (a n b and b n c) (a n c) a n b n|(a-b) a and b are equivalent modulo n n induces a natural partition of the integers into n classes. a and b are said to be in the same residue class or congruence class exactly when a n b. a n b n|(a-b) a and b are equivalent modulo n Define Residue class [i] = the set of all integers that are congruent to i modulo n . Residue Classes Mod 3: [0] = { , -6, -3, 0, 3, 6, ..} [1] = { , -5, -2, 1, 4, 7, ..} [2] = { , -4, -1, 2, 5, 8, ..} [-6] = { , -6, -3, 0, 3, 6, ..} [7] = { , -5, -2, 1, 4, 7, ..} [-1] = { , -4, -1, 2, 5, 8, ..} Fact : equivalence mod n implies equivalence...
View Full Document

This document was uploaded on 01/17/2012.

Page1 / 92

lecture16 - Great Theoretical Ideas In Computer Science...

This preview shows document pages 1 - 22. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online