II. IPSEC PROTOCOL
IPsec has become the de-facto standard protocol for secure Internet communications, providing traffic integrity, confidentiality and authentication. It’s the security protocol which is proposed by the IETF IPSec working group in order to provide secure communication for the IP layer [10].
The IPSec protocol provides two kinds of communication protection mechanisms also known as the IPSec sub-protocols they are Encapsulating Security Payload (ESP) and Authentication Head (AH).
The ESP mechanism provides confidentiality and integrity protection for communication. ESP will negotiate a DES or 3DES (triple DES) session key that’s exchanged between peers and used for encrypting traffic between them. You can also specify a SHA1 or MD5 digital signature in ESP. Note that both the ESP encryption and signature computations include the payload and the TCP/UDP header portions of each packet but not the IP header; compared to AH whose digital signature covers the entire packet.
AH mechanism provides the integrity protection. AH computes SHA1 or MD5 digital signature across the entire packet and adds this signature to the packet. The receiver computes its version of the signature and compares that with the signature stored in the header; if they match, the packet hasn’t been modified.
N.B MD5 isn’t advised for use on real networks it’s used for testing purposes.
ESP and AH can be used together or separately, depending on the environment and the mechanisms. It can prevent anti-replay attack (a form of partial sequence integrity) [1].
In IPSec the Internet Key Exchange (IKE) is adopted to realize the automatic security parameters negotiation; the security parameters negotiated in IKE include encryption and authentication algorithms, encryption and authentication keys, protected communication mode (transmission or tunnel mode) and life time of the key. For IP packets, two encapsulation modes transfer and tunnel modes are offered by ESP. In the transmission mode, the original IP head is unchanged, only the data of transport layer is encrypted. In tunnel mode, the whole IP data packet is encapsulated with a new IP head. IKE exists to establish Security Associations (SA) for IPsec. Before it can do this, IKE must negotiate an Internet Security and Key Management protocol (ISAKMP) SA relationship with the peer. Since IKE negotiates its own policy, it’s possible to configure multiple policy statements with different configuration statements, and then let the two hosts come to an agreement.