Secure Communication with an Insecure Internet Infrastructure.

Slides:



Advertisements
Similar presentations
Security and Privacy over the Internet Chan Hing Wing, Anthony Mphil Yr. 1, CSE, CUHK Oct 19, 1998.
Advertisements

CIS 725 Key Exchange Protocols. Alice ( PB Bob (M, PR Alice (hash(M))) PB Alice Confidentiality, Integrity and Authenication PR Bob M, hash(M) M, PR Alice.
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
SSL CS772 Fall Secure Socket layer Design Goals: SSLv2) SSL should work well with the main web protocols such as HTTP. Confidentiality is the top.
An Introduction to Secure Sockets Layer (SSL). Overview Types of encryption SSL History Design Goals Protocol Problems Competing Technologies.
Netprog: Cryptgraphy1 Cryptography Reference: Network Security PRIVATE Communication in a PUBLIC World. by Kaufman, Perlman & Speciner.
Grid Security Infrastructure Tutorial Von Welch Distributed Systems Laboratory U. Of Chicago and Argonne National Laboratory.
Mar 12, 2002Mårten Trolin1 This lecture Diffie-Hellman key agreement Authentication Certificates Certificate Authorities SSL/TLS.
CSCI283 Fall 2005 GWU All slides from Bishop’s slide set Public Key Infrastructure (PKI)
Cryptography and Network Security Chapter 17
Chapter 5 Cryptography Protecting principals communication in systems.
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
1 Key Establishment Symmetric key problem: How do two entities establish shared secret key in the first place? Solutions: Deffie-Hellman trusted key distribution.
Apr 22, 2003Mårten Trolin1 Agenda Course high-lights – Symmetric and asymmetric cryptography – Digital signatures and MACs – Certificates – Protocols Interactive.
8-1 What is network security? Confidentiality: only sender, intended receiver should “understand” message contents m sender encrypts message m receiver.
Symmetric Key Distribution Protocol with Hybrid Crypto Systems Tony Nguyen.
Cryptography (continued). Enabling Alice and Bob to Communicate Securely m m m Alice Eve Bob m.
L-13 Security 1. Schedule up to Midterm 2/26 No class (work on project 1, hw3) Review 3/2 Monday 4:30 pm NSH 3002 HW 3 due Midterm 3/3 Tuesday in class.
Network Security understand principles of network security:
1 Key Establishment Symmetric key problem: How do two entities establish shared secret key over network? Solution: trusted key distribution center (KDC)
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
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.
1 CS 194: Distributed Systems Security Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
Alexander Potapov.  Authentication definition  Protocol architectures  Cryptographic properties  Freshness  Types of attack on protocols  Two-way.
Computer Science Public Key Management Lecture 5.
Secure Communication with an Insecure Internet Infrastructure Lecture Nov. 21 st 2006 Dan Wendlandt.
CSCI 6962: Server-side Design and Programming
Chapter 31 Network Security
L-24 Security 1. Today's Lecture Internet security weaknesses Establishing secure channels (Crypto 101) Key distribution 2.
How HTTPS Works J. David Giese. Hyper Text Transfer Protocol BrowserHTTP Server GET / HTTP/1.1 HOST: edge-effect.github.io HEADERS BODY HTTP/ OK.
SSL and https for Secure Web Communication CSCI 5857: Encoding and Encryption.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Cryptography and Network Security (CS435) Part Fourteen (Web Security)
Web Security : Secure Socket Layer Secure Electronic Transaction.
Security: An Overview of Cryptographic Techniques /440 With slides from: Debabrata Dash, Nick Feamster, Gregory Kesden, Vyas Sekar and others.
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.
Basic Cryptography 1. What is cryptography? Cryptography is a mathematical method of protecting information –Cryptography is part of, but not equal to,
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
23-1 Last time □ P2P □ Security ♦ Intro ♦ Principles of cryptography.
Network Security7-1 CIS3360: Chapter 8: Cryptography Application of Public Cryptography Cliff Zou Spring 2012 TexPoint fonts used in EMF. Read the TexPoint.
1 Cryptography NOTES. 2 Secret Key Cryptography Single key used to encrypt and decrypt. Key must be known by both parties. Assuming we live in a hostile.
Network Security Understand principles of network security:
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
Washington System Center © 2005 IBM Corporation August 25, 2005 RDS Training Secure Socket Layer (SSL) Overview z/Series Security (Mary Sweat, Greg Boyd)
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Topic 14: Secure Communication1 Information Security CS 526 Topic 14: Key Distribution & Agreement, Secure Communication.
Network Security Continued. Digital Signature You want to sign a document. Three conditions. – 1. The receiver can verify the identity of the sender.
Computer and Network Security - Message Digests, Kerberos, PKI –
Lecture 5.1: Message Authentication Codes, and Key Distribution
L-24 Security 1. Today's Lecture Internet security weaknesses Establishing secure channels (Crypto 101) Key distribution 2.
Key Management Network Systems Security Mort Anvari.
EE 122: Lecture 24 (Security) Ion Stoica December 4, 2001.
This courseware is copyrighted © 2016 gtslearning. No part of this courseware or any training material supplied by gtslearning International Limited to.
@Yuan Xue CS 285 Network Security Key Distribution and Management Yuan Xue Fall 2012.
@Yuan Xue CS 285 Network Security Secure Socket Layer Yuan Xue Fall 2013.
Distributed Systems Fall 2016
Distributed Systems Fall 2016
Basics of Cryptography
Computer Communication & Networks
Distributed Systems Final Review (part 2) Fall 2017
Secure Communication with an Insecure Internet Infrastructure
The Secure Sockets Layer (SSL) Protocol
Protocol ap1.0: Alice says “I am Alice”
Lecture 10: Network Security.
Chapter 8 roadmap 8.1 What is network security?
Presentation transcript:

Secure Communication with an Insecure Internet Infrastructure

Internet Design Decisions and Security Origin as a small and cooperative network (=> largely trusted infrastructure) Global Addressing (=> every sociopath is your next-door neighbor*) Connection-less datagram service (=> can’t verify source, hard to protect bandwidth) * Dan Geer

Internet Design Decisions and Security Anyone can connect (=> ANYONE can connect) Millions of hosts run nearly identical software (=> single exploit can create epidemic) Most Internet users know about as much as Senator Stevens aka “the tubes guy” (=> God help us all…)

Our “Narrow” Focus Yes:  Protecting network resources and limiting connectivity (Last time)  Creating a “secure channel” for communication (today) No:  Preventing software vulnerabilities & malware, or “social engineering”.

Secure Communication with an Untrusted Infrastructure ISP A ISP D ISP C ISP B Alice Bob

Secure Communication with an Untrusted Infrastructure ISP A ISP D ISP C ISP B Alice Bob Mallory

Secure Communication with an Untrusted Infrastructure ISP A ISP D ISP C ISP B Alice Hello, I’m “Bob”

What do we need for a secure communication channel? Authentication (Who am I talking to?) Confidentiality (Is my data hidden?) Integrity (Has my data been modified?) Availability (Can I reach the destination?)

What is cryptography? "cryptography is about communication in the presence of adversaries." - Ron Rivest “cryptography is using math and other crazy tricks to approximate magic” - Unknown 441 TA

What is cryptography? Tools to help us build secure communication channels that provide: 1) Authentication 2) Integrity 3) Confidentiality

Cryptography As a Tool Using cryptography securely is not simple Designing cryptographic schemes correctly is near impossible. Today we want to give you an idea of what can be done with cryptography. Take a security course if you think you may use it in the future (e.g )

The Great Divide Symmetric Crypto (Private key) (E.g., AES) Asymmetric Crypto (Public key) (E.g., RSA) Shared secret between parties? Yes Speed of crypto operations Slow No Fast

Symmetric Key: Confidentiality Motivating Example: You and a friend share a key K of L random bits, and want to secretly share message M also L bits long. Scheme: You send her the xor(M,K) and then she “decrypts” using xor(M,K) again. 1)Do you get the right message to your friend? 2)Can an adversary recover the message M? 3)Can adversary recover the key K?

Symmetric Key: Confidentiality One-time Pad (OTP) is secure but usually impactical  Key is as long at the message  Keys cannot be reused (why?) Stream Ciphers: Ex: RC4, A5 Block Ciphers: Ex: DES, AES, Blowfish In practice, two types of ciphers are used that require constant length keys:

Symmetric Key: Confidentiality Stream Ciphers (ex: RC4) PRNG Pseudo-Random stream of L bits Message of Length L bits XOR = Encrypted Ciphertext K A-B Bob uses K A-B as PRNG seed, and XORs encrypted text to get the message back (just like OTP). Alice:

Symmetric Key: Confidentiality Block 4Block 3Block 2Block 1 Round #1Round #2Round #n Block 1 Block Ciphers (ex: AES) K A-B Alice: Bob breaks the ciphertext into blocks, feeds it through decryption engine using K A-B to recover the message. Block 2Block 3Block 4 (fixed block size, e.g. 128 bits)

Cryptographic Hash Functions Consistent hash(X) always yields same result One-way given Y, can’t find X s.t. hash(X) = Y Collision resistant given hash(W) = Z, can’t find X such that hash(X) = Z Hash Fn Message of arbitrary length Fixed Size Hash

Symmetric Key: Integrity Hash Message Authentication Code (HMAC) Hash Fn Message MACMessage Alice Transmits Message & MAC Why is this secure? How do properties of a hash function help us? MAC Step #1: Alice creates MAC Step #2Step #3 Bob computes MAC with message and K A-B to verify. K A-B

Symmetric Key: Authentication You already know how to do this! (hint: think about how we showed integrity) Hash Fn I am Bob A43FF234 Alice receives the hash, computes a hash with K A-B, and she knows the sender is Bob whoops! K A-B

Symmetric Key: Authentication What if Mallory overhears the hash sent by Bob, and then “replays” it later? ISP A ISP D ISP C ISP B Hello, I’m Bob. Here’s the hash to “prove” it A43FF234

Symmetric Key: Authentication A “Nonce”  A random bitstring used only once. Alice sends nonce to Bob as a “challenge”. Bob Replies with “fresh” MAC result. Hash Nonce B4FE64 Bob K A-B Nonce B4FE64 Alice Performs same hash with K A-B and compares results

Symmetric Key: Authentication A “Nonce”  A random bitstring used only once. Alice sends nonce to Bob as a “challenge”. Bob Replies with “fresh” MAC result. Nonce Alice ?!?! If Alice sends Mallory a nonce, she cannot compute the corresponding MAC without K A-B Mallory

Symmetric Key Crypto Review Confidentiality: Stream & Block Ciphers Integrity: HMAC Authentication: HMAC and Nonce Questions?? Are we done? Not Really: 1)Number of keys scales as O(n 2 ) 2)How to securely share keys in the first place?

Diffie-Hellman key exchange An early (1976) way to create a shared secret. Everyone knows a prime, p, and a generator, g. Alice and Bob want to share a secret, but only have internet to communicate over.

DH key exchange Bob Alice Everyone: large prime p and generator g Create secret: a Create secret: b Compute: (g b mod p) a Compute: (g a mod p) b Voila: They both know g ab which is secret! Send Bob: g a mod p Send Alice: g b mod p

DH key exchange & Man-In-The-Middle g a mod p g c mod p g b mod p g c mod p

Asymmetric Key Crypto: Instead of shared keys, each person has a “key pair” Bob’s public key Bob’s private key KBKB K B -1 The keys are inverses, so: K B -1 ( K B (m) ) = m

Asymmetric Key Crypto: It is believed to be computationally unfeasible to derive K B -1 from K B or to find any way to get M from K B (M) other than using K B -1. => K B can safely be made public. Note: We will not explain the computation that K B (m) entails, but rather treat these functions as black boxes with the desired properties.

Asymmetric Key: Confidentiality ciphertext encryption algorithm decryption algorithm Bob’s public key plaintext message K B (m) Bob’s private key m = K B -1 ( K B (m) ) KBKB K B -1

Asymmetric Key: Sign & Verify The message must be from Bob, because it must be the case that S = K B -1 (M), and only Bob has K B -1 ! If we are given a message M, and a value S such that K B (S) = M, what can we conclude? This gives us two primitives: Sign (M) = K B -1 (M) = Signature S Verify (S, M) = test( K B (S) == M )

Asymmetric Key: Integrity & Authentication We can use Sign() and Verify() in a similar manner as our HMAC in symmetric schemes. Integrity: S = Sign(M)Message M Receiver must only check Verify(M, S) Authentication: Nonce S = Sign(Nonce) Verify(Nonce, S)

Asymmetric Key Review: Confidentiality: Encrypt with Public Key of Receiver Integrity: Sign message with private key of the sender Authentication: Entity being authenticated signs a nonce with private key, signature is then verified with the public key But, these operations are computationally expensive*

One last “little detail”… How do I get these keys in the first place?? Remember: Symmetric key primitives assumed Alice and Bob had already shared a key. Asymmetric key primitives assumed Alice knew Bob’s public key. This may work with friends, but when was the last time you saw Amazon.com walking down the street?

Symmetric Key Distribution How does Andrew do this? Andrew Uses Kerberos, which relies on a Key Distribution Center (KDC) to establish shared symmetric keys.

Key Distribution Center (KDC) Alice, Bob need shared symmetric key. KDC: server shares different secret key with each registered user (many users) Alice, Bob know own symmetric keys, K A-KDC K B-KDC, for communicating with KDC. K B-KDC K X-KDC K Y-KDC K Z-KDC K P-KDC K B-KDC K A-KDC K P-KDC KDC

Key Distribution Center (KDC) Alice knows R1 Bob knows to use R1 to communicate with Alice Alice and Bob communicate: using R1 as session key for shared symmetric encryption Q: How does KDC allow Bob, Alice to determine shared symmetric secret key to communicate with each other? KDC generates R1 K B-KDC (A,R1) K A-KDC (A,B) K A-KDC (R1, K B-KDC (A,R1) )

How Useful is a KDC? Must always be online to support secure communication KDC can expose our session keys to others! Centralized trust and point of failure. In practice, the KDC model is mostly used within single organizations (e.g. Kerberos) but not more widely.

Certification Authorities Certification authority (CA): binds public key to particular entity, E. An entity E registers its public key with CA.  E provides “proof of identity” to CA.  CA creates certificate binding E to its public key.  Certificate contains E’s public key AND the CA’s signature of E’s public key. Bob’s public key Bob’s identifying information CA generates S = Sign(K B ) CA private key certificate = Bob’s public key and signature by CA KBKB K -1 CA KBKB

Certification Authorities When Alice wants Bob’s public key:  Gets Bob’s certificate (Bob or elsewhere).  Use CA’s public key to verify the signature within Bob’s certificate, then accepts public key Verify(S, K B ) CA public key K CA KBKB If signature is valid, use K B

Certificate Contents info algorithm and key value itself (not shown) Cert owner Cert issuer Valid dates Fingerprint of signature

Which Authority Should You Trust? Today: many authorities What about a shared Public Key Infrastructure (PKI)?  A system in which “roots of trust” authoritatively bind public keys to real-world identities  So far it has not been very successful

Transport Layer Security (TLS) aka Secure Socket Layer (SSL) Used for protocols like HTTPS Special TLS socket layer between application and TCP (small changes to application). Handles confidentiality, integrity, and authentication. Uses “hybrid” cryptography.

Setup Channel with TLS “Handshake” Handshake Steps: 1)Client and server negotiate exact cryptographic protocols 2)Client validates public key certificate with CA public key. 3)Client encrypts secret random value with server’s key, and sends it as a challenge. 4)Server decrypts, proving it has the corresponding private key. 5)This value is used to derive symmetric session keys for encryption & MACs.

How TLS Handles Data 1) Data arrives as a stream from the application via the TLS Socket 2) The data is segmented by TLS into chunks 3) A session key is used to encrypt and MAC each chunk to form a TLS “record”, which includes a short header and data that is encrypted, as well as a MAC. 4) Records form a byte stream that is fed to a TCP socket for transmission.

What to take home? Internet design and growth => security challenges Symmetric (pre-shared key, fast) and asymmetric (key pairs, slow) primitives provide: Confidentiality Integrity Authentication “Hybrid Encryption” leverages strengths of both. Great complexity exists in securely acquiring keys. Crypto is hard to get right, so use tools from others, don’t design your own (e.g. TLS).

Resources Textbook: 8.1 – 8.3 Wikipedia for overview of Symmetric/Asymmetric primitives and Hash functions. OpenSSL ( top-rate open source code for SSL and primitive functions. “Handbook of Applied Cryptography” available free online: