IPsec

Internet Protocol Security (IPsec) is a protocol suite for securing Internet Protocol (IP) communications by authenticating and encrypting each IP packet of a communication session. IPsec also includes protocols for establishing mutual authentication between agents at the beginning of the session and negotiation of cryptographic keys to be used during the session.

IPsec is an end-to-end security scheme operating in the Internet Layer of the Internet Protocol Suite. It can be used in protecting 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]

Some other Internet security systems in widespread use, such as Secure Sockets Layer (SSL), Transport Layer Security (TLS) and Secure Shell (SSH), operate in the upper layers of the TCP/IP model. Hence, IPsec protects any application traffic across an IP network. Applications do not need to be specifically designed to use IPsec. The use of TLS/SSL, on the other hand, must be designed into an application to protect the application protocols.

IPsec originally was developed at the Naval Research Laboratory as part of a DARPA-sponsored research project. ESP was derived directly from the SP3D protocol, rather than being derived from the ISO Network-Layer Security Protocol (NLSP). The SP3D protocol specification was published by NIST, but designed by the Secure Data Network System project of the National Security Agency (NSA), IPsec AH is derived in part from previous IETF standards work for authentication of the Simple Network Management Protocol (SNMP).

IPsec is officially specified by the Internet Engineering Task Force (IETF) in a series of Request for Comments documents addressing various components and extensions. It specifies the spelling of the protocol name to be IPsec.[2]

Contents

Security architecture

The IPsec suite is an open standard. IPsec uses the following protocols to perform various functions:[3][4]

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 (see below).

AH operates directly on top of IP, using IP protocol number 51.[12]

The following AH packet diagram shows how an AH packet is constructed and interpreted:[5][6]

Authentication Header format
Offsets Octet16 0 1 2 3
Octet16 Bit10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 Next Header Payload Len Reserved
4 32 Security Parameters Index (SPI)
8 64 Sequence Number
C 96 Integrity Check Value (ICV)
Next Header (8 bits) 
Type of the next header, indicating what upper-layer protocol was protected. The value is taken from the list of IP protocol numbers.
Payload Len (8 bits) 
The length of this Authentication Header in 4-octet units, minus 2 (a value of 0 means 8 octets, 1 means 12 octets, etcetera). 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.
Reserved (16 bits) 
Reserved for future use (all zeroes until then).
Security Parameters Index (32 bits) 
Arbitrary value which is used (together with the destination IP address) to identify the security association of the receiving party.
Sequence Number (32 bits) 
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.[6]
Integrity Check Value (multiple of 32 bits) 
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

Encapsulating Security Payload (ESP) is a member of the IPsec protocol suite. In IPsec it provides origin authenticity, integrity, and confidentiality protection of packets. ESP also supports encryption-only and authentication-only configurations, but using encryption without authentication is strongly discouraged because it is insecure.[13][14][15] 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.[12]

The following ESP packet diagram shows how an ESP packet is constructed and interpreted:[1][16]

Encapsulating Security Payload format
Offsets Octet16 0 1 2 3
Octet16 Bit10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
0 0 Security Parameters Index (SPI)
4 32 Sequence Number
8 64 Payload data
   
  Padding (0-255 octets)  
  Pad Length Next Header
Integrity Check Value (ICV)
Security Parameters Index (32 bits) 
Arbitrary value which is used (together with the destination IP address) to identify the security association of the receiving party.
Sequence Number (32 bits) 
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.
Payload data (variable) 
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.
Padding (0-255 octets) 
Padding for encryption, to extend the payload data to a size that fits the encryption's cypher block size, and to align the next field.
Pad Length (8 bits) 
Size of the padding in octets.
Next Header (8 bits) 
Type of the next header. The value is taken from the list of IP protocol numbers.
Integrity Check Value (multiple of 32 bits) 
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

The IP security architecture uses the concept of a security 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 traffic, 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.[11][17][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 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 tunnel mode.

Transport mode

In transport mode, only the payload (the data you transfer) of the IP packet is usually encrypted and/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 translated, as this will invalidate the hash value. The transport and application layers are always secured by hash, so they cannot be modified in any way (for example by translating the port numbers). Transport mode is used for host-to-host communications.

A means to encapsulate IPsec messages for NAT traversal has been defined by RFC documents describing the NAT-T mechanism.

Tunnel mode

In tunnel mode, the entire IP packet is encrypted and/or 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).

Tunnel mode supports NAT traversal.

Cryptographic algorithms

Cryptographic algorithms defined for use with IPsec include:

Refer to RFC 4835 for details.

Software implementations

IPsec support is usually implemented in the kernel with key management and ISAKMP/IKE negotiation carried out from user-space. Existing IPsec implementations often include both.

There exist a number of implementations of IPsec and ISAKMP/IKE protocols. These include:

Standards status

IPsec was developed in conjunction with IPv6 and must be available in all standards-compliant implementations of IPv6 although not all IPv6 implementations include IPsec support;[31] it is optional for IPv4 implementations. However, because of the slow deployment of IPv6, IPsec is most commonly used to secure IPv4 traffic. IPsec protocols were originally defined in RFC 1825 and RFC 1829, published in 1995. In 1998, these documents were superseded by RFC 2401 and RFC 2412 with incompatible aspects, 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”. It is unusual to see any product that offers support for RFCs 1825 and 1829. “ESP” generally refers to RFC 2406, while ESPbis refers to RFC 4303.

Since mid-2008, an IPsec Maintenance and Extensions working group is active at the IETF.[32][33]

See also

References

  1. ^ a b c Kent, S.; Atkinson, R. (November 1998). IP Encapsulating Security Payload (ESP). IETF. RFC 2406. http://tools.ietf.org/html/rfc2406. 
  2. ^ "RFC4301: Security Architecture for the Internet Protocol". Network Working Group of the IETF. December 2005. p. 4. http://tools.ietf.org/html/rfc4301#page-4. "The spelling "IPsec" is preferred and used throughout this and all related IPsec standards. All other capitalizations of IPsec [...] are deprecated." 
  3. ^ Thayer, R.; Doraswamy, N.; Glenn, R. (November 1998). IP Security Document Roadmap. IETF. RFC 2411. http://tools.ietf.org/html/rfc2411. 
  4. ^ Hoffman, P. (December 2005). Cryptographic Suites for IPsec. IETF. RFC 4308. http://tools.ietf.org/html/rfc4308. 
  5. ^ a b Kent, S.; Atkinson, R. (November 1998). IP Authentication Header. IETF. RFC 2402. http://tools.ietf.org/html/rfc2402. 
  6. ^ a b c d e Kent, S. (December 2005). IP Authentication Header. IETF. RFC 4302. http://tools.ietf.org/html/rfc4302. 
  7. ^ The Internet Key Exchange (IKE), RFC 2409, §1 Abstract
  8. ^ Harkins, D.; Carrel, D. (November 1998). The Internet Key Exchange (IKE). IETF. RFC 2409. http://tools.ietf.org/html/rfc2409. 
  9. ^ Kaufman, C., ed. IKE Version 2. IETF. RFC 4306. http://tools.ietf.org/html/rfc4306. 
  10. ^ Sakane, S.; Kamada, K.; Thomas, M.; Vilhuber, J. (November 1998). Kerberized Internet Negotiation of Keys (KINK). IETF. RFC 4430. http://tools.ietf.org/html/rfc4430. 
  11. ^ a b Richardson, M. (February 2005). A Method for Storing IPsec Keying Material in DNS. IETF. RFC 4025. http://tools.ietf.org/html/rfc4025. 
  12. ^ a b "Protocol Numbers". IANA. IANA. 2010-05-27. Archived from the original on 2010-07-27. http://www.webcitation.org/5rXTFZt87. 
  13. ^ Bellovin, Steven M. (1996). "Problem Areas for the IP Security Protocols" (PostScript). Proceedings of the Sixth Usenix Unix Security Symposium. San Jose, CA. pp. 1–16. http://www.cs.columbia.edu/~smb/papers/badesp.ps. Retrieved 2007-07-09. 
  14. ^ Paterson, Kenneth G.; Yau, Arnold K.L. (2006-04-24). "Cryptography in theory and practice: The case of encryption in IPsec" (PDF). Eurocrypt 2006, Lecture Notes in Computer Science Vol. 4004. Berlin. pp. 12–29. http://eprint.iacr.org/2005/416. Retrieved 2007-08-13. 
  15. ^ Degabriele, Jean Paul; Paterson, Kenneth G. (2007-08-09). "Attacking the IPsec Standards in Encryption-only Configurations" (PDF). IEEE Symposium on Security and Privacy, IEEE Computer Society. Oakland, CA. pp. 335–349. http://eprint.iacr.org/2007/125. Retrieved 2007-08-13. 
  16. ^ Kent, S. (December 2005). IP Encapsulating Security Payload (ESP). IETF. RFC 4303. http://tools.ietf.org/html/rfc4303. 
  17. ^ RFC 2406, §1, page 2
  18. ^ RFC 3129
  19. ^ "Information Technology Division, Naval Research Laboratory". NRL ITD. 2009-10-29. http://www.itd.nrl.navy.mil/. Retrieved 2010-12-31. 
  20. ^ "Best Software Review". Daemon News. http://ezine.daemonnews.org/199812/security.html. Retrieved 2010-12-31. 
  21. ^ Worldwide. "Internet Protocol Security (IPsec) - JUNOS Software Security Configuration Guide". Juniper Networks. http://www.juniper.net/techpubs/software/junos-security/junos-security95/junos-security-swconfig-security/ipsec-chapter.html. Retrieved 2011-05-04. 
  22. ^ Worldwide. "An Introduction to IP Security (IPSec) Encryption [IPSec Negotiation/IKE Protocols]". Cisco Systems. http://www.cisco.com/en/US/tech/tk583/tk372/technologies_tech_note09186a0080094203.shtml. Retrieved 2010-12-31. 
  23. ^ "Modifying an Internet Protocol security (IPSec) policy from a Windows XP SP1-based or Windows 2000-based client may corrupt the IPSec policy". Microsoft Support. 2006-12-25. http://support.microsoft.com/?kbid=884909. Retrieved 2010-12-31. 
  24. ^ "L2TP/IPsec NAT-T update for Windows XP and Windows 2000". Microsoft Support. 2006-10-26. http://support.microsoft.com/kb/818043/en-us. Retrieved 2010-12-31. 
  25. ^ [1]
  26. ^ [2]
  27. ^ "IPsec". Microsoft TechNet. http://technet.microsoft.com/en-us/network/bb531150.aspx. Retrieved 2010-12-31. 
  28. ^ "Windows Firewall with Advanced Security Getting Started Guide". Microsoft TechNet. http://technet.microsoft.com/en-us/library/cc748991%28WS.10%29.aspx. Retrieved 2010-12-31. 
  29. ^ "Products | Toolkits". AuthenTec. http://www.authentec.com/toolkits.cfm. Retrieved 2010-12-31. 
  30. ^ "IPsec and IKE Administration Guide". Sun Microsystems. 2003-12-09. http://docs.sun.com/app/docs/doc/817-2694?a=expand. Retrieved 2010-12-31. 
  31. ^ Loughney, J., ed (April 2006). IPv6 Node Requirements. IETF. sec. 8.1. RFC 4294. http://tools.ietf.org/html/rfc4294#section-8.1. 
  32. ^ ipsecme charter
  33. ^ ipsecme status

External links

Standards