Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cryptography & Complexity An amazing blend of Mathematics, Computer Science, Physics and achieving “the impossible”.

Similar presentations


Presentation on theme: "Cryptography & Complexity An amazing blend of Mathematics, Computer Science, Physics and achieving “the impossible”."— Presentation transcript:

1 Cryptography & Complexity An amazing blend of Mathematics, Computer Science, Physics and achieving “the impossible”.

2 Complexity A Million Dollar Question

3 Complexity Computers are very fast But problems can be far more complex Complexity can be measured n, n 2, n 3, … 2 n 2 n is enormous 1, 2, 4, 8, 16, 32, 64, 256, … 2 64 = 18,446,744,073,709,551,616 1Ghz = 1,000,000,000 ops/sec 1 year = 31,557,600 secs Will be done counting in 584.54 years

4 A linear time question Adding n=5 four digit numbers 1253+4367+8365+7394+8362 Question requires 20=4n digits to ask. Answer requires some 4n digit additions. As question size grows, the answer complexity is the same as the question complexity.

5 A quadratic-time question Multiply 76243875 by 98725879 n=16 digit problem 8 2 multiplications 8 2 additions n 2 /4 complexity 76243875 x98725879 686194875 533707125 609951000 381219375 152487750 533707125 609951000 686194875 7527243577741125

6 An exp-time question Find sum of numbers: 1 + 2 + … + 763653 The question requires n=6 digits to ask. The (simple-minded) answer requires (almost) 10 n = 1,000,000 additions to compute. But a shortcut can get the answer

7 Poly-time and Exp-time A method (algorithm) which takes polynomial time to solve, will remain poly-time on any conceivable machine. An algorithm that takes exponential time will remain exp-time on any machine. But shortcuts may make it possible to do some exp-time problem in poly-time using a different algorithm.

8 NP class Problems that have “certificates” that can be verified in polynomial time, can be solved in “at most” exponential time. Simply verify each possible input Brute force approach Is 370371518519 not a prime number? 555557 x 666667 is a certificate that can be verified in 6 x 6 (n 2 time). Verifying all 10 6, 6-digit certificates finds answer in exp-time. Recent poly-time algorithms.

9 P = NP ? The million dollar question. 1. Do ALL problems that are in NP have some clever way to do them in P time? 2. Does there exist at least one problem in NP that in not in P (ie. has no shortcut)? Most people believe in 2, but there is no proof (yet). If one such problem can be found, the NP- complete class proves that there are dozens more that are also NP.

10 If P ≠ NP … Then there are very hard problems that will take more years than the lifetime of the universe. (10 10 years) if every atom in the universe is a computer (10 70 atoms) that can do a computation in the time it take light to travel the distance of an atom! (10 -20 secs)

11 Cryptography From Secret Codes and Spies To E-Banking and E-mail And on to Quantum Computing

12 One Way Functions n is an integer between 1 and 10000000000. f(n) is digits 100 to 120 of sin(n). Sin(n)=0.2749841541342665865736721659577527097363147274852480138431 0018225352466407595583451935495524097693349152981333211826475694 So f(n) = 91529813332118264756 Given f(n) how do you find that n=54321? No easy way to imagine other than brute force. But there are always many surprises in CS.

13 Write Only Memory Cryptography using one way functions is like Write Only Memory. But it has its uses. Password checking. Proving that you are the anonymous author. To create account User Name: “Arif Zaman” Password: “MyPassw0rd” Store the name and f(pwd) f(“MyPassw0rd”) = “qXpAkW” To authenticate a user Compare f(pwd) against the stored value.

14 Trapdoor functions Computing y = f k (x) is easy. Computing x = f k -1 (y) is hard. Computing x = f k -1 (y, key) is easy. So there is a way to go back, if we have a “key”. It is difficult to imagine an example, yet there are many such functions.

15 RSA Take r and s, two 1000 digit primes. p = r s is a 2000 digit non-prime. To make p from r and s is easy. To find r and s from p is hard. It is suspected that it is an exponentially hard problem to find factors.

16 Classic Substitution Ciphers Cipher Key: A→W, B→Q, C→S, D→P, E→L, … Shared secret key needed for both encryption and decryption. Key distribution is a major problem PlaintextCyphertext Encryption:A BAD CAB→W QWP SWQ Decryption:A BAD CAB←W QWP SWQ

17 Public Key Cryptography I secretly multiply two prime numbers p =r s and announce p to enemies and friends alike. I also announce how f p (t) anyone can encrypt messages to me using p (my public key). My friend then openly sends a message that can be read by enemies as well as myself. Only I (or anyone that can factor p) can decrypt message. Or by brute force: keep encrypting messages until you find one that encrypts to the right cyphertext.

18 Two keys not one Everyone has a public key known by all much like a phone number used to send them messages Everyone has a private key kept secret used to decipher messages

19 Digital Signatures When you do credit card transactions on the web, you can’t claim that someone else did it. The technology is the same.

20 Quantum Mechanics BarrierDetector X X XX XXX XXXx XXXXXXX XXXXXXXx XXXXxXX XXXX XXX XX X X X X XX XXX XXXx XXXXXXX XXXXXXXx XXXXxXX XXXX XXX XX X X X XX XXX XX X XXXXX XXXXXXX XXXXX X XX XXX XX X One slit – Dispersion occurs with light (photons) or small particles (electrons) You can count then hitting the detector Two slit – Interference A particle must be aware of both holes to have this behavior!

21 Implications One particle can do two (and more) computations at the same time. This is not science fiction, it has been done! Quantum computers could conceivably do large brute-force computations. Quantum methods can encrypt messages on the spins of particles in such a way that only the intended receiver can decrypt them. No copy can be made. Interception will destroy the message. Ultra safe, but expensive and currently only in lab.

22 The world is changing rapidly… Within your lifetimes, these will probably become practical realities. Already these new (less than 20 years old) sciences have dramatically changed the world.


Download ppt "Cryptography & Complexity An amazing blend of Mathematics, Computer Science, Physics and achieving “the impossible”."

Similar presentations


Ads by Google