Cryptography and Network Security



Similar documents
Key Management (Distribution and Certification) (1)

Authentication requirement Authentication function MAC Hash function Security of

2.4: Authentication Authentication types Authentication schemes: RSA, Lamport s Hash Mutual Authentication Session Keys Trusted Intermediaries

Chapter 4. Authentication Applications. COSC 490 Network Security Annie Lu 1

Authentication Types. Password-based Authentication. Off-Line Password Guessing

Module 8. Network Security. Version 2 CSE IIT, Kharagpur

Network Security [2] Plain text Encryption algorithm Public and private key pair Cipher text Decryption algorithm. See next slide

Network Security. Computer Networking Lecture 08. March 19, HKU SPACE Community College. HKU SPACE CC CN Lecture 08 1/23

Client Server Registration Protocol

Chapter 16: Authentication in Distributed System

CSCE 465 Computer & Network Security

Final Exam. IT 4823 Information Security Administration. Rescheduling Final Exams. Kerberos. Idea. Ticket

Application Layer (1)

Kerberos. Guilin Wang. School of Computer Science, University of Birmingham

Chapter 8. Cryptography Symmetric-Key Algorithms. Digital Signatures Management of Public Keys Communication Security Authentication Protocols

Kerberos: An Authentication Service for Computer Networks by Clifford Neuman and Theodore Ts o. Presented by: Smitha Sundareswaran Chi Tsong Su

TOPIC HIERARCHY. Distributed Environment. Security. Kerberos

Cryptography and Network Security

How To Use Kerberos

CS 348: Computer Networks. - Security; 30 th - 31 st Oct Instructor: Sridhar Iyer IIT Bombay

Cryptography and Network Security Digital Signature

CIS 6930 Emerging Topics in Network Security. Topic 2. Network Security Primitives

Elements of Applied Cryptography. Key Distribution. Trusted third party: KDC, KTC Diffie-Helmann protocol The man-in-the-middle attack

Public Key (asymmetric) Cryptography

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

Chapter 10. Network Security

Message authentication and. digital signatures

Public Key Cryptography Overview

Outline. Computer Science 418. Digital Signatures: Observations. Digital Signatures: Definition. Definition 1 (Digital signature) Digital Signatures

CS 356 Lecture 28 Internet Authentication. Spring 2013

Kerberos. Public domain image of Heracles and Cerberus. From an Attic bilingual amphora, BC. From Italy (?).

Overview of Public-Key Cryptography

Chapter 8. Network Security

CS 758: Cryptography / Network Security

Chapter 9 Key Management 9.1 Distribution of Public Keys Public Announcement of Public Keys Publicly Available Directory

Part 2 D(E(M, K),K ) E(M, K) E(M, K) Plaintext M. Plaintext M. Decrypt with private key. Encrypt with public key. Ciphertext

Introduction to Computer Security

Lecture 9: Application of Cryptography

Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

Authentication Application

Chapter 7: Network security

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

Part I. Universität Klagenfurt - IWAS Multimedia Kommunikation (VK) M. Euchner; Mai Siemens AG 2001, ICN M NT

Discrete logarithms within computer and network security Prof Bill Buchanan, Edinburgh Napier

Network Security #10. Overview. Encryption Authentication Message integrity Key distribution & Certificates Secure Socket Layer (SSL) IPsec

Key Management. CSC 490 Special Topics Computer and Network Security. Dr. Xiao Qin. Auburn University

Security: Focus of Control. Authentication

Practice Questions. CS161 Computer Security, Fall 2008

SECURITY IN NETWORKS

Outline. CSc 466/566. Computer Security. 8 : Cryptography Digital Signatures. Digital Signatures. Digital Signatures... Christian Collberg

Network Security Protocols

TELE 301 Network Management. Lecture 18: Network Security

Is your data safe out there? -A white Paper on Online Security

Digital Signature. Raj Jain. Washington University in St. Louis

Authentication Applications

Digital Signatures. (Note that authentication of sender is also achieved by MACs.) Scan your handwritten signature and append it to the document?

Security. Friends and Enemies. Overview Plaintext Cryptography functions. Secret Key (DES) Symmetric Key

CPSC 467b: Cryptography and Computer Security

Introduction to Cryptography

Capture Resilient ElGamal Signature Protocols

Lecture 6 - Cryptography

Module 7 Security CS655! 7-1!

Q: Why security protocols?

Public Key Cryptography. c Eli Biham - March 30, Public Key Cryptography

CS 392/681 - Computer Security

Overview of Cryptographic Tools for Data Security. Murat Kantarcioglu

Institute of Computer Technology - Vienna University of Technology. L96 - SSL, PGP, Kerberos

Cryptography and network security CNET4523

CPS Computer Security Lecture 9: Introduction to Network Security. Xiaowei Yang

Authenticity of Public Keys

Network Security. HIT Shimrit Tzur-David

Content Teaching Academy at James Madison University

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 15.1

Network Security CS 5490/6490 Fall 2015 Lecture Notes 8/26/2015

Principles of Network Security

EXAM questions for the course TTM Information Security May Part 1

Cryptosystems. Bob wants to send a message M to Alice. Symmetric ciphers: Bob and Alice both share a secret key, K.

Introduction to Cryptography CS 355

NETWORK ADMINISTRATION AND SECURITY

Lukasz Pater CMMS Administrator and Developer

Chapter 15 User Authentication

CRYPTOGRAPHY IN NETWORK SECURITY

12/8/2015. Review. Final Exam. Network Basics. Network Basics. Network Basics. Network Basics. 12/10/2015 Thursday 5:30~6:30pm Science S-3-028

CUNSHENG DING HKUST, Hong Kong. Computer Security. Computer Security. Cunsheng DING, HKUST COMP4631

Computer Security: Principles and Practice

Network Security (2) CPSC 441 Department of Computer Science University of Calgary

Network Security. Security Attacks. Normal flow: Interruption: 孫 宏 民 Phone: 國 立 清 華 大 學 資 訊 工 程 系 資 訊 安 全 實 驗 室

Common security requirements Basic security tools. Example. Secret-key cryptography Public-key cryptography. Online shopping with Amazon

Digital Signatures. Murat Kantarcioglu. Based on Prof. Li s Slides. Digital Signatures: The Problem

CIS 5371 Cryptography. 8. Encryption --

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

CS 393 Network Security. Nasir Memon Polytechnic University Module 11 Secure

Kerberos-Based Authentication for OpenStack Cloud Infrastructure as a Service

SECURITY ANALYSIS OF A SINGLE SIGN-ON MECHANISM FOR DISTRIBUTED COMPUTER NETWORKS

Computer and Network Security. Outline

1 Message Authentication

Transcription:

Cryptography and Network Security Spring 2012 http://users.abo.fi/ipetre/crypto/ Lecture 9: Authentication protocols, digital signatures Ion Petre Department of IT, Åbo Akademi University 1

Overview of the course I. CRYPTOGRAPHY Secret-key cryptography Classical encryption techniques DES, AES, RC5, RC4 Public-key cryptography RSA Key management II. AUTHENTICATION MAC Hashes and message digests Digital signatures Kerberos III. NETWORK SECURITY Email security IP security Web security (SSL, secure electronic transactions) Firewalls Wireless security IV. OTHER ISSUES Viruses Digital cash Secret sharing schemes Zero-knowledge techniques 2

Topics today In a confidential communication the authenticity needs to be carefully established for: The two partners Before sending any confidential information one needs to be sure to whom it sends that information: authentication protocols The messages received by each partner One needs to be sure that the message received has not been modified it coincides with the sent message: message authentication If the two partners do not quite trust each other, they need to make sure that the sender cannot later deny having sent the message and the receiver cannot have devised the message himself: digital signatures 3

I. Authentication protocols Such protocols enable communicating parties to satisfy themselves mutually about each other s identity and possibly, to exchange session keys Two central problems here: confidentiality and timeliness Essential identification information and the session keys must be communicated in encrypted form Because of the threat of replay, timeliness is essential here Replays could allow the attacker to get a session key or to impersonate another party At minimum, the attacker could disrupt operations by presenting parties with messages that appear genuine but are not aims at a denial of service attack Two approaches are generally used to defend replay attacks Timestamps: A accepts a message as fresh only if it contains a timestamp that, in A s judgment, is close enough to A s knowledge of current time clocks need to be synchronized Challenge/response: A, expecting a fresh message from B, first sends B a random number (challenge) and requires that the subsequent message (response) received from B contains that random number or some agree-upon transformation on it (this is also called hand-shaking sometimes) 4

Authentication protocols and setting up secret keys A. Direct authentication 1. Based on a shared secret master key 2. Based on a public-key system 3. Diffie-Hellman B. Mediated authentication 1. Based on key distribution centers 2. Otway-Rees 3. Kerberos 5

A1. Direct authentication based on a shared secret key Assume here that A and B already share a secret key this is called sometimes the master key MK because the two will only use this rarely, whenever they need to authenticate each other and establish a session key Master keys will only be used to establish session keys Concentrate here on how to establish session keys Protocol A issues a requests to B for a session key and includes a nonce N 1 B responds with a message encrypted using the shared master key include there the session key he selects, A s id, a value f(n 1 ) (say the successor of N 1 ) and another nonce N 2 At this point, A is sure of B s identity: only he knows the master key; B is not sure of anything yet A knows that the message is fresh: B sends a transformation on N 1 Using the new session key, A return f(n 2 ) to B B is sure of A s identity: only A can read the message he sent, including the session key B knows that the message is fresh: A sends a transformation on N 2 6

A2. A general scheme of public-key authentication (and distribution of secret keys) Assume here that A and B know each other s public key (through a protocol such as those in Lecture 8) N 1 and N 2 in the scheme are random numbers they ensure the authenticity of A and B (because only they can decrypt the messages and read N 1 and N 2 ) After Step 2, A is sure of B s identity: right response to its challenge After Step 3, B is sure of A s identity: right response to its challenge 7

A3. A concrete scheme: Diffie-Hellman key exchange This is the first ever published public-key algorithm used in a number of commercial products Elegant idea: establish a secret key based on each other s public keys Protocol Alice and Bob need to agree on two large numbers n,g, where n is prime, (n-1)/2 is also prime and some extra conditions are satisfied by g (to defeat math attacks) these numbers may be public so Alice could generate this on her own Alice picks a large (say, 512-bit) number x and B picks another one, say y Alice initiates the key exchange protocol by sending Bob a message containing (n,g,g x mod n) Bob sends Alice a message containing g y mod n Alice raises the number Bob sent her to the x-th power mod n to get the secret key: (g y mod n) x mod n=g xy mod n Bob raises the number Alice sent to the y-th power modulo n to get the secret key: (g x mod n) y mod n=g xy mod n 8

Diffie-Hellman key exchange: an attack Security of the protocol: Eve has seen both messages A and B have changed given g,n, and g x mod n, she must find x In math terms, she needs to compute a discrete logarithm Computing discrete logarithms is thought to be infeasible Is this enough to secure the protocol? Man-in-the-middle attack Eve intercepts all communications between A and B she will impersonate A in communications with B and will impersonate B in communications with A; E may forward a modified message to A and B A and B will never know that they are both actually talking to E Attack can be defeated using signatures both A and B will sign their messages with their private keys 9

Second approach to authentication B. Mediated authentication 1. Based on key distribution centers 2. Otway-Rees 3. Kerberos 10

B1. Authentication using key distribution centers (KDC) Setting up a shared key was fairly involved with the previous approaches and perhaps not quite worth doing ( sour grape attack ) Each user has to maintain a secret key (perhaps on some plastic card) for each of his friends this may be a problem for popular people Different approach: have a trusted key distribution center (KDC) Each user maintains one single secret key the one to communicate with KDC Authentication and all communications go through KDC Alice picks K s and tells KDC that she wants to talk to Bob using K s A uses secret key K A used only to communicate with KDC KDC decrypts the message and sends K s to Bob together with Alice s id KDC uses key K B used only to communicate with B Authentication here is for free key K A is only known to A and KDC 11

Replay attack to the KDC-based protocol Say Eve manages to get a job with Alice and after doing the job, she asks Alice to pay her by bank transfer Alice establishes a secret key with the banker Bob and then sends Bob a message requesting money to be transferred to Eve s account Eve however is back to her old business, snooping on the network she copies message 2 in the protocol and the request for money that follows Later Eve replays both messages to Bob Bob will think that Alice has hired again Eve and pays Eve the money Eve is able to do many iterations of the procedure replay attack Solution 1: include a timestamp with the message any old message will be discarded Problem: clocks are not always exactly synchronized so there will be a period when the message is still valid Solution 2: include a nonce (random number) with the message Problem: the nonces have to be remembered forever and any old one is discarded 12

B2. A stronger version of the KDC-based protocol (Otway-Rees protocol) In the figure below, R, R A are random numbers generated by A, R B is a random number generated by B, K A and K B are as before the keys of A and B to communicate with KDC R is for KDC to check the integrity KDC has to see R in both messages encrypted with KA and KB; if so, KDC generates the secret key and sends it to both A and B R A and R B are for A and B to make sure the secret key comes from KDC Resistant to replay attack: in such a case A and B will get keys they did not ask for or messages that do not match the random numbers they sent 13

B3. Authentication using Kerberos Kerberos is an authentication protocol used in many systems, including Windows 2000 and later versions, using the KDC-based approach Kerberos was the name of a multi-headed dog in Greek mythology that used to guard the entrance to Hades Designed at MIT to allow workstation users to access network resources securely As such, it relies on the assumption that all locks are fairly well synchronized Kerberos v4 is the most widely used version the one we discuss here Includes three servers that communicate with Alice (at the workstation) Authentication server (AS) verifies the user during login It shares a secret password with each user (plays the role of the KDC) Ticket-granting server (TGS) issues proof of identity tickets Tickets will be used by the user to perform various jobs Bob the server does the work Alice needs to do, based on the identity ticket Based on the identity ticket will grant Alice the right she is entitled to 14

Authentication using Kerberos 1. A sits down at an arbitrary public workstation and types her name Workstation sends her name to the AS in plaintext 2. AS sends back a session key K S and a ticket K TGS (A,K S ) for TGS both encrypted with A s secret key At this point the workstation asks for A s password Password is used to generate the secret key and decrypt the message, obtaining the ticket for TGS Password is overwritten immediately to make sure it stays inside just for a few milliseconds, it never leaves the workstation; without the password Eve cannot get the ticket for TGS 15

Authentication using Kerberos A tells the workstation she needs to contact the file server Bob 3. Workstation sends a message to TGS asking for a ticket to use Bob Key element here is the ticket for TGS received from AS this proves to TGS that the sender is really A 4. TGS creates and sends back a session key K AB for A to use with B TGS sends a message encrypted with K S so that A can read and get K AB TGS also includes a message intended only for Bob, sending A s identity and the key K AB If Eve replays message 3 she will be foiled by the timestamp t Even if she replays the message quickly she will only get a copy of message 4 that she cannot read 16

Authentication using Kerberos 5. Alice can now communicate with Bob using K AB 6. Bob confirms he has received the request and is ready to do the work Multiple realms can be accommodated in Kerberos, each with its own AS and TGS To get a ticket for a distant server B, Alice asks her own TGS for a ticket accepted by the distant TGS She will go through the same protocol with the distant servers The users of the two realms must trust each other s TGS 17

II. Digital signatures Having a sort of digital signature replacing handwritten signatures is essential in the cyber-world This is crucial between two parties who do not trust each other and need protection from each other s later false claims Requirements for a digital signature Examples: Must authenticate the content of the message at the time of the signature Must authenticate the author, date, and time of the signature Receiver can verify the claimed identity of the sender Sender cannot later repudiate the content of the message Receiver cannot possibly have concocted the message himself Can be verified by third-parties to resolve disputes The bank needs to verify the identity of the client placing a transfer order The client cannot deny later having sent that order It is impossible for the bank to create transfer orders and claim they actually came from the client 18

Digital signatures Computational requirements Must be a bit pattern depending on the message being signed Signature must use some information unique to the sender to prevent forgery and denial Computationally easy to produce a signature Computationally easy to recognize and verify the signature Computationally infeasible to forge a digital signature either by constructing a new message for an existing digital signature or by constructing a fraudulent digital signature for a given message Practical to retain a copy of the digital signature in storage Two general schemes for digital signatures Direct Arbitrated 19

Arbitrated digital signatures Every signed message from A to B goes to an arbiter BB (Big Brother) that everybody trusts BB checks the signature and the timestamp, origin, content, etc. BB dates the message and sends it to B with an indication that it has been verified and it is legitimate 20

Arbitrated digital signatures E.g., every user shares a secret key with the arbiter A sends to BB in an encrypted form the plaintext P together with B s id, a timestamp and a random number R A BB decrypts the message and thus makes sure it comes from A; it also checks the timestamp to protect against replays BB then sends B the message P, A s id, the timestamp and the random number R A ; he also sends a message encrypted with his own private key (that nobody knows) containing A s id, timestamp t and the plaintext P (or a hash) B cannot check the signature but trusts it because it comes from BB he knows that because the entire communication was encrypted with K B B will not accept old messages or messages containing the same R A to protect against replay In case of dispute, B will show the signature he got from BB (only BB may have produced it) and BB will decrypt it 21

Direct digital signatures This involves only the communicating parties and it is based on public keys The sender knows the public key of the receiver Digital signature: encrypt the entire message (or just a hash code of the message) with the sender s private key If confidentiality is required: apply the receiver s public key or encrypt using a shared secret key In case of a dispute, the receiver B will produce the plaintext P and the signature E(KR A, P) the judge will apply KU A and decrypt P and check the match: B does not know KRA and cannot have produced the signature himself 22

Direct digital signatures Weaknesses: The scheme only works as long as KR A remains secret: if it is disclosed (or A discloses it herself), then the argument of the judge does not hold: anybody can produce the signature Attack: to deny the signature right after signing, simply claim that the private key has been lost similar to claims of credit card misuse If A changes her public-private keys (she can do that often) the judge will apply the wrong public key to check the signature Attack: to deny the signature change your public-private key pair this should not work if a PKI is used because they may keep trace of old public keys A should protect her private key even after she changes the key Attack: Eve could get hold of an old private key and sign a document with an old timestamp 23

Digital signature standard Any public-key systems may be used the industry de facto choice is RSA The proposed standard (1991) is the Digital Signature Standard (DSS) based on ElGamal (a public-key system) Latest update as a standard in 2009 ElGamal is based on discrete logarithms Immediate complains: Too secret NSA was involved in developing the protocol for using ElGamal in DSS Too slow 10 to 40 times slower than RSA-based signatures Too new ElGamal had not yet been thoroughly analyzed Too insecure only 512-bit key (subsequently 1024-bit keys adopted) 24

DSS approach 25

DSS The message M is first subjected to a hash function (to compress it) The hash code and a random number k are provided as input to the signature function Signature function depends on the sender s private key KR a and a public key KU G known to several users The result is a signature with 2 components r,s 26

Digital Signature Algorithm (not required in the exam) 27