Modified from Silberschatz, Galvin and Gagne Lecture 22 Chapter 15: Security.

Slides:



Advertisements
Similar presentations
Spring 2000CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
Advertisements

Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
1 Network Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
Sri Lanka Institute of Information Technology
Cryptography. 8: Network Security8-2 The language of cryptography symmetric key crypto: sender, receiver keys identical public-key crypto: encryption.
Digital Signatures and Hash Functions. Digital Signatures.
Public Key Cryptography & Message Authentication By Tahaei Fall 2012.
1 CS 854 – Hot Topics in Computer and Communications Security Fall 2006 Introduction to Cryptography and Security.
1 Counter-measures Threat Monitoring Cryptography as a security tool Encryption Digital Signature Key distribution.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
Chapter 8 Network Security Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
8-1 What is network security? Confidentiality: only sender, intended receiver should “understand” message contents m sender encrypts message m receiver.
CSE401n:Computer Networks
Network Security understand principles of network security:
Spring 2003CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
Cryptography and Network Security Chapter 11 Fourth Edition by William Stallings Lecture slides by Lawrie Brown/Mod. & S. Kondakci.
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
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.
Lecture 24 Cryptography CPE 401 / 601 Computer Network Systems slides are modified from Jim Kurose and Keith Ross and Dave Hollinger.
Network Security. Contents Security Requirements and Attacks Confidentiality with Conventional Encryption Message Authentication and Hash Functions Public-Key.
Network Security Sorina Persa Group 3250 Group 3250.
Chapter 31 Network Security
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
Behzad Akbari Spring In the Name of the Most High.
1-1 1DT066 Distributed Information System Chapter 8 Network Security.
Message Authentication  message authentication is concerned with: protecting the integrity of a message protecting the integrity of a message validating.
Information Security Principles Assistant Professor Dr. Sana’a Wafa Al-Sayegh 1 st Semester ITGD 2202 University of Palestine.
8-1Network Security Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message integrity, authentication.
1 Chapter 11: Message Authentication and Hash Functions Fourth Edition by William Stallings Lecture slides by Lawrie Brown (modified by Prof. M. Singhal,
 This Class  Chapter 8. 2 What is network security?  Confidentiality  only sender, intended receiver should “understand” message contents.
Cryptography, Authentication and Digital Signatures
Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,
Introduction1-1 Data Communications and Computer Networks Chapter 6 CS 3830 Lecture 31 Omar Meqdadi Department of Computer Science and Software Engineering.
Day 37 8: Network Security8-1. 8: Network Security8-2 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key:
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-1 1DT066 Distributed Information System Chapter 8 Network Security.
System Security. The Security Problem Security must consider external environment of the system, and protect the system resources Intruders (crackers)
Network Security David Lazăr.
11.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Message Integrity and Message Authentication.
1 Security and Cryptography: basic aspects Ortal Arazi College of Engineering Dept. of Electrical & Computer Engineering The University of Tennessee.
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.
8-1 Chapter 8 Security Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 part 2: Message integrity.
1 Lecture 11 protection and Security Operating System Fall 2005.
1 Network Security Basics. 2 Network Security Foundations: r what is security? r cryptography r authentication r message integrity r key distribution.
Security Many secure IT systems are like a house with a locked front door but with a side window open -somebody.
Chapter 11 Message Authentication and Hash Functions.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Security.
Network Security7-1 Today r Reminders m Ch6 Homework due Wed Nov 12 m 2 nd exams have been corrected; contact me to see them r Start Chapter 7 (Security)
+ Security. + What is network security? confidentiality: only sender, intended receiver should “understand” message contents sender encrypts message receiver.
Cryptography and Network Security (CS435) Part Nine (Message Authentication)
1 Cryptography Troy Latchman Byungchil Kim. 2 Fundamentals We know that the medium we use to transmit data is insecure, e.g. can be sniffed. We know that.
 Last Class  Chapter 7 on Data Presentation Formatting and Compression  This Class  Chapter 8.1. and 8.2.
Lecture 22 Network Security (cont) CPE 401 / 601 Computer Network Systems slides are modified from Dave Hollinger slides are modified from Jim Kurose,
Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim
8: Network Security8-1 Chapter 8 Network Security A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students,
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts Essentials – 2 nd Edition Chapter 14b: Security II.
Public-Key Cryptography and Message Authentication
Basic Network Encryption
Network Security Basics
1DT057 Distributed Information System Chapter 8 Network Security
Basic Network Encryption
Chapter 8 roadmap 8.1 What is network security?
Presentation transcript:

Modified from Silberschatz, Galvin and Gagne Lecture 22 Chapter 15: Security

2 Principles of Computer Operating Systems Security Services Enhance the security of data processing systems and information transfers of an organization. Counter security attacks. Security Attack Action that compromises the security of information owned by an organization. Security Mechanisms Designed to prevent, detect or recover from a security attack. Aspects of Security

3 Principles of Computer Operating Systems Enhance security of data processing systems and information transfers Authentication Assurance that the communicating entity is the one claimed Authorization Prevention of the unauthorized use of a resource Availability Data is available in a timely manner when needed Security Services

4 Principles of Computer Operating Systems Confidentiality Protection of data from unauthorized disclosure Integrity Assurance that data received is as sent by an authorized entity Non-Repudiation Protection against denial by one of the parties in a communication Security Services

5 Principles of Computer Operating Systems Security Attacks Information source Information destination Normal Flow

6 Principles of Computer Operating Systems Security Attacks Information source Information destination Interruption Attack on availability (ability to use desired information or resources)

7 Principles of Computer Operating Systems Denial of Service Internet Perpetrator Victim ICMP echo (spoofed source address of victim) Sent to IP broadcast address ICMP echo reply ICMP = Internet Control Message Protocol Innocent reflector sites Smurf Attack 1 SYN 10,000 SYN/ACKs – Victim is dead

8 Principles of Computer Operating Systems Security Attacks Information source Information destination Interception Attack on confidentiality (concealment of information)

9 Principles of Computer Operating Systems Packet Sniffing Packet Sniffer Client Server Network Interface Card allows only packets for this MAC address Every network interface card has a unique 48-bit Media Access Control (MAC) address, e.g. 00:0D:84:F6:3A:10 24 bits assigned by IEEE; 24 by card vendor Packet sniffer sets his card to promiscuous mode to allow all packets

10 Principles of Computer Operating Systems Security Attacks Information source Information destination Fabrication Attack on authenticity (identification and assurance of origin of information)

11 Principles of Computer Operating Systems IP addresses are filled in by the originating host Using source address for authentication r-utilities (rlogin, rsh, rhosts etc..) IP Address Spoofing Can A claim it is B to the server S? ARP Spoofing Can C claim it is B to the server S? Source Routing Internet C A B S

12 Principles of Computer Operating Systems Security Attacks Information source Information destination Modification Attack on integrity (prevention of unauthorized changes)

13 Principles of Computer Operating Systems When is a TCP packet valid? Address / Port / Sequence Number in window How to get sequence number? Sniff traffic Guess it  Many earlier systems had predictable Initial Sequence Number Inject arbitrary data to the connection TCP Session Hijack

14 Principles of Computer Operating Systems Security Attacks Message interception Traffic analysis eavesdropping, monitoring transmissions Passive attacks MasqueradeDenial of service some modification of the data stream Active attacks ReplayModification of message contents

15 Principles of Computer Operating Systems Feature designed to Prevent attackers from violating security policy Detect attackers’ violation of security policy Recover, continue to function correctly even if attack succeeds. No single mechanism that will support all services Authentication, authorization, availability, confidentiality, integrity, non- repudiation Security Mechanism

16 Principles of Computer Operating Systems

17 Principles of Computer Operating Systems Cryptography as a Security Tool Broadest security tool available Source and destination of messages cannot be trusted without cryptography Means to constrain potential senders (sources) and / or receivers (destinations) of messages Based on secrets (keys)

18 Principles of Computer Operating Systems Secure Communication over Insecure Medium

19 Principles of Computer Operating Systems Encryption Encryption algorithm consists of Set of K keys Set of M Messages Set of C ciphertexts (encrypted messages) A function E : K → (M→C). That is, for each k  K, E(k) is a function for generating ciphertexts from messages.  Both E and E(k) for any k should be efficiently computable functions. A function D : K → (C → M). That is, for each k  K, D(k) is a function for generating messages from ciphertexts.  Both D and D(k) for any k should be efficiently computable functions. An encryption algorithm must provide this essential property: Given a ciphertext c  C, a computer can compute m such that E(k)(m) = c only if it possesses D(k). Thus, a computer holding D(k) can decrypt ciphertexts to the plaintexts used to produce them, but a computer not holding D(k) cannot decrypt ciphertexts. Since ciphertexts are generally exposed (for example, sent on the network), it is important that it be infeasible to derive D(k) from the ciphertexts

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

21 Principles of Computer Operating Systems Symmetric Encryption Data Encryption Standard most commonly used symmetric block-encryption algorithm created by US Govt Encrypts a block of data at a time initial permutation 16 identical “rounds” of function application, each using different 48 bits of key final permutation DES operation

22 Principles of Computer Operating Systems Symmetric Encryption (cont) DES is breakable using brute force making DES more secure  use three keys sequentially (3-DES) on each datum  use cipher-block chaining Advanced Encryption Standard (AES) symmetric-key NIST standard  replacing DES, Nov 2001 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

23 Principles of Computer Operating Systems Asymmetric Encryption Public-key encryption based on each user having two keys: public key – published key used to encrypt data private key – key known only to individual user used to decrypt data Must be an encryption scheme that can be made public without making it easy to figure out the decryption scheme Most common is RSA block cipher Efficient algorithm for testing whether or not a number is prime No efficient algorithm is know for finding the prime factors of a number

24 Principles of Computer Operating Systems Public key cryptography plaintext message, m ciphertext encryption algorithm decryption algorithm Bob’s public key plaintext message K (m) B + K B + Bob’s private key K B - m = K ( K (m) ) B + B -

25 Principles of Computer Operating Systems Asymmetric Encryption (Cont.) Formally, it is computationally infeasible to derive D(k d, N) from E(k e, N), and so E(k e, N) need not be kept secret and can be widely disseminated E(k e, N) (or just k e ) is the public key D(k d, N) (or just k d ) is the private key N is the product of two large, randomly chosen prime numbers p and q (for example, p and q are 512 bits each) Encryption algorithm is E(k e, N)(m) = m k e mod N, where k e satisfies k e k d mod (p−1)(q −1) = 1 The decryption algorithm is then D(k d, N)(c) = c k d mod N

26 Principles of Computer Operating Systems 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 B + K B -

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

28 Principles of Computer Operating Systems Asymmetric Encryption Example For example. make p = 7and q = 13 We then calculate N = 7 ∗ 13 = 91 and (p−1)(q−1) = 72 We next select k e relatively prime to 72 and< 72, yielding 5 Finally,we calculate k d such that k e k d mod 72 = 1, yielding 29 We how have our keys Public key, k e, N = 5, 91 Private key, k d, N = 29, 91 Encrypting the message 69 with the public key results in the cyphertext 62 Cyphertext can be decoded with the private key Public key can be distributed in cleartext to anyone who wants to communicate with holder of public key

29 Principles of Computer Operating Systems Encryption and Decryption using RSA Asymmetric Cryptography

30 Principles of Computer Operating Systems Cryptography (Cont.) Note symmetric cryptography based on transformations, asymmetric based on mathematical functions Asymmetric much more compute intensive Typically not used for bulk data encryption Many times a combination is used: use public key cryptography to share a secret key. use the secret key to encrypt the bulk of the communication.

31 Principles of Computer Operating Systems

32 Principles of Computer Operating Systems Authentication Constraining set of potential senders of a message Complementary and sometimes redundant to encryption Also can prove message unmodified Algorithm components A set K of keys A set M of messages A set A of authenticators A function S : K → (M→ A)  That is, for each k  K, S(k) is a function for generating authenticators from messages  Both S and S(k) for any k should be efficiently computable functions A function V : K → (M× A→ {true, false}).  That is, for each k  K, V(k) is a function for verifying authenticators on messages  Both V and V(k) for any k should be efficiently computable functions

33 Principles of Computer Operating Systems Authentication (Cont.) For a message m, a computer can generate an authenticator a  A such that V(k)(m, a) = true only if it possesses S(k) Thus, computer holding S(k) can generate authenticators on messages so that any other computer possessing V(k) can verify them Computer not holding S(k) cannot generate authenticators on messages that can be verified using V(k) Since authenticators are generally exposed (for example, they are sent on the network with the messages themselves), it must not be feasible to derive S(k) from the authenticators

34 Principles of Computer Operating Systems Authentication – Hash Functions Basis of authentication Creates small, fixed-size block of data (message digest, hash value) from m Hash Function H must be collision resistant on m Must be infeasible to find an m’ ≠ m such that H(m) = H(m’) If H(m) = H(m’), then m = m’ The message has not been modified Common message-digest functions include MD5, which produces a 128-bit hash SHA-1, which outputs a 160-bit hash

35 Principles of Computer Operating Systems Authentication - MAC Symmetric encryption used in message-authentication code (MAC) authentication algorithm Simple example: MAC defines S(k)(m) = f (k, H(m))  Where f is a function that is one-way on its first argument – k cannot be derived from f (k, H(m))  Because of the collision resistance in the hash function, reasonably assured no other message could create the same MAC  A suitable verification algorithm is V(k)(m, a) ≡ ( f (k,m) = a)  Note that k is needed to compute both S(k) and V(k), so anyone able to compute one can compute the other

36 Principles of Computer Operating Systems Message Authentication Code m s (shared secret) (message) H(. ) H(m+s) public Internet append m H(m+s) s compare m H(m+s) H(. ) H(m+s) (shared secret)

37 Principles of Computer Operating Systems Authentication – Digital Signature Based on asymmetric keys and digital signature algorithm Authenticators produced are digital signatures In a digital-signature algorithm, computationally infeasible to derive S(k s ) from V(k v ) V is a one-way function Thus, k v is the public key and k s is the private key Consider the RSA digital-signature algorithm Similar to the RSA encryption algorithm, but the key use is reversed Digital signature of message S(k s )(m) = H(m) k s mod N The key k s again is a pair d, N, where N is the product of two large, randomly chosen prime numbers p and q Verification algorithm is V(k v )(m, a) ≡ (a k v mod N = H(m))  Where k v satisfies k v k s mod (p − 1)(q − 1) = 1

38 Principles of Computer Operating Systems 8: Network Security8-38 Digital Signatures simple digital signature for message m: Bob “signs” m by encrypting with his private key K B, creating “signed” message, K B (m) - - Dear Alice Oh, how I have missed you. I think of you all the time! …(blah blah blah) Bob Bob’s message, m public key encryption algorithm Bob’s private key K B - Bob’s message, m, signed (encrypted) with his private key K B - (m)

39 Principles of Computer Operating Systems Digital Signatures suppose Alice receives msg m, digital signature K B (m) Alice verifies m signed by Bob by applying Bob’s public key K B to K B (m) then checks K B (K B (m) ) = m. if K B (K B (m) ) = m, whoever signed m must have used Bob’s private key Alice thus verifies that: o Bob signed m. o No one else signed m. o Bob signed m and not m’. non-repudiation: Alice can take m, and signature K B (m) to court and prove that Bob signed m. -

40 Principles of Computer Operating Systems large message m H: hash function H(m) digital signature (encrypt) Bob’s private key K B - + Bob sends digitally signed message: Alice verifies signature and integrity of digitally signed message: K B (H(m)) - encrypted msg digest K B (H(m)) - encrypted msg digest large message m H: hash function H(m) digital signature (decrypt) H(m) Bob’s public key K B + equal ? Digital signature = signed MAC

41 Principles of Computer Operating Systems Authentication (Cont.) Why authentication if a subset of encryption? Fewer computations (except for RSA digital signatures) Authenticator usually shorter than message Sometimes want authentication but not confidentiality  Signed patches et al Can be basis for non-repudiation

42 Principles of Computer Operating Systems Key Distribution Delivery of symmetric key is huge challenge Sometimes done out-of-band Asymmetric keys can proliferate stored on key ring Even asymmetric key distribution needs care  man-in-the-middle attack

43 Principles of Computer Operating Systems Man-in-the-middle Attack on Asymmetric Cryptography

44 Principles of Computer Operating Systems Digital Certificates Proof of who or what owns a public key Public key digitally signed a trusted party Trusted party receives proof of identification from entity and certifies that public key belongs to entity Certificate authority are trusted party – their public keys included with web browser distributions They vouch for other authorities via digitally signing their keys, and so on

45 Principles of Computer Operating Systems Certification Authorities Certification 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.” Bob’s public key K B + Bob’s identifying information digital signature (encrypt) CA private key K CA - K B + certificate for Bob’s public key, signed by CA - K CA (K ) B +

46 Principles of Computer Operating Systems Certification Authorities 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 Bob’s public key K B + digital signature (decrypt) CA public key K CA + K B + - K (K ) B +