Spring 2010: CS419 Computer Security

Similar documents
Cryptographic Checksums

Chapter 9: Key Management

Overview. Cryptographic key infrastructure Certificates. May 13, 2004 ECS 235 Slide #1. Notation

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

L7: Key Distributions. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Chapter 10: Key Management

Topics. Dramatis Personae Cathy, the Computer, trusted 3 rd party. Cryptographic Protocols

CSC 482/582: Computer Security. Security Protocols

Chapter 9. Public Key Cryptography, RSA And Key Management

Information Security & Privacy

L8: Public Key Infrastructure. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Cryptography and Network Security

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

Cryptography and Network Security Chapter 10. Fourth Edition by William Stallings

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

Key Management and Distribution

Key Management CS461/ECE422

Public Key Algorithms

INFSCI 2935: Introduction of Computer Security 1. Courtesy of Professors Chris Clifton & Matt Bishop. INFSCI 2935: Introduction to Computer Security 2

Lecture 2 Applied Cryptography (Part 2)

Elements of Security

Protocols II. Computer Security Lecture 12. David Aspinall. 17th February School of Informatics University of Edinburgh

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

Cryptography and Network Security. Prof. D. Mukhopadhyay. Department of Computer Science and Engineering. Indian Institute of Technology, Kharagpur

Session key establishment protocols

1. Diffie-Hellman Key Exchange

Session key establishment protocols

Fall 2010/Lecture 32 1

Authentication Handshakes

CSC 474/574 Information Systems Security

CS3235 Seventh set of lecture slides

CS 161 Computer Security

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

CIS 6930/4930 Computer and Network Security. Topic 6.2 Authentication Protocols

CSC/ECE 774 Advanced Network Security

Key Establishment and Authentication Protocols EECE 412

Information Security CS 526

T Cryptography and Data Security

Fun with Crypto keys and protocols. some Bishop, some Jim, some RA

Cryptography and Network Security Chapter 14

Cryptographic Protocols 1

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

Data Security and Privacy. Topic 14: Authentication and Key Establishment

Cryptography CS 555. Topic 16: Key Management and The Need for Public Key Cryptography. CS555 Spring 2012/Topic 16 1

Lecture 5: Protocols - Authentication and Key Exchange* CS 392/6813: Computer Security Fall Nitesh Saxena

Authentication and Key Distribution

CPSC 467: Cryptography and Computer Security

Grenzen der Kryptographie

0/41. Alice Who? Authentication Protocols. Andreas Zeller/Stephan Neuhaus. Lehrstuhl Softwaretechnik Universität des Saarlandes, Saarbrücken

Lecture 6.2: Protocols - Authentication and Key Exchange II. CS 436/636/736 Spring Nitesh Saxena. Course Admin

Datasäkerhetsmetoder föreläsning 7

Lecture 6 - Cryptography

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

CSC 474/574 Information Systems Security

Key Agreement. Guilin Wang. School of Computer Science, University of Birmingham

Real-time protocol. Chapter 16: Real-Time Communication Security

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

Lecture 7 - Applied Cryptography

This chapter continues our overview of public-key cryptography systems (PKCSs), and begins with a description of one of the earliest and simplest

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

Crypto Background & Concepts SGX Software Attestation

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

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

CS 161 Computer Security

Key Establishment. Chester Rebeiro IIT Madras. Stinson : Chapter 10

Chapter 10 : Private-Key Management and the Public-Key Revolution

Kurose & Ross, Chapters (5 th ed.)

CSC 774 Network Security

Lecture 1: Course Introduction

Security Handshake Pitfalls

CS Computer Networks 1: Authentication

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

ICS 180 May 4th, Guest Lecturer: Einar Mykletun

Introduction. CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell

Session Key Distribution

KEY AGREEMENT PROTOCOLS. CIS 400/628 Spring 2005 Introduction to Cryptography. This is based on Chapter 13 of Trappe and Washington

Outline. Login w/ Shared Secret: Variant 1. Login With Shared Secret: Variant 2. Login Only Authentication (One Way) Mutual Authentication

CS 494/594 Computer and Network Security

1 Identification protocols

Computer Security. 10. Exam 2 Review. Paul Krzyzanowski. Rutgers University. Spring 2017

Key Exchange. References: Applied Cryptography, Bruce Schneier Cryptography and Network Securiy, Willian Stallings

CS Protocol Design. Prof. Clarkson Spring 2017

CIS 4360 Secure Computer Systems Applied Cryptography

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

Chapter 9 Public Key Cryptography. WANG YANG

Security Handshake Pitfalls

Modelling and Analysing of Security Protocol: Lecture 1. Introductions to Modelling Protocols. Tom Chothia CWI

CS Protocols. Prof. Clarkson Spring 2016

Authentication in Distributed Systems

CS 6324: Information Security More Info on Key Establishment: RSA, DH & QKD

Network Security (NetSec)

Authentication Part IV NOTE: Part IV includes all of Part III!

Public Key (asymmetric) Cryptography

Other Topics in Cryptography. Truong Tuan Anh

Public Key Cryptography

CS 470 Spring Security. Mike Lam, Professor. a.k.a. Why on earth do Alice and Bob need to share so many secrets?!?

Cryptography Lecture 9 Key distribution and trust, Elliptic curve cryptography

Public Key Algorithms

Diffie-Hellman. Part 1 Cryptography 136

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

Transcription:

Spring 2010: CS419 Computer Security Vinod Ganapathy Lecture 7 Topic: Key exchange protocols Material: Class handout (lecture7_handout.pdf) Chapter 2 in Anderson's book.

Today s agenda Key exchange basics Simple protocols and replay attacks Needham Schroeder and refinements Public key exchange protocols Man in the middle attacks Certificates 2

Notation X Y : { Z W } k X,Y X sends Y the message produced by concatenating Z and W enciphered by key k X,Y, which is shared by users X and Y A T : { Z } k A { W } k A,T A sends T a message consisting of the concatenation of Z enciphered using k A, A s key, and W enciphered using k A,T, the key shared by A and T r 1, r 2 nonces (nonrepeating random numbers) 3

Session, Interchange Keys Alice wants to send a message m to Bob Assume public key encryption Alice generates a random cryptographic key k s and uses it to encipher m To be used for this message only Called a session key She enciphers k s with Bob;s public key k B k B enciphers all session keys Alice uses to communicate with Bob Called an interchange key Alice sends { m } k s { k s } k B 4

Benefits Limits amount of traffic enciphered with single key Standard practice, to decrease the amount of traffic an attacker can obtain Prevents some attacks Example: Alice will send Bob message that is either BUY or SELL. Eve computes possible ciphertexts { BUY } k B and { SELL } k B. Eve intercepts enciphered message, compares, and gets plaintext at once 5

Key Exchange Algorithms Goal: Alice, Bob get shared key Key cannot be sent in clear Attacker can listen in Key can be sent enciphered, or derived from exchanged data plus data not known to an eavesdropper Alice, Bob may trust third party All cryptosystems, protocols publicly known Only secret data is the keys, ancillary information known only to Alice and Bob needed to derive keys Anything transmitted is assumed known to attacker 6

Classical Key Exchange Bootstrap problem: how do Alice, Bob begin? Alice can t send it to Bob in the clear! Assume trusted third party, Cathy Alice and Cathy share secret key k A Bob and Cathy share secret key k B Use this to exchange shared key k s 7

Simple Protocol Alice { request for session key to Bob } k A Cathy Alice { k s } k A { k s } k B Cathy Alice { k s } k B Bob 8

Problems How does Bob know he is talking to Alice? Replay attack: Eve records message from Alice to Bob, later replays it; Bob may think he s talking to Alice, but he isn t Session key reuse: Eve replays message from Alice to Bob, so Bob re uses session key Protocols must provide authentication and defense against replay 9

Needham Schroeder Alice Alice Alice Alice Alice Alice Bob r 1 { Alice Bob r 1 k s { Alice k s } k B } k A { Alice k s } k B { r 2 } k s { r 2 1 } k s Cathy Cathy Bob Bob Bob 10

Argument: Alice talking to Bob Second message Enciphered using key only she, Cathy knows So Cathy enciphered it Response to first message As r 1 in it matches r 1 in first message Third message Alice knows only Bob can read it As only Bob can derive session key from message Any messages enciphered with that key are from Bob 11

Argument: Bob talking to Alice Third message Enciphered using key only he, Cathy know So Cathy enciphered it Names Alice, session key Cathy provided session key, says Alice is other party Fourth message Uses session key to determine if it is replay from Eve If not, Alice will respond correctly in fifth message If so, Eve can t decipher r 2 and so can t respond, or responds incorrectly 12

Denning Sacco Modification Assumption: all keys are secret Question: suppose Eve can obtain session key. How does that affect protocol? In what follows, Eve knows k s Eve Eve Eve { Alice k s } k B { r 2 } k s { r 2 1 } k s Bob Bob Bob 13

Solution In protocol above, Eve impersonates Alice Problem: replay in third step First in previous slide Solution: use time stamp T to detect replay Proposed by Denning and Sacco 14

Needham Schroeder with Denning Sacco Modification Alice Alice Alice Alice Alice Alice Bob r 1 { Alice Bob r 1 k s { Alice T k s } k B } k A { Alice T k s } k B { r 2 } k s { r 2 1 } k s Cathy Cathy Bob Bob Bob 15

Problem with timestamps? If clocks not synchronized, may either reject valid messages or accept replays Parties with either slow or fast clocks vulnerable to replay Resetting clock does not eliminate vulnerability We ll see timestamps used in Kerberos as well. 16

Otway Rees Protocol Corrects problem That is, Eve replaying the third message in the protocol Does not use timestamps Not vulnerable to the problems that Denning Sacco modification has Uses integer n to associate all messages with particular exchange 17

The Protocol Alice Cathy n Alice Bob { r 1 n Alice Bob } k A n Alice Bob { r 1 n Alice Bob } k A { r 2 n Alice Bob } k B Bob Bob Cathy n { r 1 k s } k A { r 2 k s } k B Bob Alice n { r 1 k s } k A Bob 18

Argument: Alice talking to Bob Fourth message If n matches first message, Alice knows it is part of this protocol exchange Cathy generated k s because only she, Alice know k A Enciphered part belongs to exchange as r 1 matches r 1 in encrypted part of first message 19

Argument: Bob talking to Alice Third message If n matches second message, Bob knows it is part of this protocol exchange Cathy generated k s because only she, Bob know k B Enciphered part belongs to exchange as r 2 matches r 2 in encrypted part of second message 20

Replay Attack Eve acquires old k s, message in third step n { r 1 k s } k A { r 2 k s } k B Eve forwards appropriate part to Alice Alice has no ongoing key exchange with Bob: n matches nothing, so is rejected Alice has ongoing key exchange with Bob: n does not match, so is again rejected If replay is for the current key exchange, and Eve sent the relevant part before Bob did, Eve could simply listen to traffic; no replay involved 21

Public Key Key Exchange Here interchange keys known e A, e B Alice and Bob s public keys known to all d A, d B Alice and Bob s private keys known only to owner Simple protocol k s is desired session key Alice { k s } e B Bob 22

Problem and Solution Vulnerable to forgery or replay Because e B known to anyone, Bob has no assurance that Alice sent message Simple fix uses Alice s private key k s is desired session key Alice { { k s } d A } e B Bob 23

Notes Can include message enciphered with k s Assumes Bob has Alice s public key, and vice versa If not, each must get it from public server If keys not bound to identity of owner, attacker Eve can launch a man in the middle attack (next slide; Cathy is public server providing public keys) Solution to this (binding identity to keys) discussed later as public key infrastructure (PKI) 24

Man in the Middle Attack Alice send Bob s public key Eve Eve intercepts request send Bob s public key Cathy Cathy Eve e B Cathy Alice e E Eve Alice { k s } e E Eve intercepts message Bob Eve { k s } e B Bob 25

Cryptographic Key Infrastructure Goal: bind identity to key Classical: not possible as all keys are shared Use protocols to agree on a shared key (see earlier) Public key: bind identity to public key Crucial as people will use key to communicate with principal whose identity is bound to key Erroneous binding means no secrecy between principals Assume principal identified by an acceptable name 26

Certificates Create token (message) containing Identity of principal (here, Alice) Corresponding public key Timestamp (when issued) Other information (perhaps identity of signer) signed by trusted authority (here, Cathy) C A = { e A Alice T } d C 27

Use Bob gets Alice s certificate If he knows Cathy s public key, he can decipher the certificate When was certificate issued? Is the principal Alice? Now Bob has Alice s public key Problem: Bob needs Cathy s public key to validate certificate Problem pushed up a level Two approaches: Merkle s tree, signature chains 28

Certificate Signature Chains Create certificate Generate hash of certificate Encipher hash with issuer s private key Validate Obtain issuer s public key Decipher enciphered hash Recompute hash from certificate and compare Problem: getting issuer s public key 29

X.509 Chains Some certificate components in X.509v3: Version Serial number Signature algorithm identifier: hash algorithm Issuer s name; uniquely identifies issuer Interval of validity Subject s name; uniquely identifies subject Subject s public key 30

X.509 Certificate Validation Obtain issuer s public key The one for the particular signature algorithm Decipher signature Gives hash of certificate Recompute hash from certificate and compare If they differ, there s a problem Check interval of validity 31

Issuers Certification Authority (CA): entity that issues certificates Multiple issuers pose validation problem Alice s CA is Cathy; Bob s CA is Don; how can Alice validate Bob s certificate? Have Cathy and Don cross certify Each issues certificate for the other 32

Validation and Cross Certifying Certificates: Cathy<<Alice>> Dan<<Bob> Cathy<<Dan>> Dan<<Cathy>> Alice validates Bob s certificate Alice obtains Cathy<<Dan>> Alice uses (known) public key of Cathy to validate Cathy<<Dan>> Alice uses Cathy<<Dan>> to validate Dan<<Bob>> 33

Public Key Distribution of Secret Keys if have securely exchanged public keys: 34

Diffie Hellman Key Exchange first public key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts note: now know that James Ellis (UK CESG) secretly proposed the concept in 1970 is a practical method for public exchange of a secret key used in a number of commercial products 35

Diffie Hellman Key Exchange a public key distribution scheme cannot be used to exchange an arbitrary message rather it can establish a common key known only to the two participants value of key depends on the participants (and their private and public key information) based on exponentiation in a finite (Galois) field (modulo a prime or a polynomial) easy security relies on the difficulty of computing discrete logarithms (similar to factoring) hard 36

Next class Certificate chains Kerberos 37

Diffie Hellman Setup all users agree on global parameters: large prime integer or polynomial q α a primitive root mod q each user (eg. A) generates their key chooses a secret key (number): x A < q compute their public key: y A = α x A mod q each user makes public that key y A 38

Diffie Hellman Key Exchange shared session key for users A & B is K AB : K AB = α x A. x B mod q = y A x B mod q (which B can compute) = y B x A mod q (which A can compute) K AB is used as session key in private key encryption scheme between Alice and Bob if Alice and Bob subsequently communicate, they will have the same key as before, unless they choose new public keys attacker needs an x, must solve discrete log 39

Diffie Hellman Example users Alice & Bob who wish to swap keys: agree on prime q=353 and α=3 select random secret keys: A chooses x A =97, B chooses x B =233 compute public keys: y A =3 97 mod 353 = 40 (Alice) y B =3 233 mod 353 = 248 (Bob) compute shared session key as: K AB = y B x A mod 353 = 248 97 = 160 (Alice) K AB = y A x B mod 353 = 40 233 = 160 (Bob) 40