IPSec: Internet Key Exchange

Slides:



Advertisements
Similar presentations
ISA 662 IKE Key management for IPSEC Prof. Ravi Sandhu.
Advertisements

Key Exchange Protocols J. Mitchell CS 259. Next few lectures uToday Key exchange protocols and properties uThursday Cathy Meadows: GDOI uNext Tues Contract-signing.
Key Management Protocols and Compositionality John Mitchell Stanford TECS Week2005.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
1 Lecture 17: SSL/TLS history, architecture basic handshake session initiation/resumption key computation negotiating cipher suites application: SET.
ECE 454/CS 594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall.
Header and Payload Formats
IKEv2 extension: MOBIKE Faisal Memon Erik Weathers CS 259.
Security at the Network Layer: IPSec
IP Security and Key Establishment CS 395T. Plan for the Next Few Lectures uToday: “systems” lecture on IP Security and design of key exchange protocols.
1 IPSec—An Overview Somesh Jha Somesh Jha University of Wisconsin University of Wisconsin.
Chapter 5 Network Security Protocols in Practice Part I
Chapter 13 IPsec. IPsec (IP Security)  A collection of protocols used to create VPNs  A network layer security protocol providing cryptographic security.
Henric Johnson1 Ola Flygt Växjö University, Sweden IP Security.
IP Security IPSec 2 * Essential Network Security Book Slides. IT352 | Network Security |Najwa AlGhamdi 1.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Crypto – chapter 16 - noack Introduction to network stcurity Chapter 16 - Stallings.
IPsec – IKE CS 470 Introduction to Applied Cryptography
CS470, A.SelcukReal-Time Communication Issues1 Real-Time Communication Security IPsec & SSL Issues CS 470 Introduction to Applied Cryptography Instructor:
IKE message flow IKE message flow always consists of a request followed by a response. It is the responsibility of the requester to ensure reliability.
Configuration of a Site-to-Site IPsec Virtual Private Network Anuradha Kallury CS 580 Special Project August 23, 2005.
CMSC 414 Computer and Network Security Lecture 16 Jonathan Katz.
Internet Key Exchange. IPSec – Reminder SPI SA1 2 3 …… SAD.
CMSC 414 Computer and Network Security Lecture 22 Jonathan Katz.
More on AuthenticationCS-4513 D-term More on Authentication CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
CMSC 414 Computer and Network Security Lecture 18 Jonathan Katz.
Slide 1 Vitaly Shmatikov CS 378 Key Establishment Pitfalls.
Just Fast Keying (JFK) Protocol 18739A: Foundations of Security and Privacy Anupam Datta CMU Fall
CMSC 414 Computer and Network Security Lecture 23 Jonathan Katz.
Internet Security CSCE 813 IPsec. CSCE Farkas2 Reading Today: – Oppliger: IPSec: Chapter 14 – Stalllings: Network Security Essentials, 3 rd edition,
Key Distribution CS 470 Introduction to Applied Cryptography
CMSC 414 Computer (and Network) Security Lecture 25 Jonathan Katz.
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.
© 2007 Cisco Systems, Inc. All rights reserved.ISCW-Mod3_L7 1 Network Security 2 Module 6 – Configure Remote Access VPN.
IPsec: IKE, Internet Key Exchange IPsec does not use Public Key Infrastructure and exchanging keys before an IPsec connection is established is a problem.
1 Lecture 14: Real-Time Communication Security real-time communication – two parties interact in real time (as opposed to delayed communication like )
ECE 454/CS 594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall.
1 Chapter 8 Copyright 2003 Prentice-Hall Cryptographic Systems: SSL/TLS, VPNs, and Kerberos.
406 NW’98 1 © 1998, Cisco Systems, Inc. IPSec Loss of Privacy Security Threats Impersonation Loss of Integrity Denial of Service m-y-p-a-s-s-w-o-r-d.
IPSec Chapter 3 – Secure WAN’s. Definition IPsec, Internet Protocol Security, is a set of protocols defined by the IETF, Internet Engineering Task Force,
1 Section 10.9 Internet Security Association and Key Management Protocol ISAKMP.
Cosc 4765 SSL/TLS and VPN. SSL and TLS We can apply this generally, but also from a prospective of web services. Multi-layered: –S-http (secure http),
IP Security Lawrence Taub IPSEC IP security — security built into the IP layer Provides host-to-host (or router-to-router) encryption and.
1 Network Security Lecture 8 IP Sec Waleed Ejaz
CSCE 715: Network Systems Security
Lecture 14 ISAKMP / IKE Internet Security Association and Key Management Protocol / Internet Key Exchange CIS CIS 5357 Network Security.
ECE 454/CS 594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall.
1 Lecture 16: IPsec IKE history of IKE Photurus IKE phases –phase 1 aggressive mode main mode –phase 2.
Cryptography and Network Security (CS435) Part Eight (Key Management)
IPsec IPsec (IP security) Security for transmission over IP networks –The Internet –Internal corporate IP networks –IP packets sent over public switched.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
© 2006 Cisco Systems, Inc. All rights reserved. Network Security 2 Module 4: Configuring Site to Site VPN with Pre-shared keys.
IPSec VPN: How does it really work? Yasushi Kono (ComputerLinks Frankfurt)
Internet Key Exchange IKE ● RFC 2409 ● Services – Constructs shared authenticated keys – Establishes shared security parameters – Common SAs between IPSec.
IPSec and TLS Lesson Introduction ●IPSec and the Internet key exchange protocol ●Transport layer security protocol.
Group 9 Chapter 8.3 – 8.6. Public Key Algorithms  Symmetric Key Algorithms face an inherent problem  Keys must be distributed to all parties but kept.
1 Authenticated Key Exchange Rocky K. C. Chang 20 March 2007.
IPSec is a suite of protocols defined by the Internet Engineering Task Force (IETF) to provide security services at the network layer. standard protocol.
1 Secure Key Exchange: Diffie-Hellman Exchange Dr. Rocky K. C. Chang 19 February, 2002.
CMSC 414 Computer and Network Security Lecture 27 Jonathan Katz.
Network Layer Security Network Systems Security Mort Anvari.
1 Internet Key Exchange Rocky K. C. Chang 20 March 2007.
VPNs & IPsec Dr. X Slides adopted by Prof. William Enck, NCSU.
Chapter 5 Network Security Protocols in Practice Part I
Reviews Rocky K. C. Chang 20 April 2007.
CSE 4905 IPsec II.
Just Fast Keying (JFK) Protocol
0x1A Great Papers in Computer Security
Presentation transcript:

IPSec: Internet Key Exchange CS 378 IPSec: Internet Key Exchange Vitaly Shmatikov

Secure Key Establishment Goal: generate and agree on a session key using some public initial information What properties are needed? Authentication (know identity of other party) Secrecy (generated key not known to any others) Forward secrecy (compromise of one session key does not compromise keys in other sessions) Prevent replay of old key material Prevent denial of service Protect identities from eavesdroppers Other properties you can think of???

Key Management in IPSec Manual key management Keys and parameters of crypto algorithms exchanged offline (e.g, by phone), security associations established by hand Pre-shared symmetric keys New session key derived for each session by hashing pre-shared key with session-specific nonces Standard symmetric-key authentication and encryption Online key establishment Internet Key Exchange (IKE) protocol Use Diffie-Hellman to derive shared symmetric key

Diffie-Hellman Key Exchange Assume finite group G = S,  Choose generator g so every xS is x = gn for some n Example: integers modulo prime p Protocol ga mod p gb mod p A B Alice, Bob share gab mod p not known to anyone else

Diffie-Hellman Key Exchange ga mod p gb mod p A B Authentication? Secrecy? Replay attack? Forward secrecy? Denial of service? Identity protection? No Only against passive attacker Vulnerable Yes Vulnerable Participants can’t tell gx mod p from a random number: send them garbage and they’ll do expensive exponentiations Yes

IKE Genealogy Diffie-Hellman Station-to-Station ISAKMP Photuris Oakley 1976 + authentication, identity protection Diffie, van Oorschot, Wiener 1992 + defense against denial of service ISAKMP NSA 1998 Photuris “generic” protocol for establishing security associations + defense against replay Karn, Simpson 1994-99 + compatibility with ISAKMP Oakley IKE Orman 1998 Cisco 1998 IKEv2 IETF draft September 23, 2004

Design Objectives for Key Exchange Shared secret Create and agree on a secret which is known only to protocol participants Authentication Participants need to verify each other’s identity Identity protection Eavesdropper should not be able to infer participants’ identities by observing protocol execution Protection against denial of service Malicious participant should not be able to exploit the protocol to cause the other party to waste resources

Ingredient 1: Diffie-Hellman A  B: ga B  A: gb Shared secret is gab, compute key as k=hash(gab) Diffie-Hellman guarantees perfect forward secrecy Authentication Identity protection DoS protection

Ingredient 2: Challenge-Response A  B: m, A B  A: n, sigB(m, n, A) A  B: sigA(m, n, B) Shared secret Authentication A receives his own number m signed by B’s private key and deduces that B is on the other end; similar for B Identity protection DoS protection

DH + Challenge-Response ISO 9798-3 protocol: A  B: ga, A B  A: gb, sigB(ga, gb, A) A  B: sigA(ga, gb, B) Shared secret: gab Authentication Identity protection DoS protection m := ga n := gb Obtained by substituting Diffie-Hellman exponentials for the fresh terms m and n in the challenge-response protocol.

Ingredient 3: Encryption Encrypt signatures to protect identities: A  B: ga, A B  A: gb, EncK(sigB(ga, gb, A)) A  B: EncK(sigA(ga, gb, B)) Shared secret: gab Authentication Identity protection (for responder only!) DoS protection k=hash(gab) B’s identity is protected against passive adversaries.

Refresher: DoS Prevention Denial of service is often caused by malicious resource clogging If responder opens a state for each connection attempt, attacker can initiate thousands of connections from bogus or forged IP addresses Cookies ensure that the responder is stateless until initiator produced at least 2 messages Responder’s state (IP addresses and ports) is stored in an unforgeable cookie and sent to initiator After initiator responds, cookie is regenerated and compared with the cookie returned by the initiator The cost is 2 extra messages in each execution

Refresher: Anti-DoS Cookie Typical protocol: Client sends request (message #1) to server Server sets up connection, responds with message #2 Client may complete session or not (potential DoS) Cookie version: Client sends request to server Server sends hashed connection data back Send message #2 later, after client confirms his address Client confirms by returning hashed data Need an extra step to send postponed message

Ingredient 4: Anti-DoS Cookie “Almost-IKE” protocol: A  B: ga, A B  A: gb, hashKb(gb, ga) A  B: ga, gb, hashKb(gb, ga) EncK(sigA(ga, gb, B)) B  A: gb, EncK(sigB(ga, gb, A)) Shared secret: gab Authentication Identity protection DoS protection? Doesn’t quite work: B must remember his DH exponential b for every connection A cookie mechanism is a standard way of preventing blind denial-of-service attacks. B returns a keyed hash of the Diffie-Hellman exponential that he receives in the first message from A. Only after A returns the cookie in the third message does B create state and perform expensive public key operations. k=hash(gab)

Medium-Term Secrets and Nonces Idea: use the same Diffie-Hellman value gab for every session, update every 10 minutes or so Helps against denial of service To make sure keys are different for each session, derive them from gab and session-specific nonces Nonces guarantee freshness of keys for each session Re-computing ga, gb, gab is costly, generating nonces (fresh random numbers) is cheap This is more efficient and helps with DoS, but no longer guarantees forward secrecy (why?)

(Simplified) Photuris [Karn and Simpson] Random number (identifies connection) Hash(source & dest IP addrs, CookieI, ports, R’s local secret) CookieI I R CookieI, CookieR, offer crypto CookieI, CookieR, ga mod p, select crypto CookieI, CookieR, gb mod p switch to K=h(gab mod p) Alice is called “Initiator” for consistency with IKE terminology Bob is called “Responder” CookieI, CookieR, EncK(“I”, sigI(previous msgs)) CookieI, CookieR, EncK(“R”, sigR(previous msgs))

IKE Genealogy Redux Diffie-Hellman Station-to-Station ISAKMP Photuris 1976 + authentication, identity protection Diffie, van Oorschot, Wiener 1992 + defense against denial of service ISAKMP NSA 1998 Photuris “generic” protocol for establishing security associations + defense against replay Karn, Simpson 1994-99 + compatibility with ISAKMP Oakley IKE Orman 1998 Cisco 1998 IKEv2 IETF draft September 23, 2004

Cookies in Photuris and ISAKMP Photuris cookies are derived from local secret, IP addresses and ports, counter, crypto schemes Same (frequently updated) secret for all connections ISAKMP requires unique cookie for each connect Add timestamp to each cookie to prevent replay attacks Now responder needs to keep state (“cookie crumb”) Vulnerable to denial of service (why?) Inherent conflict: to prevent replay, need to remember values that you’ve generated or seen before, but keeping state allows denial of service

IKE Overview Goal: create security association between 2 hosts Shared encryption and authentication keys, agreement on crypto algorithms Two phases: 1st phase establishes security association (IKE-SA) for the 2nd phase Always by authenticated Diffie-Hellman (expensive) 2nd phase uses IKE-SA to create actual security association (child-SA) to be used by AH and ESP Use keys derived in the 1st phase to avoid DH exchange Can be executed cheaply in “quick” mode To create a fresh key, hash old DH value and new nonces

Why Two-Phase Design? Expensive 1st phase creates “main” SA Cheap 2nd phase allows to create multiple child SAs (based on “main” SA) between same 2 hosts Different conversations may need different protection Some traffic only needs integrity protection or short-key crypto Too expensive to always use strongest available protection Avoid multiplexing several conversations over same SA For example, if encryption is used without integrity protection (bad idea!), it may be possible to splice the conversations Different SAs for different classes of service

IKEv1 Was a Mess Two modes for 1st phase: “main” and “aggressive” Fewer messages in “aggressive” mode, but no identity protection and no defense against denial of service Main mode vulnerable to DoS due to bad cookie design Many field sizes not verified; poor error handling Four authentication options for each mode Shared keys; signatures; public keys in 2 different ways Special “group” mode for group key establishment Grand total of 13 different variants Difficult to implement, impossible to analyze Security problems stem directly from complexity

IKEv2: Phase One I R ga mod p, crypto proposal, Ni CookieR Optional: refuse 1st message and demand return of stateless cookie CookieR ga mod p, crypto proposal, Ni I R CookieR, ga mod p, crypto proposal, Ni gb mod p, crypto accepted, Nr switch to K=f(Ni,Nr,crypto,gab mod p) EncK(“I”, sigI(m1-4), [cert], child-SA) EncK(“R”, sigR(m1-4), [cert], child-SA) Initiator reveals identity first Prevents “polling” attacks where attacker initiates IKE connections to find out who lives at an IP addr Instead of running 2nd phase, “piggyback” establishment of child-SA on initial exchange

IKEv2: Phase Two (Create Child-SA) After Phase One, I and R share key K I R EncK(proposal, Ni, [ga mod p], traffic) Crypto suites, protocol (AH, ESP or IPcomp) Optional re-key using old DH value and fresh nonces IP address range, ports, protocol id EncK(proposal, Nr, [gb mod p], traffic) Can run this several times to create multiple SAs

Other Aspects of IKE We did not talk about… Interaction with other network protocols How to run IPSec through NAT (Network Address Translation) gateways? Error handling Very important! Bleichenbacher attacked SSL by cryptanalyzing error messages from an SSL server Protocol management Dead peer detection, rekeying, etc. Legacy authentication What if one of the parties doesn’t have a public key?

Current State of IPSec Best currently existing VPN standard For example, used in Cisco PIX firewall, many remote access gateways IPSec has been out for a few years, but wide deployment has been hindered by complexity ANX (Automotive Networking eXchange) uses IPSec to implement a private network for the Big 3 auto manufacturers and their suppliers