Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data encryption with big prime numbers DANIEL FREEMAN, SLU.

Similar presentations


Presentation on theme: "Data encryption with big prime numbers DANIEL FREEMAN, SLU."— Presentation transcript:

1 Data encryption with big prime numbers DANIEL FREEMAN, SLU

2 Old school codes Full knowledge of the code is needed to both encrypt messages and to decrypt messages. The code can only be used between a small number of trusted people.

3 Public key encryption  If you buy something online, you need to send your credit card number to Amazon.  Your computer needs to be able to encrypt your credit card number.  Amazon does NOT want you to be able to decrypt other people’s credit card numbers.  Everyone needs to be able to encrypt but only Amazon should be able to decrypt.  We need a mathematical technique that is computationally very simple to evaluate, but is extremely computationally difficult to invert.

4 Multiplication is easy, factoring is hard * Typing in the following into Wolfram Alpha gives an output of Typing in the following into Wolfram Alpha factor gives an output of factor

5 Mod n We think of x mod n as the remainder when x is divided by n. More generally, x≡y mod n means that x and y have the same remainder when divided by n, or that x-y is a multiple of n.

6 Modular exponentiation Fermat’s little theorem : Let p be a prime number and let x be an integer that is not divisible by p. Then,

7 Key points of modular exponentiation More generally, if m ≡ 1 mod (p-1)(q-1) then x m mod n can be efficiently calculated by expressing the exponent m in binary. Fermat’s little theorem : Let p be a prime number and let x be an integer that is not divisible by p. Then, Euler’s theorem : Let p and q be distinct prime numbers and let x be an integer that is not divisible by p or q. Then,

8 RSA encryption Choose 2 large prime numbers p and q. Calculate n=pq. p and q should be so large that it is not computationally feasible to factor n. Choose a positive integer e which is relatively prime to (p-1)(q-1). e will be publicly shared. Choose a positive integer d such that ed ≡ 1 mod (p-1)(q-1) Suppose someone wants to encrypt the integer x such that 1

9 RSA example Choose p = q = Calculate n = pq = * = Choose e = Solve ed ≡ 1 mod (p-1)(q-1) You calculate and send y= ≡ x e mod n Amazon then calculates x ≡ y d mod n p and q are just two big prime numbers e was picked to be a prime number big enough to most likely not a factor of (p-1)(q-1) Calculate φ(n) = (p-1)(q-1) = * = d = Suppose you want to send the number x= to Amazon.


Download ppt "Data encryption with big prime numbers DANIEL FREEMAN, SLU."

Similar presentations


Ads by Google