The main three elements of the IPsec (Internet Protocol Security) framework are:
- Authentication Header (AH):
- AH provides authentication and integrity protection for IP packets, ensuring that the data has not been tampered with during transmission.
- It achieves this by computing a hash-based Message Authentication Code (MAC) over the entire IP packet, including the IP header and payload.
- AH does not provide confidentiality (encryption) for the packet payload; it only ensures the integrity and authenticity of the data.
- AH is defined in RFC 4302.
- Encapsulating Security Payload (ESP):
- ESP provides confidentiality, authentication, and integrity protection for IP packets by encrypting the packet payload and optionally authenticating the packet contents.
- It encrypts the payload of the IP packet, protecting the confidentiality of the data from eavesdropping.
- ESP can also provide authentication and integrity protection for the encrypted payload using cryptographic algorithms like HMAC (Hash-based Message Authentication Code).
- ESP supports a variety of encryption and authentication algorithms, allowing flexibility in configuring security associations.
- ESP is defined in RFC 4303.
- Security Associations (SA):
- Security Associations are the negotiated security parameters shared between two IPsec peers, defining the security attributes and keys used for securing IP traffic.
- Each SA consists of various parameters, including the IP addresses of the source and destination hosts, the security protocol (AH or ESP), encryption and authentication algorithms, security keys, and lifetime values.
- SAs are established through a process called IKE (Internet Key Exchange) or manually configured by network administrators.
- Once established, SAs are stored in the Security Association Database (SAD) and used to process incoming and outgoing IPsec traffic.
- SAs are unidirectional, meaning that separate SAs are created for inbound and outbound traffic.
- SAs can be set up in Transport mode (only encrypting the payload) or Tunnel mode (encrypting the entire IP packet).
- SAs are uniquely identified by Security Parameters Index (SPI) values.
- SAs are typically managed and maintained by the IPsec protocol suite or by IPsec-enabled networking devices such as routers and firewalls.
These elements work together within the IPsec framework to provide secure communication over IP networks, ensuring data confidentiality, integrity, and authenticity between communicating hosts or networks.