The ESP header (IP protocol 50) forms the core of the IPsec protocol. This protocol, in conjunction with an agreedupon
set of security parameters or transform set, protects data by rendering it indecipherable. This protocol encrypts the data portion of the packet only and uses other protections (HMAC) for other protections (data integrity, antireplay,
maninthemiddle). Optionally, it can also provide for authentication of the protected data. Figure 4 illustrates how ESP encapsulates an IP packet.