IPsec: IKE, Internet Key Exchange IPsec does not use Public Key Infrastructure and exchanging keys before an IPsec connection is established is a problem.

Slides:



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

Internet Protocol Security (IP Sec)
IPSec In Depth. Encapsulated Security Payload (ESP) Must encrypt and/or authenticate in each packet Encryption occurs before authentication Authentication.
CSC 474 Information Systems Security
ISAKMP RFC 2408 Internet Security Association & Key Management Protocol Protocol Establish, modify, and delete SAs Negotiate crypto keys Procedures Authentication.
Header and Payload Formats
Security at the Network Layer: IPSec
Cryptography and Network Security Chapter 16 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
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
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.
1 IPsec Youngjip Kim Objective Providing interoperable, high quality, cryptographically-based security for IPv4 and IPv6 Services  Access.
W O R L D W I D E L E A D E R I N S E C U R I N G T H E I N T E R N E T IKE Tutorial.
Internet Security CSCE 813 IPsec. CSCE Farkas2 Reading Today: – Oppliger: IPSec: Chapter 14 – Stalllings: Network Security Essentials, 3 rd edition,
CMSC 414 Computer (and Network) Security Lecture 25 Jonathan Katz.
Creating an IPsec VPN using IOS command syntax. What is IPSec IPsec, Internet Protocol Security, is a set of protocols defined by the IETF, Internet Engineering.
Network Access for Remote Users: Practical IPSec Dr John S. Graham ULCC
1 Chapter 8 Copyright 2003 Prentice-Hall Cryptographic Systems: SSL/TLS, VPNs, and Kerberos.
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.
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.
SMUCSE 5349/49 IP Sec. SMUCSE 5349/7349 Basics Network-level: all IP datagrams covered Mandatory for next-generation IP (v6), optional for current-generation.
Information management 1 Groep T Leuven – Information department 1/26 IPSec IP Security (IPSec)
IT:Network:Apps.  RRAS does nice job of routing ◦ NAT is nice ◦ BASIC firewall ok but somewhat weak  Communication on network (WS to SRV) is in clear.
1 Lecture 16: IPsec IKE history of IKE Photurus IKE phases –phase 1 aggressive mode main mode –phase 2.
1 © 2005 Cisco Systems, Inc. All rights reserved. 111 © 2004, Cisco Systems, Inc. All rights reserved. CNIT 221 Security 2 Module 3 City College of San.
Karlstad University IP security Ge Zhang
IPsec IPsec (IP security) Security for transmission over IP networks –The Internet –Internal corporate IP networks –IP packets sent over public switched.
IPsec Introduction 18.2 Security associations 18.3 Internet Security Association and Key Management Protocol (ISAKMP) 18.4 Internet Key Exchange.
1 Methods and Protocols for Secure Key Negotiation Using IKE Author : Michael S. Borella, 3Com Corp.
IPSEC : KEY MANAGEMENT PRESENTATION BY: SNEHA A MITTAL(121427)
© 2006 Cisco Systems, Inc. All rights reserved. Network Security 2 Module 4: Configuring Site to Site VPN with Pre-shared keys.
Attacking IPsec VPNs Charles D George Jr. Overview Internet Protocol Security (IPSec) is a suite of protocols for authenticating and encrypting packets.
IPSec VPN: How does it really work? Yasushi Kono (ComputerLinks Frankfurt)
Potential vulnerabilities of IPsec-based VPN
Virtual Private Network. ATHENA Main Function of VPN  Privacy  Authenticating  Data Integrity  Antireplay.
IP security Ge Zhang Packet-switched network is not Secure! The protocols were designed in the late 70s to early 80s –Very small network.
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.
Securing Data Transmission and Authentication. Securing Traffic with IPSec IPSec allows us to protect our network from within IPSec secures the IP 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.
IPSec VPN Chapter 13 of Malik. 2 Outline Types of IPsec VPNs IKE (or Internet Key Exchange) protocol.
Virtual Private Network Chapter 4. Lecturer : Trần Thị Ngọc Hoa2 Objectives  VPN Overview  Tunneling Protocol  Deployment models  Lab Demo.
V IRTUAL P RIVATE N ETWORKS K ARTHIK M OHANASUNDARAM W RIGHT S TATE U NIVERSITY.
Cryptography and Network Security (CS435) Part Thirteen (IP Security)
IPSec  general IP Security mechanisms  provides  authentication  confidentiality  key management  Applications include Secure connectivity over.
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.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Network Layer Security Network Systems Security Mort Anvari.
1 Internet Key Exchange Rocky K. C. Chang 20 March 2007.
K. Salah1 Security Protocols in the Internet IPSec.
8-1Network Security Virtual Private Networks (VPNs) motivation:  institutions often want private networks for security.  costly: separate routers, links,
IP Security (IPSec) Internet Key Exchange (IKE) Dr Milan Marković.
Chapter 5 Network Security Protocols in Practice Part I
Somesh Jha University of Wisconsin
CSE 4905 IPsec II.
IPSec VPN Chapter 13 of Malik.
Presentation transcript:

IPsec: IKE, Internet Key Exchange IPsec does not use Public Key Infrastructure and exchanging keys before an IPsec connection is established is a problem. IKE solves generation of a symmetric key for a session of IPsec but without PKI man-in-the-middle attack is possible. IKE (Internet Key Exchange) creates Security Associations (SA). That is, parties in IKE negotiate keys for the SA. SA was a data structure containing keys and other relevant information for the connection. IKE is a general purpose key exchange protocol. It is used by IPsec, but it can be used by other protocols who need SAs as well. Thus IPsec SA is not directly IKE SA, but IKE SA can be converted to IPsec SA (or to SA of some other protocol). IKE is a formally checked cryptoprotocol. IKE is rather complicated, usually a secure cryptoprotocol is complicated. The following description of IKE may feel rather technical.

IPsec: IKE, Internet Key Exchange General IKE creates SA, refreshes them and deletes them. IKE has the following exchanges: –Phase one (creation of IKE SA): There are two modes for phase one: main mode or aggressive mode –Phase two (creation of IPSec SA): there is only one mode: quick mode –Maintenance of IKE SA –Negotiation of private Diffie-Hellman groups What the last exchange means is that in the phase one there are predefined several ways to use Diffie-Hellman, but one can define own ways also using the last exchange. IKE protocol initial message exchanges are not encrypted. IKE uses (normally) the UDP port 500.

IPsec: IKE The predefined Diffie-Hellman groups in IKE: (group here means only an agreement of the algorithm) 1. MODP group with a 768-bit modulus 2. MODP group with a 1024-bit modulus 3. ECP group with a 155-bit modulus 4. EC2N group with a 185-bit modulus 5. MODP group with a 1680-bit modulus What this means is that you can use discrete logarithm problem (see Diffie-Hellman algorithm from a previous lecture) noted as MODP and the number p for A=g a mod p must have the defined length. The algorithm family EC2N is a family of elliptic curve cryptoalgorithms. They give good security level with shorter keys and less processing. ECP 155 is about as secure MODP 768, respectively EC2N 185 about as good as MODP 1024.

IPsec: IKE In the first part of the IKE exchange, an authentication method is agreed. There are five authentication methods 1) preshared keys 2) digital signature with DSA 3) digital signature with RSA 4) authentication via exchange of encrypted nonces 5) revised method 4) This method is agreed via exchange of IKE SA. Exchange of IKE SA contains also some secret information. The peers generate four secrets: SKEYID, SKEYID_d, SKEYID_a and SKEYID_e. Both sides take part in creating the secrets.

IPsec: IKE Generation of the secrets: Each side contributes a cookie (CKY-x) and a nonce (Nx) to SKEYID generation (x=i (initiator) or r (responder). A nonce is simply a pseudo-random number, a cookie is generated by taking a hash from some data. For preshared key authentication –SKEYID=PRF(preshared key, Ni|Nr) For signature authentication Diffie-Hellman type g xy is used: –SKEYID=PRF(Ni|Nr, g xy ) For encrypted nonce authentication: –SKEYID=PRF(hash(Ni|Nr), CKY-i|CKY-r) Here | denotes concatenating the data, so Ni|Nr = nonce from initiator + nonce from responder. PRF is a result of a hash function, usually HMAC.

IPsec: IKE All other secrets are derived from SKEYID: SKEYID_d=PRF(SKEYID, g xy |CKY-i|CKY-r|0) SKEYID_a=PRF(SKEYID, SKEYID_d|g xy |CKY-i|CKY-r|1) SKEYID_e=PRF(SKEYID, SKEYID_a|g xy |CKY-i|CKY-r|2) Why all these secrets? SKEYID_d is used for deriving keying data for IPSec SKEYID_a is used for integrity and data source authentication SKEYID_e is used to encrypt IKE messages. Different keys must be used for security purposes. Because of the hash function PRF, the original secret SKEYID cannot be calculated from the derived secrets. Why so many options in IKE (remember, many options were one reason OSI failed to gain popularity) ?

IPsec: IKE cookie exchange IKE uses the following cookie generation method: a cookie is the result of hashing a unique identifier of the peer (peer’s IP address, port and protocol), a secret known only to the generator of the cookie, and a time stamp. The initiator generates a cookie, sets the responder cookie to zero and sends to the responder. The responder generates a responder cookie, copies the initiator cookie to the message and sends it to the initiator. The initiator can easily check that the initiator cookie is to one it generated and that the peer’s addresses match. Only if the cookie matches, check of signatures etc. are made. Consider this: if you need to check the signatures (strong method), the cookie method must be weak. How can a weak method protect a strong method? Thus, there must be an attack leading the parties to the computationally expensive Diffie- Hellman and DoS. Try the cookie method: initiator=attacker

IPsec: IKE Phase one, normal mode using preshared key authentication InitiatorResponder Header, KE, Nonce Header, SA Header, KE, Nonce Header, IDi, Hash The normal mode has an exchange of six messages, several versions of the phase one normal mode exist. SA=Security Association, KE=Key Exchange, Nonce=random number, IDi= identity of the peer.

IPsec: IKE Phase one of normal mode using public key exchanges: InitiatorResponder Header, SA Header, KE, Ni [,Cert_Req ] Header, IDi, [Cert,] Signature In this variant optional payloads are bracketed. In the optional features a certificate can be requested (Cert_Req) and then it is returned in Cert. Ni=Nonce i. Header, IDi, [Cert,] Signature Header, KE, Ni [,Cert_Req ]

IPsec: IKE Phase one of normal mode the standard method using public key exchanges: InitiatorResponder Header, SA Header, KE, {IDi}pub_r, {Ni}pub_r Header, Hash In this variant {something}pub_x means something encrypted with the public key of x=i (initiator) or r (responder). Ni is nonce. Header, Hash Header, KE, {IDi}pub_i, {Ni}pub_r

IPsec: IKE Policy negotiation After IKE SA is agreed, IKE will negotiate of the policy. Policy is something like: authenticate everything and if possible encrypt it, and if possible also compress it. For each operation there may be several algorithms. SA payload can contain several proposals for protocols and exact algorithms (transforms). Policy negotiation works so that the initiator proposes some algorithms and the responder removes from the list what it does not want to use. Negotiating compression is also included in IKE since it is not good to try to compress encrypted data (it will not compress, it is random), therefore link layer compression like in PPP will not work with IPsec. One (but not efficient) way is to compress each IP packet on IPsec layer before encryptation with PCP.

IPsec: IKE Example proposal for SA: the offer maker proposes in the given order the following choices. Proposal 1: AH Transform 1: HMAC-SHA Transform 2: HMAC-MD5 Proposal 2: ESP Transform 1: 3DES with HMAC-SHA Transform 2: 3DES with HMAC-MD5 Transform 3: DES with HMAC-SHA Transform 4: DES with HMAC-MD5 Proposal 3: PCP (compression before encryptation) Transform 1: LZS (one header compression algorithm) Transform 2: Deflate (another header compression)

IPsec: IKE Phase one: aggressive mode Aggressive mode is more simple than the normal mode. In the aggressive mode there are only three messages exchanged. The initiator offers a list of protection suites, his Diffie- Hellman public key value, his nonce and his identity. The responder replies with a selected protection suite, his Diffie-Hellman public value, his nonce, his identity, and authentication payload, like a signature. The initiator responds with authentication payload. There is no chance to negotiate as much in this case as in the normal mode. The method suits well for connecting to own site from a remote site as then it is known in advance what kind of authentication the other side supports.

IPsec: IKE Phase two: quick mode Phase two of IKE creates IPsec SA. Since IKE can be used for other protocols than IPsec, like the routing protocols RIPv2 and OSPF, IKE SA is not directly IPsec SA. IKE SA protects the quick mode by encrypting messages and authenticating them. Authentication comes from use of PRF (the HMAC hash function) The quick mode creates keys for IPSec association. Many quick modes can be made using the same IKE SA, therefore a message ID (M-ID) is used to identify the IPSec SA. Nonces are added to prevent replay of the same messages by an attacker. The quick mode has more details, but the following figure gives the general view of the protocol.

IPsec: IKE Quick mode exchange InitiatorResponder Header, HASH1, SA, Ni [, KE][, IDci, IDcr] Header, HASH2, SA, Nr [, KE] [, IDci, IDcr] Header, HASH3 HASH3=PRF(SKEYID_a, 0 | M-ID | Ni | Nr) HASH2=PRF(SKEYID_a, M-ID | Ni | SA [| KE] [| IDci | IDcr]) HASH1=PRF(SKEYID_a, M-ID | SA | Ni [| KE] [| IDci | IDcr])