Secure Communication with an Insecure Internet Infrastructure

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

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.
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.
Secure Communication with an Insecure Internet Infrastructure.
Computer Science Public Key Management Lecture 5.
Secure Communication with an Insecure Internet Infrastructure Lecture Nov. 21 st 2006 Dan Wendlandt.
Chapter 31 Network Security
L-24 Security 1. Today's Lecture Internet security weaknesses Establishing secure channels (Crypto 101) Key distribution 2.
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.
Network Security – Part 2 (Continued) Lecture Notes for May 8, 2006 V.T. Raja, Ph.D., Oregon State University.
Security: An Overview of Cryptographic Techniques /440 With slides from: Debabrata Dash, Nick Feamster, Gregory Kesden, Vyas Sekar and others.
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.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Encryption. Introduction The incredible growth of the Internet has excited businesses and consumers alike with its promise of changing the way we live.
Network Security Continued. Digital Signature You want to sign a document. Three conditions. – 1. The receiver can verify the identity of the sender.
L-24 Security 1. Today's Lecture Internet security weaknesses Establishing secure channels (Crypto 101) Key distribution 2.
SSL: Secure Socket Layer By: Mike Weissert. Overview Definition History & Background SSL Assurances SSL Session Problems Attacks & Defenses.
Distributed Systems Fall 2016
Distributed Systems Fall 2016
Cryptography CS 555 Topic 34: SSL/TLS.
Reviews Rocky K. C. Chang 20 April 2007.
Basics of Cryptography
IT443 – Network Security Administration Instructor: Bo Sheng
Cryptography and Network Security
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
Computer Communication & Networks
Cryptography Reference: Network Security
Cryptography Reference: Network Security
Secure Sockets Layer (SSL)
Information Security message M one-way hash fingerprint f = H(M)
Cryptographic Hash Function
Public Key Encryption Systems
Distributed Systems Final Review (part 2) Fall 2017
Basic Network Encryption
Information and Network Security
Network Security Primitives
Information Security message M one-way hash fingerprint f = H(M)
Information Security message M one-way hash fingerprint f = H(M)
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
Cryptography and Network Security
Security through Encryption
SSH: SECURE LOGIN CONNECTIONS OVER THE INTERNET
Cryptography and Network Security
CS/ECE 478 Network Security Dr. Attila Altay Yavuz
Information Security message M one-way hash fingerprint f = H(M)
The Secure Sockets Layer (SSL) Protocol
Protocol ap1.0: Alice says “I am Alice”
Encryption INST 346, Section 0201 April 3, 2018.
CS2911 Week 9, Class 1 Today Discussion on RSA Video Eavesdropping
Key Management Network Systems Security
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
Outline Using cryptography in networks IPSec SSL and TLS.
Lecture 10: Network Security.
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
Basic Network Encryption
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
Advanced Computer Networks
Security at the Transport Layer
Security: Integrity, Authentication, Non-repudiation
Public Key Encryption Systems
Security: Public Key Cryptography
Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator.
Cryptography and Network Security
Chapter 8 roadmap 8.1 What is network security?
Review of Cryptography: Symmetric and Asymmetric Crypto Advanced Network Security Peter Reiher August, 2014.
Presentation transcript:

Secure Communication with an Insecure Internet Infrastructure

What is “Internet Security” ? Denial-of-Service Password Cracking Traffic modification Worms & Viruses Trojan Horse DNS Poisoning Phishing Spyware IP Spoofing * This list is pretty broad, some things are actual incidents that may cause harm, while others are vulnerabilities that lead to more complex attacks that cause harm. From such a list, we might define Internet security as preventing bad things that can happen when someone is using the Internet. Route Hijacks Traffic Eavesdropping End-host impersonation Spam

Internet Design Decisions: (ie: how did we get here? ) 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) Assumption is still true, even now when Internet is a huge collection of independent ISPs. * Dan Geer

Internet Design Decisions: (ie: how did we get here? ) 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…) Assumption is still true, even now when Internet is a huge collection of independent ISPs.

Our “Narrow” Focus Yes: 1) Creating a “secure channel” for communication (today) 2) Protecting network resources and limiting connectivity (next Tuesday) No: 1) Preventing software vulnerabilities & malware, or “social engineering”. For this course though, we want to focus on understanding how the Internet’s design contributes to a variety of security vulnerabilities, how these vulnerabilities can be exploited, and, most importantly, give you an idea of what tools are used to allow secure communication.

Secure Communication with an Untrusted Infrastructure Bob ISP D ISP B ISP C ISP A The focus on today’s lecture will be how to we set up a “secure channel” for communication. Alice wants to talk to Bob. Alice probably trusts ISP A, but how does she know where her traffic is going after that? Or who else might see it, or modify it before it reaches bob? Alice

Secure Communication with an Untrusted Infrastructure Mallory Bob ISP D ISP B ISP C ISP A Of course, its even more complicated…. As each ISP if made of up many routers, each which independently reach a forwarding decision. Can this infrastructure be trusted? No, mallory (or the NSA) might be on any of the routers, intercepting your communication Alice

Secure Communication with an Untrusted Infrastructure ISP D ISP B ISP C ISP A Worse yet, how does Alice even know she’s actually talking to Bob at all? This way, Mallory may not even have to compromise a router! 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?) We will talk about the first three of these things today… Vyas will get to availability next week.

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. 18-487)

The Great Divide Yes No Fast Slow Asymmetric Crypto: (Public key) Example: RSA Symmetric Crypto: (Private key) Example: AES Requires a pre-shared secret between communicating parties? Yes No The three attributes of a secure communication we mentioned can be achieved using two different “types”, or “families” of cryptography. Each family has within it many different algorithms, with slightly different properties. Symmetric and Asymmetric cryptography differ in the assumptions they make about the “secrets”, or “keys” that two participants use to enable secure communication. Symmetric key crypto assumes that the parties have used some mechanism to set-up a “shared secret” between the two parties that can be used to secure further communication. Public key crypto, as we will see, does not make this assumption, yet can still provide strong security properties. However, the mechanism to do this uses complex math, and as a result, the time to perform asymmetric crypto operations is significantly longer than their symmetric counter-parts. Overall speed of cryptographic operations Fast Slow

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

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

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

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

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

Symmetric Key: Integrity Hash Message Authentication Code (HMAC) Step #1: Alice creates MAC Hash Fn Message MAC K A-B Alice Transmits Message & MAC Step #2 Step #3 Bob computes MAC with message and KA-B to verify. This is similar to a checksum, but secure. Why? Note: the message does not have to be encrypted, unless you also desire confidentiality. Will the MAC always check out on the receiving end? Yes, b/c receiver has key, and HAS is consistent. Can attacker substitute in another message? No, b/c of collision resistance of HASH Can attacker recover the key, based on the message? No, b/c of one-way nature of HASH MAC Message Why is this secure? How do properties of a hash function help us?

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

Symmetric Key: Authentication What is Mallory overhears the hash sent by Bob, and then “replays” it later? ISP D ISP B ISP C ISP A 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. Nonce Bob Alice Nonce Hash B4FE64 K A-B B4FE64 Performs same hash with KA-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 Mallory If Alice sends Mallory a nonce, she cannot compute the corresponding MAC without K A-B

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

Asymmetric Key Crypto: Instead of shared keys, each person has a “key pair” KB Bob’s public key Bob’s private key KB-1 The keys are inverses, so: Note: We are not going to go into the details of that KB(m) means as far as computation. We will treat it as a black box function with these properties. KB-1 (KB (m)) = m

Asymmetric Key Crypto: It is believed to be computationally unfeasible to derive KB-1 from KB or to find any way to get M from KB(M) other than using KB-1 . => KB can safely be made public. Note: We will not detail the computation that KB(m) entails, but rather treat these functions as black boxes with the desired properties. Note: We are not going to go into the details of that KB(m) means as far as computation. We will treat it as a black box function with these properties.

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

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

Asymmetric Key: Integrity & Authentication We can use Sign() and Verify() in a similar manner as our HMAC in symmetric schemes. S = Sign(M) Message M Integrity: Receiver must only check Verify(M, S) Note: there is another way to do authentication, which we will see when we look at SSL. Nonce Authentication: 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, KA-KDC KB-KDC , for communicating with KDC. KDC KB-KDC KP-KDC KA-KDC KX-KDC KP-KDC KY-KDC KZ-KDC KB-KDC KA-KDC

Key Distribution Center (KDC) Q: How does KDC allow Bob, Alice to determine shared symmetric secret key to communicate with each other? KDC generates R1 KA-KDC(A,B) KA-KDC(R1, KB-KDC(A,R1) ) Alice knows R1 Bob knows to use R1 to communicate with Alice KB-KDC(A,R1) Downside: KDC must always be online to communicate securely KDC can give our session keys away (escrow) Alice and Bob communicate: using R1 as session key for shared symmetric encryption

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. CA generates S = Sign(KB) Note: CA’s do NOT generate keys. They simply are handed a public key along with proof of identify, and generate a signature which can accompany the key when it is given to a user that must validate that they key is in fact Bob’s public key. Bob’s public key KB KB certificate = Bob’s public key and signature by CA CA private key Bob’s identifying information K-1 CA

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, KB) KB If signature is valid, use KB CA public key KCA

Certificate Contents Cert owner Cert issuer Valid dates info algorithm and key value itself (not shown) Cert owner Cert issuer Valid dates Fingerprint of signature Wait… didn’t we just say that we needed to have the key’s from the CA’s? What does our browser use?

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 PKI’s are notoriously complex

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. Originally created by a little known and know largely defunct net start-up called “netscape” in the mid-90’s

Setup Channel with TLS “Handshake” Handshake Steps: Clients and servers negotiate exact cryptographic protocols Client’s validate public key certificate with CA public key. Client encrypt secret random value with server’s key, and send it as a challenge. Server decrypts, proving it has the corresponding private key. 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 (www.openssl.org): top-rate open source code for SSL and primitive functions. “Handbook of Applied Cryptography” available free online: www.cacr.math.uwaterloo.ca/hac/