IPsec
IPsec
In computing, Internet Protocol Security (IPsec) is a network protocol suite that authenticates and encrypts the packets of data sent over a network. IPsec includes protocols for establishing mutual
authentication between agents at the beginning of the session and negotiation of cryptographic keys to use during the session. IPsec can protect data flows between a pair of hosts (host-to-host), between
a pair of security gateways (network-to-network), or between a security gateway and a host (network-to-host).[1] Internet Protocol security (IPsec) uses cryptographic security services to protect
communications over Internet Protocol (IP) networks. IPsec supports network-level peer authentication, data-origin authentication, data integrity
, data confidentiality (encryption), and replay protect
ion.
IPsec is an end-to-end security scheme operating in the Internet Layer of the Internet Protocol Suite, while some other Internet security systems in widespread use, such as Transport Layer Security
(TLS) and Secure Shell (SSH), operate in theupper layers at the Transport Layer (TLS) and the Application layer (SSH). IPsec can automatically secure applications at the IP layer
.
Contents
History
Security architecture
Authentication Header
Encapsulating Security Payload
Security association
Modes of operation
Transport mode
Tunnel mode
Cryptographic algorithms
Software implementations
Standards status
Alleged NSA interference
IETF documentation
Standards Track
Experimental RFCs
Informational RFCs
Best Current Practice RFCs
Obsolete/Historic RFCs
See also
References
External links
History
In the late 1980s, US NIST developed a set of security protocols for the Internet. One of these, Security Protocol at layer-3 (SP3) was implemented in IP encryption devices sold by Motorola. The IPsec
Encapsulating Security Payload (ESP) is a direct derivative of the SP3 protocol. In 1992, both research and implementation began at the US Naval Research Laboratory (NRL) on IP encryption. This
NRL work ultimately led to the IP Security protocols standardized by the Internet Engineering Task Force (IETF). Later, in December 1993, the Software IP Encryption protocol swIPe (protocol) was
researched at Columbia University and AT&T Bell Labs by John Ioannidis and others.
The IP Encapsulating Security Payload (ESP)[2] was researched at the Naval Research Laboratory starting in 1992 as part of a DARPA-sponsored research project, and was openly published by IETF
SIPP[3] Working Group drafted in December 1993 as a security extension for SIPP. This ESP was originally derived from the US Department of Defense SP3D protocol, rather than being derived from
the ISO Network-Layer Security Protocol (NLSP). The SP3D protocol specification was published by NIST in the late 1980s, but designed by the Secure Data Network System project of the US
Department of Defense. The Security Authentication Header (AH) is derived partially from previous IETF standards work for authentication of the Simple Network Management Protocol (SNMP)
version 2.
In July 1992, the IETF started to create an open, freely available set of security extensions to the Internet protocol. This quickly became the IETF IP Security (IPsec) Working Group. The SDNS project
had defined a Security Protocol Layer 3 (SP3) that had been published by NIST and was also the basis of the ISO Network Layer Security Protocol (NLSP).[4] Key management for SP3 was provided by
the Key Management Protocol (KMP) that provided a baseline of ideas for subsequent work in the IPsec committee.
IPsec is officially standardised by the Internet Engineering Task Force (IETF) in a series of Request for Comments documents addressing various components and extensions. The original IETF
of spelling of the protocol name isIPsec.[5]
specifications are in RFC-1825 through RFC-1827, which published in 1995. The ficial
Security architecture
The IPsec suite is an open standard. IPsec uses the followingprotocols to perform various functions:[6][7]
Authentication Headers (AH)provides connectionlessdata integrity and data origin authenticationfor IP datagrams and provides protection againstreplay attacks.[8][9]
Encapsulating Security Payloads (ESP)provides confidentiality, data-origin authentication, connectionless integrity, an anti-replay service (a form of partial sequence integrity),
and limited traffic-flow confidentiality.[1]
Security Associations (SA)provides the bundle of algorithms and data that provide the parameters necessary for AH and/or ESP operations. The Internet Security Association and
Key Management Protocol(ISAKMP) provides a framework for authentication and key exchange, [10] with actual authenticated keying material provided either by manual
configuration with pre-shared keys, Internet Key Exchange(IKE and IKEv2), Kerberized Internet Negotiation of Keys(KINK), or IPSECKEYDNS records.[11][12][13][14]
Authentication Header
Authentication Header (AH) is a member of the IPsec protocol suite. AH guarantees connectionless integrity and data origin authentication of IP packets. Further, it can optionally protect against replay
attacks by using the sliding window technique and discarding old packets (seebelow).
In IPv4, AH prevents option-insertion attacks. InIPv6, AH protects both against header insertion attacks and option insertion attacks.
In IPv4, the AH protects the IP payload and all header fields of an IP datagram except for mutable fields (i.e. those that might be altered in transit), and also IP options such as the
IP Security Option (RFC 1108). Mutable (and therefore unauthenticated) IPv4 header fields areDSCP/ToS, ECN, Flags, Fragment Offset, TTL and Header Checksum.[9]
In IPv6, the AH protects most of the IPv6 base header
, AH itself, non-mutable extension headers after the AH, and the IP payload. Protection for the IPv6 header excludes the
mutable fields: DSCP, ECN, Flow Label, and Hop Limit.[9]
AH operates directly on top of IP, using IP protocol number 51.[15]
[8][9]
The following AH packet diagram shows how an AH packet is constructed and interpreted:
[1][19]
The following ESP packet diagram shows how an ESP packet is constructed and interpreted:
Security association
The IP security architecture uses the concept of asecurity association as the basis for building security functions into IP. A security association is simply the bundle of algorithms and parameters (such as
keys) that is being used to encrypt and authenticate a particular flow in one direction. Therefore, in normal bi-directional traf
fic, the flows are secured by a pair of security associations.
Security associations are established using the Internet Security Association and Key Management Protocol (ISAKMP). ISAKMP is implemented by manual configuration with pre-shared secrets,
Internet Key Exchange(IKE and IKEv2), Kerberized Internet Negotiation of Keys (KINK), and the use of IPSECKEY DNS records.[14][20][21] RFC 5386 defines Better-Than-Nothing Security (BTNS)
as an unauthenticated mode of IPsec using an extended IKE protocol.
In order to decide what protection is to be provided for an outgoing packet, IPsec uses the Security Parameter Index (SPI), an index to the security association database (SADB), along with the
destination address in a packet header, which together uniquely identify a security association for that packet. A similar procedure is performed for an incoming packet, where IPsec gathers decryption
and verification keys from the security association database.
For multicast, a security association is provided for the group, and is duplicated across all authorized receivers of the group. There may be more than one security association for a group, using different
SPIs, thereby allowing multiple levels and sets of security within a group. Indeed, each sender can have multiple security associations, allowing authentication, since a receiver can only know that
someone knowing the keys sent the data. Note that the relevant standard does not describe how the association is chosen and duplicated across the group; it is assumed that a responsible party will have
made the choice.
Modes of operation
IPsec can be implemented in a host-to-host transport mode, as well as in a network tunneling mode.
Transport mode
In transport mode, only the payload of the IP packet is usually encrypted or authenticated. The routing is intact, since the IP header is neither modified nor encrypted; however, when the authentication
header is used, the IP addresses cannot be modified by network address translation, as this always invalidates the hash value. The transport and application layers are always secured by a hash, so they
cannot be modified in any way, for example by translating the port numbers.
A means to encapsulate IPsec messages forNAT traversal has been defined by RFC documents describing theNAT-T mechanism.
Tunnel mode
In tunnel mode, the entire IP packet is encrypted and authenticated. It is then encapsulated into a new IP packet with a new IP header. Tunnel mode is used to create virtual private networks for network-
[22]
to-network communications (e.g. between routers to link sites), host-to-network communications (e.g. remote user access) and host-to-host communications (e.g. private chat).
Cryptographic algorithms
Cryptographic algorithms defined for use with IPsec include:
Software implementations
IPsec support is usually implemented in thekernel with key management andISAKMP/IKE negotiation carried out from user space. The openly specified "PF_KEY Key Management API, Version 2" is
[23]
often used to enable the application-space key management application to update the IPsec Security Associations stored within the kernel-space IPsec implementation.
Existing IPsec implementations usually include ESP, AH, and IKE version 2. Existing IPsec implementations on UNIX-like operating systems, for example, Solaris or Linux, usually include PF_KEY
version 2.
Standards status
IPsec was developed in conjunction with IPv6 and was originally required to be supported by all standards-compliant implementations of IPv6 before RFC 6434 made it only a recommendation.[24]
IPsec is also optional forIPv4 implementations. IPsec is most commonly used to secure IPv4 traf
fic.
IPsec protocols were originally defined in RFC 1825 through RFC 1829, which were published in 1995. In 1998, these documents were superseded by RFC 2401 and RFC 2412 with a few incompatible
engineering details, although they were conceptually identical. In addition, a mutual authentication and key exchange protocol Internet Key Exchange (IKE) was defined to create and manage security
associations. In December 2005, new standards were defined in RFC 4301 and RFC 4309 which are largely a superset of the previous editions with a second version of the Internet Key Exchange
standard IKEv2. These third-generation documents standardized the abbreviation of IPsec to uppercase “IP” and lowercase “sec”. “ESP” generally refers to RFC 4303, which is the most recent version
of the specification.
.[25][26]
Since mid-2008, an IPsec Maintenance and Extensions (ipsecme) working group is active at the IETF
The OpenBSD IPsec stack was the first implementation that was available under a permissive open-source license, and was therefore copied widely. In a letter which OpenBSD lead developer Theo de
Raadt received on 11 Dec 2010 from Gregory Perry, it is alleged that Jason Wright and others, working for the FBI, inserted "a number of backdoors and side channel key leaking mechanisms" into the
OpenBSD crypto code. In the forwarded email from 2010, Theo de Raadt did not at first express an official position on the validity of the claims, apart from the implicit endorsement from forwarding the
email.[29] Jason Wright's response to the allegations: "Every urban legend is made more real by the inclusion of real names, dates, and times. Gregory Perry's email falls into this category. … I will state
clearly that I did not add backdoors to the OpenBSD operating system or the OpenBSD crypto framework (OCF)."[30] Some days later, de Raadt commented that "I believe that NETSEC was probably
[31] This was published before the Snowden leaks.
contracted to write backdoors as alleged. … If those were written, I don't believe they made it into our tree."
An alternative explanation put forward by the authors of the Logjam attack suggests that the NSA compromised IPsec VPNs by undermining the Diffie-Hellman algorithm used in the key exchange. In
their paper[32] they allege the NSA specially built a computing cluster to precompute multiplicative subgroups for specific primes and generators, such as for the second Oakley group defined in RFC
2409. As of May 2015, 90% of addressable IPsec VPNs supported the second Oakley group as part of IKE. If an organization were to precompute this group, they could derive the keys being exchanged
and decrypt traffic without inserting any softwarebackdoors.
A second alternative explanation that was put forward was that the Equation Group used zero-day exploits against several manufacturers' VPN equipment which were validated by Kaspersky Lab as
being tied to the Equation Group[33] and validated by those manufacturers as being real exploits, some of which were zero-day exploits at the time of their exposure.[34][35][36] The Cisco PIX and ASA
firewalls had vulnerabilities that were used for wiretapping by the NSA.
. This can be and apparently is targeted by the NSA using offline dictionary attacks.[37][38][39]
Furthermore, IPsec VPNs using "Aggressive Mode" settings send a hash of the PSK in the clear
IETF documentation
Standards Track
RFC 1829: The ESP DES-CBC Transform
RFC 2403: The Use of HMAC-MD5-96 within ESP and AH
RFC 2404: The Use of HMAC-SHA-1-96 within ESP and AH
RFC 2405: The ESP DES-CBC Cipher Algorithm With Explicit IV
RFC 2410: The NULL Encryption Algorithm and Its Use With IPsec
RFC 2451: The ESP CBC-Mode Cipher Algorithms
RFC 2857: The Use of HMAC-RIPEMD-160-96 within ESP and AH
RFC 3526: More Modular Exponential (MODP) Diffie-Hellman groups for Internet Key Exchange (IKE)
RFC 3602: The AES-CBC Cipher Algorithm and Its Use with IPsec
RFC 3686: Using Advanced Encryption Standard (AES) Counter Mode With IPsec Encapsulating Security Payload (ESP)
RFC 3947: Negotiation of NAT-Traversal in the IKE
RFC 3948: UDP Encapsulation of IPsec ESP Packets
RFC 4106: The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating Security Payload (ESP)
RFC 4301: Security Architecture for the Internet Protocol
RFC 4302: IP Authentication Header
RFC 4303: IP Encapsulating Security Payload
RFC 4304: Extended Sequence Number (ESN) Addendum to IPsec Domain of Interpretation (DOI) for Internet Security Association and Key Management Protocol (ISAKMP)
RFC 4307: Cryptographic Algorithms for Use in the Internet Key Exchange ersion
V 2 (IKEv2)
RFC 4308: Cryptographic Suites for IPsec
RFC 4309: Using Advanced Encryption Standard (AES) CCM Mode with IPsec Encapsulating Security Payload (ESP)
RFC 4543: The Use of Galois Message Authentication Code (GMAC) in IPsec ESP and AH
RFC 4555: IKEv2 Mobility and Multihoming Protocol (MOBIKE)
RFC 4806: Online Certificate Status Protocol (OCSP) Extensions to IKEv2
RFC 4868: Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 with IPsec
RFC 4945: The Internet IP Security PKI Profile of IKEv1/ISAKMP , IKEv2, and PKIX
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile
RFC 5282: Using Authenticated Encryption Algorithms with the Encrypted Payload of the Internet Key Exchange version 2 (IKEv2) Protocol
RFC 5386: Better-Than-Nothing Security: An Unauthenticated Mode of IPsec
RFC 5529: Modes of Operation for Camellia for Use with IPsec
RFC 5685: Redirect Mechanism for the Internet Key Exchange Protocol eVrsion 2 (IKEv2)
RFC 5723: Internet Key Exchange Protocol Version 2 (IKEv2) Session Resumption
RFC 5857: IKEv2 Extensions to Support Robust Header Compression over IPsec
RFC 5858: IPsec Extensions to Support Robust Header Compression over IPsec
RFC 7296: Internet Key Exchange Protocol Version 2 (IKEv2)
RFC 7321: Cryptographic Algorithm Implementation Requirements and Usage Guidance for Encapsulating Security Payload (ESP) and Authentication Header (AH)
RFC 7383: Internet Key Exchange Protocol Version 2 (IKEv2) Message Fragmentation
RFC 7427: Signature Authentication in the Internet Key Exchange e Vrsion 2 (IKEv2)
RFC 7634: ChaCha20, Poly1305, and Their Use in the Internet Key Exchange Protocol (IKE) and IPsec
Experimental RFCs
RFC 4478: Repeated Authentication in Internet Key Exchange (IKEv2) Protocol
Informational RFCs
RFC 2367: PF_KEY Interface
RFC 2412: The OAKLEY Key Determination Protocol
RFC 3706: A Traffic-Based Method of Detecting Dead Internet Key Exchange (IKE) Peers
RFC 3715: IPsec-Network Address Translation (NAT) Compatibility Requirements
RFC 4621: Design of the IKEv2 Mobility and Multihoming (MOBIKE) Protocol
RFC 4809: Requirements for an IPsec Certificate Management Profile
RFC 5387: Problem and Applicability Statement for Better-Than-Nothing Security (BTNS)
RFC 5856: Integration of Robust Header Compression over IPsec Security Associations
RFC 5930: Using Advanced Encryption Standard Counter Mode (AES-CTR) with the Internet Key Exchange version 02 (IKEv2) Protocol
RFC 6027: IPsec Cluster Problem Statement
RFC 6071: IPsec and IKE Document Roadmap
RFC 6379: Suite B Cryptographic Suites for IPsec
RFC 6380: Suite B Profile for Internet Protocol Security (IPsec)
RFC 6467: Secure Password Framework for Internet Key Exchange e Vrsion 2 (IKEv2)
See also
Dynamic Multipoint Virtual Private Network
Information security
NAT traversal
Opportunistic encryption
tcpcrypt
References
1. Kent, S.; Atkinson, R. (November 1998).IP Encapsulating Security Payload (ESP)(ht 19. Kent, S. (December 2005).IP Encapsulating Security Payload (ESP)([Link]
tps://[Link]/html/rfc2406). IETF. doi:10.17487/RFC2406 ([Link] [Link]/html/rfc4303). IETF. doi:10.17487/RFC4303 ([Link]
487%2FRFC2406). RFC 2406. [Link] 4303). RFC 4303. [Link]
2. "SIPP Encapsulating Security Payload"([Link] 20. RFC 2406, §1, page 2
[Link]). IETF SIPP Working Group. 1993. 21. Thomas, M. (June 2001).Requirements for Kerberized Internet Negotiation of Keys
3. "Draft SIPP Specification"([Link]
. IETF. ([Link] doi:10.17487/RFC3129 ([Link]
1993. p. 21. 7%2FRFC3129). RFC 3129. [Link]
4. [Link] 22. William, S., & Stallings, W. (2006). Cryptography and Network Security, 4/E. Pearson
5. "RFC4301: Security Architecture for the Internet Protocol"([Link] Education India. p. 492-493
4301#page-4). Network Working Group of the IETF. December 2005. p. 4."The 23. RFC 2367, PF_KEYv2 Key Management API, Dan McDonald, Bao Phan, & Craig
spelling "IPsec" is preferred and used throughout this and all related IPsec standards. Metz (July 1998)
All other capitalizations of IPsec [...] are deprecated.
" 24. RFC 6434, "IPv6 Node Requirements", E. Jankiewicz, J. Loughney , T. Narten
6. Thayer, R.; Doraswamy, N.; Glenn, R. (November 1998).IP Security Document (December 2011)
Roadmap ([Link] IETF. doi:10.17487/RFC2411 ([Link] 25. "ipsecme charter" ([Link] Retrieved
[Link]/10.17487%2FRFC2411). RFC 2411. [Link] 2015-10-26.
7. Hoffman, P. (December 2005). Cryptographic Suites for IPsec([Link] 26. "ipsecme status" ([Link] Retrieved 2015-10-26.
ml/rfc4308). IETF. doi:10.17487/RFC4308 ([Link]
27. "Secret Documents Reveal N.S.A. Campaign Against Encryption"([Link]
RFC 4308. [Link]
[Link]/interactive/2013/09/05/us/documents-reveal-nsa-campaign-against-encryption.
8. Kent, S.; Atkinson, R. (November 1998).IP Authentication Header([Link] html). New York Times.
g/html/rfc2402). IETF. doi:10.17487/RFC2402 ([Link]
28. John Gilmore. "Re: [Cryptography] Opening Discussion: Speculation on "BULLRUN
""
02). RFC 2402. [Link]
([Link]
9. Kent, S. (December 2005).IP Authentication Header([Link]
29. Theo de Raadt. "Allegations regarding OpenBSD IPSEC"([Link]
2). IETF. doi:10.17487/RFC4302 ([Link] RFC
d-tech&m=129236621626462&w=2).
4302. [Link]
30. Jason Wright. "Allegations regarding OpenBSD IPSEC"([Link]
10. The Internet Key Exchange(IKE), RFC 2409, §1 Abstract
ech&m=129244045916861&w=2).
11. Harkins, D.; Carrel, D. (November 1998).The Internet Key Exchange (IKE)([Link]
31. Theo de Raadt. "Update on the OpenBSD IPSEC backdoor allegation"([Link]
[Link]/html/rfc2409). IETF. doi:10.17487/RFC2409 ([Link]
t/Articles/420858/).
FRFC2409). RFC 2409. [Link]
32. David Adrian; Karthikeyan Bhargavan; Zakir Durumeric; Pierrick Gaudry; Matthew
12. Kaufman, C., ed. IKE Version 2 ([Link] IETF.
Green; J. Alex Halderman; Nadia Heninger; Drew Springall; Emmanuel Thomé; Luke
doi:10.17487/RFC4306 ([Link] RFC 4306.
Valenta; Benjamin VanderSloot; Eric Wustrow; Santiago Zanella-Béguelink; Paul
[Link]
Zimmermann. "Imperfect Forward Secrecy: How Diffie-Hellman Fails in Practice" (http
13. Sakane, S.; Kamada, K.; Thomas, M.; Vilhuber, J. (November 1998). Kerberized s://[Link]/imperfect-forward-secrecy
.pdf) (PDF).
Internet Negotiation of Keys (KINK)([Link] IETF.
33. Goodin, Dan (August 16, 2016)."Confirmed: hacking tool leak came from
doi:10.17487/RFC4430 ([Link] RFC 4430.
"omnipotent" NSA-tied group"([Link]
[Link]
d-online-came-from-omnipotent-nsa-tied-hacking-group/). Ars Technica. Retrieved
14. Richardson, M. (February 2005).A Method for Storing IPsec Keying Material in DNS August 19, 2016.
([Link] IETF. doi:10.17487/RFC4025 ([Link]
34. Thomson, Iain (August 17, 2016)."Cisco confirms two of the Shadow Brokers' 'NSA'
17487%2FRFC4025). RFC 4025. [Link]
vulns are real" ([Link]
15. "Protocol Numbers" ([Link] _vulnerabilities_real/). The Register. Retrieved September 16, 2016.
assignments/protocol-numbers/[Link]) . IANA. IANA. 2010-05-27.
35. Pauli, Darren (August 24, 2016)."Equation Group exploit hits newer Cisco ASA,
Archived from the original ([Link]
Juniper Netscreen" ([Link]
[Link]) on 2010-07-27.
_expanded_to_target_cisco_924_asa_boxes/) . The Register. Retrieved
16. Bellovin, Steven M. (1996). "Problem Areas for the IP Security Protocols"([Link] September 16, 2016.
[Link]/~smb/papers/[Link])(PostScript). Proceedings of the Sixth
36. Chirgwin, Richard (August 18, 2016)."Fortinet follows Cisco in confirming Shadow
Usenix Unix Security Symposium. San Jose, CA. pp. 1–16. Retrieved 2007-07-09.
Broker vuln" ([Link]
17. Paterson, Kenneth G.; Yau, Arnold K.L. (2006-04-24). "Cryptography in theory and rming_shadow_broker_vuln/). The Register. Retrieved September 16, 2016.
practice: The case of encryption in IPsec"([Link] (PDF).
37. [Link]
Eurocrypt 2006, Lecture Notes in Computer Science V ol. 4004. Berlin. pp. 12–29.
Retrieved 2007-08-13. 38. [Link]
aggressive-mode-compared-to-ikev1-main-mode-or-i
18. Degabriele, Jean Paul; Paterson, Kenneth G. (2007-08-09)."Attacking the IPsec
Standards in Encryption-only Configurations"([Link] (PDF). 39. [Link]
IEEE Symposium on Security and Privacy , IEEE Computer Society. Oakland, CA.
pp. 335–349. Retrieved 2007-08-13.
External links
Computer Security at Curlie (based on DMOZ)
All IETF active security WGs
Text is available under theCreative Commons Attribution-ShareAlike License ; additional terms may apply. By using this site, you agree to theTerms of Use and Privacy Policy.
Wikipedia® is a registered trademark of theWikimedia Foundation, Inc., a non-profit organization.