IPsec
{{short description|Secure network protocol suite}}
{{Infobox technology standard
| title = IPsec
| long_name = Internet Protocol Security
| image =
| image_size =
| alt =
| caption =
| abbreviation =
| native_name =
| native_name_lang =
| status =
| year_started = 1996
| first_published =
| version =
| version_date =
| preview =
| preview_date =
| organization = Internet Engineering Task Force
| committee =
| series =
| editors =
| authors =
| base_standards = Various, see IETF documentation chapter
| related_standards =
| predecessor =
| successor =
| domain =
| license =
| copyright =
| website =
}}
{{IPstack}}In computing, Internet Protocol Security (IPsec) is a secure network protocol suite that authenticates and encrypts packets of data to provide secure encrypted communication between two computers over an Internet Protocol network. It is used in virtual private networks (VPNs).
IPsec includes protocols for establishing mutual authentication between agents at the beginning of a 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).{{Ref RFC|2406}}
IPsec uses cryptographic security services to protect communications over Internet Protocol (IP) networks. It supports network-level peer authentication, data origin authentication, data integrity, data confidentiality (encryption), and protection from replay attacks.
The protocol was designed by a committee instead of being designed via a competition. Some experts criticized it, stating that it is complex and with a lot of options, which has a devastating effect on a security standard.{{Cite web |date=December 2003 |title=A Cryptographic Evaluation of IPsec |url=https://www.schneier.com/academic/archives/2003/12/a_cryptographic_eval.html |access-date=2024-12-01 |website=Schneier on Security |language=en-US}} There is alleged interference of NSA to weaken its security features.
History
Starting in the early 1970s, the Advanced Research Projects Agency sponsored a series of experimental ARPANET encryption devices, at first for native ARPANET packet encryption and subsequently for TCP/IP packet encryption; some of these were certified and fielded. From 1986 to 1991, the NSA sponsored the development of security protocols for the Internet under its Secure Data Network Systems (SDNS) program.{{Cite book|publisher=IEEE |chapter-url=https://ieeexplore.ieee.org/document/6168355 |language=en-US|doi=10.1109/ACCT.2012.64|s2cid=16526652|year=2012 |last1=Dhall |first1=Hitesh |last2=Dhall |first2=Dolly |last3=Batra |first3=Sonia |last4=Rani |first4=Pooja |title=2012 Second International Conference on Advanced Computing & Communication Technologies |chapter=Implementation of IPSec Protocol |pages=176–181 |isbn=978-1-4673-0471-9 }} This brought together various vendors including Motorola who produced a network encryption device in 1988. The work was openly published from about 1988 by NIST and, of these, Security Protocol at Layer 3 (SP3) would eventually morph into the ISO standard Network Layer Security Protocol (NLSP).{{Cite web |url=http://www.toad.com/gnu/netcrypt.html |title=Network Encryption – history and patents |first=John |last=Gilmore |access-date=2014-02-18 |archive-url=https://web.archive.org/web/20140903145752/http://www.toad.com/gnu/netcrypt.html |archive-date=2014-09-03 |url-status=dead }}
In 1992, the US Naval Research Laboratory (NRL) was funded by DARPA CSTO to implement IPv6 and to research and implement IP encryption in 4.4 BSD, supporting both SPARC and x86 CPU architectures. DARPA made its implementation freely available via MIT. Under NRL's DARPA-funded research effort, NRL developed the IETF standards-track specifications (RFC 1825 through RFC 1827) for IPsec. NRL's IPsec implementation was described in their paper in the 1996 USENIX Conference Proceedings.{{Cite web|url=https://www.usenix.org/legacy/publications/library/proceedings/sd96/atkinson.html|title=USENIX 1996 ANNUAL TECHNICAL CONFERENCE|website=www.usenix.org}} NRL's open-source IPsec implementation was made available online by MIT and became the basis for most initial commercial implementations.{{Cite web|url=https://web.mit.edu/network/isakmp/|title=IPv6 + IPSEC + ISAKMP Distribution Page|website=web.mit.edu}}
The Internet Engineering Task Force (IETF) formed the IP Security Working Group in 1992{{Cite web|url=https://datatracker.ietf.org/wg/ipsec/history/|title=IP Security Protocol (ipsec) -|website=datatracker.ietf.org}} to standardize openly specified security extensions to IP, called IPsec.{{Ref RFC|4301|p=4|quote=The spelling "IPsec" is preferred and used throughout this and all related IPsec standards. All other capitalizations of IPsec [...] are deprecated.}} The NRL developed standards were published by the IETF as RFC 1825 through RFC 1827.{{Cite web|url=https://www.nrl.navy.mil/itd/sites/www.nrl.navy.mil.itd/files/files/itd_accomp_ipsec.pdf |archive-url=https://web.archive.org/web/20150915230737/http://www.nrl.navy.mil/itd/sites/www.nrl.navy.mil.itd/files/files/itd_accomp_ipsec.pdf |archive-date=2015-09-15 |url-status=dead|title=NRL ITD Accomplishments - IPSec and IPv6|website=US Naval Research Laboratories}}
Security architecture
The initial IPv4 suite was developed with few security provisions. As a part of the IPv4 enhancement, IPsec is a layer 3 OSI model or internet layer end-to-end security scheme. In contrast, while some other Internet security systems in widespread use operate above the network layer, such as Transport Layer Security (TLS) that operates above the transport layer and Secure Shell (SSH) that operates at the application layer, IPsec can automatically secure applications at the internet layer.
IPsec is an open standard as a part of the IPv4 suite and uses the following protocols to perform various functions:{{Ref RFC|6071}}{{Ref RFC|4308}}
- Authentication Header (AH) provides connectionless data integrity and data origin authentication for IP datagrams and provides protection against IP header modification attacks and replay attacks.{{Ref RFC|4302}}
- Encapsulating Security Payload (ESP) provides confidentiality, connectionless data integrity, data origin authentication, an anti-replay service (a form of partial sequence integrity), and limited traffic-flow confidentiality.{{Ref RFC|2406}}
- Internet Security Association and Key Management Protocol (ISAKMP) provides a framework for authentication and key exchange,The Internet Key Exchange (IKE), RFC 2409, §1 Abstract 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 IPSECKEY DNS records.{{Ref RFC|2409}}{{Ref RFC|4306}}{{Ref RFC|4430}}{{Ref RFC|4025}} The purpose is to generate the security associations (SA) with the bundle of algorithms and parameters necessary for AH and/or ESP operations.
=Authentication Header=
The Security Authentication Header (AH) was developed at the US Naval Research Laboratory in the early 1990s and is derived in part from previous IETF standards' work for authentication of the Simple Network Management Protocol (SNMP) version 2. Authentication Header (AH) is a member of the IPsec protocol suite. AH ensures connectionless integrity by using a hash function and a secret shared key in the AH algorithm. AH also guarantees the data origin by authenticating IP packets. Optionally a sequence number can protect the IPsec packet's contents against replay attacks,{{Cite book|title= Carrier-Scale IP Networks: Designing and Operating Internet Networks|author =Peter Willis |publisher= IET|year=2001 |isbn= 9780852969823|page=270}}{{Ref RFC|4949}} using the sliding window technique and discarding old packets.
- In IPv4, AH prevents option-insertion attacks. In IPv6, 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.{{Ref RFC|1108}} Mutable (and therefore unauthenticated) IPv4 header fields are DSCP/ToS, ECN, Flags, Fragment Offset, TTL and Header Checksum.{{Ref RFC|4302}}
- 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.{{Ref RFC|4302}}
AH operates directly on top of IP, using List of IP protocol numbers.{{cite web|url=https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml |title=Protocol Numbers |date=2010-05-27 |archive-url=https://web.archive.org/web/20100529122930/https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml |archive-date=2010-05-29 |work=IANA |url-status=dead }}
The following AH packet diagram shows how an AH packet is constructed and interpreted:{{Ref RFC|4302}}
{{APHD|start|title=Authentication Header format}}
{{APHD|0|bits1=8|field1=Next Header|bits2=8|field2=Payload Len|bits3=16|field3=Reserved}}
{{APHD|4|bits1=32|field1=Security Parameters Index}}
{{APHD|8|bits1=32|field1=Sequence Number}}
{{APHD|999|hoctets=12|hbits=96|bits1=64|field1=Integrity Check Value}}
{{APHD|end}}
;{{APHD|def|name=Next Header|length=8 bits|text=Type of the next header, indicating what upper-layer protocol was protected. The value is taken from the list of IP protocol numbers.}}
;{{APHD|def|name=Payload Len|length=8 bits|text=The length of this Authentication Header in 4-octet units, minus 2. For example, an AH value of 4 equals 3×(32-bit fixed-length AH fields) + 3×(32-bit ICV fields) − 2 and thus an AH value of 4 means 24 octets. Although the size is measured in 4-octet units, the length of this header needs to be a multiple of 8 octets if carried in an IPv6 packet. This restriction does not apply to an Authentication Header carried in an IPv4 packet.}}
;{{APHD|def|name=Reserved|length=16 bits|text=Reserved for future use (all zeroes until then).}}
;{{APHD|def|name=Security Parameters Index|length=32 bits|text=Arbitrary value which is used (together with the destination IP address) to identify the security association of the receiving party.}}
;{{APHD|def|name=Sequence Number|length=32 bits|text=A monotonic strictly increasing sequence number (incremented by 1 for every packet sent) to prevent replay attacks. When replay detection is enabled, sequence numbers are never reused, because a new security association must be renegotiated before an attempt to increment the sequence number beyond its maximum value.{{Ref RFC|4302}}}}
;{{APHD|def|name=Integrity Check Value|length=multiple of 32 bits|text=Variable length check value. It may contain padding to align the field to an 8-octet boundary for IPv6, or a 4-octet boundary for IPv4.}}
=Encapsulating Security Payload=
File:Ipsec-esp-tunnel-and-transport.svg
The IP Encapsulating Security Payload (ESP){{cite web | url = http://www.toad.com/gnu/draft-ietf-sip-esp-00.txt | title = SIPP Encapsulating Security Payload | publisher = IETF SIPP Working Group | year = 1993 | access-date = 2013-08-07 | archive-url = https://web.archive.org/web/20160909031941/http://www.toad.com/gnu/draft-ietf-sip-esp-00.txt | archive-date = 2016-09-09 | url-status = dead }} was developed at the Naval Research Laboratory starting in 1992 as part of a DARPA-sponsored research project, and was openly published by IETF SIPP{{cite web | url = http://tools.ietf.org/html/draft-ietf-sipp-spec-00 | title = Draft SIPP Specification | publisher = IETF | year = 1993 | page = 21| last1 = Deering | first1 = Steve E. }} 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.
Encapsulating Security Payload (ESP) is a member of the IPsec protocol suite. It provides origin authenticity through source authentication, data integrity through hash functions and confidentiality through encryption protection for IP packets. ESP also supports encryption-only and authentication-only configurations, but using encryption without authentication is strongly discouraged because it is insecure.{{cite conference | title=Problem Areas for the IP Security Protocols | book-title=Proceedings of the Sixth Usenix Unix Security Symposium | first=Steven M. | last=Bellovin | year=1996 | pages=1–16 | place=San Jose, CA | url=https://www.cs.columbia.edu/~smb/papers/badesp.ps | access-date=2007-07-09|author-link=Steven M. Bellovin|format=PostScript}}{{cite conference | title=Cryptography in theory and practice: The case of encryption in IPsec | book-title=Eurocrypt 2006, Lecture Notes in Computer Science Vol. 4004 | last1=Paterson|first1=Kenneth G.|last2=Yau|first2=Arnold K.L.|date=2006-04-24|pages=12–29 | location=Berlin | url=http://eprint.iacr.org/2005/416 | access-date=2007-08-13|format=PDF}}{{cite conference | title=Attacking the IPsec Standards in Encryption-only Configurations | book-title=IEEE Symposium on Security and Privacy, IEEE Computer Society |last1=Degabriele|first1=Jean Paul|last2=Paterson|first2=Kenneth G.|date=2007-08-09|format=PDF | pages=335–349 | location=Oakland, CA | url=http://eprint.iacr.org/2007/125 | access-date=2007-08-13 }}
Unlike Authentication Header (AH), ESP in transport mode does not provide integrity and authentication for the entire IP packet. However, in tunnel mode, where the entire original IP packet is encapsulated with a new packet header added, ESP protection is afforded to the whole inner IP packet (including the inner header) while the outer header (including any outer IPv4 options or IPv6 extension headers) remains unprotected.
ESP operates directly on top of IP, using IP protocol number 50.
The following ESP packet diagram shows how an ESP packet is constructed and interpreted:{{Ref RFC|4303}}
{{APHD|start|title=Encapsulating Security Payload format}}
{{APHD|0|bits1=32|field1=Security Parameters Index}}
{{APHD|4|bits1=32|field1=Sequence Number}}
{{APHD|999|hoctets=8|hbits=64|bits1=64|border1=bottom|background1=mistyrose|field1=Payload Data}}
{{APHD|999|bits1=8|border1=top|background1=mistyrose|field1={{nbsp}}|bits2=24|background2=linen|border2=bottom|field2={{nbsp}}}}
{{APHD|999|bits1=32|border1=top-bottom|background1=linen|field1=(Padding)}}
{{APHD|999|bits1=16|border1=top|background1=linen|field1={{nbsp}}|bits2=8|field2=Pad Length|bits3=8|field3=Next Header}}
{{APHD|999|bits1=64|field1=Integrity Check Value{{break}}⋮}}
{{APHD|end}}
;{{APHD|def|name=Security Parameters Index|short=SPI|length=32 bits|text=Arbitrary value used (together with the destination IP address) to identify the security association of the receiving party.}}
;{{APHD|def|name=Sequence Number|length=32 bits|text=A monotonically increasing sequence number (incremented by 1 for every packet sent) to protect against replay attacks. There is a separate counter kept for every security association.}}
;{{APHD|def|name=Payload Data|length=variable|text=The protected contents of the original IP packet, including any data used to protect the contents (e.g. an Initialisation Vector for the cryptographic algorithm). The type of content that was protected is indicated by the Next Header field.}}
;{{APHD|def|name=Padding|length=0-255 octets|text=Optional. Padding for encryption, to extend the payload data to a size that fits the encryption's cipher block size, and to align the next field.}}
;{{APHD|def|name=Pad Length|length=8 bits|text=Size of the padding (in octets).}}
;{{APHD|def|name=Next Header|length=8 bits|text=Indicates the protocol type of the Payload Data,{{Ref RFC|4303|rsection=2.6}} like the value {{Mono|6}} for TCP. As ESP is an encapsulation protocol, a value of {{Mono|4}} is also possible, indicating IP in IP. A value of {{Mono|41}} indicates IPv6 encapsulated in IPv4, e.g. 6to4. The value {{Mono|59}} (meaning: No Next Header) is used for dummy packets, which may be inserted in the stream, and which contents should be discarded.}}
;{{APHD|def|name=Integrity Check Value|short=ICV|length=variable|text=Variable length check value. It may contain padding to align the field to an 8-octet boundary for IPv6, or a 4-octet boundary for IPv4.}}
=Security association=
{{main|Security association}}
The IPsec protocols use a security association, where the communicating parties establish shared security attributes such as algorithms and keys. As such, IPsec provides a range of options once it has been determined whether AH or ESP is used. Before exchanging data, the two hosts agree on which symmetric encryption algorithm is used to encrypt the IP packet, for example AES or ChaCha20, and which hash function is used to ensure the integrity of the data, such as BLAKE2 or SHA256. These parameters are agreed for the particular session, for which a lifetime must be agreed and a session key.{{Cite book|title= Carrier-Scale IP Networks: Designing and Operating Internet Networks|author =Peter Willis |publisher= IET|year=2001 |isbn= 9780852969823|page=271}}
The algorithm for authentication is also agreed before the data transfer takes place and IPsec supports a range of methods. Authentication is possible through pre-shared key, where a symmetric key is already in the possession of both hosts, and the hosts send each other hashes of the shared key to prove that they are in possession of the same key. IPsec also supports public key encryption, where each host has a public and a private key, they exchange their public keys and each host sends the other a nonce encrypted with the other host's public key. Alternatively if both hosts hold a public key certificate from a certificate authority, this can be used for IPsec authentication.{{Cite book|title= Carrier-Scale IP Networks: Designing and Operating Internet Networks|author =Peter Willis |publisher= IET|year=2001 |isbn= 9780852969823|pages=272–3}}
The security associations of IPsec 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.{{Ref RFC|4025}}{{Ref RFC|2406|rsection=1}}{{Ref RFC|3129}} RFC 5386 defines Better-Than-Nothing Security (BTNS) as an unauthenticated mode of IPsec using an extended IKE protocol. C. Meadows, C. Cremers, and others have used formal methods to identify various anomalies which exist in IKEv1 and also in IKEv2.{{cite book|author=C. Cremers|title=Key Exchange in IPsec Revisited: Formal Analysis of IKEv1 and IKEv2, ESORICS 2011|chapter=Key Exchange in IPsec Revisited: Formal Analysis of IKEv1 and IKEv2 |series=Lecture Notes in Computer Science|year=2011|volume=6879 |pages=315–334|publisher=Springer|doi=10.1007/978-3-642-23822-2_18|hdl=20.500.11850/69608|isbn=9783642238222|s2cid=18222662 |chapter-url=https://link.springer.com/chapter/10.1007/978-3-642-23822-2_18}}
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 identifies 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 IP 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.
Keepalives
To ensure that the connection between two endpoints has not been interrupted, endpoints exchange keepalive messages at regular intervals, which can also be used to automatically reestablish a tunnel lost due to connection interruption.
Dead Peer Detection (DPD) is a method of detecting a dead Internet Key Exchange (IKE) peer. The method uses IPsec traffic patterns to minimize the number of messages required to confirm the availability of a peer. DPD is used to reclaim the lost resources in case a peer is found dead and it is also used to perform IKE peer failover.
UDP keepalive is an alternative to DPD.
Modes of operation
The IPsec protocols AH and ESP 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 for NAT traversal (NAT-T) has been defined by RFC documents describing the NAT-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-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).William, S., & Stallings, W. (2006). Cryptography and Network Security, 4/E. Pearson Education India. p. 492-493
Tunnel mode supports NAT traversal.
Algorithms
=Symmetric encryption algorithms=
Cryptographic algorithms defined for use with IPsec include:
- HMAC-SHA1/SHA2 for integrity protection and authenticity.
- TripleDES-CBC for confidentiality
- AES-CBC and AES-CTR for confidentiality.
- AES-GCM and ChaCha20-Poly1305 providing confidentiality and authentication together efficiently.
Refer to RFC 8221 for details.
=Key exchange algorithms=
- Diffie–Hellman (RFC 3526)
- ECDH (RFC 4753)
=Authentication algorithms=
Implementations
The IPsec can be implemented in the IP stack of an operating system. This method of implementation is done for hosts and security gateways. Various IPsec capable IP stacks are available from companies, such as HP or IBM.{{Cite book|title= Carrier-Scale IP Networks: Designing and Operating Internet Networks|author =Peter Willis |publisher= IET|year=2001 |isbn= 9780852969823|page=266}} An alternative is so called bump-in-the-stack (BITS) implementation, where the operating system source code does not have to be modified. Here IPsec is installed between the IP stack and the network drivers. This way operating systems can be retrofitted with IPsec. This method of implementation is also used for both hosts and gateways. However, when retrofitting IPsec the encapsulation of IP packets may cause problems for the automatic path MTU discovery, where the maximum transmission unit (MTU) size on the network path between two IP hosts is established. If a host or gateway has a separate cryptoprocessor, which is common in the military and can also be found in commercial systems, a so-called bump-in-the-wire (BITW) implementation of IPsec is possible.{{Cite book|title= Carrier-Scale IP Networks: Designing and Operating Internet Networks|author =Peter Willis |publisher= IET|year=2001 |isbn= 9780852969823|page=267}}
When IPsec is implemented in the kernel, the key management and ISAKMP/IKE negotiation is carried out from user space. The NRL-developed and openly specified "PF_KEY Key Management API, Version 2" is often used to enable the application-space key management application to update the IPsec security associations stored within the kernel-space IPsec implementation.RFC 2367, PF_KEYv2 Key Management API, Dan McDonald, Bao Phan, & Craig Metz (July 1998) 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.
Embedded IPsec can be used to ensure the secure communication among applications running over constrained resource systems with a small overhead.{{Cite book|last1=Hamad|first1=Mohammad|last2=Prevelakis|first2=Vassilis|title=2015 World Symposium on Computer Networks and Information Security (WSCNIS) |chapter=Implementation and performance evaluation of embedded IPsec in microkernel OS |date=2015|pages=1–7 |language=en-US|publisher=IEEE|doi=10.1109/wscnis.2015.7368294|isbn=9781479999064|s2cid=16935000|url=https://publikationsserver.tu-braunschweig.de/receive/dbbs_mods_00065815}}
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.{{ref RFC|6434}} IPsec is also optional for IPv4 implementations. IPsec is most commonly used to secure IPv4 traffic.{{citation needed|date=January 2019}}
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.
Since mid-2008, an IPsec Maintenance and Extensions (ipsecme) working group is active at the IETF.{{cite web|access-date=2015-10-26|url=https://datatracker.ietf.org/wg/ipsecme/charter/|title=ipsecme charter}}{{cite web|access-date=2015-10-26|url=https://tools.ietf.org/wg/ipsecme/|title=ipsecme status}}
Alleged NSA interference
In 2013, as part of Snowden leaks, it was revealed that the US National Security Agency had been actively working to "Insert vulnerabilities into commercial encryption systems, IT systems, networks, and endpoint communications devices used by targets" as part of the Bullrun program.{{cite news|url=https://www.nytimes.com/interactive/2013/09/05/us/documents-reveal-nsa-campaign-against-encryption.html|newspaper=New York Times|title=Secret Documents Reveal N.S.A. Campaign Against Encryption}} There are allegations that IPsec was a targeted encryption system.{{cite web|url=http://www.mail-archive.com/cryptography@metzdowd.com/msg12325.html|title=Re: [Cryptography] Opening Discussion: Speculation on "BULLRUN"|author=John Gilmore}}
The OpenBSD IPsec stack came later on and also was widely copied. 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.{{cite web|url=http://marc.info/?l=openbsd-tech&m=129236621626462&w=2|title=Allegations regarding OpenBSD IPSEC|author=Theo de Raadt}} 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 Cryptographic Framework (OCF)."{{cite web|url=http://marc.info/?l=openbsd-tech&m=129244045916861&w=2|title=Allegations regarding OpenBSD IPSEC|author=Jason Wright}} Some days later, de Raadt commented that "I believe that NETSEC was probably contracted to write backdoors as alleged. ... If those were written, I don't believe they made it into our tree."{{cite web|url=https://lwn.net/Articles/420858/|title=Update on the OpenBSD IPSEC backdoor allegation|author=Theo de Raadt}} This was published before the Snowden leaks.
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,{{Cite book|chapter-url=https://doi.org/10.1145/2810103.2813707|doi=10.1145/2810103.2813707|chapter=Imperfect Forward Secrecy|title=Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security|year=2015|last1=Adrian|first1=David|last2=Bhargavan|first2=Karthikeyan|last3=Durumeric|first3=Zakir|last4=Gaudry|first4=Pierrick|last5=Green|first5=Matthew|last6=Halderman|first6=J. Alex|last7=Heninger|first7=Nadia|last8=Springall|first8=Drew|last9=Thomé|first9=Emmanuel|last10=Valenta|first10=Luke|last11=Vandersloot|first11=Benjamin|last12=Wustrow|first12=Eric|last13=Zanella-Béguelin|first13=Santiago|last14=Zimmermann|first14=Paul|pages=5–17|isbn=9781450338325|s2cid=347988}} 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 software backdoors.
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{{Cite news | url = https://arstechnica.com/security/2016/08/code-dumped-online-came-from-omnipotent-nsa-tied-hacking-group/ | title = Confirmed: hacking tool leak came from "omnipotent" NSA-tied group | first = Dan | last = Goodin | date = August 16, 2016 | access-date = August 19, 2016 | newspaper = Ars Technica}} and validated by those manufacturers as being real exploits, some of which were zero-day exploits at the time of their exposure.{{Cite news | url = https://www.theregister.co.uk/2016/08/17/cisco_two_shadow_brokers_vulnerabilities_real/ | first = Iain | last = Thomson | title = Cisco confirms two of the Shadow Brokers' 'NSA' vulns are real | date = August 17, 2016 | access-date = September 16, 2016 | newspaper = The Register}}{{Cite news | title = Equation Group exploit hits newer Cisco ASA, Juniper Netscreen | url = https://www.theregister.co.uk/2016/08/24/equation_group_exploit_expanded_to_target_cisco_924_asa_boxes/ | first = Darren | last = Pauli | date = August 24, 2016 | access-date=September 16, 2016 | newspaper = The Register}}{{Cite news | url = https://www.theregister.co.uk/2016/08/18/fortinet_follows_cisco_in_confirming_shadow_broker_vuln/ | title = Fortinet follows Cisco in confirming Shadow Broker vuln | first = Richard | last = Chirgwin | newspaper = The Register | date = August 18, 2016 | access-date = September 16, 2016}} The Cisco PIX and ASA firewalls had vulnerabilities that were used for wiretapping by the NSA{{citation needed|date=April 2020}}.
Furthermore, IPsec VPNs using "Aggressive Mode" settings send a hash of the PSK in the clear. This can be and apparently is targeted by the NSA using offline dictionary attacks.{{Cite web|url=https://crypto.stackexchange.com/questions/27404/what-are-the-problems-of-ikev1-aggressive-mode-compared-to-ikev1-main-mode-or-i|title=key exchange - What are the problems of IKEv1 aggressive mode (compared to IKEv1 main mode or IKEv2)?|website=Cryptography Stack Exchange}}{{Cite web|url=https://nohats.ca/wordpress/blog/2014/12/29/dont-stop-using-ipsec-just-yet/|title=Don't stop using IPsec just yet|author=|website=No Hats|date=December 29, 2014}}
See also
References
{{Reflist|30em}}
Further reading
=Standards track=
- {{IETF RFC|1829|link=no}}: The ESP DES-CBC Transform
- {{IETF RFC|2403|link=no}}: The Use of HMAC-MD5-96 within ESP and AH
- {{IETF RFC|2404|link=no}}: The Use of HMAC-SHA-1-96 within ESP and AH
- {{IETF RFC|2405|link=no}}: The ESP DES-CBC Cipher Algorithm With Explicit IV
- {{IETF RFC|2410|link=no}}: The NULL Encryption Algorithm and Its Use With IPsec
- {{IETF RFC|2451|link=no}}: The ESP CBC-Mode Cipher Algorithms
- {{IETF RFC|2857|link=no}}: The Use of HMAC-RIPEMD-160-96 within ESP and AH
- {{IETF RFC|3526|link=no}}: More Modular Exponential (MODP) Diffie-Hellman groups for Internet Key Exchange (IKE)
- {{IETF RFC|3602|link=no}}: The AES-CBC Cipher Algorithm and Its Use with IPsec
- {{IETF RFC|3686|link=no}}: Using Advanced Encryption Standard (AES) Counter Mode With IPsec Encapsulating Security Payload (ESP)
- {{IETF RFC|3947|link=no}}: Negotiation of NAT-Traversal in the IKE
- {{IETF RFC|3948|link=no}}: UDP Encapsulation of IPsec ESP Packets
- {{IETF RFC|4106|link=no}}: The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating Security Payload (ESP)
- {{IETF RFC|4301|link=no}}: Security Architecture for the Internet Protocol
- {{IETF RFC|4302|link=no}}: IP Authentication Header
- {{IETF RFC|4303|link=no}}: IP Encapsulating Security Payload
- {{IETF RFC|4304|link=no}}: Extended Sequence Number (ESN) Addendum to IPsec Domain of Interpretation (DOI) for Internet Security Association and Key Management Protocol (ISAKMP)
- {{IETF RFC|4307|link=no}}: Cryptographic Algorithms for Use in the Internet Key Exchange Version 2 (IKEv2)
- {{IETF RFC|4308|link=no}}: Cryptographic Suites for IPsec
- {{IETF RFC|4309|link=no}}: Using Advanced Encryption Standard (AES) CCM mode with IPsec Encapsulating Security Payload (ESP)
- {{IETF RFC|4543|link=no}}: The Use of Galois Message Authentication Code (GMAC) in IPsec ESP and AH
- {{IETF RFC|4555|link=no}}: IKEv2 Mobility and Multihoming Protocol (MOBIKE)
- {{IETF RFC|4806|link=no}}: Online Certificate Status Protocol (OCSP) Extensions to IKEv2
- {{IETF RFC|4868|link=no}}: Using HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512 with IPsec
- {{IETF RFC|4945|link=no}}: The Internet IP Security PKI Profile of IKEv1/ISAKMP, IKEv2, and PKIX
- {{IETF RFC|5280|link=no}}: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile
- {{IETF RFC|5282|link=no}}: Using Authenticated Encryption Algorithms with the Encrypted Payload of the Internet Key Exchange version 2 (IKEv2) Protocol
- {{IETF RFC|5386|link=no}}: Better-Than-Nothing Security: An Unauthenticated Mode of IPsec
- {{IETF RFC|5529|link=no}}: Modes of Operation for Camellia for Use with IPsec
- {{IETF RFC|5685|link=no}}: Redirect Mechanism for the Internet Key Exchange Protocol Version 2 (IKEv2)
- {{IETF RFC|5723|link=no}}: Internet Key Exchange Protocol Version 2 (IKEv2) Session Resumption
- {{IETF RFC|5857|link=no}}: IKEv2 Extensions to Support Robust Header Compression over IPsec
- {{IETF RFC|5858|link=no}}: IPsec Extensions to Support Robust Header Compression over IPsec
- {{IETF RFC|7296|link=no}}: Internet Key Exchange Protocol Version 2 (IKEv2)
- {{IETF RFC|7321|link=no}}: Cryptographic Algorithm Implementation Requirements and Usage Guidance for Encapsulating Security Payload (ESP) and Authentication Header (AH)
- {{IETF RFC|7383|link=no}}: Internet Key Exchange Protocol Version 2 (IKEv2) Message Fragmentation
- {{IETF RFC|7427|link=no}}: Signature Authentication in the Internet Key Exchange Version 2 (IKEv2)
- {{IETF RFC|7634|link=no}}: ChaCha20, Poly1305, and Their Use in the Internet Key Exchange Protocol (IKE) and IPsec
=Experimental RFCs=
- {{IETF RFC|4478|link=no}}: Repeated Authentication in Internet Key Exchange (IKEv2) Protocol
=Informational RFCs=
- {{IETF RFC|2367|link=no}}: PF_KEY Interface
- {{IETF RFC|2412|link=no}}: The OAKLEY Key Determination Protocol
- {{IETF RFC|3706|link=no}}: A Traffic-Based Method of Detecting Dead Internet Key Exchange (IKE) Peers
- {{IETF RFC|3715|link=no}}: IPsec-Network Address Translation (NAT) Compatibility Requirements
- {{IETF RFC|4621|link=no}}: Design of the IKEv2 Mobility and Multihoming (MOBIKE) Protocol
- {{IETF RFC|4809|link=no}}: Requirements for an IPsec Certificate Management Profile
- {{IETF RFC|5387|link=no}}: Problem and Applicability Statement for Better-Than-Nothing Security (BTNS)
- {{IETF RFC|5856|link=no}}: Integration of Robust Header Compression over IPsec Security Associations
- {{IETF RFC|5930|link=no}}: Using Advanced Encryption Standard Counter Mode (AES-CTR) with the Internet Key Exchange version 02 (IKEv2) Protocol
- {{IETF RFC|6027|link=no}}: IPsec Cluster Problem Statement
- {{IETF RFC|6071|link=no}}: IPsec and IKE Document Roadmap
- {{IETF RFC|6379|link=no}}: Suite B Cryptographic Suites for IPsec
- {{IETF RFC|6380|link=no}}: Suite B Profile for Internet Protocol Security (IPsec)
- {{IETF RFC|6467|link=no}}: Secure Password Framework for Internet Key Exchange Version 2 (IKEv2)
=Best current practice RFCs=
- {{IETF RFC|5406|link=no}}: Guidelines for Specifying the Use of IPsec Version 2
=Obsolete/historic RFCs=
- {{IETF RFC|1825|link=no}}: Security Architecture for the Internet Protocol (obsoleted by RFC 2401)
- {{IETF RFC|1826|link=no}}: IP Authentication Header (obsoleted by RFC 2402)
- {{IETF RFC|1827|link=no}}: IP Encapsulating Security Payload (ESP) (obsoleted by RFC 2406)
- {{IETF RFC|1828|link=no}}: IP Authentication using Keyed MD5 (historic)
- {{IETF RFC|2401|link=no}}: Security Architecture for the Internet Protocol (IPsec overview) (obsoleted by RFC 4301)
- {{IETF RFC|2406|link=no}}: IP Encapsulating Security Payload (ESP) (obsoleted by RFC 4303 and RFC 4305)
- {{IETF RFC|2407|link=no}}: The Internet IP Security Domain of Interpretation for ISAKMP (obsoleted by RFC 4306)
- {{IETF RFC|2409|link=no}}: The Internet Key Exchange (obsoleted by RFC 4306)
- {{IETF RFC|4305|link=no}}: Cryptographic Algorithm Implementation Requirements for Encapsulating Security Payload (ESP) and Authentication Header (AH) (obsoleted by RFC 4835)
- {{IETF RFC|4306|link=no}}: Internet Key Exchange (IKEv2) Protocol (obsoleted by RFC 5996)
- {{IETF RFC|4718|link=no}}: IKEv2 Clarifications and Implementation Guidelines (obsoleted by RFC 7296)
- {{IETF RFC|4835|link=no}}: Cryptographic Algorithm Implementation Requirements for Encapsulating Security Payload (ESP) and Authentication Header (AH) (obsoleted by RFC 7321)
- {{IETF RFC|5996|link=no}}: Internet Key Exchange Protocol Version 2 (IKEv2) (obsoleted by RFC 7296)
External links
- [http://www.ietf.org/html.charters/wg-dir.html#Security%20Area All IETF active security WGs]
- [http://datatracker.ietf.org/wg/ipsecme/ IETF ipsecme WG] ("IP Security Maintenance and Extensions" Working Group)
- [https://web.archive.org/web/20070416135452/http://www.ietf.org/html.charters/btns-charter.html IETF btns WG] ("Better-Than-Nothing Security" Working Group) (chartered to work on unauthenticated IPsec, IPsec APIs, connection latching)]
- [http://www.windowsecurity.com/articles/Securing_Data_in_Transit_with_IPSec.html Securing Data in Transit with IPsec] {{Webarchive|url=https://web.archive.org/web/20081013035743/http://www.windowsecurity.com/articles/Securing_Data_in_Transit_with_IPSec.html |date=2008-10-13 }} WindowsSecurity.com article by Deb Shinder
- [http://www.microsoft.com/ipsec IPsec] on Microsoft TechNet
- [http://www.microsoft.com/downloads/details.aspx?FamilyID=1d4c292c-7998-42e4-8786-789c7b457881&displaylang=en Microsoft IPsec Diagnostic Tool] on Microsoft Download Center
- [http://www.unixwiz.net/techtips/iguide-ipsec.html An Illustrated Guide to IPsec] by Steve Friedl
- [https://www.ict.tuwien.ac.at/lva/384.081/infobase/P97-IPsec_v4-7.pdf Security Architecture for IP (IPsec)] Data Communication Lectures by Manfred Lindner Part IPsec
- [http://www.linuxjournal.com/article/9916 Creating VPNs with IPsec and SSL/TLS] Linux Journal article by Rami Rosen
{{VPN}}
{{Authority control}}
{{DEFAULTSORT:Ipsec}}
Category:Cryptographic protocols