David Evans CS150: Computer Science University of Virginia Computer Science Class 36: Public Key Crypto.

Slides:



Advertisements
Similar presentations
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
Advertisements

CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
Digital Signatures. Anononymity and the Internet.
1 Supplement III: Security Controls What security services should network systems provide? Confidentiality Access Control Integrity Non-repudiation Authentication.
1 Counter-measures Threat Monitoring Cryptography as a security tool Encryption Digital Signature Key distribution.
Security Overview Hofstra University University College for Continuing Education - Advanced Java Programming Lecturer: Engin Yalt May 24, 2006.
Cryptography in World War II Jefferson Institute for Lifelong Learning at UVa Spring 2006 David Evans Class 4: Modern Cryptography
ECOMMERCE TECHNOLOGY SUMMER 2002 COPYRIGHT © 2002 MICHAEL I. SHAMOS Cryptographic Security.
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
8-1 What is network security? Confidentiality: only sender, intended receiver should “understand” message contents m sender encrypts message m receiver.
Cryptographic Technologies
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Chapter3 Public-Key Cryptography and Message Authentication.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Topic 11: Key Distribution and Agreement 1 Information Security CS 526 Topic 11: Key Distribution & Agreement, Secure Communication.
8: Network Security8-1 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key: K r e.g., key is knowing substitution.
Public Key Cryptography RSA Diffie Hellman Key Management Based on slides by Dr. Lawrie Brown of the Australian Defence Force Academy, University College,
C HAPTER 13 Asymmetric Key Cryptography Slides adapted from "Foundations of Security: What Every Programmer Needs To Know" by Neil Daswani, Christoph Kern,
Encryption. Introduction Computer security is the prevention of or protection against –access to information by unauthorized recipients –intentional but.
Computer Science Public Key Management Lecture 5.
Introduction to Public Key Cryptography
Public Key Model 8. Cryptography part 2.
1 Fluency with Information Technology Lawrence Snyder Chapter 17 Privacy & Digital Security Encryption.
Chapter 12 Cryptography (slides edited by Erin Chambers)
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
Lecture 11: Key Distribution
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
CS110: Computers and the Internet Encryption and Certificates.
David Evans CS200: Computer Science University of Virginia Computer Science Class 35: Cookie Monsters and Semi-Secure.
David Evans CS200: Computer Science University of Virginia Computer Science Class 35: Cookie Monsters and Semi-Secure.
Cryptography, Authentication and Digital Signatures
David Evans CS150: Computer Science University of Virginia Computer Science Class 31: Cookie Monsters and Semi-Secure.
Public-Key Cryptography CS110 Fall Conventional Encryption.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
David Evans CS200: Computer Science University of Virginia Computer Science Class 36: Public-Key Cryptography If you want.
Midterm Review Cryptography & Network Security
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Cryptography and Network Security (CS435) Part Eight (Key Management)
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
1 Public-Key Cryptography and Message Authentication.
Computer and Network Security Rabie A. Ramadan Lecture 6.
Cryptography and Network Security Chapter 9 - Public-Key Cryptography
David Evans CS588: Security and Privacy University of Virginia Computer Science Lecture 14: Public Key Infrastructure.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CS 4244: Internet Programming Security 1.0. Introduction Client identification and cookies Basic Authentication Digest Authentication Secure HTTP.
1 Network Security Basics. 2 Network Security Foundations: r what is security? r cryptography r authentication r message integrity r key distribution.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
ICOM 5018 Network Security and Cryptography Description This course introduces and provides practical experience in network security issues and cryptographic.
+ Security. + What is network security? confidentiality: only sender, intended receiver should “understand” message contents sender encrypts message receiver.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
Encryption CS110: Computer Science and the Internet.
Electronic Commerce School of Library and Information Science PGP and cryptography I. What is encryption? Cryptographic systems II. What is PGP? How does.
Key Management Network Systems Security Mort Anvari.
MM Clements Cryptography. Last Week Firewalls A firewall cannot protect against poor server, client or network configuration A firewall cannot.
Lecture 11 Overview. Digital Signature Properties CS 450/650 Lecture 11: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
David Evans CS588: Security and Privacy University of Virginia Computer Science Lecture 10: Certificates and Hashes.
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
Digital Signatures.
Computer Communication & Networks
Basic Network Encryption
Lecture 10: Network Security.
Class 36: Public-Key Cryptography
Presentation transcript:

David Evans CS150: Computer Science University of Virginia Computer Science Class 36: Public Key Crypto

2 CS150 Fall 2005: Lecture 36: Public Key Cryptography Login: alyssa Password: fido Terminal Trusted Subsystem Eve Login Process login sends

3 CS150 Fall 2005: Lecture 36: Public Key Cryptography Password Problems Need to store the passwords –Dangerous to rely on database being secure Need to transmit password from user to host –Dangerous to rely on Internet being confidential Lecture 31, Recap Now Today

4 CS150 Fall 2005: Lecture 36: Public Key Cryptography Hashed Passwords UserIDPassword alyssaf (“fido”) benf (“schemer”) davef (“Lx.Ly.x”)

5 CS150 Fall 2005: Lecture 36: Public Key Cryptography Dictionary Attacks Try a list of common passwords –All 1-4 letter words –List of common (dog) names –Words from dictionary –Phone numbers, license plates –All of the above in reverse Simple dictionary attacks retrieve most user-selected passwords Precompute H(x) for all dictionary entries

6 CS150 Fall 2005: Lecture 36: Public Key Cryptography (at least) 86% of users are dumb and dumber Single ASCII character0.5% Two characters2% Three characters14% Four alphabetic letters14% Five same-case letters21% Six lowercase letters18% Words in dictionaries or names15% Other (possibly good passwords)14% (Morris/Thompson 79)

7 CS150 Fall 2005: Lecture 36: Public Key Cryptography Salt of the Earth UserIDSaltPassword alyssa1125crypt (“Lx.Ly.x”, 1125 ) ben2437crypt (“schemer”, 2437) dave932crypt (“Lx.Ly.x”, 932) How much harder is the off-line dictionary attack? In HooRides.net we use the user name as the salt. Is this better or worse? Salt: 12 random bits

8 CS150 Fall 2005: Lecture 36: Public Key Cryptography Sending Passwords Encrypt User Server The Internet

9 CS150 Fall 2005: Lecture 36: Public Key Cryptography Encrypt Decrypt Plaintext Ciphertext Plaintext User Server C = Encrypt K (P) P = Decrypt K (C) KK The Internet

10 CS150 Fall 2005: Lecture 36: Public Key Cryptography From PS4: Lorenz Cipher

11 CS150 Fall 2005: Lecture 36: Public Key Cryptography 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 (random bits, not rotor alignments) PS4 = 5 3 ; Lorenz  5 12 < 10 9 Modern  128 bits > –Encrypt blocks of letters at a time

12 CS150 Fall 2005: Lecture 36: Public Key Cryptography Modern Ciphers AES (Rijndael) successor to DES selected bit keys, encrypt 128-bit blocks Brute force attack (around times harder than Lorenz) –Try 1 Trillion keys per second –Would take 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

13 CS150 Fall 2005: Lecture 36: Public Key Cryptography Encrypt Decrypt Plaintext Ciphertext Plaintext User Server KK The Internet How do User and Server agree on K (without sending it over the Internet)?

14 CS150 Fall 2005: Lecture 36: Public Key Cryptography Key Agreement Demo (Animated version at end of slides.)

15 CS150 Fall 2005: Lecture 36: Public Key Cryptography Asymmetric Cryptosystems Need a hard problem (like symmetric cryptosystems) With a trap door: if you know a secret, the hard problem becomes easy

16 CS150 Fall 2005: Lecture 36: Public Key Cryptography One-Way Functions Easy to compute, hard to invert 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. –Hence, anyone who knows E can encrypt, but only someone who knows D can decrypt

17 CS150 Fall 2005: Lecture 36: Public Key Cryptography RSA [Rivest, Shamir, Adelman 78] One-way function: multiplication is easy, factoring is hard Trap-door: number theory (Euler and Fermat)

18 CS150 Fall 2005: Lecture 36: Public Key Cryptography Security of RSA n is public, but not p and q where n = pq How much work is factoring n ? n ~200 digits – would take quintillions of years Number Field Sieve (fastest known factoring algorithm) is: O(e ((ln (n)) 1/3 (ln (ln (n))) 2/3 ) The movie Sneakers is about what happens if someone discovers a O(n k ) factoring algorithm.

19 CS150 Fall 2005: Lecture 36: Public Key Cryptography Asymmetric Cryptosystems Encryption and Decryption are done with different keys Keep one of the keys secret, reveal the other E KRA (E KUA (M)) = M Alice’s Public Key: KUA Alice’s Private Key: KRA Only KRA can decrypt a message encrypted using KUA.

20 CS150 Fall 2005: Lecture 36: Public Key Cryptography Public-Key Applications: Privacy Alice encrypts message to Bob using Bob’s Private Key Only Bob knows Bob’s Private Key  only Bob can decrypt message Encrypt Decrypt Plaintext Ciphertext Plaintext Alice Bob Bob’s Public Key Bob’s Private Key

21 CS150 Fall 2005: Lecture 36: Public Key Cryptography Signatures 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) Encrypt Decrypt Plaintext Signed Message Plaintext Alice Bob Alice’s Private Key Alice’s Public Key

22 CS150 Fall 2005: Lecture 36: Public Key Cryptography Encrypt Decrypt Plaintext Ciphertext Plaintext User Server KU S KR S The Internet Public Key Private Key How does User know the public key to use?

23 CS150 Fall 2005: Lecture 36: Public Key Cryptography Key Management

24 CS150 Fall 2005: Lecture 36: Public Key Cryptography Approach 1: Meet Secretly User and Server Operator 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

25 CS150 Fall 2005: Lecture 36: Public Key Cryptography Approach 2: Public Announcement Publish public keys in a public forum –Append to messages –Post on web site –New York Time classifieds Easy for rogue to pretend to be someone else –Forge , alter web site, lie to New York Times

26 CS150 Fall 2005: Lecture 36: Public Key Cryptography 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

27 CS150 Fall 2005: Lecture 36: Public Key Cryptography Approach 4: Certificates VeriSign UserServer KU S C S = E KR VeriSign [“Server”, KU S ] CSCS Request $$$$ E KUVeriSign (C S ) = [“Server”, KU S ] Knows KR S

28 CS150 Fall 2005: Lecture 36: Public Key Cryptography SSL (Secure Sockets Layer) Browser Server Hello KR CA [Server Identity, KU S ] Check Certificate using KU CA Pick random K KU S [K] Find K using KR S Secure channel using K Note: This is slightly simplified from the actual SSL protocol. This version is vulnerable to a person-in- the-middle attack!

29 CS150 Fall 2005: Lecture 36: Public Key Cryptography Data encrypted using secret key exchanged using some public key associated with some certificate.

30 CS150 Fall 2005: Lecture 36: Public Key Cryptography

31 CS150 Fall 2005: Lecture 36: Public Key Cryptography

32 CS150 Fall 2005: Lecture 36: Public Key Cryptography

33 CS150 Fall 2005: Lecture 36: Public Key Cryptography How do you make your web site password form encrypt its input?

34 CS150 Fall 2005: Lecture 36: Public Key Cryptography Exam 2: Requested Topics TopicAverage<=3<=1 Biology (Monday’s class) Finding Aliens How Google Works Hardware Implementing Interpreter Software Security Languages & Complexity Testing Viruses and Worms Complex Language The 2 classes after Thanksgiving will be about Google Manuvir Das’ talk today at 3:30 (Olsson 009) will include these topics (how Microsoft makes software more reliably) Friday’s class will be on this (as well as on finding prime factors)

35 CS150 Fall 2005: Lecture 36: Public Key Cryptography Charge Project Meetings today, tomorrow and Friday Exam 2: return now –Comments will be posted on web site tonight

36 CS150 Fall 2005: Lecture 36: Public Key Cryptography Animated version of Asymmetric Cryptography Demo

37 CS150 Fall 2005: Lecture 36: Public Key Cryptography Padlocked Boxes Alice Hi!

38 CS150 Fall 2005: Lecture 36: Public Key Cryptography Padlocked Boxes Alice Hi! Alice’s Padlock Alice’s Padlock Key

39 CS150 Fall 2005: Lecture 36: Public Key Cryptography Padlocked Boxes Alice Alice’s Padlock Key Shady Sammy’s Slimy Shipping Service

40 CS150 Fall 2005: Lecture 36: Public Key Cryptography Padlocked Boxes Alice Hi! Bob Bob’s Padlock Bob’s Padlock Key Alice’s Padlock Key

41 CS150 Fall 2005: Lecture 36: Public Key Cryptography Padlocked Boxes Alice Hi! Bob Bob’s Padlock Key Alice’s Padlock Key

42 CS150 Fall 2005: Lecture 36: Public Key Cryptography Padlocked Boxes Alice Hi! Bob Bob’s Padlock Key Alice’s Padlock Key

43 CS150 Fall 2005: Lecture 36: Public Key Cryptography Padlocked Boxes Alice Hi! Bob Bob’s Padlock Key

44 CS150 Fall 2005: Lecture 36: Public Key Cryptography Padlocked Boxes Alice Hi! Bob Bob’s Padlock Key Hi!