Understanding Cryptography by Christof Paar and Jan Pelzl www.crypto-textbook.com Chapter 13 – Key Establishment ver. Jan 7, 2010 These slides were prepared.

Slides:



Advertisements
Similar presentations
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.
Advertisements

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.
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
Digital Signatures and Hash Functions. Digital Signatures.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (4) Information Security.
Chapter 14 From Cryptography and Network Security Fourth Edition written by William Stallings, and Lecture slides by Lawrie Brown, the Australian Defence.
Chapter 5 Network Security Protocols in Practice Part I
Mar 12, 2002Mårten Trolin1 This lecture Diffie-Hellman key agreement Authentication Certificates Certificate Authorities SSL/TLS.
CSCI283 Fall 2005 GWU All slides from Bishop’s slide set Public Key Infrastructure (PKI)
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 6 Wenbing Zhao Department of Electrical and Computer Engineering.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 29 Cryptography and Network.
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
November 1, 2006Sarah Wahl / Graduate Student UCCS1 Public Key Infrastructure By Sarah Wahl.
Mar 4, 2003Mårten Trolin1 This lecture Diffie-Hellman key agreement Authentication Certificates Certificate Authorities.
8-1 What is network security? Confidentiality: only sender, intended receiver should “understand” message contents m sender encrypts message m receiver.
Mar 5, 2002Mårten Trolin1 Previous lecture More on hash functions Digital signatures Message Authentication Codes Padding.
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.
Kemal AkkayaWireless & Network Security 1 Department of Computer Science Southern Illinois University Carbondale CS 591 – Wireless & Network Security Lecture.
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.
Topic 11: Key Distribution and Agreement 1 Information Security CS 526 Topic 11: Key Distribution & Agreement, Secure Communication.
Key Distribution CS 470 Introduction to Applied Cryptography
Introduction to Public Key Infrastructure (PKI) Office of Information Security The University of Texas at Brownsville & Texas Southmost College.
Cryptography and Network Security Chapter 10. Chapter 10 – Key Management; Other Public Key Cryptosystems No Singhalese, whether man or woman, would venture.
Security Management.
1 CS 194: Distributed Systems Security Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
Computer Science CSC 774Dr. Peng Ning1 CSC 774 Advanced Network Security Topic 2. Review of Cryptographic Techniques.
Alexander Potapov.  Authentication definition  Protocol architectures  Cryptographic properties  Freshness  Types of attack on protocols  Two-way.
Computer Science Public Key Management Lecture 5.
CMSC 414 Computer and Network Security Lecture 14 Jonathan Katz.
Network Security. An Introduction to Cryptography The encryption model (for a symmetric-key cipher).
Part Two Network Security Applications Chapter 4 Key Distribution and User Authentication.
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 10 – Digital Signatures.
Csci5233 Computer Security1 Bishop: Chapter 10 (Cont.) Key Management: Storage & Revoking.
Cryptography, Authentication and Digital Signatures
10. Key Management. Contents Key Management  Public-key distribution  Secret-key distribution via public-key cryptography.
Midterm Review Cryptography & Network Security
Chapter 3: Basic Protocols Dulal C. Kar. Key Exchange with Symmetric Cryptography Session key –A separate key for one particular communication session.
Chapter 31 Cryptography And Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
23-1 Last time □ P2P □ Security ♦ Intro ♦ Principles of cryptography.
Understanding Cryptography by Christof Paar and Jan Pelzl These slides were prepared by Christof Paar and Jan Pelzl Chapter 8 –
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
Digital Signatures, Message Digest and Authentication Week-9.
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 11 – Hash Functions.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Understanding Cryptography by Christof Paar and Jan Pelzl These slides were prepared by Tim Güneysu, Christof Paar and Jan Pelzl.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Cryptographic Security Identity-Based Encryption.
Computer and Network Security - Message Digests, Kerberos, PKI –
Key Management. Authentication Using Public-Key Cryptography  K A +, K B + : public keys Alice Bob K B + (A, R A ) 1 2 K A + (R A, R B,K A,B ) 3 K A,B.
Protocol Analysis. CSCE Farkas 2 Cryptographic Protocols Two or more parties Communication over insecure network Cryptography used to achieve goal.
Key Management Network Systems Security Mort Anvari.
1 Authenticated Key Exchange Rocky K. C. Chang 20 March 2007.
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
Fall 2006CS 395: Computer Security1 Key Management.
9.2 SECURE CHANNELS JEJI RAMCHAND VEDULLAPALLI. Content Introduction Authentication Message Integrity and Confidentiality Secure Group Communications.
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.
CPIS 312 Chapter Four: PUBLIC KEY CRYPTO. Index 2 A.Introduction A.1 Asymmetric Key Cryptography- Introduction A.2 General ideas about the Public Key.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Understanding Cryptography by Christof Paar and Jan Pelzl These slides were prepared by Christof Paar and Jan Pelzl Chapter 12.
Chapter 13 – Key Establishment ver. Jan 7, 2010
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 10 – Digital Signatures.
Chapter 4 Cryptography / Encryption
Presentation transcript:

Understanding Cryptography by Christof Paar and Jan Pelzl Chapter 13 – Key Establishment ver. Jan 7, 2010 These slides were prepared by Christof Paar and Jan Pelzl

 The slides can used free of charge. All copyrights for the slides remain with Christof Paar and Jan Pelzl.  The title of the accompanying book “Understanding Cryptography” by Springer and the author’s names must remain on each slide.  If the slides are modified, appropriate credits to the book authors and the book title must remain within the slides.  It is not permitted to reproduce parts or all of the slides in printed form whatsoever without written consent by the authors. Some legal stuff (sorry): Terms of Use 2/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Introduction  The n 2 Key Distribution Problem  Symmetric Key Distribution  Asymmetric Key Distribution  Man-in-the-Middle Attack  Certificates  Public-Key Infrastructure  Content of this Chapter 3/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Classification of Key Establishment Methods In an ideal key agreement protocol, no single party can control what the key value will be. 4/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

It is often desirable to frequently change the key in a cryptographic system. Reasons for key freshness include:  If a key is exposed (e.g., through hackers), there is limited damage if the key is changed often  Some cryptographic attacks become more difficult if only a limited amount of ciphertext was generated under one key  If an attacker wants to recover long pieces of ciphertext, he has to recover several keys which makes attacks harder  Key Freshness 5/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Key Derivation  In order to achieve key freshness, we need to generate new keys frequently.  Rather than performing a full key establishment every time (which is costly in terms of computation and/or communication), we can derive multiple session keys k ses from a given key k AB.  The key k AB is fed into a key derivation function together with a nonce r („number used only once“).  Every different value for r yields a different session key 6/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Key Derivation  The key derivation function is a computationally simple function, e.g., a block cipher or a hash function AliceBob generate nonce r derive session key K ses = e kAB (r) r  Example for a basic protocol: 7/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Introduction  The n 2 Key Distribution Problem  Symmetric Key Distribution  Asymmetric Key Distribution  Man-in-the-Middle Attack  Certificates  Public-Key Infrastructure  Content of this Chapter 8/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 The n 2 Key Distribution Problem  Simple situation: Network with n users. Every user wants to communicate securely with every of the other n-1 users.  Naïve approach: Every pair of users obtains an individual key pair 9/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 The n 2 Key Distribution Problem Shortcomings  There are n (n-1) ≈ n 2 keys in the system  There are n (n-1)/2 key pairs  If a new user Esther joins the network, new keys k XE have to be transported via secure channels (!) to each of the existing usersa  Only works for small networks which are relatively static Example: mid-size company with 750 employees  750 x 749 = 561,750 keys must be distributed securely 10/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Introduction  The n 2 Key Distribution Problem  Symmetric Key Distribution  Asymmetric Key Distribution  Man-in-the-Middle Attack  Certificates  Public-Key Infrastructure  Content of this Chapter 11/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Key Establishment with Key Distribution Center AliceBob derive session key K ses = e KA (y A ) KDC KEK: k A KEKs: k A, k B KEK: k B RQST (ID A,ID B ) generate session key k ses y A = e KA (k ses ) y B = e KB (k ses ) yAyA yByB derive session key K ses = e KB (y B ) y= e Kses (x) y x= e -1 Kses (y)  Key Distribution Center (KDC) = Central party, trusted by all users  KDC shares a key encryption key (KEK) with each user  Principle: KDC sends session keys to users which are encrypted with KEKs message y 12/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Key Establishment with Key Distribution Center  Advantages over previous approach:  Only n long-term key pairs are in the system  If a new user is added, a secure key is only needed between the user and the KDC (the other users are not affected)  Scales well to moderately sized networks  Kerberos (a popular authentication and key distribution protocol) is based on KDCs  More information on KDCs and Kerberos: Section 13.2 of Understanding Cryptography 13/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Key Establishment with Key Distribution Center Remaining problems:  No Perfect Forward Secrecy: If the KEKs are compromised, an attacker can decrypt past messages if he stored the corresponding ciphertext  Single point of failure: The KDC stores all KEKs. If an attacker gets access to this database, all past traffic can be decrypted.  Communication bottleneck: The KDC is involved in every communication in the entire network (can be countered by giving the session keys a long life time)  For more advanced attacks (e.g., key confirmation attack): Cf. Section 13.2 of Understanding Cryptography 14/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Introduction  The n 2 Key Distribution Problem  Symmetric Key Distribution  Asymmetric Key Distribution  Man-in-the-Middle Attack  Certificates  Public-Key Infrastructure  Content of this Chapter 15/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

Alice  Recall: Diffie–Hellman Key Exchange (DHKE) Bob Choose random private key k prA = a ∈ {1, 2,…, p-1} Choose random private key k prB = b ∈ {1, 2,…, p-1} Compute public key k pubA = A = α a mod p Compute public key k pubB = B = α b mod p Compute common secret k AB = B a = (α a ) b mod p Compute common secret k AB = A b = (α b ) a mod p A B  Widely used in practice  If the parameters are chosen carefully (especially a prime p > ), the DHKE is secure against passive (i.e., listen-only) attacks  However: If the attacker can actively intervene in the communciation, the man-in-the-middle attack becomes possible Public parameters α, p 16/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

Alice  Man-in-the-Middle Attack Bob k prA = a k pubA = A = α a mod p k AO = (B´) a mod p A  Oscar computes a session key k AO with Alice, and k BO with Bob  However, Alice and Bob think they are communicationg with each other !  The attack efficiently performs 2 DH key-exchanges: Oscar-Alice and Oscar-Bob  Here is why the attack works: k prB = b Oscar k pubB = B = α b mod p A´ substitute A´ = α o mod p B´ B substitute B´ = α o mod p k BO = (A´) b mod p k AO = A o mod p k BO = B o mod p Alice computes: k AO = (B´) a = (α o ) a Oscar computes: k AO = A o = (α a ) o Bob computes: k BO = (A´) b = (α o ) b Oscar computes: k BO = B o = (α a ) o 17/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

Alice  Implications of the Man-in-the-Middle Attack Bob k prA = a k pubA = A = α a mod p k AO = (B´) a mod p A  Oscar has no complete control over the channel, e.g., if Alice wants to send an encrypted message x to Bob, Oscar can read the message: k prB = b Oscar k pubB = B = α b mod p A´ substitute A´ = α o mod p B´ B substitute B´ = α o mod p k BO = (A´) b mod p k AO = A o mod p k BO = B o mod p y = AES kA,O (x) y decrypt x = AES -1 kA,O (y) re-encrypt y´= AES kB,O (x) y´ x = AES -1 kB,O (y´) 18/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Very, very important facts about the Man-in-the-Middle Attack  The man-in-the-middle-attack is not restricted to DHKE; it is applicable to any public-key scheme, e.g. RSA encryption. ECDSA digital signature, etc. etc.  The attack works always by the same pattern: Oscar replaces the public key from one of the parties by his own key.  The attack is also known as MIM attack or Janus attack  Q: What is the underlying problem that makes the MIM attack possible?  A: The public keys are not authenticated: When Alice receives a public key which is allegedly from Bob, she has no way of knowing whether it is in fact his. (After all, a key consists of innocent bits; it does not smell like Bob‘s perfume or anything like that) Even though public keys can be sent over unsecure channels, they require authenticated channels. 19/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Introduction  The n 2 Key Distribution Problem  Symmetric Key Distribution  Asymmetric Key Distribution  Man-in-the-Middle Attack  Certificates  Public-Key Infrastructure  Content of this Chapter 20/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Certificates  In order to authenticate public keys (and thus, prevent the MIM attack), all public keys are digitally signed by a central trusted authority.  Such a construction is called certificate certificate = public key + ID(user) + digital signature over public key and ID  In its most basic form, a certificate for the key k pub of user Alice is: Cert(Alice) = (k pub, ID(Alice), sig K CA (k pub,ID(Alice) )  Certificates bind the identity of user to her public key  The trusted authority that issues the certificate is referred to as certifying authority (CA)  „Issuing certificates“ means in particular that the CA computes the signature sig K CA (k pub ) using its (super secret!) private key k CA  The party who receives a certificate, e.g., Bob, verifies Alice‘s public key using the public key of the CA 21/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

Alice  Diffie–Hellman Key Exchange (DHKE) with Certificates Bob verify certificate ver Kpub,CA (Cert(Bob)) if verification is correct: Compute common secret k AB = B a = (α a ) b mod p if verification is correct: Compute common secret k AB = A b = (α b ) a mod p Cert(Alice) k prA = a k pubA = A Cert(Alice) = ((A, ID A ), sig K CA (A,ID A )) Cert(Bob) k prB = b k pubB = B = α b mod p Cert(Bob) = ((B, ID B ), sig K CA (B,ID B )) verify certificate ver Kpub,CA (Cert(Alice)) CA Cert(Alice) Cert(Bob) 22/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Note that verfication requires the public key of the CA for ver Kpub,CA  In principle, an attacker could run a MIM attack when k pub,CA is being distributed  The public CA keys must also be distributed via an authenticated channel!  Certificates  Q: So, have we gained anything? After all, we try to protect a public key (e.g., a DH key) by using yet another public-key scheme (digital signature for the certificate)?  A: YES! The difference from before (e.g., DHKE without certificates) is that we only need to distribute the public CA key once, often at the set-upt time of the system  Example: Most web browsers are shipped with the public keys of many CAs. The „authenticated channel“ is formed by the (hopefully) correct distribution of the original browser software. 23/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 Introduction  The n 2 Key Distribution Problem  Symmetric Key Distribution  Asymmetric Key Distribution  Man-in-the-Middle Attack  Certificates  Public-Key Infrastructure  Content of this Chapter 24/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

Definition: The entire system that is formed by CAs together with the necessary support mechanisms is called a public-key infrastructure (PKI).  Public-Key Infrastructure 25/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

 In the wild certificates contain much more information than just a public key and a signature.  X509 is a popular signature standard. The main fields of such a certificate are shown to the right.  Note that the „Signature“ at the bottom is computed over all other fields in the certifcate (after hashing of all those fields).  It is important to note that there are two public-key schemes involved in every certificate: 1. The public-key that actually is protected by the signature („Subject‘s Public Key“ on the right). This was the public Diffie-Hellman key in the earlier examples. 2. The digital signature algorithm used by the CA to sign the certificate data.  For more information on certificates, see Section 13.3 of Understanding Cryptography  Certificates in the Real World 26/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl

There are many additional problems when certificates are to be used in systems with a large number of participants. The more pressing ones are: 1. Users communicate which other whose certificates are issued by different CAs  This requires cross-certification of CAs, e.g.. CA1 certifies the public-key of CA2. If Alice trusts „her“ CA1, cross-certification ensures that she also trusts CA2. This is called a „chain of trust“ and it is said that „trust is delegated“. 2. Certificate Revocation Lists (CRLs)  Another real-world problem is that certificates must be revoced, e.g., if a smart card with certificate is lost or if a user leaves an organization. For this, CRLs must be sent out periodically (e.g., daily) which is a burden on the bandwidth of the system. More information on PKIs and CAs can be found in Section 13.3 of Understanding Cryptography  Remaining Issues with PKIs 27/27 Chapter 13 of Understanding Cryptography by Christof Paar and Jan Pelzl