Unit-4 IP Security (IPSec)
Unit-4 IP Security (IPSec)
fixed
variable
Authentication Header (AH) Protocol
• It provides source authentication and data integrity, but
not
privacy
• It uses a hash function and a symmetric key to create a MD, and
the MD is inserted in the AH
• The AH is then placed in a location based on the mode to send
• AH fields
• Next Header: 8-bit length defines the type of payload carried
by the IP .
• Payload length: 8-bit length. Defines the length of AH
• Security Parameter Index: 32-bit length. Identifier to know the
security association used to send packets.
• Sequence number: 32-bit length. Ordering information to
prevent a playback. Unique number always used even a packet
is retransmitted.
• Authentication data: applying a hash function to entire IP data
packet to create a MD.
Encapsulating Security Payload (ESP) Protocol
• Encapsulating Security Payload (ESP) protocol provides
source
authentication, data integrity, and privacy
• It adds a header and trailer ESP’s authentication data are added at
the end of the packet
• ESP procedure follows
• ESP trailer is added to the payload
• The payload and trailer are encrypted
• ESP header is added
• The ESP header, payload, and ESP trailer are used to create the
authentication data.
• the authentication data are added to the end of the ESP trailer
• The IP header is added after changing the protocol value to 50
The fields of header and trailer are
• Security Parameter Index: 32-bit length. Identifier to know the
security association used to send packets
• Sequence Number: 32-bit length. Ordering information to prevent
a playback. Unique number always used even a packet is
retransmitted.
• Pad length: 8-bit length. defines no. of padding bytes. Value is
between 0 and 255.
• Next header: 8-bit length defines the type of payload carried by
the IP .
ESP Packet Details
ESP Packet Details
• Security Parameters Index (32 bits): Identifies a
security association.
• Sequence Number (32 bits): A monotonically
increasing counter value; this provides an anti-replay
function.
• Payload Data (variable): This is a transport-level
segment (transport mode) or IP packet (tunnel mode)
that is protected by encryption.
• Padding (0–255 bytes): The purpose of this field is to
make the plaintext to a multiple of some number of
bytes.
• Pad Length (8 bits): Indicates the number of pad bytes
immediately preceding this field.
• Next Header (8 bits): Identifies the type of data
contained in the payload data.
• Integrity Check Value (variable): A variable-length
field (must be an integral number of 32-bit words)
that contains the Integrity Check Value computed
over the ESP packet.
Encryption & Authentication
Algorithms & Padding
• ESP can encrypt payload data, padding, pad length, and
next header fields
• ESP can have optional ICV for integrity
– is computed after encryption is performed
• ESP uses padding
– to expand plaintext to required length
– to align pad length and next header fields
IPSec Services