Internet Protocol Security (IPsec) is a successor of the ISO standard Network Layer Security Protocol (NLSP). What are the advantages, disadvantages, other interesting facts regarding the protocol?
IPsec is actually a family of protocols, it has several sub-protocols that could be used or not used, and the overall security depends on each of these in turn and how they're configured:
- IKE for protocol negotiation and key management
- AH for authentication, integrity and I think some protocol protection
- ESP for encryption and then some.
- Transparent to applications and users (in most scenarios). To emphasize, this is not a trivial point - I have had many times when my recommendations to clients would be to encrypt the channel, e.g. with SSL - however they dont have access to source code, or SSL is not supported by vendor, etc - and IPsec is basically drop-in encryption (as far as the app is concerned) and totally out of view of the app.
- Very secure, if implemented correctly
- Less prone to user mistakes (as SSL)
- More efficient than SSL, if you're encrypting most of the traffic anyway
- Can be complex to deploy, depending on your network and requirements
- Cannot be used over Internet or with unknown clients (okay not strictly accurate, but still holds for most intents and purposes).
- Can provide false sense of security to network admins, if deployed incorrectly (e.g. without ESP, but hey I've got IPsec, right?).
- Much less efficient than e.g. SSL, if you don't need to encrypt all the traffic (but IPsec will do so anyway).
IPsec provides two modes:
Authentication Header: each packet has an attached Message Authentication Code which guarantees its integrity; this also includes some protection against replay attacks (when the attacker sends copies of a previously exchanged packet).
Encapsulated Security Payload: each packet is encrypted (and also has a MAC); the encryption covers not only the packet data but also most of the header; a new header is added. This can be used to send the packet to a decrypting host which will then route it to its ultimate destination (the attacker cannot know where the packet is really intended to go).
The cryptography is sound, since it went through the same painful specify-attack-fix cycle than other protocols such as SSL or SSH.
The main difference with SSL is that IPsec runs at the machine level: it protects data from one machine to another, whereas SSL is between applications (e.g. a Web browser and a Web server). In most contexts (but not all), this makes no relevant difference, but it is still good to remember it.
The biggest practical difference is that Average Joe's PC is a fully configured SSL-able engine, but any attempt at IPsec is likely to fail, because it would require Joe to fiddle quite a bit with its configuration (most operating systems implement IPsec, including Windows since Windows 2000, but the implementation is not a problem -- the configuration is).
IPsec is a mandatory component of IPv6, so IPsec will be widespread at least when IPv6 becomes prevalent -- an event which was supposed to take place in 2007...
IPsec was designed to improve security, but again, this protocol is also not so close to ideal solution. One of advantages that comes to mind is security, that is obvious. Depending on situation it may have following disadvantages:
- encryption / decryption will use some CPU resources;
- it can be complicated to manage traffic policy for complex networks;
- promised security is questionable if IPsec is used in transport mode;