CSC 8560 Computer Networks: Network Security

Similar documents
CS 332 Computer Networks Security

CS Computer Networks 1: Authentication

Chapter 8 Security. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Encryption. INST 346, Section 0201 April 3, 2018

Ref:

The Network Security Model. What can an adversary do? Who might Bob and Alice be? Computer Networks 12/2/2009. CSC 257/457 - Fall

SECURITY IN NETWORKS

14. Internet Security (J. Kurose)

Kurose & Ross, Chapters (5 th ed.)

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

SECURITY IN NETWORKS 1

Lecture 30. Cryptography. Symmetric Key Cryptography. Key Exchange. Advanced Encryption Standard (AES) DES. Security April 11, 2005

ח'/סיון/תשע "א. RSA: getting ready. Public Key Cryptography. Public key cryptography. Public key encryption algorithms

Computer Communication Networks Network Security

Network Security. Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2002.

Computer Networking. What is network security? Chapter 7: Network security. Symmetric key cryptography. The language of cryptography

Welcome to CS 395/495 Internet Security: A Measurement-based Approach

Internet and Intranet Protocols and Applications

Chapter 8. Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2004.

Computer Networks. Wenzhong Li. Nanjing University

Public Key Algorithms

Chapter 8 Security. Computer Networking: A Top Down Approach. Andrei Gurtov. 7 th edition Jim Kurose, Keith Ross Pearson/Addison Wesley April 2016

Chapter 8 Security. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

COSC : mobility within same subnet. Lecture 26. H1 remains in same IP subnet: IP address can remain same

Cryptography (Overview)

CSCI 454/554 Computer and Network Security. Topic 5.2 Public Key Cryptography

Lecture 9a: Secure Sockets Layer (SSL) March, 2004

Outline. CSCI 454/554 Computer and Network Security. Introduction. Topic 5.2 Public Key Cryptography. 1. Introduction 2. RSA

Outline. Public Key Cryptography. Applications of Public Key Crypto. Applications (Cont d)

Chapter 8 Security. Computer Networking: A Top Down Approach

Chapter 8 Security. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

CSE 127: Computer Security Cryptography. Kirill Levchenko

Chapter 9 Public Key Cryptography. WANG YANG

Lecture 1 Applied Cryptography (Part 1)

Lecture Nov. 21 st 2006 Dan Wendlandt ISP D ISP B ISP C ISP A. Bob. Alice. Denial-of-Service. Password Cracking. Traffic.

L13. Reviews. Rocky K. C. Chang, April 10, 2015

Security: Focus of Control. Authentication

9/30/2016. Cryptography Basics. Outline. Encryption/Decryption. Cryptanalysis. Caesar Cipher. Mono-Alphabetic Ciphers

Cryptography Basics. IT443 Network Security Administration Slides courtesy of Bo Sheng

Distributed Systems. 26. Cryptographic Systems: An Introduction. Paul Krzyzanowski. Rutgers University. Fall 2015

CSE 3461/5461: Introduction to Computer Networking and Internet Technologies. Network Security. Presentation L

Lecture 2 Applied Cryptography (Part 2)

(2½ hours) Total Marks: 75

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018

Security: Focus of Control

Information Security. message M. fingerprint f = H(M) one-way hash. 4/19/2006 Information Security 1

Security and Privacy. Xin Liu Computer Science University of California, Davis. Introduction 1-1

Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls

Chapter 8 Network Security

Security issues: Encryption algorithms. Threats Methods of attack. Secret-key Public-key Hybrid protocols. CS550: Distributed OS.

06/02/ Local & Metropolitan Area Networks. 0. Overview. Terminology ACOE322. Lecture 8 Network Security

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 11 Basic Cryptography

UNIT - IV Cryptographic Hash Function 31.1

Security: Cryptography

CSC 474/574 Information Systems Security

Cryptography & Key Exchange Protocols. Faculty of Computer Science & Engineering HCMC University of Technology

Chapter 8 Network Security. Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.

CRYPTOGRAPHY & DIGITAL SIGNATURE

Outline. Data Encryption Standard. Symmetric-Key Algorithms. Lecture 4

Cryptographic Concepts

David Wetherall, with some slides from Radia Perlman s security lectures.

Module: Cryptographic Protocols. Professor Patrick McDaniel Spring CMPSC443 - Introduction to Computer and Network Security

Public Key Algorithms

Modern cryptography 2. CSCI 470: Web Science Keith Vertanen

1.264 Lecture 28. Cryptography: Asymmetric keys

1.264 Lecture 27. Security protocols Symmetric cryptography. Next class: Anderson chapter 10. Exercise due after class

Chapter 8 Network Security

Network Security. Chapter 8. MYcsvtu Notes.

EEC-682/782 Computer Networks I

Diffie-Hellman. Part 1 Cryptography 136

CSC 774 Network Security

Lecture 6 - Cryptography

Other Uses of Cryptography. Cryptography Goals. Basic Problem and Terminology. Other Uses of Cryptography. What Can Go Wrong? Why Do We Need a Key?

CSCI 454/554 Computer and Network Security. Topic 2. Introduction to Cryptography

Public-key Cryptography: Theory and Practice

Background. Network Security - Certificates, Keys and Signatures - Digital Signatures. Digital Signatures. Dr. John Keeney 3BA33

Network Security Chapter 8

EEC-484/584 Computer Networks

Issues. Separation of. Distributed system security. Security services. Security policies. Security mechanism

Basic Concepts and Definitions. CSC/ECE 574 Computer and Network Security. Outline

Symmetric Cryptography. CS4264 Fall 2016

CS 161 Computer Security

ECEN 5022 Cryptography

ISA 662 Internet Security Protocols. Outline. Prime Numbers (I) Beauty of Mathematics. Division (II) Division (I)

Garantía y Seguridad en Sistemas y Redes

CSC 474/574 Information Systems Security

Cryptography (DES+RSA) by Amit Konar Dept. of Math and CS, UMSL

Practical Aspects of Modern Cryptography

Outline. Cryptography. Encryption/Decryption. Basic Concepts and Definitions. Cryptography vs. Steganography. Cryptography: the art of secret writing

CRYPTOLOGY KEY MANAGEMENT CRYPTOGRAPHY CRYPTANALYSIS. Cryptanalytic. Brute-Force. Ciphertext-only Known-plaintext Chosen-plaintext Chosen-ciphertext

CSC/ECE 774 Advanced Network Security

CIS 4360 Secure Computer Systems Applied Cryptography

Computers and Security

Introduction to Cryptography

What did we talk about last time? Public key cryptography A little number theory

Computer Security. 10r. Recitation assignment & concept review. Paul Krzyzanowski. Rutgers University. Spring 2018

APNIC elearning: Cryptography Basics

EEC-682/782 Computer Networks I

Computer Networks & Security 2016/2017

2.1 Basic Cryptography Concepts

Transcription:

CSC 8560 Computer Networks: Network Security Professor Henry Carter Fall 2017

Last Time We talked about mobility as a matter of context: How is mobility handled as you move around a room? Between rooms in the same building? As your drive down The Connector at 75 MPH? Core routers in the Internet could support mobility. Why don t we do this? What are the tradeoffs between direct and indirect routing schemes? What are the equivalents of HAs and FAs in a cellular network? 2

Chapter 8: Network Security Chapter goals: understand principles of network security: cryptography and its many uses beyond confidentiality authentication message integrity key distribution security in practice: security in application, transport, network, link layers 3

Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message Integrity 8.4 Authentication 8.5 Securing e-mail 8.6 Securing TCP connections: SSL 8.7 Network layer security: IPsec 8.8 Securing wireless LANs 8.9 Operational security: firewalls and IDS 4

What is network security? Confidentiality: only sender, intended receiver should understand message contents sender encrypts message receiver decrypts message Authentication: sender, receiver want to confirm identity of each other Message Integrity: sender, receiver want to ensure message not altered (in transit, or afterwards) without detection Access and Availability: services must be accessible and available to users 5

Friends and enemies: Alice, Bob, Trudy well-known in network security world Bob, Alice want to communicate securely Trudy (intruder) may intercept, delete, add messages Alice channel data, control messages Bob data secure sender secure receiver data Trudy 6

Who might Bob, Alice be? well, real-life Bobs and Alices! Web browser/server for electronic transactions (e.g., on-line purchases) on-line banking client/server DNS servers routers exchanging routing table updates other examples? 7

There are bad guys (and girls) out there! Q: What can a bad guy do? A: a lot! eavesdrop: intercept messages actively insert messages into connection impersonation: can fake (spoof) source address in packet (or any field in packet) hijacking: take over ongoing connection by removing sender or receiver, inserting himself in place denial of service: prevent service from being used by others (e.g., by overloading resources) more on this later 8

Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message Integrity 8.4 Authentication 8.5 Securing e-mail 8.6 Securing TCP connections: SSL 8.7 Network layer security: IPsec 8.8 Securing wireless LANs 8.9 Operational security: firewalls and IDS 9

Notes on Cryptography Cryptography in and of itself is not security. It is a tool that helps us achieve security. Think of this as the difference using a hammer and designing a building (an architect probably needs to be skilled in both). Do not, under any circumstances, attempt to roll your own crypto. In the last 40 years, cryptography has become a science. Most work before this time can be broken with ease. You must assume that your enemy knows the algorithm you are using. It must be secure anyhow. This is Kerchoffs Principle. 10

The language of cryptography K A Alice s encryption key K B Bob s decryption key plaintext encryption algorithm ciphertext decryption algorithm plaintext symmetric key crypto: sender, receiver keys identical public-key crypto: encryption key public, decryption key secret (private) 11

Caesar Cipher The earliest know encryption scheme, this cipher simply shifts all letters in the alphabet to the right by 3 places. abcdefghijklmnopqrstuvwxyz defghijklmnopqrstuvwxyzabc KRZ ZHOO GRHV WKLV ZRUN? This example belongs to a basic class of rotation substitution ciphers. e.g., ROT3, ROT13 12

Symmetric key cryptography substitution cipher: substituting one thing for another monoalphabetic cipher: substitute one letter for another E.g.: plaintext: abcdefghijklmnopqrstuvwxyz ciphertext: mnbvcxzasdfghjklpoiuytrewq ciphertext: nkn. s gktc wky. mgsbc Plaintext: bob. i love you. alice Q: How hard to break this simple cipher?: brute force (how hard?) other? 13

Symmetric key cryptography K A-B K A-B plaintext message, m encryption algorithm ciphertext K A-B (m) decryption algorithm plaintext m = K ( ) A-B K A-B (m) symmetric key crypto: Bob and Alice share know same (symmetric) key: K A-B e.g., key is knowing substitution pattern in mono alphabetic substitution cipher Q: how do Bob and Alice agree on key value? 14

Symmetric key crypto: DES DES: Data Encryption Standard US encryption standard [NIST 1993] 56-bit symmetric key, 64-bit plaintext input How secure is DES? DES Challenge: 56-bit-key-encrypted phrase ( Strong cryptography makes the world a safer place ) decrypted (brute force) in 4 months (1997) no known backdoor decryption approach making DES more secure: use three keys sequentially (3-DES) on each block 15

Symmetric key crypto: DES DES operation initial permutation 16 identical rounds of function application, each using different 48 bits of key final permutation 16

AES: Advanced Encryption Standard newer (Nov. 2001) symmetric-key NIST standard, replacing DES processes data in 128 bit blocks 128, 192, or 256 bit keys brute force decryption (try each key) taking 1 sec on DES, takes 149 trillion years for AES 17

Block Cipher Modes How do we encrypt messages longer than one block? First attempt: Electronic Codebook mode (ECB) Simple approach: Break message into blocks (padding the end out if not a full block) Encrypt each block Send message in pieces

Tux

Cipher Block Chaining Cipher block: if input block repeated, will produce same cipher text: Cipher block chaining: XOR i th input block, m(i), with previous block of ciphertext, c(i-1) c(o) transmitted to receiver in clear what happens in HTTP/1.1 scenario from above? 20

Public Key Cryptography symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if never met )? public key cryptography radically different approach [Diffie- Hellman76, RSA78] sender, receiver do not share secret key public encryption key known to all private decryption key known only to receiver 21

Public key cryptography K B + Bob s public key K B - Bob s private key plaintext message, m encryption algorithm ciphertext + K (m) B decryption algorithm plaintext message - + m = K (K (m)) B B 22

Public key encryption algorithms Requirements: 1 + - need K ( ) and K ( ) such that B B 2 + given public key K B, it should be impossible to compute private key K B - RSA: Rivest, Shamir, Adelson algorithm 23

RSA: Choosing keys 1. Choose two large prime numbers p, q. (e.g., 1024 bits each) 2. Compute n = pq, z = (p-1)(q-1) 3. Choose e (with e<n) that has no common factors with z. (e, z are relatively prime ). 4. Choose d such that ed-1 is exactly divisible by z. (in other words: ed mod z = 1 ). 5. Public key is (n,e). Private key is (n,d). + - K K B B 24

RSA: Encryption, decryption 0. Given (n,e) and (n,d) as computed above 1. To encrypt bit pattern, m, compute c = m e mod n (i.e., remainder when m e is divided by n) 2. To decrypt received bit pattern, c, compute m = c d mod n (i.e., remainder when c d is divided by n) Magic happens! e m = (m mod n) c d mod n 25

RSA example: Bob chooses p=5, q=7. Then n=35, z=24. e=5 (so e, z relatively prime). d=29 (so ed-1 exactly divisible by z). letter m m e c = m e mod n encrypt: l 12 248832 17 c c d m = c dmod n letter decrypt: 17 481968572106750915091411825223071697 12 l 26

Now You Try Choosing Keys p = 7 and q = 11 n = pq =? ; z = (p-1)(q-1) =? Choose e (no common factors with z): 7 Choose d such that 7 x d = 1 mod z : 43 Our message is 9, what is the ciphertext? c = m e mod n m = c d mod n 27

RSA: another important property The following property will be very useful later: use public key first, followed by private key use private key first, followed by public key Result is the same! 28

Why is RSA secure? suppose you know Bob s public key (n,e). How hard is it to determine d? essentially need to find the factors of n (p and q) fact: factoring a big number is hard 29

Diffie-Hellman Encrypting data with RSA is computationally expensive Much faster to use a symmetric cipher Later, we will see examples where a symmetric key is choosen by sender and encrypted by RSA... but, what about network communications? We want two hosts to agree on a symmetric key Public key crypto was really started by Diffie and Hellman Goal: negotiate a secret over an insecure (e.g., public) medium seems impossible 30

Diffie-Hellman Protocol We have two participants: Alice (A) and Bob (B) Setup: pick a prime number p and a base g (<p) This information is public, e.g., p=13, g=4 Step 1: Each principal picks a private value x (<p-1) Step 2: Each principle generates and communicates a new value: y = g x mod p Step 3: Each principle generates the secret shared key z z = y x mod p z is used as the symmetric key for communication 31

Diffie-Hellman: Exchange Public Info: p = 17, g = 5 Everyone choose an x Alice picks her x: SA TA=g SA mod p TB=g SB mod p Bob picks his x: SB Alice computes: K = TB SA mod p TB SA = (g SB ) SA = g SB SA = g SA SB = (g SA ) SB = TA SB mod p Encrypted communication with K Alice computes: K = TA SB mod p How does Alice know Bob sent TA? Stay tuned... 32

Diffie-Hellman - Class Exercise Select a partner. Setup: Pick a prime number p and a base g (<p) p=13, g=4 Each partner chose a private value x (<p-1) Generate the following value and exchange it. y = g x mod p Now generate the shared secret z: z = y x mod p You should have both calculated the same value for z. This is your key! 33

Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message Integrity 8.4 Authentication 8.5 Securing e-mail 8.6 Securing TCP connections: SSL 8.7 Network layer security: IPsec 8.8 Securing wireless LANs 8.9 Operational security: firewalls and IDS 34

Message Integrity Bob receives msg from Alice, wants to ensure: message originally came from Alice message not changed since sent by Alice Cryptographic Hash: takes input m, produces fixed length value, H(m) e.g., as in Internet checksum... but a bit different... computationally infeasible to find two different messages, x, y such that H(x) = H(y) equivalently: given m = H(x), (x unknown), can not determine x. note: Internet checksum fails this requirement! 35

Internet Checksum: Poor Crypto Hash Function Internet checksum has some properties of hash function: produces fixed length digest (16-bit sum) of message is many-to-one But given a message with given hash value, it is easy to find another message with same hash value: Strong hashing algorithms like SHA-256 are designed to avoid this! 36

Message Authentication Code (MAC) (shared secret) s (message) m H(.) append H(m+s) m H(m+s) public Internet m H(m+s) H(.) H(m+s) compare s (shared secret) 37

MACs in Practice MD5 hash function widely used (RFC 1321) computes 128-bit MAC in 4-step process. arbitrary 128-bit string x, appears difficult to construct msg m whose MD5 hash is equal to x Attacks on MD5 are well known! SHA-1 is also used US standard [NIST, FIPS PUB 180-1] 160-bit MAC Brute-force attacks on SHA now require 2 63 operations to find a collision. General consensus that we should move to SHA2, SHA3 38

Digital Signatures Cryptographic technique analogous to hand-written signatures. sender (Bob) digitally signs document, establishing he is document owner/creator. verifiable, nonforgeable: recipient (Alice) can prove to someone that Bob, and no one else (including Alice), must have signed document 39

Digital Signatures simple digital signature for message m: Bob signs m by encrypting with his private key KB, creating signed message, KB(m) Bob s message, m Dear Alice Oh, how I have missed you. I think of you all the time! (blah blah blah) Bob K B - public key encryption algorithm Bob s private key K B - (m) Bob s message, m, signed (encrypted) with his private key 40

Digital Signatures (more) Suppose Alice receives msg m, digital signature KB(m) Alice verifies m signed by Bob by applying Bob s public + - + - key KB to KB(m) then checks KB(KB(m) ) = m. + - If KB(KB(m) ) = m, whoever signed m must have used Bob s private key. Alice thus verifies that: Bob signed m. No one else signed m. Bob signed m and not m. non-repudiation: Alice can take m, and signature KB(m) to court and prove that Bob signed m. 41

Digital Signature = signed MAC 42

Public Key Certification Public Key Problem: When Alice obtains Bob s public key (from web site, e-mail, diskette), how does she know it is Bob s public key, not Trudy s? Solution: Trusted certification authority (CA) 43

Certificate Authorities Certificate Authority (CA): binds public key to particular entity, E. E registers its public key with CA. E provides proof of identity to CA. CA creates certificate binding E to its public key. certificate containing E s public key digitally signed by CA: CA says This is E s public key. 44

Certificate Authority When Alice wants Bob s public key: gets Bob s certificate (Bob or elsewhere). apply CA s public key to Bob s certificate, get Bob s public key 45

A Certificate Contains: Serial number (unique to issuer) info about certificate owner, including algorithm and key value itself (not shown) info about certificate issuer valid dates digital signature by issuer 46

Problems with PKI Why exactly do you trust a CA? Anyone have any idea how many you actually trust? If two CAs present you with a certificate for Microsoft, which one is right? What prevents a CA from making up a key for you? What happens when keys are compromised? 47

Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message Integrity 8.4 Authentication 8.5 Securing e-mail 8.6 Securing TCP connections: SSL 8.7 Network layer security: IPsec 8.8 Securing wireless LANs 8.9 Operational security: firewalls and IDS 48

Authentication Goal: Bob wants Alice to prove her identity to him Protocol ap1.0: Alice says I am Alice I am Alice Failure scenario?? 49

Authentication Goal: Bob wants Alice to prove her identity to him Protocol ap1.0: Alice says I am Alice I am in a network, Bob can not see Alice, so Trudy simply declares herself to be Alice Alice 50

Authentication: another try Protocol ap2.0: Alice says I am Alice in an IP packet containing her source IP address Alice s IP address I am Alice Failure scenario?? 51

Authentication: another try Protocol ap2.0: Alice says I am Alice in an IP packet containing her source IP address Trudy can create a packet spoofing Alice s address Alice s IP address I am Alice 52

Authentication: another try Protocol ap3.0: Alice says I am Alice and sends her secret password to prove it. Alice s IP addr Alice s password I m Alice Alice s IP addr OK Failure scenario?? 53

Authentication: another try Protocol ap3.0: Alice says I am Alice and sends her secret password to prove it. Alice s IP addr Alice s password I m Alice Alice s IP addr OK replay attack: Trudy records Alice s packet and later plays it back to Bob Alice s IP addr Alice s password I m Alice 54

Authentication: yet another try Protocol ap3.1: Alice says I am Alice and sends her encrypted secret password to prove it. Alice s IP addr encrypted password I m Alice Alice s IP addr OK Failure scenario?? 55

Authentication: another try Protocol ap3.1: Alice says I am Alice and sends her encrypted secret password to prove it. Alice s IP addr encrypted password I m Alice record and Alice s IP addr OK playback still works! Alice s IP addr encrypted password I m Alice 56

Authentication: yet another try Goal: avoid playback attack Nonce: number (R) used only once in-a-lifetime ap4.0: to prove Alice live, Bob sends Alice nonce, R. Alice must return R, encrypted with shared secret key I am Alice Failures, drawbacks? R K A-B (R) Alice is live, and only Alice knows key to encrypt nonce, so it must be Alice! 57

Authentication: ap5.0 ap4.0 requires shared symmetric key can we authenticate using public key techniques? ap5.0: use nonce, public key cryptography R I am Alice - K A (R) send me your public key K A + Bob computes - K (K (R)) = R A + A and knows only Alice could have the private key, that encrypted R such that K A + - (K (R)) = R A 58

ap5.0: security hole Man (woman) in the middle attack: Trudy poses as Alice (to Bob) and as Bob (to Alice) 59

ap5.0: security hole Man (woman) in the middle attack: Trudy poses as Alice (to Bob) and as Bob (to Alice) Difficult to detect: Bob receives everything that Alice sends, and vice versa. (e.g., so Bob, Alice can meet one week later and recall conversation) problem is that Trudy receives all messages as well! 60

Remember Diffie-Hellman? How does Alice know Bob sent TA? Alice picks her x: SA TA=g SA mod p TB=g SB mod p Bob picks his x: SB Alice computes: K = TB SA mod p TB SA = (g SB ) SA = g SB SA = g SA SB = (g SA ) SB = TA SB mod p Encrypted communication with K Alice computes: K = TA SB mod p There is nothing to prevent a man-in-the-middle attack against this protocol. 61

Next Time... Textbook Chapter 8.5-8.9 Remember, you need to read it BEFORE you come to class! Homework: HW 3 due after break! Continue working on project 4! 62