What is IPSec?

IPsec (Internet Protocol Security) refers to a set of protocols designed to ensure secure communications between devices on the Internet or on public networks.

IPsec enables companies to authenticate data sources and protect sensitive information such as payment details and confidential communications when this information is transmitted over a network. It is also a commonly used method to authenticate traffic and protect data in a virtual private network (VPN).

More than a single technology, IPSec consists of a set of protocols and processes developed to ensure secure network communications. The following are the most important elements of this set:

  • Authentication header (AH):

Data is transmitted in packets through the network. Each package has a header, that is, information that describes the expected content. The authentication header acts as a tamper-proof seal, allowing the receiving device to check the source of the packet and ensure that it has not been changed during transmission.

  • Safety Encapsulation Protocol (ESP):

This protocol adds an authentication layer and is responsible for encryption, ensuring that only authorized devices can read the transmitted data.

  • Security Association and Key Management Protocol:

With ESP, devices exchange encrypted data through a shared key. To enable this, the ISAKMP protocol defines the attributes of the connection, including the establishment of the cryptographic key and the algorithm to be used.

How does IPsec work?

IPsec operates in two distinct modes: tunnel and transport.

  • Tunnel Mode:

In this mode, the entire IP packet, including payload and header, is encrypted. IPsec encapsulates the original package, adds a new IP header and sends it to the destination. This allows secure data transmission across multiple devices across different networks.

  • shipping mode:

Here, only the payload of the package is encrypted and authenticated, keeping the original header unchanged. With less bandwidth overhead, the transport mode is ideal for managing devices and networks, such as remote access by a technician to a server.

IPsec Operational Steps

Here's how an IPsec connection occurs in practice:

  • host recognition:

The system identifies that a particular package requires protection. It is treated as relevant traffic, which automatically triggers IPsec security policies.

  • IKE – Phase One:

The devices involved are authenticated, and an Internet Key Exchange (IKE) policy is negotiated between them. This ensures that both use the same cryptographic key. A safe tunnel is then established.

  • IKE – Phase Two:

Data exchange parameters are agreed based on the ISAKMP protocol.

  • data transfer:

The data is encrypted, transmitted through the IPsec tunnel and, at the other end, decrypted.

How is IPsec used in VPN?

A VPN (Virtual Private Network) connects devices, allowing them to access shared systems through a secure tunnel, even on public networks.

For businesses, VPN creates private connections between remote employees and corporate systems, making it ideal for remote work models. This technology is also useful in IoT initiatives, allowing deployed smart devices to communicate with the management infrastructure or data collection.

On IoT systems, the IPsec VPN is widely used to protect connections between corporate networks and MNO/MVNO networks, or to directly protect between devices communication.

With the VPN, the data is encrypted before they even reach the Internet Service Provider (ISP). One of the most common uses of IPsec is to encrypt and authenticate all traffic transmitted through this tunnel.

 

For more explanations about IoT, visit our glossary.