Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Math for CS CMPSC 360 LECTURE 14 Last time:

Similar presentations


Presentation on theme: "Discrete Math for CS CMPSC 360 LECTURE 14 Last time:"β€” Presentation transcript:

1 Discrete Math for CS CMPSC 360 LECTURE 14 Last time:
Chinese Remainder Theorem Today: Public Key Cryptography: RSA CMPSC 360 2/27/2019

2 Cryptography Secure communications between two parties. Applications:
Military, Intelligence (NSA) E-Commerce 2/27/2019

3 Cryptography Alice encrypts message π‘š to 𝐸(π‘š) Alice send 𝐸(π‘š) to Bob
Bob decrypts secret message 𝐸(π‘š) to 𝐷(𝐸(π‘š)) = π‘š. Eve can intercept 𝐸(π‘š) but can’t read m. 2/27/2019

4 Private Key Cryptography
Example: Julius Caesar (shifting 3 letters) Today is Friday. Wrgdb lv Iulgdb. Requires a secret encryption/decryption key between two parties. 2/27/2019

5 Public Key Cryptography
Bob announces a public key 𝑒 to everyone. Everyone can encrypt a message π‘š to 𝑒(π‘š). Only Bob can decrypt 𝑒(π‘š) using his private decryption key 𝑑 for 𝑒. 2/27/2019

6 The RSA algorithm Need the following numbers:
Two large primes (i.e., 512 bits) 𝒑 and 𝒒 𝑡 = 𝒑𝒒 A public encryption key 𝒆 , which is relatively prime to (π’‘βˆ’πŸ)(π’’βˆ’πŸ). A private decryption key 𝒅, which is 𝒆’s inverse modulo (π’‘βˆ’πŸ)(π’’βˆ’πŸ) 2/27/2019

7 𝐸 π‘₯ = π‘₯ 𝑒 mod 𝑁 𝐷 π‘₯ = π‘₯ 𝑑 mod 𝑁 𝑒𝑑≑1 mod (π‘βˆ’1)(π‘žβˆ’1) The RSA algorithm
Encrypting a message π‘₯: 𝐸 π‘₯ = π‘₯ 𝑒 mod 𝑁 Decrypting a message π‘₯: 𝐷 π‘₯ = π‘₯ 𝑑 mod 𝑁 Numbers 𝑝, π‘ž are prime, and 𝑒, 𝑑 satisfy: 𝑒𝑑≑1 mod (π‘βˆ’1)(π‘žβˆ’1) 2/27/2019

8 RSA is correct Fermat’s Little Theorem 𝐷(𝐸(π‘₯)) = π‘₯ mod 𝑁 in RSA
(Blackboard) 2/27/2019

9 Running time of RSA Efficient algorithm (repeated squaring) for exponentiation To create the key pairs, need to find large primes: Primes are relatively densely distributed. Testing if a number is prime is fast. Randomly generate enough large numbers and test which ones are prime. Finding 𝑒 relatively prime to (π‘βˆ’1)(π‘žβˆ’1) and its inverse is fast. 2/27/2019

10 RSA is secure Need 𝑝 and π‘ž to find 𝑑 from 𝑒.
Factoring a large number 𝑁 is hard. 2/27/2019


Download ppt "Discrete Math for CS CMPSC 360 LECTURE 14 Last time:"

Similar presentations


Ads by Google