CN_Assignment_IP_Security
CN_Assignment_IP_Security
Ans: IPsec, or Internet Protocol Security, is a suite of protocols that provides security at the
network layer by authenticating and encrypting IP packets. Its main goals are confidentiality,
data integrity, source authentication, and replay protection
3. What is Encapsulation Security Payload (ESP) in IPsec, and what does it provide?
Ans: ESP is a protocol within IPsec that provides encryption, source authentication, and data
integrity. It encapsulates the payload, protecting it against unauthorised access
Ans: In Transport Mode, only the IP payload is encrypted, leaving the IP header unchanged.
In Tunnel Mode, the entire IP packet, including the header, is encrypted, making it ideal for
VPNs and secure gateway-to-gateway communications
5. What is a Virtual Private Network (VPN) and how does IPsec support it?
Ans: A VPN is a secure network created over a public network. IPsec supports VPNs by
encrypting the data exchanged over the public network, enabling private, secure
communication as though over a dedicated network
14 Mark Questions
1. Explain in detail the IPsec protocol suite and the functionalities of AH and ESP
protocols.
Ans: The IPsec protocol suite secures IP communications by authenticating and encrypting
each IP packet in a data stream. It operates at the network layer, providing comprehensive
security for IP communications by supporting two primary protocols:
● Authentication Header (AH): AH provides data integrity and source authentication by
applying a cryptographic hash function (like SHA or MD5) to each packet. While AH
verifies that data has not been altered, it does not encrypt the data, so it does not
offer confidentiality. AH ensures the origin and integrity of each packet, protecting
against spoofing and tampering. However, AH is less commonly used than ESP due
to its lack of confidentiality.
● Encapsulation Security Payload (ESP): ESP provides data encryption, source
authentication, and data integrity. By encrypting the payload, ESP ensures
confidentiality, preventing unauthorised access. Like AH, ESP also applies a hash
function to provide data integrity and origin authentication. ESP’s ability to encrypt
the payload makes it ideal for secure communications, particularly in VPNs and
sensitive data transfers.
● Modes of Operation:
○ Transport Mode: Only the IP payload is encrypted, leaving the IP header
intact. This mode is efficient for end-to-end communication (e.g., host-to-host)
and maintains the original IP addressing, which simplifies routing.
○ Tunnel Mode: In this mode, the entire IP packet (header and payload) is
encrypted and encapsulated in a new IP header. Tunnel Mode is ideal for
network-to-network or gateway-to-gateway communication, as it secures
routing and addressing details, commonly used in VPNs.
● Security Services Provided by IPsec:
○ Confidentiality: Through ESP encryption, IPsec prevents unauthorised data
access.
○ Data Integrity: Both AH and ESP ensure that data has not been altered in
transit.
○ Source Authentication: By validating packet origins, IPsec verifies that data is
from an authorised sender.
○ Replay Protection: Sequence numbers help prevent replay attacks by
identifying and rejecting duplicate packets.
IPsec’s suite of protocols, particularly in Tunnel Mode, is widely used in VPNs to ensure
secure data exchange across the internet, providing a complete framework for securing IP
communications
2. Discuss IPsec Security Associations (SAs) and the Security Policy Database (SPD)
and their role in secure communication.
Ans: IPsec relies on Security Associations (SAs) to define the parameters required for
secure data exchange. Each SA represents a one-way logical connection between entities
and specifies the security attributes that will apply to each communication session. SAs
contain:
● Security Protocols (AH or ESP): Specify whether the connection will use AH for
authentication and integrity or ESP for encryption and confidentiality.
● Encryption and Integrity Algorithms: Define the cryptographic algorithms (such as
AES for encryption and SHA-1 for hashing) used to protect data.
● Keys and Sequence Numbers: Specify the cryptographic keys and sequence
numbers, ensuring that each packet is unique and protected against replay attacks.
Together, SAs and the SPD provide the foundation for IPsec’s secure communication by
managing and enforcing security policies at the network layer, allowing for flexible and
dynamic security configurations
3. Describe the role of Internet Key Exchange (IKE) in IPsec and how it aids in SA
management?
Ans: The Internet Key Exchange (IKE) protocol automates the setup of SAs, simplifying
IPsec configuration by negotiating cryptographic keys and connection parameters between
entities. IKE operates in two phases:
4. Explain the IPsec Datagram format and how it supports both Transport and Tunnel
modes.
Ans: IPsec datagrams vary depending on the mode of operation. IPsec supports two modes,
Transport and Tunnel, each suited to different network configurations.
● Transport Mode Datagram: In Transport Mode, only the IP payload is protected. The
ESP header and trailer are added to the payload, with optional encryption applied to
the data itself, leaving the original IP header visible for routing purposes. This mode
is often used for host-to-host communication, where end devices have IPsec
capabilities.
● Tunnel Mode Datagram: In Tunnel Mode, the entire IP packet (header and payload)
is encapsulated within a new IP header, allowing the original IP packet to remain
confidential. Tunnel Mode is commonly used in VPNs and secure
gateway-to-gateway connections. In Tunnel Mode:
○ An outer IP header is added for routing across the internet.
○ The original IP packet is encrypted and encapsulated, preventing exposure of
routing and addressing details.
● ESP Header: Placed before the IP payload, it includes the SPI and sequence
numbers, allowing IPsec to identify the SA and prevent replay attacks.
● Payload: The IP packet or data being transmitted, encrypted in ESP.
● ESP Trailer and Authentication: Used for padding and integrity checks, ensuring data
remains unaltered.
This flexibility in encapsulation and encryption makes IPsec suitable for a wide range of
network topologies, allowing secure communication across various configurations
5. How does IPsec provide protection against various attacks such as eavesdropping,
tampering, replay attacks?
Ans: Psec’s robust protocol suite provides comprehensive protection against common
network attacks, ensuring secure communication across potentially insecure networks.
By combining these mechanisms, IPsec creates a secure environment that addresses major
security concerns, making it an effective solution against eavesdropping, tampering,
unauthorised access, and replay attacks