1 / 35

David Evans evans@cs.virginia cs.virginia/evans

http://www.cs.virginia.edu/evans/talks/cyberlaw.ppt. Encryption: How it works, why it (sometimes) doesn’t, and what it can do.

aheaton
Télécharger la présentation

David Evans evans@cs.virginia cs.virginia/evans

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. http://www.cs.virginia.edu/evans/talks/cyberlaw.ppt Encryption: How it works, why it (sometimes) doesn’t, and what it can do With a magnetic card and his dog Buddy's name as a password, President Clinton e-signed a bill Friday that will make electronic signatures as real as those on paper. FoxNews, 30 June 2000 David Evans evans@cs.virginia.edu http://www.cs.virginia.edu/evans University of Virginia Department of Computer Science

  2. Eve Terminology Insecure Channel Ciphertext Encrypt Decrypt Plaintext Plaintext Alice Bob C = E(P) P = D(C) E must be invertible: P = D (E (P)) Cyberlaw: Encryption

  3. Eve “The enemy knows the system being used.” Claude Shannon Insecure Channel Ciphertext Encrypt Decrypt Plaintext Plaintext K K Alice Bob C = E(P, K) P = D(C, K) Cyberlaw: Encryption

  4. Jefferson Wheel Cipher Cyberlaw: Encryption

  5. Enigma • About 50,000 used by Nazi’s in WWII • Modified throughout WWII, believed to be perfectly secure • Broken by Bletchley Park led by Alan Turing (and 30,000 others) • First computer (Collossus) developed to break Nazi codes (but kept secret through 1970s) • Allies used decrypted Enigma messages to plan D-Day Cyberlaw: Encryption

  6. Modern Symmetric Ciphers A billion billion is a large number, but it's not that large a number.— Whitfield Diffie • Same idea but: • Use digital logic instead of mechanical rotors • Larger keys • Encrypt blocks of letters at a time Cyberlaw: Encryption

  7. Can try 1 Trillion keys per second, break DES in < 1 day DES [1976] Plaintext Initial Permutation 56-bit key 256 = 72 quadrillion R0 L0 K1  Substitution F 16x Round Permutation L1 R1 Cyberlaw: Encryption

  8. Modern Ciphers • AES (Rijndael) successor to DES selected last year • 128-bit keys, encrypt 128-bit blocks • Brute force attack • Try 1 Trillion keys per second • Would take 10790283070806000000 years to try all keys! • If that’s not enough, can use 256-bit key • No known techniques that do better than brute force search Cyberlaw: Encryption

  9. Eve Problem with all Symmetric Ciphers Insecure Channel Ciphertext Encrypt Decrypt Plaintext Plaintext K K Alice Bob How do Alice and Bob agree on K (without Eve hearing it)? Cyberlaw: Encryption

  10. Padlocked Boxes Hi! Alice Cyberlaw: Encryption

  11. Alice’s Padlock Alice’s Padlock Key Padlocked Boxes Hi! Alice Cyberlaw: Encryption

  12. Shady Sammy’s Slimy Shipping Service Padlocked Boxes Alice Alice’s Padlock Key Cyberlaw: Encryption

  13. Bob’s Padlock Bob’s Padlock Key Padlocked Boxes Alice Hi! Bob Alice’s Padlock Key Cyberlaw: Encryption

  14. Bob’s Padlock Key Padlocked Boxes Hi! Alice Bob Alice’s Padlock Key Cyberlaw: Encryption

  15. Bob’s Padlock Key Padlocked Boxes Hi! Alice Bob Alice’s Padlock Key Cyberlaw: Encryption

  16. Padlocked Boxes Alice Hi! Bob Bob’s Padlock Key Cyberlaw: Encryption

  17. Padlocked Boxes Hi! Alice Hi! Bob Bob’s Padlock Key Cyberlaw: Encryption

  18. Alice’s Secret Color Bob’s Secret Color CA = Yellow + Purple CB = Yellow + Red K = Yellow + Red + Purple K = Yellow + Purple + Red Analogy due to Simon Singh, The Code Book. Secret Paint Mixing Alice Bob Yellow paint (public) Eve Cyberlaw: Encryption

  19. One-Way Functions • Like mixing paint – easy to mix, hard to unmix • Simple example: • Middle 100 digits of n2, n random 100 digit number • Given n, easy to calculate. • Given 100 digits, hard to find n. • Trap-door one way function: • D (E (M)) = M • E and D are easy to compute. • Revealing E doesn’t reveal an easy way to compute D Cyberlaw: Encryption

  20. Public-Key Applications: Privacy Bob Alice • Alice encrypts message to Bob using Bob’s Private Key • Only Bob knows Bob’s Private Key only Bob can decrypt message Decrypt Ciphertext Encrypt Plaintext Plaintext Bob’s Public Key Bob’s Private Key Cyberlaw: Encryption

  21. Signatures Bob Alice Signed Message Decrypt Encrypt Plaintext Plaintext • Bob knows it was from Alice, since only Alice knows Alice’s Private Key • Non-repudiation: Alice can’t deny signing message (except by claiming her key was stolen!) • Integrity: Bob can’t change message (doesn’t know Alice’s Private Key) Alice’s Public Key Alice’s Private Key Cyberlaw: Encryption

  22. RSA[Rivest, Shamir, Adelman 78] E(M) = Me mod n Public key (e, n) D(C) = Cd mod n Private key d e, d and n chosen so Med mod n = M D(E(M)) = E(D(M)) = M Cyberlaw: Encryption

  23. Choosing e, d, n Choose 2 secret primes p and q n = p * q e * d  1 mod (p – 1)(q – 1) Depends on number theory theorems of Euler and Fermat Cyberlaw: Encryption

  24. RSA in Perl Until 1997 – Illegal to show this slide to non-US citizens! print pack"C*", split/\D+/, `echo "16iII*o\U@{$/=$z; [(pop,pop,unpack"H*",<>)]} \EsMsKsN0[lN*1lK[d2%Sa2/d0 <X+d*lMLa^*lN%0]dsXx++lMlN /dsM0<J]dsJxp"|dc` Cyberlaw: Encryption

  25. Security of RSA • n is public, but not p and q where n = p * q • If we can find p and q, easy to find d (private key) • Sounds easy: just need to factor n • 4th grade factoring: divide by 2, 3, 4, … n is ~200 digits – would take quintillions of years Better algorithms known, but not much better Cyberlaw: Encryption

  26. Decrypt Ciphertext Encrypt Plaintext Plaintext Bob’s Public Key Bob’s Private Key Really Eve’s Public Key Really Eve’s Padlock Key Management Everyone can know the public key, but to be useful must know it is the owner’s public key. Alice Hi! Alice’s Padlock Key Cyberlaw: Encryption

  27. Approach 1: Meet Secretly • Alice and Bob meet secretly and swap public keys • If you can do that, might as well agree on a secret (symmetric key) instead • Doesn’t work for Internet transactions Cyberlaw: Encryption

  28. Approach 2: Public Announcement • Publish public keys in a public forum • Append to email messages • Post on web site • New York Time classifieds • Easy for rogue to pretend to be someone else • Forge email, alter web site, lie to New York Times Cyberlaw: Encryption

  29. Approach 3: Public Directory • Trusted authority maintains directory mapping names to public keys • Entities register public keys with authority in some secure way • Authority publishes directory • Print using watermarked paper, special fonts, etc. • Allow secure electronic access • Depends on secure distribution of directory’s key Cyberlaw: Encryption

  30. KUB CA = EKRVeriSign[“Alice”, KUA] CB = EKRVeriSign[“Bob”, KUB] CA CB Approach 4: Certificates VeriSign KUA $$$$ Alice Bob How do I know “Alice” is “Alice”? Cyberlaw: Encryption

  31. Data encrypted using secret key exchanged using some public key associated with some certificate. Cyberlaw: Encryption

  32. Cyberlaw: Encryption

  33. Cyberlaw: Encryption

  34. Cyberlaw: Encryption

  35. Summary • Cryptology can do a lot: • Keep secrets • Provide signatures • Anonymity, Money, Voting, Zero-Knowledge Proofs, etc. • But, its not perfect: • Depends on humans not making mistakes • Tough to associate keys with principals http://www.cs.virginia.edu/evans/talks/cyberlaw.ppt Cyberlaw: Encryption

More Related