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

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

Encryption. INST 346, Section 0201 April 3, 2018

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

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

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)

Computer Security: Principles and Practice

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

Lecture 1 Applied Cryptography (Part 1)

(2½ hours) Total Marks: 75

Public Key Algorithms

Cryptography (Overview)

Kurose & Ross, Chapters (5 th ed.)

Protecting Information Assets - Week 11 - Cryptography, Public Key Encryption and Digital Signatures. MIS 5206 Protecting Information Assets

Public-key Cryptography: Theory and Practice

KALASALINGAM UNIVERSITY

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

S. Erfani, ECE Dept., University of Windsor Network Security

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

Chapter 9 Public Key Cryptography. WANG YANG

CSC 474/574 Information Systems Security

Cryptographic Concepts

Overview. SSL Cryptography Overview CHAPTER 1

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

CSC/ECE 774 Advanced Network Security

Cristina Nita-Rotaru. CS355: Cryptography. Lecture 17: X509. PGP. Authentication protocols. Key establishment.

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

Public-Key Cryptography. Professor Yanmin Gong Week 3: Sep. 7

1.264 Lecture 28. Cryptography: Asymmetric keys

Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2010

APNIC elearning: Cryptography Basics

14. Internet Security (J. Kurose)

Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls

Ref:

CS Computer Networks 1: Authentication

Public Key Cryptography

CSC 774 Network Security

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

2.1 Basic Cryptography Concepts

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018

More on Cryptography CS 136 Computer Security Peter Reiher January 19, 2017

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

CSE 127: Computer Security Cryptography. Kirill Levchenko

NETWORK SECURITY & CRYPTOGRAPHY

Verteilte Systeme (Distributed Systems)

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

Security. Communication security. System Security

Introduction to Cryptography. Vasil Slavov William Jewell College

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

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

Cryptography and Network Security. Sixth Edition by William Stallings

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

PROTECTING CONVERSATIONS

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

Computer Security. Two main issues are current regarding security for computer communication systems

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

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

Chapter 9. Public Key Cryptography, RSA And Key Management

key distribution requirements for public key algorithms asymmetric (or public) key algorithms

Overview. Public Key Algorithms I

CRYPTOGRAPHY & DIGITAL SIGNATURE

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

Secure Multiparty Computation

Garantía y Seguridad en Sistemas y Redes

CS 425 / ECE 428 Distributed Systems Fall 2017

Network Security Chapter 8

Security: Cryptography

CS 332 Computer Networks Security

Public Key Algorithms

Principles of Information Security, Fourth Edition. Chapter 8 Cryptography

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

CSC 474/574 Information Systems Security

Authentication CHAPTER 17

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

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

Cryptography III. Public-Key Cryptography Digital Signatures. 2/1/18 Cryptography III

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

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

Computer Networks. Wenzhong Li. Nanjing University

EEC-682/782 Computer Networks I

CSC 474/574 Information Systems Security

Introduction and Overview. Why CSCI 454/554?

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

CPSC 467b: Cryptography and Computer Security

EEC-484/584 Computer Networks

CS61A Lecture #39: Cryptography

CIS 6930/4930 Computer and Network Security. Topic 3.2 Secret Key Cryptography Modes of Operation

CSCI 454/554 Computer and Network Security. Topic 3.2 Secret Key Cryptography Modes of Operation

CS 161 Computer Security

Network Security Issues and Cryptography

CT30A8800 Secured communications

Appendix A: Introduction to cryptographic algorithms and protocols

Message Authentication Codes and Cryptographic Hash Functions

Key Management. Digital signatures: classical and public key Classic and Public Key exchange. Handwritten Signature

Lecture 2 Applied Cryptography (Part 2)

CIS 4360 Secure Computer Systems Symmetric Cryptography

1-7 Attacks on Cryptosystems

Introduction to Network Security Missouri S&T University CPE 5420 Data Integrity Algorithms

Applied Cryptography Protocol Building Blocks

Transcription:

CS 3461/5461: Introduction to Computer Networking and Internet Technologies Network Security Study: 21.1 21.5 Kannan Srinivasan 11-27-2012 Security Attacks, Services and Mechanisms Security Attack: Any action that compromises the security of information. Security Mechanism: A mechanism that is designed to detect, prevent, or recover from a security attack. Security Service: A service that enhances the security of data processing systems and information transfers. A security service makes use of one or more security mechanisms. 2 1

Security Attacks (Threats) Attack on availability Attack on confidentiality Attack on integrity Attack on authenticity 3 Threats in Data Communication avesdropping: intercepting and reading messages intended for another process. Traffic analysis: by monitoring frequency and length of messages, even encrypted, nature of communication may be guessed; Difficult to detect, but can be prevented. Masquerading: sending or receiving messages using another process s identity, i.e. pretending to be a different entity Replaying: using previously sent messages to gain another process s privileges. Message tampering: intercepting and altering messages intended for another process. Denial of service: preventing or inhibiting the normal use or management of communication facilities. 4 2

Passive and Active Security Threats eavesdropping on transmissions modification of the data stream or the creation of a false stream monitoring frequency and length of messages to get info on senders; easy to detect but hard to prevent, focus on detection and recovery 5 Security Services Data confidentiality or privacy: protect data content/access, Data integrity: protect data accuracy, i.e. make sure data has not been altered, Authenticity: protect data origin, i.e. make sure who created or sent the data, Non-repudiation: prevents sender from denying of creating and sending data, Authorization or access control: prevent misuse of resources, Availability: ensure timely service: denial of service attacks virus that deletes files. 6 3

Security Service (continued) Data Confidentiality or Privacy: evidence that the two corresponding processes are the only ones that can read the transmission; the mechanisms involved in handling this service are encryption mechanisms. Data integrity: verification that the data has not been corrupted by an outside source; the mechanisms involved in handling this service are different hash functions. Authenticity: guarantee that the message has come from the process who claims to have sent it; the mechanisms used to handle this service are authentication exchange mechanisms. 7 Security Service (continued) Non-repudiation: verification that a message had been sent by another process in the event the other process tries to deny it at a later time. The mechanisms used to handle this service are digital signature mechanisms. Authorization or Access control : insurance that only the authorized processes can gain access to protected resources. 8 4

Security Mechanisms (Tools) Cryptographic Algorithms Hash (Digest) Algorithms Authentication Mechanisms Digital Signatures Traffic Padding Key Management Protocols 9 Cryptography Cryptography is a mechanism against eavesdropping and it provides confidentiality, also referred as privacy. Fundamental tenet of cryptography: If lots of smart people have failed to solve a problem, then it probably won t be solved (soon). Cryptographic Algorithms: Symmetric or secret key cryptography Public key cryptography 10 5

Symmetric or Secret Key Cryptography Figure 21.1 sender and receiver must obtain/exchange secret key securely; 11 Symmetric or Secret Key Cryptography Uses the same key for both encryption and decrypting Both sender and receiver need to have the same key in order to communicate successfully; widely used and very popular. Advantages: fast relative to public key cryptography, considered secure providing the key is relatively long, the cryptotext is compact. Disadvantages: a large number of keys is needed to communicate securely with a large group of people, the administration of the keys can become extremely complicated, key distribution and renewal is a huge problem; the key is subject to interception by hackers, non-repudiation is not possible. 12 6

Attacking ncryption Requirement for security is a strong encryption algorithm, thus unable to decrypt without key: even when algorithm is known (and that is often the case), even if many plaintexts & ciphertexts available. Cryptanalysis: relay on nature of algorithm plus some knowledge of general characteristics of plaintext, attempt to deduce plaintext or key. Brute force: try every possible key until plaintext is recovered, rapidly becomes infeasible as key size increases, 56-bit key is not secure. 13 Symmetric Cryptography Algorithms DS - Data ncryption Algorithm; published in 1977 encrypts 64-bit block of plaintext into 64-bit block of ciphertext using a 56-bit key, the key of 56 bits for a long time had been pretty much universally acknowledged to be too small to be secure, broken, in less than three days, in 1998 by lectronic Frontier Foundation by special purpose US$250,000 machine, 3DS or D (ncrypt-decrypt-ncrypt) DS algorithm used three times involves repeating basic DS three times, using two or three unique DS keys, for a key size of 112 or 168 bits 14 7

Symmetric Cryptography Algorithms (cont.) Advanced ncryption Standard (AS); issued in 1997 security strength equal to or better than 3DS significantly improved efficiency symmetric block cipher with block length 128 bits key lengths 128, 192, and 256 bits RC4 a proprietary encryption schema marketed by RSADSI a stream encryption schema: first, both sender and receiver produces (efficiently) an unbounded length pseudorandom stream from a varying length key (1 to 256 bytes), then, the stream is XORed (by sender) with the data for encryption. receiver XORes encrypted data for decrypting. 15 ncrypting Larger Messages The block algorithms encrypt a fixed size block, e.g. 64 bits. Obvious solution is break a message into blocks and encrypt a block at a time. This is called lectronic Code Book (CB) CB has two serious flaws: since repeated plaintext blocks yield repeated ciphertext blocks, this will give an eavesdropper some information encryption does not guarantee integrity, since blocks can be rearranged or modify without automatic detection, As result CB is rarely used to encrypt messages. Other modes chain to avoid this, such as Cipher Block Chaining (CBC). 16 8

lectronic Code Block ncryption Message m1 m2 m3 m4 m5 m6 m7 m8 Break into blocks ncrypt with secret key c1 c2 c3 c4 c5 c6 c7 c8 17 lectronic Code Block Decryption c1 c2 c3 c4 c5 c6 c7 c8 D D D D D D D D Decrypt with secret key m1 m2 m3 m4 m5 m6 m7 m8 Message Reassemble blocks 18 9

Randomized CB ncryption m1 m2 m3 m4 r1 r2 r3 r4 Generate random numbers ncrypt with secret key c1 c2 c3 c4 To decrypt this, you would decrypt all c i s, and for each c i, after decrypting it, you would xor it with the random number r i. But inefficient; twice as much data to be transmitted, since r i s have to be also transmitted. 19 Cipher Block Chaining ncryption m1 m2 m3 m4 IV ncrypt with secret key c1 c2 c3 c4 CBC generates its own random numbers ; c i is used as r i+1 CBS generates the initial random number IV (initialization vector) to avoid having two plaintext messages that start the same to have the same ciphertext at the beginning; IV is also transmitted. 20 10

Cipher Block Chaining Decryption m1 m2 m3 m4 IV D D D D Decrypt with secret key c1 c2 c3 c4 Decryption is simple because xor is its own inverse Since the cost of xor is trivial comparing to the cost of an encryption CBC has the same performance as CB, except the cost of generating and transmitting IV. 21 Location of ncryption Devices Figure 21.4 22 11

Location of ncryption Devices (cont.) Link encryption: each communication link equipped at both ends, all traffic secure, high level of security, but, requires lots of encryption devices, and message must be decrypted at each switch to read address, thus, security vulnerable at switches; particularly on public ones. nd-to-nd encryption: encryption done at ends of system, data in encrypted form crosses network unaltered, destination shares key with source to decrypt, but, host can only encrypt user data, otherwise switching nodes could not read header and route packet hence traffic pattern not secure. Solution is to use both link and end to end 23 Message Authentication ncrypting messages does not provide integrity protection, meaning that after receiving an encrypted message, we are not automatically able to say if the message has been tampered with. Message authentication should protect against active attacks with: falsification of data, falsification of source. Message authentication allows a receiver to verify that a message is authentic implying: it has not been altered, it is from the claimed/authentic source, its timeliness, e.g. it has not been artificially delayed and replayed. 24 12

Authentication Using Symmetric ncryption It is possible to perform authentication simply by the use of symmetric encryption: assuming sender & receiver only know key then, only sender could have encrypted message for other party and encrypted message should include: error detection code to assure that no alterations have been made, sequence number to assure that sequencing is proper, time stamp to assure that the message has not been delayed beyond that normally expected for network transit. 25 Authentication Without ncryption Message is not encrypted, and it can be read by anybody, but authentication tag generated and appended to each message. Useful when don t want encryption because: messages broadcast to multiple destinations: have one destination responsible for authentication, one side heavily loaded: encryption adds to workload, can authenticate random messages, authentication of a computer program in plaintext is an attractive service; a program can be executed without having to decrypt it every time, but with check for integrity. Hashing (digest) algorithms are used for generating authentication tags, without need to encrypt message content. 26 13

Message Hash (Digest) Algorithms Message digest algorithms are one-way functions and they are design to solve problem of authenticity and data integrity. Calculation of the digest is infinitely easier compared to the process of retrieving the message from the digest. Message digest algorithms generally possess the following characteristics: they take in any length input and generate a fixed length output called a hash or a message digest, it is not computationally feasible to calculate the message based on the digest, it is not computationally feasible to find two messages which generate the same digest. Message digest algorithms: MD2, MD4, MD5 all with 128 bit digests, and SHA-1 with 160 bit digest. 27 Message Authentication Using Hashing With conventional encryption of a digest Figure 21.7a 28 14

Message Authentication Using Hashing (cont.) Using secrete value Figure 21.7c 29 Public Key ncryption Uses one key for encryption and another for decrypting. ach user generates (has) two keys - one public & one private, public key and private key are mathematically linked. User places its public key in public domain, i.e. it is revealed to all, private key remains a secret, i.e. know only to its owner. ncryption is performed with the public key of receiver, Decrypting can be only performed with the private key, infeasible to determine the decryption (private) key given 30 the encryption (public) key, the algorithm and ciphertext. 15

Public Key ncryption: Confidentiality Figure 21.9a 31 Public Key ncryption: Characteristics Advantages: considered very secure, no form of secret is required, thus reducing key administration to minimum, the number of key managed by each user is much less compared to secret key cryptography, supports non-repudiation. Disadvantages: much slower compared to secret key cryptography, the ciphered text is larger than the plaintext. 32 16

Public Key ncryption Algorithms RSA algorithm (Rivest, Shamir & Adleman): it supports variable length key, thus a longer key for enhanced security, or a short key for efficiency, the most commonly used key is 512 or 1024 bits, the block size in RSA, i.e. the chunk of data to be encrypted, is also variable and the plaintext block must be smaller than key length, resulting ciphertext will be of the length of the key. Diffie-Hellman algorithm Digital Signature Standard algorithm (DSS) 33 RSA: Key Generation Select two prime numbers p and q; p = 17 and q = 11 selected; Calculate n = p q; n = 17 11 = 187 calculated; Calculate (n) = (p 1)(q 1); (n) = 16 10 = 160 calculated; Select e such that e is relatively prime to (n) and e < (n); e = 7 selected; Determine d such that (d e) mod (n) = 1 and d < (n); d = 23, determined; it is correct because 23 7 = 161 = 10 16 + 1; The resulting keys are: public key PU = {e, n} = {7, 187}, private key PR = (d, n} = {23, 187}. 34 17

RSA: ncryption and Decryption Given public key {e, n} and a plaintext M, the encryption: C = M e mod n Given private key {d,n} and a ciphertext C, the decryption for : M = C d mod n = (M e ) d mod n = M ed mod n PU =7, 187 PR =23, 187 Figure 21.11 35 RSA Security Brute force by trying all possible keys: larger size of e and d, the more secure the algorithm, but larger keys do slow calculations in key generation and in encryption/decryption. Most discussion about RSA focused on the task of factoring n to recover p & q: a very hard mathematical problem, key size of 1024-bits, i.e. 300 decimal digits, currently secure for most applications. 129 decimal digits challenge broken in in April of 1994, by a group working over the Internet and using over 1600 computers claimed the prize after only eight months of work. 36 18

Public Key ncryption: Authentication Figure 21.9b Non-repudiation, but it is really slow as always with PK. Solutions: digital signature, digital envelope. 37 Public Key ncryption: Digital Signature Figure 21.7b Message authentication with public key encryption: integrity, non-repudiation. 38 19

Creating Digital nvelope Message Symmetric encrypting function ncrypted message ncrypted message ncrypted symmetric key Random symmetric key Public key encrypting function ncrypted symmetric key Receiver s public key 39 Verifying Digital nvelope ncrypted message ncrypted message Symmetric decryption function Message ncrypted symmetric key ncrypted symmetric key Public key decrypting function Decrypted symmetric key Receiver s private key 40 20

Certification Authority The private key is secure because owner X need never reveal it However, others must be sure that the public key with X's name written all over it is in fact X's public key, since someone else could have broadcast a public key and said it was X's. The solution to this problem is the public-key certificate. In essence, a certificate consists of a public key plus a User ID of the key owner, with the whole block signed the private key by by a trusted third party. 41 Certification Authority (cont.) Typically, the third party is a certificate authority (CA) that is trusted by the user community and its public key is distributed, thus available to everybody. A user can present public key to the authority in a secure manner and obtain a certificate signed by the CA s private key. The user can then publish the certificate. Anyone, needing an user's public key, can obtain the certificate and verify that it is valid by way of the attached trusted signature. But is CA to be trusted? CA distributes its certificate. Who certifies CA s certificate? Hierarchy of CAs. 42 21

Public Key Certificate Figure 21.12 43 Authentication Handshake [XYZ] ABC = encryption of XYZ by ABC s private key Alice I m Alice a random challenge R [R] Alice Bob Protocol 1. Bob authenticates Alice based on her public key signature {XYZ} ABC = encryption of XYZ by ABC s public key I m Alice Alice {R} Alice R Bob Protocol 2. Bob authenticates Alice if she can decrypt a message encrypted with her public key 44 22

Authentication Handshake (cont.) [XYZ] ABC = encryption of XYZ by ABC s private key {XYZ} ABC = encryption of XYZ by ABC s public key I m Alice, {R 2 } Bob Alice R 2,{R 1 } Alice Bob R 1 Protocol 3. Mutual authentication based on public key 45 Secure Socket Layer - SSL SSL is designed for a user-level process, and runs on top of TCP Session keys are derived during the initial handshake. I want to talk, ciphers I support, R Alice Alice chooses: secret S Alice computes: K=f(S,R Alice, R Bob ) Alice my certificate, cipher I choose, R Bob {S} Bob, {keyed hash of handshake messages} {keyed hash of handshake messages} Bob data protected with keys derived from K Bob computes: K=f(S,R Alice, R Bob ) This handshake procedure is a characteristic for a client (without certificate) securely accessing a server (with certificate). 46 23

Secure Socket Layer SSL (cont.) Message 1: Alice says she would like to talk (but doesn t identify herself), and gives a list of cipher algorithms, along with a random number R Alice, that will contribute to form of various keys, Message 2: Bob sends Alice his certificate, responds with one of ciphers listed, and a random number R Bob, that will also contribute to form various keys, After receiving message 2, Alice chooses a random number S (known as the pre-master secret) and computes the master secret K as the function of S, R Alice and R Bob. Alice now derives session keys by hashing K, R Alice and R Bob ; the keys are for encryption / decryption, integrity and IV in each direction; total of six keys. 47 Secure Socket Layer SSL (cont.) Message 3: Alice sends S, encrypted with Bob s public key, and keyed hash of K and the handshake messages, both to prove she knows the key and to ensure that tampering of the handshake messages would be detected. After receiving message 3, Bob computes the master secret K as the function of S, R Alice and R Bob. Then Bob derives session keys by hashing K, R Alice and R Bob ; the same six keys as Alice. Message 4: Bob proves he knows the session keys, and ensures that earlier messages arrived intact, by sending a keyed hash of K and the handshake messages. 48 24

Autumn Semester 2012 CS 3461/5461 Introduction to Computer Networking and Internet Technologies The nd 25