Presentation is loading. Please wait.

Presentation is loading. Please wait.

RSA Encryption © 2014 Project Lead The Way, Inc.Computer Science and Software Engineering.

Similar presentations


Presentation on theme: "RSA Encryption © 2014 Project Lead The Way, Inc.Computer Science and Software Engineering."— Presentation transcript:

1 RSA Encryption © 2014 Project Lead The Way, Inc.Computer Science and Software Engineering

2 Private Key Encryption –Example: Caesar cipher –Triple DES is the modern standard Public Key Encryption –Example: RSA –Pair of keys: one public + one private Encryption Schemes

3 RSA is used for the signed certificate and to transmit a shared key Triple DES used for remainder of a secured connection to increase speed of encryption/decryption Real World: RSA, then Triple DES

4 Step 1: Pick prime numbers p and q Step 2: Calculate the modulus n=pq Example: p = 5q = 7 n = 35 Keys will be (35, ?) and (35, ?) Notice: product of primes is shared publicly! How Does RSA Work? To Make Keys:

5 Step 3: Subtract one from each prime number and multiply. The product is "phi". Example: p = 5q = 7 n = 35 p-1 = 5-1 = 4q -1 = 7-1 = 6 phi = 4*6 = 24 How Does RSA Work? To Make Keys:

6 Step 4: Look at numbers that are 1 more than multiples of phi. Factor one of them. Example: p = 5q = 7 n = 35 phi = 24 1 more than multiples of phi: 24+1, 48+1, 72+1, 96+1, 120+1, 144+1, … We use 144+1 and factor it into 145=5*29 Keys will be (35, 5) and (35, 29) How Does RSA Work? To Make Keys:

7 That list 24+1, 48+1, 72+1, 96+1, 120+1, 144+1, … uses remainder division, also known as modulus division or clock arithmetic. In Python the modulus operator is %: In[] : 47%4 Out[]: 3 47 divided by 4 has remainder 3. Useful for checking a factor: n%2==0 is True if and only if n is even. An Aside: Modulus division

8 Step 1: A message has to be broken into numbers that are each less than the modulus. Example: "CAT"  3 – 1 – 20 Step 2: Raise each number to the power of the second part of the key. Example using key (35, 5): "CAT"  3 5 – 1 5 – 20 5  243 – 1 – 3200000 How Does RSA Work? To Use Keys:

9 Step 3: Find remainder of each number divided by the first part of the key. Example using key (35, 5): "CAT"  3 5 – 1 5 – 20 5  243 – 1 – 3200000  243%35 – 1%35 – 3200000%35  33 – 1 – 20 The ciphertext! How Does RSA Work? To Use Keys:


Download ppt "RSA Encryption © 2014 Project Lead The Way, Inc.Computer Science and Software Engineering."

Similar presentations


Ads by Google