notes
notes
a. Tthe format of an ESP packet in IP security. Why does ESP include a padding field?
4.
Padding
The Padding field serves several purposes:
• If an encryption algorithm requires the plaintext to be a multiple of some number of bytes, the
Padding field is used to expand the plaintext to the required length.
• The ESP format requires that the Pad Length and Next Header fields be right aligned within a
32-bit word.
• Additional padding may be added to provide partial traffic-flow confidentiality by concealing
the actual length of the payload.
Describe how Authentication Header (AH) is implemented in transport and tunnel modes
with a neat diagram.
For transport mode AH using IPv4, the AH is inserted after the original IP header and before the
IP payload
Authentication covers the entire packet, excluding mutable fields in the IPv4 header that
are set to zero for MAC calculation
For tunnel mode AH, the entire original IP packet is authenticated and the AH is inserted
between the original IP header and a new outer IP header
The inner IP header carries the ultimate source and destination address
The outer IP header may contain different IP addresses
b. Applications of IPsec :-
IPsec provides the capability to secure communications across a LAN, across private and public
WANs, and across the Internet. Examples of its use include:
• Secure branch office connectivity over the Internet
• Secure remote access over the Internet: An end user whose
• Establishing extranet and intranet connectivity with partners:
Benefits of IPsec :-
• When IPsec is implemented in a firewall or router, it provides strong security that can be
applied to all traffic crossing the perimeter.
• IPsec in a firewall is resistant to bypass if all traffic from the outside must use IP and the
firewall is the only means of entrance from the Internet into the organization.
• IPsec is below the transport layer (TCP, UDP) and so is transparent to applications.
• IPsec can be transparent to end users. There is no need to train users on security mechanisms,
issue keying material on a per-user basis, or revoke keying material when users leave the
organization.
• IPsec can provide security for individual users if needed.
Case 1. All security is provided between end systems that implement IPsec. For any two end
systems to communicate via an SA, they must share the appropriate secret keys. Among the
possible combinations are
a. AH in transport mode
b. ESP in transport mode
c. ESP followed by AH in transport mode (an ESP SA inside an AH SA)
d. Any one of a, b, or c inside an AH or ESP in tunnel mode
Case 2. Security is provided only between gateways (routers, firewalls, etc.) and no hosts
implement IPsec. This case illustrates simple virtual private network support. The security
architecture document specifies that only a single tunnel SA is needed for this case. The tunnel
could support AH, ESP, or ESP with the authentication option. Nested tunnels are not required,
because the IPsec services apply to the entire inner packet.
Case 3. This builds on case 2 by adding end-to-end security. The same combinations discussed
for cases 1 and 2 are allowed here. The gateway-to-gateway tunnel provides either
authentication, confidentiality, or both for all traffic between end systems. When the gateway-to-
gateway tunnel is ESP, it also provides a limited form of traffic confidentiality. Individual hosts
can implement any additional IPsec services required for given applications or given users by
means of end-to-end SAs.
Case 4. This provides support for a remote host that uses the Internet to reach an organization’s
firewall and then to gain access to some server or workstation behind the firewall. Only tunnel
mode is required between the remote host and the firewall. As in case 1, one or two SAs may be
used between the remote host and the local host.
Security Association Database (SA Parameter) :-
• Security Parameter Index: A 32-bit value selected by the receiving end of an SA to uniquely
identify the SA.
• Sequence Number Counter: A 32-bit value used to generate the Sequence Number field in
AH or ESP headers. • Sequence Counter Overflow: A flag indicating whether overflow of the
Sequence Number Counter should generate an auditable event and prevent further transmission
of packets on this SA
• Anti-Replay Window: Used to determine whether an inbound AH or ESP packet is a replay.
• AH Information: Authentication algorithm, keys, key lifetimes, and related parameters being
used with AH
• ESP Information: Encryption and authentication algorithm, keys, initialization values, key
lifetimes, and related parameters being used with ESP
• Lifetime of this Security Association: A time interval or byte count after which an SA must
be replaced with a new SA or terminated, plus an indication of which of these actions should
occur.
• IPsec Protocol Mode: Tunnel, transport, or wildcard.
• Path MTU: Any observed path maximum transmission unit and aging variables
Security Policy Database (SA Selectors):-
Each SPD entry is defined by a set of IP and upper-layer protocol field values, called selectors.
• Remote IP Address: This may be a single IP address, an enumerated list or range of addresses,
or a wildcard (mask) address.
• Source IP Address: This may be a single IP address, an enumerated list or range of addresses,
or a wildcard (mask) address.
• userID: a user identifier from the operating system
• data sensitivity level: used for systems providing information flow security
• transport layer protocol: this may be an individual protocol number, a list of protocol
numbers, or a range of protocol numbers
• source and destination ports: these may be individual TCP or UDP port values, an
enumerated list of ports or a wildcard port