320 likes | 432 Views
Engineering & Analysis Operation-Part2. Public Key Encryption. James C. Bradas, Ph.D. 18 June 2009. Private Key. Alice. Public Key. Private Key. ( n , d ). Public Key. ( n , e ). Let’s Try An Example to See How This Works RSA Public Key Encryption Scheme.
E N D
Engineering & Analysis Operation-Part2 Public Key Encryption James C. Bradas, Ph.D. 18 June 2009
Private Key Alice Public Key Private Key ( n , d ) Public Key ( n , e ) Let’s Try An Example to See How This Works RSA Public Key Encryption Scheme 1. Select two large prime numbers, p & q 2. Compute their product – the “modulus” n: 3. Compute the “totient” F 4. Choose e, 1 < e < F such that greatest common divisor (gcd) ( e , F ) = 1 e is the “public key exponent” ( Common choices are e = 3, 17 & 65537 ) 5. Compute d such that
Private Key Alice Public Key Private Key ( n , d ) Public Key ( n , e ) Let’s Try An Example to See How This Works RSA Public Key Encryption Scheme 1. Select two large prime numbers, p & q 2. Compute their product – the “modulus” n: 3. Compute the “totient” F 4. Choose e, 1 < e < F such that greatest common divisor (gcd) ( e , F ) = 1 e is the “public key exponent” ( Common choices are e = 3, 17 & 65537 ) 5. Compute d such that For this example, we’ll use small prime numbers – the principal is exactly the same….
Private Key Alice Public Key Private Key ( n , d ) Public Key ( n , e ) Let’s Try An Example to See How This Works RSA Public Key Encryption Scheme let p = 11, q = 3 1. Select two large prime numbers, p & q 2. Compute their product – the “modulus” n: 3. Compute the “totient” F 4. Choose e, 1 < e < F such that greatest common divisor (gcd) ( e , F ) = 1 e is the “public key exponent” ( Common choices are e = 3, 17 & 65537 ) 5. Compute d such that
Private Key Alice Public Key Private Key ( 33 , d ) Public Key ( 33 , e ) Let’s Try An Example to See How This Works RSA Public Key Encryption Scheme let p = 11, q = 3 n = 11 x 3 = 33 1. Select two large prime numbers, p & q 2. Compute their product – the “modulus” n: 3. Compute the “totient” F 4. Choose e, 1 < e < F such that greatest common divisor (gcd) ( e , F ) = 1 e is the “public key exponent” ( Common choices are e = 3, 17 & 65537 ) 5. Compute d such that
Private Key Alice Public Key Private Key ( 33 , d ) Public Key ( 33 , e ) Let’s Try An Example to See How This Works RSA Public Key Encryption Scheme let p = 11, q = 3 n = 11 x 3 = 33 1. Select two large prime numbers, p & q 2. Compute their product – the “modulus” n: 3. Compute the “totient” F 4. Choose e, 1 < e < F such that greatest common divisor (gcd) ( e , F ) = 1 e is the “public key exponent” ( Common choices are e = 3, 17 & 65537 ) 5. Compute d such that
Private Key Alice Public Key Private Key ( 33 , d ) Public Key ( 33 , 3 ) Let’s Try An Example to See How This Works RSA Public Key Encryption Scheme let p = 11, q = 3 n = 11 x 3 = 33 1. Select two large prime numbers, p & q 2. Compute their product – the “modulus” n: 3. Compute the “totient” F 4. Choose e, 1 < e < F such that greatest common divisor (gcd) ( e , F ) = 1 e is the “public key exponent” ( Common choices are e = 3, 17 & 65537 ) 5. Compute d such that
Private Key Alice Public Key Private Key ( 33 , d ) Public Key ( 33 , 3 ) Let’s Try An Example to See How This Works RSA Public Key Encryption Scheme let p = 11, q = 3 n = 11 x 3 = 33 1. Select two large prime numbers, p & q 2. Compute their product – the “modulus” n: 3. Compute the “totient” F 4. Choose e, 1 < e < F such that greatest common divisor (gcd) ( e , F ) = 1 e is the “public key exponent” ( Common choices are e = 3, 17 & 65537 ) 5. Compute d such that Check
Private Key Alice Public Key Private Key ( 33 , 7 ) Public Key ( 33 , 3 ) Let’s Try An Example to See How This Works RSA Public Key Encryption Scheme let p = 11, q = 3 n = 11 x 3 = 33 1. Select two large prime numbers, p & q 2. Compute their product – the “modulus” n: 3. Compute the “totient” F 4. Choose e, 1 < e < F such that greatest common divisor (gcd) ( e , F ) = 1 e is the “public key exponent” ( Common choices are e = 3, 17 & 65537 ) 5. Compute d such that Check
Private Key Alice Public Key Private Key ( 33 , 7 ) Public Key ( 33 , 3 ) Let’s Try An Example to See How This Works RSA Public Key Encryption Scheme let p = 11, q = 3 n = 11 x 3 = 33 1. Select two large prime numbers, p & q 2. Compute their product – the “modulus” n: 3. Compute the “totient” F 4. Choose e, 1 < e < F such that greatest common divisor (gcd) ( e , F ) = 1 e is the “public key exponent” ( Common choices are e = 3, 17 & 65537 ) 5. Compute d such that Check
Alice Bob Suppose Bob Wants to Send Alice the Letter “Z” “Z” Let’s say that in the agreed-upon reversible padding scheme, “Z” equals the number 7. Therefore, we want to encrypt m = 7 e n ( 33 , 3 ) Public Key Recall is a solution to
So…. Check
Alice Bob After Computing “Z” Bob sends c = 13 to Alice
Alice Bob Private Key ( 33 , 7 ) Alice Receives “13” n d
Alice Bob Private Key ( 33 , 7 ) Alice Receives “13” n d Reversible Padding Scheme
Alice Bob Private Key ( 33 , 7 ) “Z” n d Reversible Padding Scheme “Z”
Private Key Public Key Alice Bob So What’s Going On Here? M M m Encrypt Bob’s Message Decrypt How does this Work?
Some more properties we need to know If and Then let
… and more properties Fermat’s Little Theorem: If p is a prime number, then for ANY integer a, will be evenly divisible by p. or Euler’s Theorem (An Extension of Fermat’s Little Theorem) gcd(a,n)=1 Φ(n) = (p-1)(q-1) is Euler’s “Totient”
Here’s What I Want to Prove Given: 1. 2. 3. If: I can recover m via Then:
Here’s The Details Start With: Let’s raise c to the d power and use
Here’s The Details Now, recall that Euler’s Theorem
Here’s The Details (cont’d)
Here’s The Details (cont’d) Which Can Be Written
Here’s The Details (cont’d) Which is What I Wanted to Prove
Here’s The Details (cont’d) Which is What I Wanted to Prove This is because: Except for the change in sign, the two terms are equivalent.
So, Where Does RSA Encryption Stand? • For now, RSA PKE is still secure • In 1991, RSA Laboratories published 54 large semiprimes (numbers • with exactly two prime factors) and issued cash prizes for successful • factorization. • According to Wikepedia, 12 of the 54 listed numbers had been factored • by March 2008 • The RSA challenge officially ended in 2007 • Fastest Published Integer Factorization Algorithms: • General Number Field Sieve • Quadratic Sieve • Development of a large Q-Bit Quantum Computer MIGHT make RSA • vulnerable, although this is not certain • Fundamental breakthroughs in Number Theory (such as solving the • Riemann Hypothesis) still required before RSA becomes vulnerable
"The whole of e-commerce depends on prime numbers. I have described the primes as atoms: what mathematicians are missing is a kind of mathematical prime spectrometer. Chemists have a machine that, if you give it a molecule, will tell you the atoms that it is built from. Mathematicians haven't invented a mathematical version of this. That is what we are after. If the Riemann hypothesis is true, it won't produce a prime number spectrometer. But the proof should give us more understanding of how the primes work, and therefore the proof might be translated into something that might produce this prime spectrometer. If it does, it will bring the whole of e-commerce to its knees, overnight. So there are very big implications." - Marcus du Sautoy (“The Music of the Primes”)