How Does IPSEC Work Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

When Internet was introduced in a computing world, it was basically to connect educational and government computers on a very small scale. The underlying protocol known as Transmission Control protocol and Internet protocol(TCP/IP) at that time, achieved its objectives as it was only concerned with efficient delivery of packets between two hosts. There were manageable problems of security with Internet at that stage.

Later, when Internet overflowed to the general public, many millions of computers were connected. Businesses and services were introduced on the Internet. Since businesses or government heavily relied on Internet, those that attacked businesses in physical world moved their battle field to cyber world. Data which communicated on Internet can be viewed, modified, resent or blocked by someone who was not meant to receive the data. This exposed a major weakness in TCP/IP as it was not designed with inherent security in the first place.

As a solution to the problems, there are a number of protocols that were developed to thwart some of the problems described above associated with Internet. IP security was developed and added on to IP version 4 and built into IPv6 to address the issue.

In this paper, there is an attempt to describe what IPsec protocol that was added to IPv4, among several other solutions, how it is implemented, its limitations and best practices that must be followed to achieve best use.

What is IPsec

Internet Exchange Task Force (IETF) developed a protocol which was primarily aimed at ensuring confidentiality and authentication at IP layer by applying modern cryptography (Rhee 2003). The diagram below summarises the components of IPsec and how they are related.

Overview of IPsec

+--------------+

| Architecture |

+--------------+

v v

+<-<-<-<-+ +->->->->+

v v

+----------+ +----------+

| ESP | | AH |

| Protocol | | Protocol |

+----------+ +----------+

v v v v

v +->->->->->->->->+ v v

v v v v v

v v v v v

v +------------+ +----------------+ v

v | +------------+ | +----------------+ v

v | | Encryption | | | Authentication | v

v +-| Algorithm | +-| Algorithm | v

v +------------+ +----------------+ v

v v v v

v v +-----+ v v

+>->->->-+->->->->| DOI |<-<-<-<-+-<-<-<-<-+

+-----+

^

^

+------------+

| KEY |

| MANAGEMENT |

+------------+

Figure 1. IPsec Roadmap : Source RFC 2411

The figure above depict that IPsec has six major components described as follows: Authentication Header (AH) protocol provides integrity of data and prevent replay attacks. Encapsulating Security Payload (ESP) on the other hand, provides both confidentiality and authentication/integrity of communication. It further shows that while both offer authentication, only ESP offers encryption to data that is communicated over two devices.

The second set of interest is authentication algorithms, which provide a set of authentication technologies while encryption algorithms describe a set of algorithms that describe a set of encryption to be used in the process.

Both algorithms rely on Domain of Interpretation (DOI) which consolidates all above documents into one (Tipton &Krause, 2007).

Key management specifies which key management standards are available for use and this includes Internet key exchange, public key infrastructure.

How does IPsec Work

In order to understand how IPsec works, it is important to understand that IPsec modifies the IP packet so that security components are added on. It is also important to note that AH, ESP can be applied in isolation or in combination (RFC2402). These protocols can also be applied in transport mode or tunnel mode. Essentially, there are four possible combination of how IPsec can be implemented. This has been depicted in fig 2 below.

Original IP header

TCP

Data

(a)

Authentication

Original IP header

Authentication header

TCP

Data

(b)

Authentication

New IP header

Authentication header

Original IP header

TCP

Data

(c)

Fig 2. Authentication Header (a) original IP packet (b) transport mode (c) tunnel mode

Original IP header

TCP

Data

(a)

Authentication

Encryption

Original IP header

ESP header

TCP

Data

ESP Trailer

ESP authorisation

(b)

Authentication

Encryption

New IP header

ESP header

Original IP header

TCP

Data

ESP Trailer

ESP Authorisation

(c)

Fig 3. ESP Encryption and authentication (a) original IP packet (b) transport mode (c) tunnel mode

Fig2 (b): This is the AH protocol in transport mode.

This setup is advantageous to the fact that it adds little to existing payload of the IP packet hence minimal overheads when processing packets. It also ensures integrity of the packet as it authenticates the entire new packet. Further, it thwarts against packet replay as the entire packet which includes the sequence number is also authenticated.

However, AH protocol does not provide encryption option. Therefore, if the concern is to ensure confidentiality of data across network, AH does not support.

Nonetheless, AH transport mode is suitably implemented in host-to-host communication where little overhead is desired and integrity and not confidentiality matters.

Fig 2 (c) The AH mode in tunnel mode.

This implementation is suitable where integrity of entire packet is required and preventing packet replays. As AH does not offer encryption there is no confidentiality of data. It is worth noting through, that this mode is similar to AH transport mode as both authenticate the same data. In fact, this mode is rarely used in practice. (Doraswamy and Harkins,)

Fig 3 (b) the ESP in transport modes:

ESP in transport mode offers encryption of the payload and optionally the authentication of payload and the ESP header. This has the advantage of achieving confidentiality of data in transit and at the same time, stopping packet replay attacks through sequence number which is also authenticated.

On the contrary, since authentication is optional in ESP, encryption that is applied to data portion without authentication is believed to expose the packet to a number of attacks hence undermining its confidentiality (RFC 2406). In the same vein, it cannot stop replay attacks as the ESP header which contains an essential sequence number is not authenticated alongside the payload. It further has the weakness even through the encryption and authentication are applied, the original IP header which contains ultimate source and destination addresses is not encrypted an attacker would be able to infer the type of communication that is passing by even without reading the contents of the packets. (Deoligoris & Serpanos, Ed, 2007 pp75)

Fig 3(c) The ESP in tunnel mode:

This is a mode where the entire IP packet is encapsulated in a new packet all together. The new IP header contains information relevant for routing and it does not contain final or source addresses. If both encryption and authentication are applied, the mode achieves both confidentiality and authentication of data. It further stops packet replays. Even traffic analysis is difficult because the new IP header does not contain enough information as is contained in original IP header. The inner packet which contains source and final destination of the packet is encrypted and also authenticated, and the outer and IP packet contains IP addresses for perimeter devices such as gateway routers. In this case, an intruder would not be able to determine last destination of the packet, through his traffic analysis attacks (RFC2402).

Nevertheless, this mode adds most to already existing payload hence processing overheads are expected to increase significantly. This arrangement is suitable were security is required in contrast to speed. The best implementation of tunnel mode is in gateway-to-gateway implementation of Virtual Private Network (VPN) desire both confidentiality and integrity of data.

Security Association

In order to ensure that two communicating hosts agree on parameters, they use security association (SA) to agree on encryption algorithms, key size, and other sub protocols. These hosts agree on a common SA. IPsec further gathers security associations that it used to secure communication between devices by consolidation them into a database known as Security Association Database (SADB).

Since two communicating hosts need to communicate their SA, they use another protocol, Internet key Exchange (IKE). IKE main role is to transfer SA parameters between hosts and to negotiate protocols between them.

Scalability of IP sec

IPsec protocol does not specify only one encryption algorithms such DES, or RSA, 3-DES as is the case with other security protocols. It rather gives the freedom to choose among a wide variety of algorithms, protocols suitable for a particular connection. Comer (2007) specifically adds that 'IPsec is not a single protocol. Instead, IPsec provides a set of security algorithms plus a general framework that allows a pair of communication entities to use whichever algorithms provide security appropriate for the communication.' In this case, if one algorithm has been compromised, new better algorithms can be added and devices can still continue using IPsec as long as they choose the right combination.

Another aspect that depicts the scalability of IPsec is its ability to offer automated key management. According to Douligeris & Serpanos ed. (2007), key exchange between two devices could either be manual or automatic. Manual key exchange are suitable when configuring small number of devices. On the contrary, when there are numerous devices to exchange keys and regenerate keys, automated process play an important role. Keys could range from mere secretes to digital signatures. This flexibility on the number of options and availability of automated key generation and exchange underpins the scalability and robustness of IPsec protocol.

Ipsec works with any protocol above the Network layer protocol and any protocol below the network layer. Virtually, any communication that passes through network layer can be encrypted or authenticated by IPsec. In addition, the structure of an IP packet does not change; there is always the header and payload. This is an important factor to ensure that even devices on the network that may not be IPsec compliant can receive and forward such packet.

There are limitations though in the implementation of IPsec and these have been described below:

Limitations of IPsec protocol

IPsec and Firewalls not integrated in lower versions of Windows servers.

If there is a virus from outside networks that would like to infest a local computer, it would negotiate its way through the firewall. In most cases,

it would be blocked at the firewall. Alternatively, the virus would infest a remote computer which connects to the local computer, however, protected the traffic by IPsec. Since traffic between two computers is encrypted, and firewall allows IPsec traffic to pass through, it would not be able to detect the virus hence the local machine would eventually be infested by the virus because of IPsec protocol. The scenario is common in windows servers whose versions are lower than 8, because firewalls are not integrated with IPsec. This is a significant limitation of IPsec.

IPsec is too complicated to provide good security

Scalability of IPsec and availability of several algorithms/sub protocols make IPsec more complicated. Albeit the fact that it is transparent to users, which is a positive aspect of IPsec, the actual task rests with network administrator who has the daunting task of choosing the right combinations. Since there are too many options, it is likely that such may not implement the best option ever. Usually, most administrators end up choosing the default settings which are generally weak security options. Complexity of IPsec protocol is argued to be its weakness as a complex protocols are is difficult to understand and implement it (Ferguson & Schneier, 2001).

IPsec cannot digitally sign a particular document

IPsec is limited to authenticating machines to machines; administrators cannot use IPsec to implement a particular user Id to an application. The concept of user Id authentication which is central to accountability and authorisation of a particular person is not achieved through IPsec. Therefore, IPsec cannot be used to digitally sign a particular document or authenticate a particular user ID. It is limited to a machine and user ID in combination.

Inefficiencies in Host -to-host IPsec integration with Operating systems

Fig 4(a) (b)

The figures above depict that IPsec being implemented in host -to-host can either be implemented in IP stack layering fig 4a or Bump-in-stack 4b. Bump-in-stack is implemented when vendors have the problem with implementation of the IP stack layering as they work with specific client operating systems. This scenario limits their capability to offer the VPN solutions to various clients. As a solution to this problem, vendors opt to insert IPsec between the data link layer and network layer. As depicted in the diagram 4b, instead of maximizing on already available technologies of network layer as is the case in first option, bump-in-stack duplicates most features, hence increasing on processing overheads.

Best Practices in deploying IPsec

Authenticity vs. Confidentiality

The best way to deploy IPsec is to determine the objective that must be achieved. If the objective is to maintain data integrity and authenticity without necessarily incurring overheads, then AH in transport mode is adequate.

Similarly, if confidentiality is paramount as compared to speeds, then both AH and ESP must be applied in tunnel mode.

Essentially, the best option depends on what would be achieved with IPsec.

Various option in IPsec

It has been mentioned that IPsec offers numerous options of encryption algorithms. If the objective is to ensure confidentiality, then it is recommended to use strong algorithms as SHA1 as compared to SHA, or triple DES as compared to DES. To achieve the best result in both authentication and confidentiality requirements, strong algorithms must apply to authentication process of key and secret exchange between hosts and less process intensive algorithms must be applied to encryption process.

According to RFC 2411, which describes the scope of IPsec, it clearly indicates that IPsec is merely one of solutions of internet security. An organisation needs to implement best IT policy, best encryption at application layer such as PGP for email as well as media encryption. Relying purely on IPsec cannot lead to best achievements of results.

Use of Oakley/ISAKMP for key exchange

The above mentioned uses Hiffie-Hellman , an encryption algorithm which is best suited for key exchange.(Cobb, 2004). Two devices generate symmetric keys using Hiffie-Hellman algorithm, to be used in communication. As described in cryptography, if key exchange is not properly done, the entire IPsec process is equally weak. (Tipton & Henry, 2007).

Do not apply IPsec on servers that offer network services.

Due to its complexity , it is likely that if poorly configured, IPsec will fail hence it is not good practice to implement IPsec on servers that offer network services such as Domain Names Services. Instead, it is recommended to apply IPsec on servers that host sensitive data only which is at rest and has very few accesses to it.

Register to organisations that publish vulnerabilities

The network administrator who is responsible for implementing IPsec has a wide variety of choices to implement IPsec between devices. It is recommended that such must subscribe to security related organisations which publish vulnerabilities as they occur. In such a case, any vulnerability associated with an encryption algorithm or protocol could be immediately dropped if it was implemented in IPsec. For example, DES is believed to be a weak encryption and must not be used is the main concern is confidentiality. Similarly use of pre-shared keys is no longer a better option to implement in IPsec, even though they are available by default.

Conclusion

IPsec as one of integrated solutions to internet security among those applied at application layer, transport layer or data link layer , plays a pivotal role in the sense that it addresses confidentiality, originality of traffic , integrity of data, and system availability to any packet irrespective any protocol above or below it. This coupled with is easing of large scale implementation over disparate devices makes it superior over other solutions taken on a separate basis.

Nonetheless, due to the fact that IPsec implementation is hidden from ordinary user, the actual task remains to well- trained network administrator to carefully plan and deploy IPsec. This has been dabbed as the greatest weakness of IPsec as its complexity entails that it cannot be controlled either. In addition, IPsec is not a solution to all Internet risks; it needs to work in coordination with other solutions to compliment areas where IPsec scope does not tackle. It is hoped though, that IPsec will eventually reduce the options it offers and eventually become the de facto protocol of internet security in the near future.

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.