Lecture 5: Protocols - Authentication and Key Exchange CS 436/636/736 Spring 2015 Nitesh Saxena.

Slides:



Advertisements
Similar presentations
Chapter 14 – Authentication Applications
Advertisements

Authentication Applications. will consider authentication functions will consider authentication functions developed to support application-level authentication.
Key Management. Shared Key Exchange Problem How do Alice and Bob exchange a shared secret? Offline – Doesnt scale Using public key cryptography (possible)
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
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.
CS470, A.SelcukCryptographic Authentication1 Cryptographic Authentication Protocols CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
1 Security Handshake Pitfalls. 2 Authentication Handshakes Secure communication almost always includes an initial authentication handshake: –Authenticate.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Chapter 14 From Cryptography and Network Security Fourth Edition written by William Stallings, and Lecture slides by Lawrie Brown, the Australian Defence.
Cryptography and Network Security Chapter 13 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
1 Digital Signatures & Authentication Protocols. 2 Digital Signatures have looked at message authentication –but does not address issues of lack of trust.
1 Chapter 13 – Digital Signatures & Authentication Protocols Fourth Edition by William Stallings Lecture slides by Lawrie Brown (modified by Prof. M. Singhal,
Cryptography and Network Security (CS435) Part Eleven (Digital Signatures and Authentication Protocols)
Public-key based. Public-key Techniques based Protocols –may use either weak or strong passwords –high computation complexity (Slow) –high deployment.
 Authorization via symmetric crypto  Key exchange o Using asymmetric crypto o Using symmetric crypto with KDC  KDC shares a key with every participant.
CS555Spring 2012/Topic 161 Cryptography CS 555 Topic 16: Key Management and The Need for Public Key Cryptography.
SMUCSE 5349/73491 Authentication Protocols. SMUCSE 5349/73492 The Premise How do we use perfect cryptographic mechanisms (signatures, public-key and symmetric.
CMSC 414 Computer and Network Security Lecture 21 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 17 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 16 Jonathan Katz.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 7 Wenbing Zhao Department of Electrical and Computer Engineering.
CMSC 414 Computer and Network Security Lecture 22 Jonathan Katz.
Modelling and Analysing of Security Protocol: Lecture 1 Introductions to Modelling Protocols Tom Chothia CWI.
CSE331: Introduction to Networks and Security Lecture 24 Fall 2002.
CMSC 414 Computer and Network Security Lecture 24 Jonathan Katz.
EEC 688/788 Secure and Dependable Computing Lecture 7 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 23 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 17 Jonathan Katz.
CMSC 414 Computer (and Network) Security Lecture 24 Jonathan Katz.
Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE CSci530: Computer Security Systems Authentication.
CMSC 414 Computer and Network Security Lecture 13 Jonathan Katz.
Alexander Potapov.  Authentication definition  Protocol architectures  Cryptographic properties  Freshness  Types of attack on protocols  Two-way.
Computer Science Public Key Management Lecture 5.
1 Lecture 18: Security issues specific to security key management services –privacy –integrity/authentication –nonrepudiation/plausible deniability.
Lecture 3.2: Public Key Cryptography II CS 436/636/736 Spring 2014 Nitesh Saxena.
8-1Network Security Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message integrity, authentication.
Lecture 3.4: Public Key Cryptography IV CS 436/636/736 Spring 2013 Nitesh Saxena.
Chapter 3: Basic Protocols Dulal C. Kar. Key Exchange with Symmetric Cryptography Session key –A separate key for one particular communication session.
Chapter 21 Distributed System Security Copyright © 2008.
Network Security Lecture 23 Presented by: Dr. Munam Ali Shah.
23-1 Last time □ P2P □ Security ♦ Intro ♦ Principles of cryptography.
Cryptography and Network Security Chapter 13 Fourth Edition by William Stallings.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
Lecture 6.2: Protocols - Authentication and Key Exchange II CS 436/636/736 Spring 2012 Nitesh Saxena.
14.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 14 Entity Authentication.
Lecture 5.2: Key Distribution: Private Key Setting CS 436/636/736 Spring 2012 Nitesh Saxena.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Cryptography and Network Security Chapter 14 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
Network Security Lecture 25 Presented by: Dr. Munam Ali Shah.
Lecture 6.1: Protocols - Authentication and Key Exchange I CS 436/636/736 Spring 2012 Nitesh Saxena.
The School of Electrical Engineering and Computer Science (EECS) CS/ECE Network Security Dr. Attila Altay Yavuz Authentication Protocols (I): Secure Handshake.
Network Security Continued. Digital Signature You want to sign a document. Three conditions. – 1. The receiver can verify the identity of the sender.
Computer and Network Security - Message Digests, Kerberos, PKI –
Lecture 5.1: Message Authentication Codes, and Key Distribution
1 Authentication Protocols Rocky K. C. Chang 9 March 2007.
1 Authenticated Key Exchange Rocky K. C. Chang 20 March 2007.
1 Secure Key Exchange: Diffie-Hellman Exchange Dr. Rocky K. C. Chang 19 February, 2002.
Lesson Introduction ●Authentication protocols ●Key exchange protocols ●Kerberos Security Protocols.
@Yuan Xue CS 285 Network Security Key Distribution and Management Yuan Xue Fall 2012.
Pertemuan #8 Key Management Kuliah Pengaman Jaringan.
Dr. Nermin Hamza.  Attacks:  Traffic Analysis : traffic analysis occurs when an eavesdroppers observes message traffic on network. Not understand the.
Fourth Edition by William Stallings Lecture slides by Lawrie Brown
پروتكلهاي احرازاصالت Authentication protocols
Lecture 5: Protocols - Authentication and Key Exchange
Lecture 6.1: Protocols - Authentication and Key Exchange I
Diffie/Hellman Key Exchange
Lecture 6.2: Protocols - Authentication and Key Exchange II
Presentation transcript:

Lecture 5: Protocols - Authentication and Key Exchange CS 436/636/736 Spring 2015 Nitesh Saxena

Course Admin Mid-Term Grading – Will be done very soon – Scores will be posted online and graded exams distribute post-break – Will the solution set too Any questions regarding the exam – Perhaps we can quickly review? 12/12/2015 Protocols: Authentication and Key Exchange 2

Course Admin HW3 will be posted by this weekend – Due in days as usual – Covers key distribution+protocols Spring break next week 3

Outline of Today’s lecture Today we try to put everything together – Encryption (public-key/private-key) – MACs – Signing – Key-Distribution Secure protocols (for secure communication) – Authentication We studied it somewhat while talking about key distribution – (Authenticated-) Key Exchange Designing secure protocols is hard – we’ll only be able to learn the basics today We’ll use the board extensively today – be prepared to take notes 12/12/2015 Protocols: Authentication and Key Exchange 4

Protocol A protocol is a set of rules using which two or more entities exchange messages It consists of messages and rounds 12/12/2015 Protocols: Authentication and Key Exchange 5

Messages and Rounds A message is a unit of information send from one entity to other A round is a basic unit of protocol time 1.Wake up because of 1.Alarm (or clock) 2.Intial start or 3.Receipt of message(s) from other(s) 2.Compute something 3.Send message(s) to other(s) 4.Repeat 2-3 if needed 5.Wait for message(s) or clock 12/12/2015 Protocols: Authentication and Key Exchange 6

Types of Adversaries Passive – Eavesdrop, delay, and replay messages Active – Eavesdrop, delay, drop, replay and modify messages 12/12/2015 Protocols: Authentication and Key Exchange 7

Model N parties Any party can initiate the protocol with any other party Each party can be running a number of sessions with any other party at any point 12/12/2015 Protocols: Authentication and Key Exchange 8

Properties of a Secure Protocol Correctness – If entities taking part in the protocol behave honestly, (and also if there are no transmission errors) the protocol achieves its desired goal In other words, if everything works as expected, does the protocol satisfy its desired goal? Security – No adversary can defeat the goal of the protocol (with a significantly high probability) Adversary could be passive or active, depending upon the application (we consider the latter) We won’t consider denial-of-service attacks 12/12/2015 9

Adversary and Security Model Different session should use different keys Compromise of one session should not lead to the compromise of any other session Adversary is an active adversary and a part of the system “Simply forwarding” adversary is NOT considered an adversary against the protocol – Why? – Message authentication (m’) – Key exchange 10

AuthenticationFocus Entity Authentication – Verification of the identity of the sender of the message Authentication can be unilateral or mutual 12/12/2015 Protocols: Authentication and Key Exchange 11

Basis for Authentication Something you know – e.g., a PIN, a password Something you have – e.g., an access key or a card; a certificate; a smart card; an RFID tag Something you are – e.g., biometric (such as fingerprint) 12/12/2015 Protocols: Authentication and Key Exchange 12

Weak Authentication PINs, Passwords provide weak authentication – Security is based upon how hard the the pin/password is to guess – Usually, the passwords are short and weak – Vulnerable to dictionary attacks Widely used in practice – Unix, web s,…… Protocol (A authenticates to B using a password P, that A shares with B) 1.A  B:Hi, this is A! 2.B  A: r (random challenge) 3.A  B: H(p,r) Problem? 12/12/2015 Protocols: Authentication and Key Exchange 13

Strong Authentication An entity authenticates to the other by proving the knowledge of a secret associated with that entity, without revealing anything meaningful about the secret itself Can be achieved through: – Private/Public Key Encryption – MAC – Digital signatures Strong because the security reduces to the security of the underlying cryptographic primitive, which is assumed to be hard to break Our focus in the rest of the lecture We’ll study both private-key and public-key based authentication 12/12/2015 Protocols: Authentication and Key Exchange 14

Symm. Encryption-based authentication Uses encryption to authenticate Alice to Bob (assuming Alice-Bob have established a shared secret K, say through Kerberos) A auth B 1.A  B: Hi Bob, this is Alice! 2.B  A: r (a challenge) 3.A  B: Enc K (r,B) (response) Why not simply send Enc K (r) in msg 3? Reflection Attack 12/12/2015 Protocols: Authentication and Key Exchange 15

Security of the previous protocol An attacker needs to come up with a valid response – Impossible if encryption is secure r must not be re-used by Bob – Why? 12/12/2015 Protocols: Authentication and Key Exchange 16

Freshness Assurance that message has not been used previously and originated within an acceptably recent timeframe Two methods: – Nonce (Number used once) – Timestamps 12/12/2015 Protocols: Authentication and Key Exchange 17

Nonces One-time random number We depended on B to make sure r is a good nonce Choose nonces “randomly” from a large space (such as ) to avoid re-use and for unpredictability – good RNG 12/12/2015 Protocols: Authentication and Key Exchange 18

Timestamps Inclusion of date/time-stamp in the message allows recipient to check it for freshness – Need to be protected with cryptographic means A  B: Enc K (T,B) – Results in fewer messages and rounds But, requires synchronized clocks – hard to achieve in practice! 12/12/2015 Protocols: Authentication and Key Exchange 19

Encryption-based Mutual Authentication (1) Run two copies of the uni-lateral authentication protocol  4 rounds We can piggyback common flows 1.A  B: A, rA 2.B  A:Enc K (rB, rA, A) 3.A  B:Enc K (rA, rB) 12/12/2015 Protocols: Authentication and Key Exchange 20

Encryption-based Mutual Authentication (2) 1.A  B: A, Enc K (T,B) 2.B  A:Enc K (T+1,A) 12/12/2015 Protocols: Authentication and Key Exchange 21

Session Key Exchange with KDC – Needham- Schroeder Protocol A -> KDC ID A || ID B || N 1 (Hello, I am Alice, I want to talk to Bob, I need a session Key and here is a random nonce identifying this request) KDC -> A E K A ( K || ID B || N 1 || E K B (K || ID A )) Encrypted(Here is a key, for you to talk to Bob as per your request N 1 and also an envelope to Bob containing the same key) A -> B E K B (K || ID A ) (I would like to talk using key in envelope sent by KDC) B -> A E K (N 2 ) (OK Alice, But can you prove to me that you are indeed Alice and know the key?) A -> B E K (f(N 2 )) (Sure I can!) 12/12/2015 Protocols: Authentication and Key Exchange 22

Session Key Exchange with KDC – Needham- Schroeder Protocol (corrected version with mutual authentication) A -> KDC: ID A || ID B || N 1 (Hello, I am Alice, I want to talk to Bob, I need a session Key and here is a random nonce identifying this request) KDC -> A: E K A ( K || ID B || N 1 || E K B (TS1, K || ID A )) Encrypted(Here is a key, for you to talk to Bob as per your request N 1 and also an envelope to Bob containing the same key) A -> B: E K (TS2,B), E K B (TS1, K || ID A ) (I would like to talk using key in envelope sent by KDC; here is an authenticator) B -> A: E K (TS2+1,A) (OK Alice, here is a proof that I am really Bob) 12/12/2015 Protocols: Authentication and Key Exchange 23

Version 4 summary 12/12/2015 Protocols: Authentication and Key Exchange 24

MAC-based Authentication 1.A  B: A, rA 2.B  A:rB, HMAC K (rB, rA, A) 3.A  B:HMAC K (rA, rB,B) Faster than enc-based protocols (computationally) 12/12/2015 Protocols: Authentication and Key Exchange 25

Public-key based authentication (Needham-Shroeder (NS) pk-based) Assuming public keys are distributed through CA(s) 1.A  B: Enc pkb (rA, A) 2.B  A:Enc pka (rA, rB) 3.A  B:Enc pkb (rB) 12/12/2015 Protocols: Authentication and Key Exchange 26

Attack and fix on PK-based NS protocol Attack: Fix: 1.A  B: Enc pkb (rA, A) 2.B  A:Enc pka (rA, rB,B) 3.A  B:Enc pkb (rB) 12/12/2015 Protocols: Authentication and Key Exchange 27

Signature-based authentication (assuming public keys are distributed through CA) A auth B A  B: Hi Bob, this is Alice! B  A: r (a challenge) A  B: Sig SKa (r,B) (response) A auth B, B auth A (run two copies; piggyback common flows) A  B: A, rA (could sign this too) B  A:rB, Sig SKb (rB, rA, A) A  B:Sig SKa (rA,rB,B) 12/12/2015 Protocols: Authentication and Key Exchange 28

Authenticated Key Exchange (AKE) Public-key operations are costly Why not 1.use public-key mutual authentication protocols to exchange a symmetric key 2.use this symmetric key with a symmetric encryption to secure subsequent communication 12/12/2015 Protocols: Authentication and Key Exchange 29

Security Notion for AKE Launch protocol between any pair Reveal all session key except one Try to distinguish the key of the unrevealed session from random This captures: the compromise of other sessions should not lead to the compromise of any other session 12/12/2015 Protocols: Authentication and Key Exchange 30

AKE Protocol 1.A  B: A, rA, Enc PKb (K) (must sign this too??) 2.B  A:rB, Sig SKb (rB, rA, A) 3.A  B:Sig SKa (rA, rB, B) 4.A and B output K as the authenticated key Such a protocol can be instantiated using RSA encryption/signing – The way SSL/SSH establishes key But, generally only the server authenticates to the client, not vice versa 12/12/2015 Protocols: Authentication and Key Exchange 31

X.509: One-Way Authentication 1 message ( A->B) used to establish – the identity of A and that message is from A – message was intended for B – integrity & originality of message 12/12/2015 Protocols: Authentication and Key Exchange 32 A B 1-A {ta,ra,B,sgnData,KUb[Kab]} Ta-timestamp rA=nonce B =identity sgnData=signed with A’s private key

X.509: Two-Way Authentication 2 messages (A->B, B->A) which also establishes in addition: – the identity of B and that reply is from B – that reply is intended for A – integrity & originality of reply 12/12/2015 Protocols: Authentication and Key Exchange 33 A B 1-A {ta,ra,B,sgnData,KUb[Kab]} 2-B {tb,rb,A,sgnData,KUa[Kba]}

X.509: Three-Way Authentication 3 messages (A->B, B->A, A->B) which enables above authentication without the need for synchronized clocks 12/12/2015 Protocols: Authentication and Key Exchange 34 A B 1- A {ta,ra,B,sgnData,KUb[Kab]} 2 -B {tb,rb,A,sgnData,KUa[Kab]} 3- A{rb}

Discrete Logarithm Assumption p, q primes such that q|p-1 g’ be the generator of Z p * g is an element of order q and generates a group G q of order q; g = g’ (p-1)/q x in Z q, y = g x mod p Given (p, q, g, y), it is computationally hard to compute x – No polynomial time algorithm known – p should be 1024-bits and q be 160-bits x becomes the private key and y becomes the public key 12/12/2015 Protocols: Authentication and Key Exchange 35

Example of DL-based system Let’s construct an example KeyGen: – p = 11, q = 2 or 5; let’s say q = 5 – 2 is a generator of Z 11 * – g = 2 2 = 4 – x = 2; y = 4 2 mod 11 = 5 12/12/2015 Protocols: Authentication and Key Exchange 36

Diffie-Hellman (DH) Key Exchange 1.A  B: K a = g a mod p 2.B  A:K b = g b mod p 3.A outputs K ab = K b a 4.B outputs K ba = K a b Note K ab = K ba = g ab mod p 12/12/2015 Protocols: Authentication and Key Exchange 37

Security of DH key exchange No authentication of either party Secure only against a passive adversary – Under the computational Diffie-Hellman assumption Given (g, g a,g b ), hard to compute g ab Not secure against an active attacker – Man-in-the-middle attack… 12/12/2015 Protocols: Authentication and Key Exchange 38

Authenticated DH Key Exchange 1.A  B: K a = g a mod p 2.B  A:Cert b, K b = g b mod p Enc Kba [Sig SKb (K b, K a )] 3.A  B:Cert a, Enc Kab [Sig SKa (K a,K b )] 4.A outputs K ab = K b a 5.B outputs K ba = K a b 12/12/2015 Protocols: Authentication and Key Exchange 39

Summary Designing secure protocols is not easy – Becomes harder in a concurrent setting, where there are multiple parties, executing multiple instances of the protocols simultaneously – Becomes even harder as the number of parties increase; n-party or group setting Use the protocols that are well-studied and standardized While designing a protocol, consider – Reflection attacks – Replay attacks – Eliminating any symmetry in the messages 12/12/2015 Protocols: Authentication and Key Exchange 40

Further Reading HAC – chapter 10 Stallings – Chapter 15 12/12/2015 Protocols: Authentication and Key Exchange 41