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

Similar documents
Security protocols and their verification. Mark Ryan University of Birmingham

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

Fall 2010/Lecture 32 1

Authentication Handshakes

Security Handshake Pitfalls

CSC 474/574 Information Systems Security

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

Session key establishment protocols

Session key establishment protocols

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

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

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

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

Cryptographic Checksums

Acknowledgments. CSE565: Computer Security Lectures 16 & 17 Authentication & Applications

CSCI 667: Concepts of Computer Security. Lecture 9. Prof. Adwait Nadkarni

Chapter 9: Key Management

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

Cryptography V: Digital Signatures

User Authentication Protocols

Spring 2010: CS419 Computer Security

Security and Privacy in Computer Systems. Lecture 7 The Kerberos authentication system. Security policy, security models, trust Access control models

Lecture 1: Course Introduction

User Authentication Protocols Week 7

Elements of Security

Cryptography V: Digital Signatures

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

Security Handshake Pitfalls

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

BAN Logic. Logic of Authentication 1. BAN Logic. Source. The language of BAN. The language of BAN. Protocol 1 (Needham-Schroeder Shared-Key) [NS78]

Applied Cryptography Basic Protocols

Outline More Security Protocols CS 239 Computer Security February 6, 2006

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

Cryptographic Protocols 1

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

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

Security Handshake Pitfalls

Outline Key Management CS 239 Computer Security February 9, 2004

Cryptography and Network Security

Datasäkerhetsmetoder föreläsning 7

Information Security CS 526

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

Authentication in Distributed Systems

Network Security CHAPTER 31. Solutions to Review Questions and Exercises. Review Questions

Unit-VI. User Authentication Mechanisms.

CSC 482/582: Computer Security. Security Protocols

Security Handshake Pitfalls

Outline. More Security Protocols CS 239 Security for System Software April 22, Needham-Schroeder Key Exchange

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

CIS 6930/4930 Computer and Network Security. Topic 7. Trusted Intermediaries

Trusted Intermediaries

AIT 682: Network and Systems Security

CS3235 Seventh set of lecture slides

Computer Networks & Security 2016/2017

T Cryptography and Data Security

Key distribution and certification

13/10/2013. Kerberos. Key distribution and certification. The Kerberos protocol was developed at MIT in the 1980.

Introduction. Trusted Intermediaries. CSC/ECE 574 Computer and Network Security. Outline. CSC/ECE 574 Computer and Network Security.

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

Outline More Security Protocols CS 239 Computer Security February 4, 2004

Elements of Cryptography and Computer and Network Security Computer Science 134 (COMPSCI 134) Fall 2016 Instructor: Karim ElDefrawy

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

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

Computer Security 3e. Dieter Gollmann. Chapter 15: 1

Network Security: Classic Protocol Flaws, Kerberos. Tuomas Aura

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

CPSC 467b: Cryptography and Computer Security

Session Key Distribution

10/1/2015. Authentication. Outline. Authentication. Authentication Mechanisms. Authentication Mechanisms. Authentication Mechanisms

Identification Schemes

HOST Authentication Overview ECE 525

Elements of Cryptography and Computer and Network Security Computer Science 134 (COMPSCI 134) Fall 2016 Instructor: Karim ElDefrawy

Network Security (NetSec)

ECE596C: Handout #9. Authentication Using Shared Secrets. Electrical and Computer Engineering, University of Arizona, Loukas Lazos

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

Cryptology Part 1. Terminology. Basic Approaches to Cryptography. Basic Approaches to Cryptography: (1) Transposition (continued)

Kerberos and Public-Key Infrastructure. Key Points. Trust model. Goal of Kerberos

6. Security Handshake Pitfalls Contents

CSCE 813 Internet Security Kerberos

Test 2 Review. 1. (10 points) Timestamps and nonces are both used in security protocols to prevent replay attacks.

Contents Digital Signatures Digital Signature Properties Direct Digital Signatures

CS Protocol Design. Prof. Clarkson Spring 2017

Test 2 Review. (b) Give one significant advantage of a nonce over a timestamp.

ICT 6541 Applied Cryptography Lecture 8 Entity Authentication/Identification

1 Identification protocols

CS 470 Spring Security. Mike Lam, Professor. a.k.a. Why on earth do Alice and Bob need to talk so much?!? Content taken from the following:

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

Cryptography and Network Security Chapter 13. Digital Signatures & Authentication Protocols

Key Establishment and Authentication Protocols EECE 412

CS Protocols. Prof. Clarkson Spring 2016

User Authentication. Modified By: Dr. Ramzi Saifan

Lecture 9. Authentication & Key Distribution

Network Security. Chapter 7 Cryptographic Protocols

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

CHAPTER 3. ENHANCED KERBEROS SECURITY: An application of the proposed system

Chapter 10: Key Management

Applied Cryptography and Computer Security CSE 664 Spring 2017

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

CSC/ECE 774 Advanced Network Security

Transcription:

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

Outline Introduction Shared-key Authentication Asymmetric authentication protocols Key exchange protocols Combined key exchange and authentication Summary

Outline Introduction Shared-key Authentication Asymmetric authentication protocols Key exchange protocols Combined key exchange and authentication Summary

Introduction Previous lecture examined some simple protocols:

Introduction Previous lecture examined some simple protocols: Simple authentication using passwords, shared keys

Introduction Previous lecture examined some simple protocols: Simple authentication using passwords, shared keys Challenge response with shared keys

Introduction Previous lecture examined some simple protocols: Simple authentication using passwords, shared keys Challenge response with shared keys Use of nonces

Introduction Previous lecture examined some simple protocols: Simple authentication using passwords, shared keys Challenge response with shared keys Use of nonces This lecture expands and extends these concepts:

Introduction Previous lecture examined some simple protocols: Simple authentication using passwords, shared keys Challenge response with shared keys Use of nonces This lecture expands and extends these concepts: Mutual authentication

Introduction Previous lecture examined some simple protocols: Simple authentication using passwords, shared keys Challenge response with shared keys Use of nonces This lecture expands and extends these concepts: Mutual authentication Challenge response with public keys

Introduction Previous lecture examined some simple protocols: Simple authentication using passwords, shared keys Challenge response with shared keys Use of nonces This lecture expands and extends these concepts: Mutual authentication Challenge response with public keys Authentication and key establishment

Introduction Previous lecture examined some simple protocols: Simple authentication using passwords, shared keys Challenge response with shared keys Use of nonces This lecture expands and extends these concepts: Mutual authentication Challenge response with public keys Authentication and key establishment Digital certificates

Introduction Previous lecture examined some simple protocols: Simple authentication using passwords, shared keys Challenge response with shared keys Use of nonces This lecture expands and extends these concepts: Mutual authentication Challenge response with public keys Authentication and key establishment Digital certificates More fun with nonces

Outline Introduction Shared-key Authentication Asymmetric authentication protocols Key exchange protocols Combined key exchange and authentication Summary

Reminder: shared-key unilateral authentication Minimal protocol using a random number: Message 1. S A: N s Message 2. A S: { N s, S } Kas

Reminder: shared-key unilateral authentication Minimal protocol using a random number: Message 1. S A: N s Message 2. A S: { N s, S } Kas Minimal protocol using timestamps; the challenge is implicit: Message 1. A S: { T a, S } Kas

Reminder: shared-key unilateral authentication Minimal protocol using a random number: Message 1. S A: N s Message 2. A S: { N s, S } Kas Minimal protocol using timestamps; the challenge is implicit: Message 1. A S: { T a, S } Kas Nonces prevent replay of old messages

Reminder: shared-key unilateral authentication Minimal protocol using a random number: Message 1. S A: N s Message 2. A S: { N s, S } Kas Minimal protocol using timestamps; the challenge is implicit: Message 1. A S: { T a, S } Kas Nonces prevent replay of old messages S is included inside the encrypted package to foil a reflection attack (impersonation of S to A).

Reminder: shared-key unilateral authentication Minimal protocol using a random number: Message 1. S A: N s Message 2. A S: { N s, S } Kas Minimal protocol using timestamps; the challenge is implicit: Message 1. A S: { T a, S } Kas Nonces prevent replay of old messages S is included inside the encrypted package to foil a reflection attack (impersonation of S to A). Also, encrypting random strings can be risky: to prevent a chosen-text attack on the encryption scheme in the first case, A may include another random number in the encrypted package.

Shared-key mutual authentication This protocol achieves mutual authentication using shared keys and nonces: Message 1. S A: N s Message 2. A S: { N s, N a, S } Kas Message 3. S A: { N a, N s } Kas

Shared-key mutual authentication This protocol achieves mutual authentication using shared keys and nonces: Message 1. S A: N s Message 2. A S: { N s, N a, S } Kas Message 3. S A: { N a, N s } Kas The second nonce N a in message 2 serves both as a challenge for message 3 and to prevent chosen-text attacks. On receiving message 2, S checks N s was the nonce he issued in message 1, and that his name S is included in the encrypted package. He also recovers N a to send in message 3.

Shared-key mutual authentication This protocol achieves mutual authentication using shared keys and nonces: Message 1. S A: N s Message 2. A S: { N s, N a, S } Kas Message 3. S A: { N a, N s } Kas The second nonce N a in message 2 serves both as a challenge for message 3 and to prevent chosen-text attacks. On receiving message 2, S checks N s was the nonce he issued in message 1, and that his name S is included in the encrypted package. He also recovers N a to send in message 3. Mutual authentication may be obtained by running unilateral authentication twice, but that achieves something slightly weaker: the two authentications are not logically linked by the protocol (TOCTOU).

Outline Introduction Shared-key Authentication Asymmetric authentication protocols Key exchange protocols Combined key exchange and authentication Summary

Challenge-response with PK decryption Designing public-key based protocols is also subtle. For example, it s important not to use a key-pair used for authentication for other purposes, since combining usages can compromise security. First PK approach: Alice demonstrates knowledge of a private key by decrypting a challenge. Message 1. S A: h(n s ), S, { N s, S } Ka Message 2. A S: N s

Challenge-response with PK decryption Designing public-key based protocols is also subtle. For example, it s important not to use a key-pair used for authentication for other purposes, since combining usages can compromise security. First PK approach: Alice demonstrates knowledge of a private key by decrypting a challenge. Message 1. S A: h(n s ), S, { N s, S } Ka Message 2. A S: N s Server Sam invents a nonce Ns, and challenges Alice to discover it.

Challenge-response with PK decryption Designing public-key based protocols is also subtle. For example, it s important not to use a key-pair used for authentication for other purposes, since combining usages can compromise security. First PK approach: Alice demonstrates knowledge of a private key by decrypting a challenge. Message 1. S A: h(n s ), S, { N s, S } Ka Message 2. A S: N s Server Sam invents a nonce Ns, and challenges Alice to discover it. He sends a packet containing the nonce encrypted with her public key K a and a witness h(n s ), where h is a one-way hash function, which prevents chosen-text attacks.

Challenge-response with PK decryption Designing public-key based protocols is also subtle. For example, it s important not to use a key-pair used for authentication for other purposes, since combining usages can compromise security. First PK approach: Alice demonstrates knowledge of a private key by decrypting a challenge. Message 1. S A: h(n s ), S, { N s, S } Ka Message 2. A S: N s Server Sam invents a nonce Ns, and challenges Alice to discover it. He sends a packet containing the nonce encrypted with her public key K a and a witness h(n s ), where h is a one-way hash function, which prevents chosen-text attacks. Alice decrypts, and responds with Ns only if the hash and name both match. When Sam sees his nonce N s returned, Alice is authenticated.

Challenge-response with digital signatures Alice demonstrates knowledge of her signature private key by signing a challenge. Message 1. S A: N s Message 2. A S: N a, S, S A (N a, N s, S) Server Sam sends a nonce N s. Alice replies with a message containing her own nonce N a, the name S, and the signature for a message with both nonces and the name. She constructs the signature using her private signing function S A.

Challenge-response with digital signatures Alice demonstrates knowledge of her signature private key by signing a challenge. Message 1. S A: N s Message 2. A S: N a, S, S A (N a, N s, S) Server Sam sends a nonce N s. Alice replies with a message containing her own nonce N a, the name S, and the signature for a message with both nonces and the name. She constructs the signature using her private signing function S A. If the signature verifies for the plaintext N a, N s, S, he considers Alice authenticated. In both this case, and the previous slide, we assume that Sam already has the (correct) public verification function V A to check Alice s signatures (wait for discussion of digital certificates).

Outline Introduction Shared-key Authentication Asymmetric authentication protocols Key exchange protocols Combined key exchange and authentication Summary

Dealing with keys So far: protocols for authentication, assuming that any keys were securely distributed. But how?

Dealing with keys So far: protocols for authentication, assuming that any keys were securely distributed. But how? Many protocols have been designed for key-exchange. Key exchange usually establishes short-term session keys, which encrypt individual conversations, usually with conventional crypto.

Dealing with keys So far: protocols for authentication, assuming that any keys were securely distributed. But how? Many protocols have been designed for key-exchange. Key exchange usually establishes short-term session keys, which encrypt individual conversations, usually with conventional crypto. A new key for each conversation is good practice: if a particular key is used for a long time (or a lot of data), there is more opportunity for attack.

Dealing with keys So far: protocols for authentication, assuming that any keys were securely distributed. But how? Many protocols have been designed for key-exchange. Key exchange usually establishes short-term session keys, which encrypt individual conversations, usually with conventional crypto. A new key for each conversation is good practice: if a particular key is used for a long time (or a lot of data), there is more opportunity for attack. Many protocols combine authentication and key-exchange.

Dealing with keys... With symmetric cryptography:

Dealing with keys... With symmetric cryptography: Use a Trusted Third Party (TTP), or

Dealing with keys... With symmetric cryptography: Use a Trusted Third Party (TTP), or Assume that users have fixed long-term keys used to exchange shorter-term session keys.

Dealing with keys... With symmetric cryptography: Use a Trusted Third Party (TTP), or Assume that users have fixed long-term keys used to exchange shorter-term session keys. For public-key cryptography, using the genuine public key is crucial (an example of data-origin authentication).

Dealing with keys... With symmetric cryptography: Use a Trusted Third Party (TTP), or Assume that users have fixed long-term keys used to exchange shorter-term session keys. For public-key cryptography, using the genuine public key is crucial (an example of data-origin authentication). One solution: use a TTP to create digital certificates which are used to securely distribute public keys.

Dealing with keys... With symmetric cryptography: Use a Trusted Third Party (TTP), or Assume that users have fixed long-term keys used to exchange shorter-term session keys. For public-key cryptography, using the genuine public key is crucial (an example of data-origin authentication). One solution: use a TTP to create digital certificates which are used to securely distribute public keys. Advantages: public key distribution it is only required to preserve authenticity; it can be separated from the key exchange protocol.

Key-exchange using symmetric crypto Usual setting: a TTP, the Key Distribution Centre (KDC), with whom each principal shares a key.

Key-exchange using symmetric crypto Usual setting: a TTP, the Key Distribution Centre (KDC), with whom each principal shares a key. Method: Alice tells the KDC (Sam) she d like to talk to Bob. Sam generates a new session key, and encrypts two copies of it: one with Alice s key and one with Bob s key. He sends both copies to Alice. Alice decrypts her copy, sends Bob his copy, and then they can communicate securely.

Key-exchange using symmetric crypto Usual setting: a TTP, the Key Distribution Centre (KDC), with whom each principal shares a key. Method: Alice tells the KDC (Sam) she d like to talk to Bob. Sam generates a new session key, and encrypts two copies of it: one with Alice s key and one with Bob s key. He sends both copies to Alice. Alice decrypts her copy, sends Bob his copy, and then they can communicate securely. A particular protocol: Message 1. A S: A, B Message 2. S A: { K ab, T } Kas, { K ab, T } Kbs Message 3. A B: { K ab, T } Kbs Here the session key has a timestamp T to indicate its creation time.

Key-exchange using PKC Hybrid cryptography combines PK crypto for exchanging a session key with conventional crypto to communicate using the session key. Two reasons: (1) PK algorithms are slow, so bad for lots of data; (2) PK cryptosystems are vulnerable to chosen-plaintext attacks (since E e is public). Assume that Alice can generate good session keys, and that she already has Bob s public key K b. Then she can send him the session key K ab and a message M encrypted with it, in one go (for extra protection, she could sign and date the message): A B : { K ab } Kb, { M } Kab This requires just a single message (not interactive), so it works on a store-and-forward network (e.g., email), or for offline storage. Next: how can we be sure that Alice has the right public key?

Digital Certificates A digital certificate bundles a public key and/or signature verification function with identification data; the bundle is signed by a trusted certification authority (CA) who verified the data.

Digital Certificates A digital certificate bundles a public key and/or signature verification function with identification data; the bundle is signed by a trusted certification authority (CA) who verified the data. E.g., a certificate for Bob may take the form: C B = M, S CA (M) where M = (T s, T e, B, V B ) where S CA is the CA s signing function; T s, T e are start-time and end-time of validity.

Digital Certificates A digital certificate bundles a public key and/or signature verification function with identification data; the bundle is signed by a trusted certification authority (CA) who verified the data. E.g., a certificate for Bob may take the form: C B = M, S CA (M) where M = (T s, T e, B, V B ) where S CA is the CA s signing function; T s, T e are start-time and end-time of validity. Compared with a secure directory of public keys, this protects against MITM attacks; only the CA s verification function needs to be distributed securely. (But the CA s private signing key becomes a critical vulnerability.)

Digital Certificates A digital certificate bundles a public key and/or signature verification function with identification data; the bundle is signed by a trusted certification authority (CA) who verified the data. E.g., a certificate for Bob may take the form: C B = M, S CA (M) where M = (T s, T e, B, V B ) where S CA is the CA s signing function; T s, T e are start-time and end-time of validity. Compared with a secure directory of public keys, this protects against MITM attacks; only the CA s verification function needs to be distributed securely. (But the CA s private signing key becomes a critical vulnerability.) X.509 uses this model. Each certificate is signed by one CA, and there is a chain of certificates until a root or self-signed certificate is reached. Common root certificates are built into web browsers.

Key-exchange using certificates Here is a way to exchange a session key using certificates. First, Alice asks the server Sam for her certificate and Bob s certificate. Then she generates a session key K ab and a timestamp T a to send to Bob. She signs these with her signing function S A, encrypts them with Bob s public key, and sends them to him together with the certificates. Message 1. A S: A, B Message 2. S A: C a, C b Message 3. A B: C a, C b, { K ab, T a, S A (K ab, T a ) } Kb

Key-exchange using certificates Here is a way to exchange a session key using certificates. First, Alice asks the server Sam for her certificate and Bob s certificate. Then she generates a session key K ab and a timestamp T a to send to Bob. She signs these with her signing function S A, encrypts them with Bob s public key, and sends them to him together with the certificates. Message 1. A S: A, B Message 2. S A: C a, C b Message 3. A B: C a, C b, { K ab, T a, S A (K ab, T a ) } Kb Denning and Sacco proposed this key-exchange protocol in 1981.

Key-exchange using certificates Here is a way to exchange a session key using certificates. First, Alice asks the server Sam for her certificate and Bob s certificate. Then she generates a session key K ab and a timestamp T a to send to Bob. She signs these with her signing function S A, encrypts them with Bob s public key, and sends them to him together with the certificates. Message 1. A S: A, B Message 2. S A: C a, C b Message 3. A B: C a, C b, { K ab, T a, S A (K ab, T a ) } Kb Denning and Sacco proposed this key-exchange protocol in 1981. In 1994, Abadi and Needham pointed out a fatal flaw. That a serious flaw went unnoticed for so long in such a simple protocol shows quite how delicate protocol design is, and suggests that formal analysis is called for.

Key-exchange using certificates Here is a way to exchange a session key using certificates. First, Alice asks the server Sam for her certificate and Bob s certificate. Then she generates a session key K ab and a timestamp T a to send to Bob. She signs these with her signing function S A, encrypts them with Bob s public key, and sends them to him together with the certificates. Message 1. A S: A, B Message 2. S A: C a, C b Message 3. A B: C a, C b, { K ab, T a, S A (K ab, T a ) } Kb Denning and Sacco proposed this key-exchange protocol in 1981. In 1994, Abadi and Needham pointed out a fatal flaw. That a serious flaw went unnoticed for so long in such a simple protocol shows quite how delicate protocol design is, and suggests that formal analysis is called for. Can you guess what the flaw is?

Key-exchange using certificates Here is a way to exchange a session key using certificates. First, Alice asks the server Sam for her certificate and Bob s certificate. Then she generates a session key K ab and a timestamp T a to send to Bob. She signs these with her signing function S A, encrypts them with Bob s public key, and sends them to him together with the certificates. Message 1. A S: A, B Message 2. S A: C a, C b Message 3. A B: C a, C b, { K ab, T a, S A (K ab, T a ) } Kb Denning and Sacco proposed this key-exchange protocol in 1981. In 1994, Abadi and Needham pointed out a fatal flaw. That a serious flaw went unnoticed for so long in such a simple protocol shows quite how delicate protocol design is, and suggests that formal analysis is called for. Can you guess what the flaw is? (Hint: consider signed packet)

Outline Introduction Shared-key Authentication Asymmetric authentication protocols Key exchange protocols Combined key exchange and authentication Summary

Key-exchange with authentication It makes sense to combine key-exchange with authentication. A direct way to achieve this is by adding names to the (symmetric key) protocol for key exchange given earlier: Message 1. A S: A, B Message 2. S A: { A, B, K ab, T } Kas, { A, B, K ab, T } Kbs Message 3. A B: { A, B, K ab, T } Kbs Instead of encrypting just the key K ab and timestamp T, Sam sends a package containing the names A, B as well. The names allow Alice and Bob to verify they re talking to the right people, providing authentication.

Key-exchange with authentication It makes sense to combine key-exchange with authentication. A direct way to achieve this is by adding names to the (symmetric key) protocol for key exchange given earlier: Message 1. A S: A, B Message 2. S A: { A, B, K ab, T } Kas, { A, B, K ab, T } Kbs Message 3. A B: { A, B, K ab, T } Kbs Instead of encrypting just the key K ab and timestamp T, Sam sends a package containing the names A, B as well. The names allow Alice and Bob to verify they re talking to the right people, providing authentication. Protocols of this kind have been much studied, with variations using nonces instead of time stamps, changing the pattern of communications, or trying to optimise the communications.

Key-exchange with authentication It makes sense to combine key-exchange with authentication. A direct way to achieve this is by adding names to the (symmetric key) protocol for key exchange given earlier: Message 1. A S: A, B Message 2. S A: { A, B, K ab, T } Kas, { A, B, K ab, T } Kbs Message 3. A B: { A, B, K ab, T } Kbs Instead of encrypting just the key K ab and timestamp T, Sam sends a package containing the names A, B as well. The names allow Alice and Bob to verify they re talking to the right people, providing authentication. Protocols of this kind have been much studied, with variations using nonces instead of time stamps, changing the pattern of communications, or trying to optimise the communications. Some examples follow...

Wide-mouthed frog Probably the simplest symmetric key management protocol using a trusted server. Relies on synchronized clocks and the assumption that Alice can generate good keys. Message 1. A S: A, { T a, B, K ab } Kas Message 2. S B: { T s, A, K ab } Kbs

Wide-mouthed frog Probably the simplest symmetric key management protocol using a trusted server. Relies on synchronized clocks and the assumption that Alice can generate good keys. Message 1. A S: A, { T a, B, K ab } Kas Message 2. S B: { T s, A, K ab } Kbs In 1, Alice concatenates a timestamp, Bob s name, a random session key, and encrypts under her key shared with Sam.

Wide-mouthed frog Probably the simplest symmetric key management protocol using a trusted server. Relies on synchronized clocks and the assumption that Alice can generate good keys. Message 1. A S: A, { T a, B, K ab } Kas Message 2. S B: { T s, A, K ab } Kbs In 1, Alice concatenates a timestamp, Bob s name, a random session key, and encrypts under her key shared with Sam. Sam decrypts the message from Alice and checks that the message is timely. Then he concatenates a new timestamp, Alice s name, and the key. He encrypts this under the key he shares with Bob, and sends the package along to Bob in Message 2.

Wide-mouthed frog Probably the simplest symmetric key management protocol using a trusted server. Relies on synchronized clocks and the assumption that Alice can generate good keys. Message 1. A S: A, { T a, B, K ab } Kas Message 2. S B: { T s, A, K ab } Kbs In 1, Alice concatenates a timestamp, Bob s name, a random session key, and encrypts under her key shared with Sam. Sam decrypts the message from Alice and checks that the message is timely. Then he concatenates a new timestamp, Alice s name, and the key. He encrypts this under the key he shares with Bob, and sends the package along to Bob in Message 2. Bob decrypts this message, and checks that message contains a newer timestamp than any seen before. If so, he accepts the session key.

The Needham-Schroeder protocol (flawed) A protocol using nonces and a server to generate keys. Message 1. A S: A, B, N a (1) A makes contact with the server

The Needham-Schroeder protocol (flawed) A protocol using nonces and a server to generate keys. Message 1. A S: A, B, N a Message 2. S A: { N a, B, K ab, { K ab, A } Kbs } Kas (1) A makes contact with the server who (2) provides the session key K ab and a package for transmission to B containing the same key.

The Needham-Schroeder protocol (flawed) A protocol using nonces and a server to generate keys. Message 1. A S: A, B, N a Message 2. S A: { N a, B, K ab, { K ab, A } Kbs } Kas Message 3. A B: { K ab, A } Kbs Message 4. B A: { N b } Kab (1) A makes contact with the server who (2) provides the session key K ab and a package for transmission to B containing the same key. Then (3) A transmits the package to B, and B initiates a handshake with A (4) using N b to prevent replay.

The Needham-Schroeder protocol (flawed) A protocol using nonces and a server to generate keys. Message 1. A S: A, B, N a Message 2. S A: { N a, B, K ab, { K ab, A } Kbs } Kas Message 3. A B: { K ab, A } Kbs Message 4. B A: { N b } Kab Message 5. A B: { N b 1 } Kab (1) A makes contact with the server who (2) provides the session key K ab and a package for transmission to B containing the same key. Then (3) A transmits the package to B, and B initiates a handshake with A (4) using N b to prevent replay. The final message from A uses N b 1 to distinguish it from the previous message from B.

The Needham-Schroeder protocol (flawed) A protocol using nonces and a server to generate keys. Message 1. A S: A, B, N a Message 2. S A: { N a, B, K ab, { K ab, A } Kbs } Kas Message 3. A B: { K ab, A } Kbs Message 4. B A: { N b } Kab Message 5. A B: { N b 1 } Kab (1) A makes contact with the server who (2) provides the session key K ab and a package for transmission to B containing the same key. Then (3) A transmits the package to B, and B initiates a handshake with A (4) using N b to prevent replay. The final message from A uses N b 1 to distinguish it from the previous message from B. Can you guess what the flaw is?

The Needham-Schroeder protocol (flawed) A protocol using nonces and a server to generate keys. Message 1. A S: A, B, N a Message 2. S A: { N a, B, K ab, { K ab, A } Kbs } Kas Message 3. A B: { K ab, A } Kbs Message 4. B A: { N b } Kab Message 5. A B: { N b 1 } Kab (1) A makes contact with the server who (2) provides the session key K ab and a package for transmission to B containing the same key. Then (3) A transmits the package to B, and B initiates a handshake with A (4) using N b to prevent replay. The final message from A uses N b 1 to distinguish it from the previous message from B. Can you guess what the flaw is? (Hint: consider if a session key K ab is broken)

Kerberos (simplified V4) A repaired version of Needham-Schroeder, using synchronized clocks and trusted servers. Used in Windows 2000 (& DICE).

Kerberos (simplified V4) A repaired version of Needham-Schroeder, using synchronized clocks and trusted servers. Used in Windows 2000 (& DICE). Scenario: Alice wishes to access a resource B. First she must log in to the authentication server to get a ticket-granting ticket (TGT), which is encrypted with her secret key. It contains a session key K ab for Alice to use with a ticket-granting server (TGS).

Kerberos (simplified V4) A repaired version of Needham-Schroeder, using synchronized clocks and trusted servers. Used in Windows 2000 (& DICE). Scenario: Alice wishes to access a resource B. First she must log in to the authentication server to get a ticket-granting ticket (TGT), which is encrypted with her secret key. It contains a session key K ab for Alice to use with a ticket-granting server (TGS). Alice contacts TGS S and asks to access B. It grants her a ticket for using B with a limited duration. She passes this to B, with an authenticator. Optional: B replies for mutual authentication. Message 1. A S: A, B Message 2. S A: { T s, L, K ab, B, { T s, L, K ab, A } Kbs } Kas Message 3. A B: { T s, L, K ab, A } Kbs, { A, T a } Kab Message 4. B A: { T a + 1 } Kab Here, T s and T a are timestamps, and L is a lifetime.

Outline Introduction Shared-key Authentication Asymmetric authentication protocols Key exchange protocols Combined key exchange and authentication Summary

Protocols: summary Weak authentication protocols (e.g., traditional passwords). Stored time-invariant secrets or hashes of secrets. Added salt. Strong authentication protocols. Challenge-response with time-variant parameters (nonces or timestamps) to guarantee freshness and prevent replay attacks. Shared key and public key protocols, demonstrating knowledge of keys. Another kind of authentication protocol we haven t looked at (yet): zero-knowledge protocols, are based on demonstrating knowledge without giving way any further information, provably. Key-exchange protocols. Using shared keys, public keys, and digital signatures/certificates. Key-exchange and authentication protocols. Using shared keys, public keys. Well-known ones are Kerberos and Needham-Schroeder.

References Ross Anderson. Security Engineering: A Comprehensive Guide to Building Dependable Distributed Systems. 2nd Edition Wiley & Sons, 2008. Alfred J. Menezes, Paul C. Van Oorschot, and Scott A. Vanstone, editors. Handbook of Applied Cryptography ( HAC ). CRC Press Series on Discrete Mathematics and Its Applications. CRC Press, 1997. Online version at http://cacr.math.uwaterloo.ca/hac. Recommended Reading Chapter 10 of HAC (10.1 10.3). Chapter 5 of Anderson.