Formal Methods for Security Protocols

Slides:



Advertisements
Similar presentations
1 Key Exchange Solutions Diffie-Hellman Protocol Needham Schroeder Protocol X.509 Certification.
Advertisements

Key Management. Shared Key Exchange Problem How do Alice and Bob exchange a shared secret? Offline – Doesnt scale Using public key cryptography (possible)
5 June Lecture 1 1 TU Dresden - Ws on Proof Theory and Computation Formal Methods for Security Protocols Catuscia Palamidessi Penn State University,
Last Class: The Problem BobAlice Eve Private Message Eavesdropping.
CIS 725 Key Exchange Protocols. Alice ( PB Bob (M, PR Alice (hash(M))) PB Alice Confidentiality, Integrity and Authenication PR Bob M, hash(M) M, PR Alice.
Luu Anh Tuan. Security protocol Intruder Intruder behaviors Overhead and intercept any messages being passed in the system Decrypt messages that are.
Analysis of Security Protocols (I) John C. Mitchell Stanford University.
Cryptography1 CPSC 3730 Cryptography Chapter 10 Key Management.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 7 Wenbing Zhao Department of Electrical and Computer Engineering.
EEC 688/788 Secure and Dependable Computing Lecture 7 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Slide 1 Vitaly Shmatikov CS 378 Key Establishment Pitfalls.
Cryptography and Network Security Chapter 10. Chapter 10 – Key Management; Other Public Key Cryptosystems No Singhalese, whether man or woman, would venture.
COEN 351 E-Commerce Security Essentials of Cryptography.
Key Agreement Guilin Wang School of Computer Science 12 Nov
Security protocols  Authentication protocols (this lecture)  Electronic voting protocols  Fair exchange protocols  Digital cash protocols.
Using Cryptography for Network Security Common problems: –Authentication - A and B want to prove their identities to one another –Key-distribution - A.
Week 4 - Wednesday.  What did we talk about last time?  RSA algorithm.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
6 June Lecture 2 1 TU Dresden - Ws on Proof Theory and Computation Formal Methods for Security Protocols Catuscia Palamidessi Penn State University,
Using Cryptography for Network Security Common problems: –Authentication - A and B want to prove their identities to one another –Key-distribution - A.
1 Chapter 10: Key Management in Public key cryptosystems Fourth Edition by William Stallings Lecture slides by Lawrie Brown (Modified by Prof. M. Singhal,
COEN 351 E-Commerce Security
Key Management Network Systems Security Mort Anvari.
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
Diffie-Hellman Key Exchange first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts – note:
Pertemuan #8 Key Management Kuliah Pengaman Jaringan.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 14. Digital signature.
최신정보보호기술 경일대학교 사이버보안학과 김 현성.
Formal Methods for Security Protocols
Key Exchange References: Applied Cryptography, Bruce Schneier
Protocol Analysis.
CRYPTOGRAPHic Protocols and Diffie-Hellman-Merkle Key Exchange
CS480 Cryptography and Information Security
Chapter 15 Key Management
Group theory exercise.
Message Security, User Authentication, and Key Management
Cryptography Lecture 27.
Network Security Basics
Man in the Middle Attacks
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
9.2 SECURE CHANNELS Medisetty Swathy.
پروتكلهاي احرازاصالت Authentication protocols
Celia Li Computer Science and Engineering York University
IT IS 6200/8200.
Cryptographic protocols 2016, Lecture 3 Key Exchange, CDH, DDH
Practical Aspects of Modern Cryptography
Cryptographic protocols 2015, Lecture 3 Key Exchange, CDH, DDH
CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9
Public Key Cryptography
An Executable Model for JFKr
Chapter 4 Cryptography / Encryption
Key Management Network Systems Security
Efficient Short-Password Key Exchange (ESP-KE)
Cryptography and Network Security Chapter 10
Diffie-Hellman key exchange/agreement algorithm
Key Establishment Protocols ~
CDK: Chapter 7 TvS: Chapter 9
Lecture 6.1: Protocols - Authentication and Key Exchange I
CSCE 715: Network Systems Security
Chapter 29 Cryptography and Network Security
Chapter 8.5 AUTHENTICATION AND KEY DISTRIBUTION
Diffie/Hellman Key Exchange
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Secure Diffie-Hellman Algorithm
Cryptography Lecture 26.
Key Exchange, Man-in-the-Middle Attack
AIT 682: Network and Systems Security
Key Exchange With Public Key Cryptography
Lecture 6.2: Protocols - Authentication and Key Exchange II
“You have zero privacy anyway, get over it”
Presentation transcript:

Formal Methods for Security Protocols Catuscia Palamidessi Penn State University, USA 6 June 2002 - Lecture 2 TU Dresden - Ws on Proof Theory and Computation

TU Dresden - Ws on Proof Theory and Computation Security Protocols Contents of previous lecture: A brief introduction to security protocols Distributed systems, insecure communication, intruders Aims and properties authentication, secrecy, integrity, anonymity, etc. Notation Message # x-> y data Example: the Noedam-Schoeder SK protocol A very brief introduction to Cryptographic methods Symmetric and asymmetric cryptography one-way functions, door traps Vulnerabilities of Security protocols (just started) 5 June 2002 - Lecture 1 TU Dresden - Ws on Proof Theory and Computation

Security Protocols Vulnerabilities Attack strategies Man-in-the middle The attacker interferes by intercepting the message and possibly modifying it and/or pretending to be one of the two parties. 5 June 2002 - Lecture 1 TU Dresden - Ws on Proof Theory and Computation

Security Protocols Vulnerabilities Attack strategy Man-in-the middle Example: The Diffie-Hellman key establishment scheme This scheme is meant to establish a private key between two parties. It is more straightforward and requires neither a third party nor a trap-door. Chose a prime p and a primitive root r modulo p. (primitive means that all numbers between 1 and p can be generated by taking exponents of r modulo p) Alice chooses at random an integer x and sends Bob the message m1 = rx(mod p) Bob chooses an integer y and sends Alice the message m2 = ry(mod p) Alice calculates K1 = m2x(mod p) Bob calculates K2 = m1y(mod p) It is easy to prove that K1 = K2. Hence Alice and Bob can use K1 as a private key between themselves. Note that Alice and Bob play a symmetric role in the generation of the key. Deriving x from m1 (and y from m2) is considered to be intractable. 5 June 2002 - Lecture 1 TU Dresden - Ws on Proof Theory and Computation

Security Protocols Vulnerabilities The Diffie-Hellman key establishment scheme has no way to ensure authentication. A man-in-the-middle, Yves, could pretend to be Bob and establish a shared key with Alice, thus reading all the messages that Alice thinks she is sending to Bob. The same he could do with Bob, even at the same time. 5 June 2002 - Lecture 1 TU Dresden - Ws on Proof Theory and Computation

Security Protocols Vulnerabilities Replay The intruder monitors a (possibly partial) run of the protocol and at some time reproduces (replays) one or more of the messages. 5 June 2002 - Lecture 1 TU Dresden - Ws on Proof Theory and Computation

Security Protocols Vulnerabilities Example: Let us consider what could happen to the NSSK protocol (Needham-Schroeder-Secret-Key) if we remove the nonce from A Message 1   A -> J  :  A.B Message 2   J -> A  : {B.kAB.{kAB.A} ServerKey(B) }ServerKey(A) Message 3   A -> B  :  {kAB.A} ServerKey(B) Message 4   B -> A  :  {nB}kAB Message 5   A -> B  :  {nB - 1}kAB Suppose that Yves eventually succeeds to break the key, so he now knows kAB. Presumably this will have taken a long time, so kAB is not used anymore by A and B. However, next time Alice sends a request to Jeeves, Yves can intercept Jeeves’ reply, and send back to Alice the message {B.kAB.{kAB.A} ServerKey(B) } ServerKey(A) So Alice will take the old key kAB as the key to use in next conversation with Bob. 5 June 2002 - Lecture 1 TU Dresden - Ws on Proof Theory and Computation

Security Protocols Vulnerabilities In the original NSSK protocol this attack is not possible because A would recognize that the nonce is different from the one it sent. Note that the nonce is used as a sort of local time stamp The original NSSK protocol Message 1   A -> J  :  A.B.nA Message 2   J -> A  : {nA.B.kAB.{kAB.A} ServerKey(B) }ServerKey(A) Message 3   A -> B  :  {kAB.A} ServerKey(B) Message 4   B -> A  :  {nB}kAB Message 5   A -> B  :  {nB - 1}kAB 5 June 2002 - Lecture 1 TU Dresden - Ws on Proof Theory and Computation

Security Protocols Vulnerabilities In the original NSSK protocol, however, a similar attack is possible on the other partner B. In fact, B has no way to establish the freshness of the first message he sees (the #3 in the protocol). So, Yves could intercept the message from A to B, and send to B, instead, a previously intercepted message {kAB.A} ServerKey(B) Assuming that the intruder had time to discover the previous key kAB, the communication from B using this key is compromised This attack was discovered by Denning and Sacco, 1981. (three years after it had been in use in the Kerberos protocol) A solution to this problem is to use timestamps. So in message #3, also a timestamp (generated by A or by J) should be sent, encrypted, to B. Note: Time stamps assume a global notion of time. The use of timestamps was introduced in the Kerberos protocol so to avoid the problem above 5 June 2002 - Lecture 1 TU Dresden - Ws on Proof Theory and Computation

Security Protocols Vulnerabilities Alternatively, one could use nonces in a different way, as with the Yahalom protocol: Message 1   A -> B  :  A.nA Message 2   B -> J  : B.{A.nA.nB}ServerKey(B) Message 3   J -> A  :  {B.kAB.nA.nB}ServerKey(A) {A.kAB}ServerKey(B) Message 4   A -> B  :  {A.kAB}ServerKey(B).{nB}kAB In this protocol, both A and B get to inject nonces before the request reaches Jeeves, so they both get a handle on the freshness of the key generated by Jeeves. 5 June 2002 - Lecture 1 TU Dresden - Ws on Proof Theory and Computation

Security Protocols Vulnerabilities Oracle The intruder tricks an agent into inadvertently reveal some information, possibly by inducing him to perform some steps of a protocol. Interleave The intruder contrives for two or more runs of the protocol to overlap 5 June 2002 - Lecture 1 TU Dresden - Ws on Proof Theory and Computation

Security Protocols Vulnerabilities Example of an attack to the Needham-Schroeder-Public-Key protocol which combines oracle and interleaving techniques The NSPK protocol (simplified version) Message 1   A -> B  :  { A.nA }PKB Message 2   B -> A  :  { nA.nB }PKA Message 3   A -> B  :  { nB }PKB At the end of the protocol, it would seems reasonable to believe that: A and B know with whom they have been interacting A and B agree on the values of nA and nB No one else knows the values of nA and nB 5 June 2002 - Lecture 1 TU Dresden - Ws on Proof Theory and Computation

Security Protocols Vulnerabilities In fact, for many years the NSPK protocol (1981) has been believed to satisfy those properties, but in 1995 Gavin Lowe discovered the following attack: here, Y(A) represents Y generating (resp. receiving) the message, making it appear as generated (resp. received) by A. Message a.1    A -> Y   :  { A.nA }PKY Message b.1   Y(A) -> B :  { A.nA }PKB Message b.2   B -> Y(A)   :  { nA.nB }PKA Message a.2   Y -> A   :  { nA.nB }PKA Message a.3   A -> Y   :  { nB }PKY Message b.3   Y(A) -> B   :  { nB }PKB Initially, Alice starts a protocol run with Yves thinking that he is an honest agent. At the end, Bob thinks that he has been communicating with Alice, while this is not the case he and Alice share exclusively nA and nB, while this is not the case. 5 June 2002 - Lecture 1 TU Dresden - Ws on Proof Theory and Computation

Security Protocols Vulnerabilities It is actually relatively easy to fix the NSPK protocol: it is sufficient to include the identity of the responder within the encrypted part of Message 2 Message 1    A -> B   :  A.B.{ A.nA }PKB Message 2    B -> A  :  B.A.{B.nA.nB}PKA Message 3    A -> A   :  A.B.{nB}PKB This new protocol (called the Lowe-Needham-Schroeder protocol) has been proved correct by using CSP/FDR methods 5 June 2002 - Lecture 1 TU Dresden - Ws on Proof Theory and Computation