Implementation of ipsec, Basic concepts of ipsec, Security association – H3C Technologies H3C SecPath F1000-E User Manual
Page 130

2
Implementation of IPsec
IPsec consists of a series of protocols for IP data security, including Authentication Header (AH),
Encapsulating Security Payload (ESP), IKE, and algorithms for authentication and encryption. AH and
ESP provides security services and IKE performs key exchange. For how IKE works, refer to
IPsec provides two security mechanisms: authentication and encryption. The authentication mechanism
allows the receiver of an IP packet to authenticate the sender and check if the packet has been tampered.
The encryption mechanism ensures data confidentiality and protects the data from being eavesdropped
en route.
IPsec is available with two security protocols:
•
AH (protocol 51): Provides data origin authentication, data integrity, and anti-replay services. For
these purposes, an AH header is added to each IP packet. AH is suitable for transmitting
non-critical data because it cannot prevent eavesdropping even though it works fine in preventing
data tampering. AH supports authentication algorithms such as Message Digest (MD5) and Secure
Hash Algorithm (SHA-1).
•
ESP (protocol 50): Provides data encryption in addition to origin authentication, data integrity, and
anti-replay services. ESP works by inserting an ESP header and an ESP tail in IP packets. Unlike AH,
ESP encrypts data before encapsulating the data to ensure data confidentiality. ESP supports the
encryption algorithms including Data Encryption Standard (DES), 3DES, and Advanced Encryption
Standard (AES), and authentication algorithms such as MD5 and SHA-1 algorithms. The
authentication function is optional to ESP.
Both AH and ESP provide authentication services. However, the authentication service provided by AH is
stronger than that provided by ESP. In practice, you can choose either or both security protocols as
required. When both AH and ESP are used, an IP packet is encapsulated first by ESP and then by AH.
For IPsec packet format information, refer to
Basic Concepts of IPsec
Security association
IPsec enables secure communication between two ends, which are called IPsec peers.
Security associations (SAs) are fundamental to IPsec. An SA is a set of elements including the protocols
(AH, ESP or both), encapsulation mode (transport mode or tunnel mode), encryption algorithm (DES,
3DES, or AES), shared key used for flow protection and key lifetime. An SA can be created manually or
with IKE.
An SA is unidirectional. Therefore, at least two SAs are needed to protect data flows in a bidirectional
communication. Moreover, if two peers want to use both AH and ESP to protect data flows between them,
they will construct an independent SA for each protocol.
An SA is uniquely identified by a triplet, which consists of the security parameter index (SPI), destination
IP address, and security protocol (AH or ESP).
An SPI is a 32-bit number for uniquely identifying an SA. It is transmitted in the AH/ESP header. A
manually configured SA requires an SPI to be specified manually for it; while an IKE created SA will have
an SPI generated at random.
While a manually configured SA never ages out, an IKE created SA has a specified period of lifetime,
which comes in two types:
•
Time-based lifetime: Defines how long an SA can be valid after it is created.