Network layer-internet protocol security (ipsec) is a protocol suite for securing internet protocol (ip) communications by authenticating and encrypting each ip packet of a data stream. ipsec also includes protocols for establishing mutual authentication between agents at the beginning of the session and negotiation of cryptographic keys to be used during the session. ipsec can be used to protect data flows between a pair of hosts (e.g. computer users or servers), between a pair of security gateways (e.g. routers or firewalls), or between a security gateway and a host.