Security Protocols Computer Security Peter Reiher April 14, 2016

Slides:



Advertisements
Similar presentations
Key Management. Shared Key Exchange Problem How do Alice and Bob exchange a shared secret? Offline – Doesnt scale Using public key cryptography (possible)
Advertisements

Key distribution and certification In the case of public key encryption model the authenticity of the public key of each partner in the communication must.
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.
1 Digital Signatures & Authentication Protocols. 2 Digital Signatures have looked at message authentication –but does not address issues of lack of trust.
 Authorization via symmetric crypto  Key exchange o Using asymmetric crypto o Using symmetric crypto with KDC  KDC shares a key with every participant.
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
Chapter 9 Cryptographic Protocol Cryptography-Principles and Practice Harbin Institute of Technology School of Computer Science and Technology Zhijun Li.
Network Security – Part 2 V.T. Raja, Ph.D., Oregon State University.
Alexander Potapov.  Authentication definition  Protocol architectures  Cryptographic properties  Freshness  Types of attack on protocols  Two-way.
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
Chapter 3: Basic Protocols Dulal C. Kar. Key Exchange with Symmetric Cryptography Session key –A separate key for one particular communication session.
Security protocols  Authentication protocols (this lecture)  Electronic voting protocols  Fair exchange protocols  Digital cash protocols.
Security protocols and their verification Mark Ryan University of Birmingham Midlands Graduate School University of Birmingham April 2005 Steve Kremer.
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.
Digital Signatures, Message Digest and Authentication Week-9.
1 Needham-Schroeder A --> S: A,B, N A S --> A: {N A,B,K AB,{K AB,A} KBS } KAS A --> B:{K AB,A} KBS B --> A:{N B } KAB A --> B:{N B -1} KAB.
Using Cryptography for Network Security Common problems: –Authentication - A and B want to prove their identities to one another –Key-distribution - A.
The School of Electrical Engineering and Computer Science (EECS) CS/ECE Network Security Dr. Attila Altay Yavuz Authentication Protocols (I): Secure Handshake.
Fourth Edition by William Stallings Lecture slides by Lawrie Brown
Outline The basic authentication problem
Lesson 2-18 AP Computer Science Principles
Cryptography CS 555 Topic 34: SSL/TLS.
Outline Basic concepts in computer security
Key Management Session and Interchange Key Key Exchange
Outline Properties of keys Key management Key servers Certificates.
Cryptography Much of computer security is about keeping secrets
Outline Designing secure protocols Key exchange protocols
Topics In a confidential communication the authenticity needs to be carefully established for:
Public Key Encryption Systems
Outline Basics of network security Definitions Sample attacks
CS480 Cryptography and Information Security
Authenticated Key Exchange
Authentication Protocols
Outline Designing secure protocols Basic protocols Key exchange
Handshake Protocols COEN 150.
The TESLA Broadcast Authentication Protocol CS 218 Fall 2017
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Public Key Infrastructure (PKI)
IT IS 6200/8200.
CS Introduction to Operating Systems
CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9
Certificates An increasingly popular form of authentication
Protocol ap1.0: Alice says “I am Alice”
CS2911 Week 9, Class 1 Today Discussion on RSA Video Eavesdropping
Key Management Network Systems Security
Homework #4 Solutions Brian A. LaMacchia
Outline Using cryptography in networks IPSec SSL and TLS.
KERBEROS.
Consensus Algorithms.
CDK: Chapter 7 TvS: Chapter 9
Lecture 6.1: Protocols - Authentication and Key Exchange I
Diffie/Hellman Key Exchange
Security Principles and Policies CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Formal Methods for Security Protocols
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Outline The spoofing problem Approaches to handle spoofing
Security: Integrity, Authentication, Non-repudiation
Public Key Encryption Systems
Security: Public Key Cryptography
Outline Basics of network security Definitions Sample attacks
Outline Designing secure protocols Basic protocols Key exchange
Secure Diffie-Hellman Algorithm
Review of Cryptography: Symmetric and Asymmetric Crypto Advanced Network Security Peter Reiher August, 2014.
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:

Security Protocols Computer Security Peter Reiher April 14, 2016

Outline Designing secure protocols Key exchange protocols Common security problems in protocols

Basics of Security Protocols Assume (usually) that your encryption is sufficiently strong Given that, how do you design a message exchange to achieve a given result securely? Not nearly as easy as you probably think Many of the concepts are important in many areas of computer/network security

Security Protocols A series of steps involving two or more parties designed to accomplish a task with suitable security Sequence is important Cryptographic protocols use cryptography Different protocols assume different levels of trust between participants

Types of Security Protocols Arbitrated protocols Involving a trusted third party Adjudicated protocols Trusted third party, after the fact Self-enforcing protocols No trusted third party

Participants in Security Protocols Alice Bob

And the Bad Guys Eve Mallory And sometimes Alice or Bob might cheat Who only listens passively Who is actively malicious

Trusted Arbitrator Trent A disinterested third party trusted by all legitimate participants Arbitrators often simplify protocols, but add overhead and may limit applicability

Goals of Security Protocols Each protocol is intended to achieve some very particular goal Like setting up a key between two parties Protocols may only be suitable for that particular purpose Important secondary goal is minimalism Fewest possible messages Least possible data Least possible encryption

Key Exchange Protocols Often we want a different encryption key for each communication session How do we get those keys to the participants? Securely Quickly Even if they’ve never communicated before

Key Exchange With Symmetric Encryption and an Arbitrator Alice and Bob want to talk securely with a new key They both trust Trent Assume Alice & Bob each share a key with Trent How do Alice and Bob get a shared key?

Who knows what at this point? Step One KA KB Alice Bob Alice Requests Session Key for Bob Who knows what at this point? Trent

Who knows what at this point? Step Two KA KB Alice Bob EKA(KS), EKB(KS) Who knows what at this point? EKA(KS), EKB(KS) Trent KS

Who knows what at this point? Step Three KS KS EKB(KS) KA KB Alice Bob EKA(KS), EKB(KS) Who knows what at this point? Trent KS

What Has the Protocol Achieved? Alice and Bob both have a new session key The session key was transmitted using keys known only to Alice and Bob Both Alice and Bob know that Trent participated But there are vulnerabilities

Problems With the Protocol What if the initial request was grabbed by Mallory? Could he do something bad that ends up causing us problems? Yes!

The Man-in-the-Middle Attack A class of attacks where an active attacker interposes himself secretly in a protocol Allowing alteration of the effects of the protocol Without necessarily attacking the encryption

Applying the Man-in-the-Middle Attack KA Mallory KB KM Alice Bob Alice Requests Session Key for Mallory More precisely, what do they think they know? Alice Requests Session Key for Bob Who knows what at this point? Trent

Trent Does His Job KA Mallory KB KM Alice Bob EKA(KS), EKM(KS) Trent

Alice Gets Ready to Talk to Bob EKM(KS) KS KA Mallory KB KM Alice Bob KS EKM(KS) Mallory can now masquerade as Bob EKM(KS) Trent

Really Getting in the Middle KA Mallory KB KM Alice KS1 Bob KS EKM(KS1), EKB(KS1) KS EKB(KS1) KS1 Mallory can also ask Trent for a key to talk to Bob Trent

Mallory Plays Man-in-the-Middle Alice KS1 Bob KS KS KS1 Alice’s big secret EKS(Alice’s big secret) Bob’s big secret Alice’s big secret EKS1(Alice’s big secret) EKS(Alice’s big secret) EKS1(Bob’s big secret) EKS1(Bob’s big secret) EKS(Bob’s big secret) EKS(Bob’s big secret) Alice’s big secret Bob’s big secret Bob’s big secret

Defeating the Man In the Middle Problems: 1). Trent doesn’t really know what he’s supposed to do 2). Alice doesn’t verify he did the right thing Minor changes can fix that 1). Encrypt request with KA 2). Include identity of other participant in response - EKA(KS, Bob)

Applying the First Fix KB KA KM Alice Bob Mallory Mallory can’t read the request EKA(Alice Requests Session Key for Bob) And Mallory can’t forge or alter Alice’s request Trent KB

But There’s Another Problem A replay attack Replay attacks occur when Mallory copies down a bunch of protocol messages And then plays them again In some cases, this can wreak havoc Why does it here?

Step One KA KB Alice Mallory Bob EKA(Alice Requests Session Key for Trent

Step Two KA KB Alice Mallory Bob EKA(KS), EKB(KS) Trent KS EKA(Alice Requests Session Key for Bob) Bob EKA(KS), EKB(KS) EKA(KS), EKB(KS) Trent KS

What can Mallory do with his saved messages? Step Three KS KS EKB(KS) KA KB Alice Mallory EKA(Alice Requests Session Key for Bob) Bob EKA(KS), EKB(KS) EKA(KS), EKB(KS) EKB(KS) What can Mallory do with his saved messages? Trent KS

Mallory Waits for His Opportunity EKA(KS), EKB(KS) KA KB Mallory EKA(Alice Requests Session Key for Bob) EKA(KS), EKB(KS) EKA(Alice Requests Session Key for Bob) EKB(KS)

What Will Happen Next? KS KS EKB(KS) KA KB Mallory KS EKA(Alice Requests Session Key for Bob) KS EKA(KS), EKB(KS) What’s so bad about that? EKB(KS) What if Mallory has cracked KS?

Key Exchange With Public Key Cryptography With no trusted arbitrator Alice sends Bob her public key Bob sends Alice his public key Alice generates a session key and sends it to Bob encrypted with his public key, signed with her private key Bob decrypts Alice’s message with his private key Encrypt session with shared session key

Basic Key Exchange Using PK KEA , KDA KEB , KDB Alice’s PK is KDA Bob’s PK is KDB EKEA(EKDB(KS)) Bob Alice EKDB(KS) KS KS Bob verifies the message came from Alice Bob extracts the key from the message

Man-in-the-Middle With Public Keys KEA , KDA KEM , KDM KEB , KDB Mallory Alice’s PK is KDA Alice’s PK is KDM Alice Bob Now Mallory can pose as Alice to Bob

And Bob Sends His Public Key KEA , KDA KEM , KDM KEB , KDB Mallory Bob’s PK is KDM Bob’s PK is KDB Alice Bob Now Mallory can pose as Bob to Alice

Alice Chooses a Session Key KEA , KDA KEM , KDM KEB , KDB EKEA (EKDM(KS)) Mallory EKEM (EKDB(KS)) KS KS KS Alice Bob Bob and Alice are sharing a session key Unfortunately, they’re also sharing it with Mallory

Combined Key Distribution and Authentication Usually the first requires the second Not much good to be sure the key is a secret if you don’t know who you’re sharing it with How can we achieve both goals? In a single protocol With relatively few messages

Needham-Schroeder Key Exchange Uses symmetric cryptography Requires a trusted authority Who takes care of generating the new key More complicated than some protocols we’ve seen

Needham-Schroeder, Step 1 KA KB RA Alice,Bob,RA Alice Bob Trent KA KB

What’s the Point of RA? RA is random number chosen by Alice for this invocation of the protocol Not used as a key, so quality of Alice’s random number generator not too important Helps defend against replay attacks This kind of random number is sometimes called a nonce

Needham-Schroeder, Step 2 KA Including RA prevents replay KB Including Bob prevents attacker from replacing Bob’s identity RA EKA(RA,Bob,KS, EKB(KS,Alice)) Alice Bob Including the encrypted message for Bob ensures Bob’s message can’t be replaced What’s all this stuff for? Trent RA KS KA KB

Needham-Schroeder, Step 3 EKB(KS,Alice) KA KB KS Alice So we’re done, right? Bob KS Wrong! Trent KA KB

Needham-Schroeder, Step 4 EKS(RB) KB KA KS KS Alice Bob RB RB Trent KA KB

Needham-Schroeder, Step 5 EKS(RB-1) KB KA KS KS Alice Bob RB RB Now we’re done! RB-1 Trent KA KB

What’s All This Extra Stuff For? Alice knows she’s talking to Bob KA KB EKA(RA,Bob,KS, EKB(KS,Alice)) Alice Bob Trent said she was Can Mallory jump in later? No, only Bob could read the key package Trent created Trent KS KA KB

What’s All This Extra Stuff For? Bob knows he’s talking to Alice EKB(KS,Alice) KA KB Trent said he was KS Alice Bob Can Mallory jump in later? What about those random numbers? No, all later messages will use KS, which Mallory doesn’t know Trent KA KB

Mallory Causes Problems Alice and Bob do something Mallory likes Mallory watches the messages they send to do so Mallory wants to make them do it again Can Mallory replay the conversation? Let’s try it without the random numbers

Mallory Waits For His Chance EKA(Bob,KS, EKB(KS,Alice)) KB KA Alice,Bob Alice Bob Mallory Trent KA KB

What Will Alice Do Now? The message could only have been created by Trent It properly indicates she wants to talk to Bob It contains a perfectly plausible key Alice will probably go ahead with the protocol

The Protocol Continues EKB(KS,Alice) KB KA Mallory KS KS Alice Bob Mallory steps aside for a bit With no nonces, we’re done Trent KA KB

So What’s the Problem? Alice and Bob agree KS is their key They both know the key Trent definitely created the key for them Nobody else has the key But . . .

Mallory Steps Back Into the Picture EKS(Old message 1) EKS(Old message 2) KB KA Mallory KS KS Alice Bob Mallory can replay Alice and Bob’s old conversation It’s using the current key, so Alice and Bob will accept it Trent KA KB

How Do the Random Numbers Help? Alice’s random number assures her that the reply from Trent is fresh But why does Bob need another random number?

Why Bob Also Needs a Random Number KB KA Mallory EKB(KS,Alice) KS Alice Bob Let’s say Alice doesn’t want to talk to Bob But Mallory wants Bob to think Alice wants to talk Trent KA KB

So What? KB KS Bob Mallory EKS(Old message 1) KS Bob Mallory can now play back an old message from Alice to Bob And Bob will have no reason to be suspicious Bob’s random number exchange assures him that Alice really wanted to talk

So, Everything’s Fine, Right? Not if any key KS ever gets divulged Once KS is divulged, Mallory can forge Alice’s response to Bob’s challenge And convince Bob that he’s talking to Alice when he’s really talking to Mallory

Mallory Cracks an Old Key EKS(RB) KB KS Mallory EKB(KS,Alice) EKS(RB - 1) RB KS Bob RB - 1 Mallory compromises 10,000 computers belonging to 10,000 grandmothers to crack KS Unfortunately, Mallory knows KS So Mallory can answer Bob’s challenge

Timestamps in Security Protocols One method of handling this kind of problem is timestamps Proper use of timestamps can limit the time during which an exposed key is dangerous But timestamps have their own problems

Using Timestamps in the Needham-Schroeder Protocol The trusted authority includes timestamps in his encrypted messages to Alice and Bob Based on a global clock When Alice or Bob decrypts, if the timestamp is too old, abort the protocol

Using Timestamps to Defeat Mallory KB Mallory EKB(KS,Alice,TX) KS KS Bob TX TX << Tnow EKB(KS,Alice,TX) Tnow Now Bob checks TX against his clock So Bob, fearing replay, discards KS And Mallory’s attack is foiled

Problems With Using Timestamps They require a globally synchronized set of clocks Hard to obtain, often Attacks on clocks become important They leave a window of vulnerability

The Suppress-Replay Attack Assume two participants in a security protocol Using timestamps to avoid replay problems If the sender’s clock is ahead of the receiver’s, attacker can intercept message And replay later, when receiver’s clock still allows it

Handling Clock Problems 1). Rely on clocks that are fairly synchronized and hard to tamper with Perhaps GPS signals 2). Make all comparisons against the same clock So no two clocks need to be synchronized

Is This Overkill? Some of these attacks are pretty specialized Requiring special access or information Some can only achieve certain limited effects Do we really care?

Why Should We Care? Bad guys are very clever Apparently irrelevant vulnerabilities give them room to show that Changes in how you use protocols can make vulnerabilities more relevant A protocol without a vulnerability is always better Even if you currently don’t care

Something to Bear in Mind These vulnerabilities aren’t specific to just these protocols They are common and pop up all over Even in cases where you aren’t thinking about a “protocol” Important to understand them at a high conceptual level