Shopping on line can be easy, simple and save you lots of money. It can also take a lot of your time, frustrate you, and result in unwanted purchases. Now the same can be said for regular high street shopping, but with the vast opportunity presented by the Internet it will pay you to spend a few minutes reading this and understanding how to better optimize your Ipsec shopping experience:
1. Compare - without doubt the biggest advantage that the Ipsec offers shoppers today is the ability to compare thousands of Ipsec at a time. This is a great thing, but not necessarily all the time! Too much can be daunting at times so take advantage of the great comparison sites and where possible let them do the hard work for you.
2. Research - if it has been said it will be on the internet. Ignorance is no longer a justifiable reason for buying the wrong thing. Take the time to research in detail everything that you could possible want to know about
3. Testimonials - don't know anybody that has bought a Ipsec? Wrong! If the Ipsec is good the internet will let you know. Use the Internet as a friend and get testimonials before you buy.
4. Questions - Got a question about Ipsec then search the Forums, FAQ's, Blogs etc. Don't be afraid to ask .....
5. Reputation - Never heard of the company selling Ipsec? Don't worry, no reason why you should know every company in the world, but you know someone that does! Use the internet to find out what people are saying about Ipsec and build up a picture of their reputation for sales, returns, customer service, delivery etc.
6. Returns - still worried that even after all of the above your Ipsec wont be what you want? Check out the returns policy. There is so much competition now that someone, somewhere is bound to offer the terms that you are comfortable with.
7. Feedback - happy with your Ipsec then let people know, after all you are depending on others people input in your buying decision, so why not give a little back.
8. Security - check for the yellow padlock on the Ipsec site before you buy, and the s after http:/ /i.e. https:// = a secure site
9. Contact - got a question about Ipsec, or want to leave a comment then check out the sites contact page. Reputable companies have them and respond.
10. Payment - ready to pay for your Ipsec, then use your credit card or PayPal! Be aware of companies that don't accept them, there may be genuine reasons but given the huge amount of choice you have when buying online there is no reason at all not to buy via credit card or PayPal.
IPsec (
IP security) is a
Protocol suite for securing
Internet Protocol (IP) communications by
authentication and/or
encryption each
packet#Example: IP packets in a
data stream. IPsec also includes protocols for cryptographic IKE.
Summary
IPsec protocols operate at the network layer, layer 3 of the OSI model. Other Internet security protocols in widespread use, such as
Secure Sockets Layer,
Transport Layer Security and Secure Shell, operate from the transport layer up (OSI layers 4 - 7). This makes IPsec more flexible, as it can be used for protecting layer 4 protocols, including both
Transmission Control Protocol and
User Datagram Protocol, the most commonly used transport layer protocols. IPSec has an advantage over SSL and other methods that operate at higher layers. For an application to use IPsec no code change in the applications is required whereas to use SSL and other higher level protocols, applications must undergo code changes.
Security architecture
IPsec is implemented by a set of
cryptographic protocols for (1) securing packet flows, (2) internet key exchange and (3)
internet key exchange.
The IP security architecture uses the concept of a security association as the basis for building security functions into
Internet Protocol. 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. The actual choice of encryption and authentication algorithms (from a defined list) is left to the IPsec administrator.
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.
Current status as a standard
IPsec is a mandatory part of IPv6, and is optional for use with IPv4. While the standard is designed to be indifferent to IP versions, current widespread deployment and experience concerns IPv4 implementations.
IPsec protocols were originally defined by
Request for Commentss 1825–1829, published in 1995. In 1998, these documents were obsoleted by Request for Commentss 2401–2412, which are not compatible with 1825–1829, although they are conceptually identical. In December 2005, third-generation documents,
Request for Commentss 4301–4309, were produced. They are largely a superset of 2401–2412, but provide a
IKEv2 standard. These third-generation documents standardized the abbreviation of IPsec to uppercase “IP” and lowercase “sec”.
It is unusual to see any product that offers RFC1825–1829 support. “ESP” generally refers to 2406, while ESPbis refers to 4303.
Design intent
IPsec was intended to provide either
transport mode (end-to-end) security of packet traffic in which the end-point computers do the security processing, or
tunnel mode (portal-to-portal) communications security in which security of packet traffic is provided to several machines (even to whole Local area networks) by a single node.
IPsec can be used to create Virtual Private Networks (VPN) in either mode, and this is the dominant use. Note, however, that the security implications are quite different between the two operational modes.
End-to-end communication security on an Internet-wide scale has been slower to develop than many had expected. Part of the reason is that no universal, or universally trusted,
Public Key Infrastructure (PKI) has emerged (
DNSSEC was originally envisioned for this); another part is that many users understand neither their needs nor the available options well enough to promote inclusion in vendors' products.
Since the Internet Protocol does not inherently provide any security capabilities, IPsec was introduced to provide security services such as the following:
Encrypting traffic (so it cannot be read by parties other than those for whom it is intended)
Integrity validation (ensuring traffic has not been modified along its path)
Authenticating the peers (ensuring that traffic is from a trusted party)
Anti-replay (protecting against replay of the secure session).
Modes
There are two modes of
IPsec operation:
transport mode and
tunnel mode.
Transport mode
In
transport mode, only the payload (the data you transfer) of the IP packet is
encrypted and/or authenticated. The routing is intact, since the IP header is neither modified nor encrypted; however, when the
#Authentication header (AH) is used, the IP addresses cannot be
Network address translation, as this will invalidate the
hash value. The
transport layer and application layer layers are always secured by hash, so they cannot be modified in any way (for example by port address translation the
TCP and UDP port numbers).
Transport mode is used for host-to-host communications.
A means to encapsulate IPsec messages for
NAT traversal has been defined by
Request for Comments documents describing the NAT-T mechanism.
Tunnel mode
In
tunnel mode, the entire IP packet (data plus the message headers) is encrypted and/or authenticated. It must then be encapsulated into a new IP packet for routing to work.
Tunnel mode is used for network-to-network communications (secure tunnels between routers) or host-to-network and host-to-host communications over the Internet.
Technical details
Two protocols have been developed to provide packet-level security for both
IPv4 and IPv6:
- The IP Authentication Header provides integrity and authentication and non-repudiation, if the appropriate choice of cryptographic algorithms is made.
- The IP Encapsulating Security Payload provides confidentiality, along with optional (but strongly recommended) authentication and integrity protection.
Cryptographic algorithms defined for use with IPsec include HMAC-
SHA1 for integrity protection, and
TripleDES-Cipher block chaining and Advanced Encryption Standard-CBC for confidentiality. Refer to RFC 4305 for details.
Authentication header (AH)
The AH is intended to guarantee connectionless integrity and data origin authentication of IP datagrams. Further, it can optionally protect against
replay attacks by using the sliding window technique and discarding old packets. 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. In IPv4, mutable (and therefore unauthenticated) IP header fields include Type of Service, Flags, IP fragmentation
Offset,
TTL and Header Checksum. AH operates directly on top of IP, using IP protocol number 51.An AH packet diagram:
{| class="wikitable" border="1" cellspacing="0" cellpadding="2px"! style="text-align:center; width:10em;" | 0 - 7 bit! style="text-align:center; width:10em;" | 8 - 15 bit! style="text-align:center; width:10em;" | 16 - 23 bit! style="text-align:center; width:10em;" | 24 - 31 bit|--| style="text-align:center;" | Next header| style="text-align:center;" | Payload length| colspan="2" style="text-align:center;" | RESERVED|--| colspan="4" style="text-align:center;" | Security parameters index (SPI)|--| colspan="4" style="text-align:center;" | Sequence number|--| colspan="4" style="text-align:center;" |
Authentication data (variable)
|}
Field meanings:
Next header Identifies the protocol of the transferred data.Payload length Size of AH packet.RESERVED Reserved for future use (all zero until then).Security parameters index (SPI) Identifies the security parameters, which, in combination with the IP address, then identify the security association implemented with this packet.Sequence number A monotonically increasing number, used to prevent replay attacks.Authentication data Contains the integrity check value (ICV) necessary to authenticate the packet; it may contain padding.
Encapsulating Security Payload (ESP)
The ESP protocol provides origin authenticity, integrity, and confidentiality protection of a packet. ESP also supports encryption-only and authentication-only configurations, but using encryption without authentication is strongly discouraged because it is insecure. . Unlike AH , the IP packet header is not protected by ESP. (Although in tunnel mode ESP, protection is afforded to the whole inner IP packet, including the inner header; the outer header remains unprotected.) ESP operates directly on top of IP, using IP protocol number 50.
An ESP packet diagram:
{| class="wikitable" border="1" cellspacing="0" cellpadding="2px"! style="text-align:center; width:10em" | 0 - 7 bit! style="text-align:center; width:10em" | 8 - 15 bit! style="text-align:center; width:10em" | 16 - 23 bit! style="text-align:center; width:10em" | 24 - 31 bit|--| colspan="4" style="text-align:center;" | Security parameters index (SPI)|--| colspan="4" style="text-align:center;" | Sequence number|--| colspan="4" style="text-align:center; border-bottom: none" |
Payload data (variable)
|--| style="text-align:center; border-top-style: hidden" | | colspan="2" style="text-align:center;" | Padding (0-255 bytes)| style="border-left-style: hidden" | |--| style="border-right-style: hidden" | | style="border-top-style: hidden" | | style="text-align:center;" | Pad Length| style="text-align:center;" | Next Header|--| colspan="4" style="text-align:center;" |
Authentication Data (variable)
|}
Field meanings:
Security parameters index (SPI) Identifies the security parameters in combination with IP address.Sequence number A monotonically increasing number, used to prevent replay attacks.Payload data The data to be transferred.Padding Used with some block ciphers to pad the data to the full length of a block.Pad length Size of padding in bytes.Next header Identifies the protocol of the transferred data.Authentication data Contains the data used to authenticate the packet.
Implementations
IPsec support is usually implemented in the kernel (computer science) with key management and ISAKMP/IKE negotiation carried out from user-space. Existing IPsec implementations tend to include both of these functionalities. However, as there is a standard interface for key management, it is possible to control one kernel IPsec stack using key management tools from a different implementation.
Because of this, there is confusion as to the origins of the IPsec implementation that is in the Linux kernel. The
FreeS/WAN project made the first complete and open source implementation of IPsec for
Linux. It consists of a kernel IPsec stack (KLIPS), as well as a key management daemon (computer software) (
pluto (openswan)) and many shell scripts. The FreeS/WAN project was disbanded in March 2004.
Openswan and strongSwan are continuations of FreeS/WAN. The
KAME project also implemented complete IPsec support for NetBSD, FreeBSD. Its key management daemon is called
racoon (kame). OpenBSD made its own ISAKMP/IKE daemon, simply named isakmpd (which was also ported to other systems, including Linux).
However, none of these kernel IPsec stacks were integrated into the Linux kernel. Alexey Kuznetsov and David S. Miller wrote a kernel IPsec implementation from scratch for the Linux kernel around the end of 2002. This stack was subsequently released as part of Linux 2.6, and is referred to variously as "native" or "NETKEY".
Therefore, contrary to popular belief, the Linux IPsec stack did not originate from the KAME project. As it supports the standard
PF_KEY protocol (RFC 2367) and the native XFRM interface for key management, the Linux IPsec stack can be used in conjunction with either
pluto from Openswan/
strongSwan,
isakmpd from
OpenBSD project,
racoon from the
KAME project or without any ISAKMP/IKE daemon (using manual keying).
The new architectures of network processors, including multi-core processors with integrated encryption engines, change the way the IPsec stacks are designed. A dedicated Fast Path is used in order to offload the processing of the IPsec processing (SA, SP lookups, encryption, etc.). These Fast Path stacks must be co-integrated on dedicated cores with Linux or RTOS running on other cores. These OS are the control plane that runs ISAKMP/IKE of the Fast Path IPsec stack.
There are a number of implementations of
IPsec and ISAKMP/IKE protocols. These include:
- 6WINDGate, Network processor multi-core Fast Path IPsec stack
- NRL IPsec, one of the original sources of IPsec code
- OpenBSD, with its own code derived from NRL IPsec
- the KAME project stack, that is included in Mac OS X, NetBSD and FreeBSD
- "IPsec" in Cisco IOS
- "IPsec" in Microsoft Windows, including Windows XP , Windows 2000, and Windows 2003
- SafeNet QuickSec toolkits
- IPsec in Solaris (operating system)
- IBM AIX operating system
- IBM z/OS
- IPsec and IKE in HP-UX (HP-UX IPSec)
- "IPsec and IKE" in VxWorks
See also
List of IPsec-related RFCs
RFC 2367: PF_KEY InterfaceRFC 2401 (obsoleted by RFC 4301): Security Architecture for the Internet ProtocolRFC 2402 (obsoleted by RFC 4302 and RFC 4305): Authentication HeaderRFC 2403: The Use of HMAC-MD5-96 within ESP and AHRFC 2404: The Use of HMAC-SHA-1-96 within ESP and AHRFC 2405: The ESP DES-CBC Cipher Algorithm With Explicit IVRFC 2406 (obsoleted by RFC 4303 and RFC 4305): Encapsulating Security PayloadRFC 2407 (obsoleted by RFC 4306): IPsec Domain of Interpretation for ISAKMP (IPsec DoI)RFC 2408 (obsoleted by RFC 4306): Internet Security Association and Key Management Protocol (ISAKMP)RFC 2409 (obsoleted by RFC 4306): Internet Key Exchange (IKE)RFC 2410: The NULL Encryption Algorithm and Its Use With IPsecRFC 2411: IP Security Document RoadmapRFC 2412: The OAKLEY Key Determination ProtocolRFC 2451: The ESP CBC-Mode Cipher AlgorithmsRFC 2857: The Use of HMAC-RIPEMD-160-96 within ESP and AHRFC 3526: More Modular Exponential (MODP) Diffie-Hellman groups for Internet Key Exchange (IKE)RFC 3706: A Traffic-Based Method of Detecting Dead Internet Key Exchange (IKE) PeersRFC 3715: IPsec-Network Address Translation (NAT) Compatibility RequirementsRFC 3947: Negotiation of NAT-Traversal in the IKERFC 3948: UDP Encapsulation of IPsec ESP PacketsRFC 4106: The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating Security Payload (ESP)RFC 4301 (obsoletes RFC 2401): Security Architecture for the Internet ProtocolRFC 4302 (obsoletes RFC 2402): IP Authentication HeaderRFC 4303 (obsoletes RFC 2406): IP Encapsulating Security Payload (ESP)RFC 4304: Extended Sequence Number (ESN) Addendum to IPsec Domain of Interpretation (DOI) for Internet Security Association and Key Management Protocol (ISAKMP)RFC 4305 (obsoleted by RFC 4835): Cryptographic Algorithm Implementation Requirements for Encapsulating Security Payload (ESP) and Authentication Header (AH)RFC 4306 (obsoletes RFC 2407, RFC 2408, and RFC 2409): Internet Key Exchange (
IKEv2) ProtocolRFC 4307: Cryptographic Algorithms for Use in the Internet Key Exchange Version 2 (IKEv2)RFC 4308: Cryptographic Suites for IPsecRFC 4309: Using Advanced Encryption Standard (AES) CCM Mode with IPsec Encapsulating Security Payload (ESP)RFC 4478: Repeated Authentication in Internet Key Exchange (IKEv2) ProtocolRFC 4543: The Use of Galois Message Authentication Code (GMAC) in IPsec ESP and AHRFC 4555: IKEv2 Mobility and Multihoming Protocol (MOBIKE)RFC 4621: Design of the IKEv2 Mobility and Multihoming (MOBIKE) ProtocolRFC 4718: IKEv2 Clarifications and Implementation GuidelinesRFC 4806: Online Certificate Status Protocol (OCSP) Extensions to IKEv2RFC 4809: Requirements for an IPsec Certificate Management ProfileRFC 4835 (obsoletes RFC 4305): Cryptographic Algorithm Implementation Requirements for Encapsulating Security Payload (ESP) and Authentication Header (AH)RFC 4945: The Internet IP Security PKI Profile of IKEv1/ISAKMP, IKEv2, and PKIX
References
External links
- Kame Project
- racoon and ipsec-tools
- IETF IPsec WG has "concluded", archive of the page is here
- IPsec WG still has important active drafts
- All IETF active security WGs
- IETF BTNS WG (chartered to work on unauthenticated IPsec, IPsec APIs, connection latching)
- Securing Data in Transit with IPsec
- Free S/WAN project homepage.
- Openswan project homepage.
- strongSwan project homepage.
- Free IPSec VPN Client for Windows.
- Free IPSec VPN Client for MacOS X.
- The VPN Consortium.
- A long thread on the ipsec@lists.tislabs.com about the capitalization of the letter S in IPsec. The RFCs indicate that it is spelled "IPsec".
- An Illustrated Guide to IPsec
- ipsec(4) man page via OpenBSD
- IPsec in VoIP Networks TISPAN has recently selected UDP encapsulation of IPsec to secure signalling in IMS based networks. This paper looks at the issues of IPsec and NAT traversal that lead TISPAN to its choice.
- Windows XP IPSec HowTo
- A Cryptographic Tour of the IPsec Standards
- Lost in Translation: Theory and Practice in Cryptography - Lessons from the discovery of an IPsec flaw
- ike-scan wiki
- IPsec Mind Map from MindCert.com
IPsec (
IP security) is a
Protocol suite for securing
Internet Protocol (IP) communications by
authentication and/or
encryption each
packet#Example: IP packets in a data stream. IPsec also includes protocols for cryptographic
IKE.
Summary
IPsec protocols operate at the
network layer, layer 3 of the OSI model. Other Internet security protocols in widespread use, such as Secure Sockets Layer,
Transport Layer Security and Secure Shell, operate from the transport layer up (OSI layers 4 - 7). This makes IPsec more flexible, as it can be used for protecting layer 4 protocols, including both Transmission Control Protocol and
User Datagram Protocol, the most commonly used transport layer protocols. IPSec has an advantage over SSL and other methods that operate at higher layers. For an application to use IPsec no code change in the applications is required whereas to use SSL and other higher level protocols, applications must undergo code changes.
Security architecture
IPsec is implemented by a set of
cryptographic protocols for (1) securing packet flows, (2)
internet key exchange and (3) internet key exchange.
The IP security architecture uses the concept of a security association as the basis for building security functions into
Internet Protocol. 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. The actual choice of encryption and authentication algorithms (from a defined list) is left to the IPsec administrator.
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.
Current status as a standard
IPsec is a mandatory part of IPv6, and is optional for use with IPv4. While the standard is designed to be indifferent to IP versions, current widespread deployment and experience concerns IPv4 implementations.
IPsec protocols were originally defined by Request for Commentss 1825–1829, published in 1995. In 1998, these documents were obsoleted by Request for Commentss 2401–2412, which are not compatible with 1825–1829, although they are conceptually identical. In December 2005, third-generation documents,
Request for Commentss 4301–4309, were produced. They are largely a superset of 2401–2412, but provide a IKEv2 standard. These third-generation documents standardized the abbreviation of IPsec to uppercase “IP” and lowercase “sec”.
It is unusual to see any product that offers RFC1825–1829 support. “ESP” generally refers to 2406, while ESPbis refers to 4303.
Design intent
IPsec was intended to provide either
transport mode (end-to-end) security of packet traffic in which the end-point computers do the security processing, or
tunnel mode (portal-to-portal)
communications security in which security of packet traffic is provided to several machines (even to whole Local area networks) by a single node.
IPsec can be used to create
Virtual Private Networks (VPN) in either mode, and this is the dominant use. Note, however, that the security implications are quite different between the two operational modes.
End-to-end communication security on an Internet-wide scale has been slower to develop than many had expected. Part of the reason is that no universal, or universally trusted,
Public Key Infrastructure (PKI) has emerged (DNSSEC was originally envisioned for this); another part is that many users understand neither their needs nor the available options well enough to promote inclusion in vendors' products.
Since the
Internet Protocol does not inherently provide any security capabilities, IPsec was introduced to provide security services such as the following:
Encrypting traffic (so it cannot be read by parties other than those for whom it is intended)
Integrity validation (ensuring traffic has not been modified along its path)
Authenticating the peers (ensuring that traffic is from a trusted party)
Anti-replay (protecting against replay of the secure session).
Modes
There are two modes of
IPsec operation:
transport mode and
tunnel mode.
Transport mode
In
transport mode, only the payload (the data you transfer) of the IP packet is
encrypted and/or authenticated. The routing is intact, since the IP header is neither modified nor encrypted; however, when the
#Authentication header (AH) is used, the IP addresses cannot be Network address translation, as this will invalidate the hash value. The transport layer and application layer layers are always secured by hash, so they cannot be modified in any way (for example by port address translation the TCP and UDP port numbers).
Transport mode is used for host-to-host communications.
A means to encapsulate IPsec messages for NAT traversal has been defined by
Request for Comments documents describing the NAT-T mechanism.
Tunnel mode
In
tunnel mode, the entire IP packet (data plus the message headers) is encrypted and/or authenticated. It must then be encapsulated into a new IP packet for routing to work.
Tunnel mode is used for network-to-network communications (secure tunnels between routers) or host-to-network and host-to-host communications over the Internet.
Technical details
Two protocols have been developed to provide packet-level security for both
IPv4 and IPv6:
- The IP Authentication Header provides integrity and authentication and non-repudiation, if the appropriate choice of cryptographic algorithms is made.
- The IP Encapsulating Security Payload provides confidentiality, along with optional (but strongly recommended) authentication and integrity protection.
Cryptographic algorithms defined for use with IPsec include
HMAC-SHA1 for integrity protection, and TripleDES-Cipher block chaining and Advanced Encryption Standard-CBC for confidentiality. Refer to RFC 4305 for details.
Authentication header (AH)
The AH is intended to guarantee connectionless integrity and data origin authentication of IP datagrams. Further, it can optionally protect against
replay attacks by using the
sliding window technique and discarding old packets. 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. In IPv4, mutable (and therefore unauthenticated) IP header fields include Type of Service, Flags,
IP fragmentation Offset,
TTL and Header Checksum. AH operates directly on top of IP, using IP protocol number 51.An AH packet diagram:
{| class="wikitable" border="1" cellspacing="0" cellpadding="2px"! style="text-align:center; width:10em;" | 0 - 7 bit! style="text-align:center; width:10em;" | 8 - 15 bit! style="text-align:center; width:10em;" | 16 - 23 bit! style="text-align:center; width:10em;" | 24 - 31 bit|--| style="text-align:center;" | Next header| style="text-align:center;" | Payload length| colspan="2" style="text-align:center;" | RESERVED|--| colspan="4" style="text-align:center;" | Security parameters index (SPI)|--| colspan="4" style="text-align:center;" | Sequence number|--| colspan="4" style="text-align:center;" |
Authentication data (variable)
|}
Field meanings:
Next header Identifies the protocol of the transferred data.Payload length Size of AH packet.RESERVED Reserved for future use (all zero until then).Security parameters index (SPI) Identifies the security parameters, which, in combination with the IP address, then identify the
security association implemented with this packet.Sequence number A
monotonically increasing number, used to prevent replay attacks.Authentication data Contains the integrity check value (ICV) necessary to authenticate the packet; it may contain padding.
Encapsulating Security Payload (ESP)
The ESP protocol provides origin authenticity, integrity, and confidentiality protection of a packet. ESP also supports encryption-only and authentication-only configurations, but using encryption without authentication is strongly discouraged because it is insecure. . Unlike AH , the IP packet header is not protected by ESP. (Although in tunnel mode ESP, protection is afforded to the whole inner IP packet, including the inner header; the outer header remains unprotected.) ESP operates directly on top of IP, using IP protocol number 50.
An ESP packet diagram:
{| class="wikitable" border="1" cellspacing="0" cellpadding="2px"! style="text-align:center; width:10em" | 0 - 7 bit! style="text-align:center; width:10em" | 8 - 15 bit! style="text-align:center; width:10em" | 16 - 23 bit! style="text-align:center; width:10em" | 24 - 31 bit|--| colspan="4" style="text-align:center;" | Security parameters index (SPI)|--| colspan="4" style="text-align:center;" | Sequence number|--| colspan="4" style="text-align:center; border-bottom: none" |
Payload data (variable)
|--| style="text-align:center; border-top-style: hidden" | | colspan="2" style="text-align:center;" | Padding (0-255 bytes)| style="border-left-style: hidden" | |--| style="border-right-style: hidden" | | style="border-top-style: hidden" | | style="text-align:center;" | Pad Length| style="text-align:center;" | Next Header|--| colspan="4" style="text-align:center;" |
Authentication Data (variable)
|}
Field meanings:
Security parameters index (SPI) Identifies the security parameters in combination with IP address.Sequence number A monotonically increasing number, used to prevent replay attacks.Payload data The data to be transferred.Padding Used with some block ciphers to pad the data to the full length of a block.Pad length Size of padding in bytes.Next header Identifies the protocol of the transferred data.Authentication data Contains the data used to authenticate the packet.
Implementations
IPsec support is usually implemented in the
kernel (computer science) with key management and
ISAKMP/IKE negotiation carried out from user-space. Existing IPsec implementations tend to include both of these functionalities. However, as there is a standard interface for key management, it is possible to control one kernel IPsec stack using key management tools from a different implementation.
Because of this, there is confusion as to the origins of the IPsec implementation that is in the Linux kernel. The
FreeS/WAN project made the first complete and
open source implementation of IPsec for
Linux. It consists of a kernel IPsec stack (
KLIPS), as well as a key management
daemon (computer software) (
pluto (openswan)) and many shell scripts. The FreeS/WAN project was disbanded in
March 2004. Openswan and
strongSwan are continuations of FreeS/WAN. The
KAME project also implemented complete IPsec support for NetBSD,
FreeBSD. Its key management daemon is called
racoon (kame).
OpenBSD made its own ISAKMP/IKE daemon, simply named isakmpd (which was also ported to other systems, including Linux).
However, none of these kernel IPsec stacks were integrated into the Linux kernel. Alexey Kuznetsov and
David S. Miller wrote a kernel IPsec implementation from scratch for the Linux kernel around the end of 2002. This stack was subsequently released as part of Linux 2.6, and is referred to variously as "native" or "NETKEY".
Therefore, contrary to popular belief, the Linux IPsec stack did not originate from the KAME project. As it supports the standard
PF_KEY protocol (RFC 2367) and the native
XFRM interface for key management, the Linux IPsec stack can be used in conjunction with either
pluto from Openswan/strongSwan,
isakmpd from
OpenBSD project,
racoon from the KAME project or without any ISAKMP/IKE daemon (using manual keying).
The new architectures of network processors, including multi-core processors with integrated encryption engines, change the way the IPsec stacks are designed. A dedicated Fast Path is used in order to offload the processing of the IPsec processing (SA, SP lookups, encryption, etc.). These Fast Path stacks must be co-integrated on dedicated cores with Linux or RTOS running on other cores. These OS are the control plane that runs ISAKMP/IKE of the Fast Path IPsec stack.
There are a number of implementations of
IPsec and ISAKMP/IKE protocols. These include:
See also
- Information security
- Year 2005 saw the standardization of a User Datagram Protocol Encapsulation (networking) mechanism for NAT traversal: NAT-T
- L2TP (L2TP)
- Security association (SA)
- Opportunistic encryption
List of IPsec-related RFCs
RFC 2367: PF_KEY InterfaceRFC 2401 (obsoleted by RFC 4301): Security Architecture for the Internet ProtocolRFC 2402 (obsoleted by RFC 4302 and RFC 4305): Authentication HeaderRFC 2403: The Use of HMAC-MD5-96 within ESP and AHRFC 2404: The Use of HMAC-SHA-1-96 within ESP and AHRFC 2405: The ESP DES-CBC Cipher Algorithm With Explicit IVRFC 2406 (obsoleted by RFC 4303 and RFC 4305): Encapsulating Security PayloadRFC 2407 (obsoleted by RFC 4306): IPsec Domain of Interpretation for ISAKMP (IPsec DoI)RFC 2408 (obsoleted by RFC 4306): Internet Security Association and Key Management Protocol (ISAKMP)RFC 2409 (obsoleted by RFC 4306): Internet Key Exchange (IKE)RFC 2410: The NULL Encryption Algorithm and Its Use With IPsecRFC 2411: IP Security Document RoadmapRFC 2412: The OAKLEY Key Determination ProtocolRFC 2451: The ESP CBC-Mode Cipher AlgorithmsRFC 2857: The Use of HMAC-RIPEMD-160-96 within ESP and AHRFC 3526: More Modular Exponential (MODP) Diffie-Hellman groups for Internet Key Exchange (IKE)RFC 3706: A Traffic-Based Method of Detecting Dead Internet Key Exchange (IKE) PeersRFC 3715: IPsec-Network Address Translation (NAT) Compatibility RequirementsRFC 3947: Negotiation of NAT-Traversal in the IKERFC 3948: UDP Encapsulation of IPsec ESP PacketsRFC 4106: The Use of Galois/Counter Mode (GCM) in IPsec Encapsulating Security Payload (ESP)RFC 4301 (obsoletes RFC 2401): Security Architecture for the Internet ProtocolRFC 4302 (obsoletes RFC 2402): IP Authentication HeaderRFC 4303 (obsoletes RFC 2406): IP Encapsulating Security Payload (ESP)RFC 4304: Extended Sequence Number (ESN) Addendum to IPsec Domain of Interpretation (DOI) for Internet Security Association and Key Management Protocol (ISAKMP)RFC 4305 (obsoleted by RFC 4835): Cryptographic Algorithm Implementation Requirements for Encapsulating Security Payload (ESP) and Authentication Header (AH)RFC 4306 (obsoletes RFC 2407, RFC 2408, and RFC 2409): Internet Key Exchange (
IKEv2) ProtocolRFC 4307: Cryptographic Algorithms for Use in the Internet Key Exchange Version 2 (
IKEv2)RFC 4308: Cryptographic Suites for IPsecRFC 4309: Using Advanced Encryption Standard (AES) CCM Mode with IPsec Encapsulating Security Payload (ESP)RFC 4478: Repeated Authentication in Internet Key Exchange (IKEv2) ProtocolRFC 4543: The Use of Galois Message Authentication Code (GMAC) in IPsec ESP and AHRFC 4555: IKEv2 Mobility and Multihoming Protocol (MOBIKE)RFC 4621: Design of the IKEv2 Mobility and Multihoming (MOBIKE) ProtocolRFC 4718: IKEv2 Clarifications and Implementation GuidelinesRFC 4806: Online Certificate Status Protocol (OCSP) Extensions to IKEv2RFC 4809: Requirements for an IPsec Certificate Management ProfileRFC 4835 (obsoletes RFC 4305): Cryptographic Algorithm Implementation Requirements for Encapsulating Security Payload (ESP) and Authentication Header (AH)RFC 4945: The Internet IP Security PKI Profile of IKEv1/ISAKMP, IKEv2, and PKIX
References
External links
- Kame Project
- racoon and ipsec-tools
- IETF IPsec WG has "concluded", archive of the page is here
- IPsec WG still has important active drafts
- All IETF active security WGs
- IETF BTNS WG (chartered to work on unauthenticated IPsec, IPsec APIs, connection latching)
- Securing Data in Transit with IPsec
- Free S/WAN project homepage.
- Openswan project homepage.
- strongSwan project homepage.
- Free IPSec VPN Client for Windows.
- Free IPSec VPN Client for MacOS X.
- The VPN Consortium.
- A long thread on the ipsec@lists.tislabs.com about the capitalization of the letter S in IPsec. The RFCs indicate that it is spelled "IPsec".
- An Illustrated Guide to IPsec
- ipsec(4) man page via OpenBSD
- IPsec in VoIP Networks TISPAN has recently selected UDP encapsulation of IPsec to secure signalling in IMS based networks. This paper looks at the issues of IPsec and NAT traversal that lead TISPAN to its choice.
- Windows XP IPSec HowTo
- A Cryptographic Tour of the IPsec Standards
- Lost in Translation: Theory and Practice in Cryptography - Lessons from the discovery of an IPsec flaw
- ike-scan wiki
- IPsec Mind Map from MindCert.com