IPsec is short for IP Security which is basically a cluster of protocols developed by the Internet Engineering Task Force or IETF. IPsec was designed to ensure secure packet exchange at the IP layer. Since its inception, IPsec has been widely implemented in Virtual Private Networks (VPNs).
Since VPNs are intended to allow remote computers to communicate securely over the Internet, the IPsec technology is responsible for establishing secure tunnels to allow data to travel securely through public WAN.
Essentially, IPsec is an entire suite of cryptographic protocols designed to secure network communication at the very core of the IP Packet Layer. If we delve even deeper, IPsec supports two types of encryption modes. These modes are the Transport mode and Tunnel mode.
The Transport mode works by encrypting the payload or the data portion of each packet without affecting the header. On the other hand, the Tunnel mode encrypts both the payload and the header, hence being more secure. When data packets reach the receiving end, they are decrypted via an IPSec-compliant device. Both the sender and receiver share a set of public keys that are used to authenticate digital certificates.