# IPsec - Internet Protocol Security IPsec is mainly used to encrypt data exchanged between a pair of hosts (host-to-host), between a pair of security gateways (network-to-network), and between a security gateway and a host (network-to-host).