Ipsec
Ipsec
Ipsec
IPSEC Objectives
Band-aid for IPv4
Spoofing a problem
Not designed with security or authentication
in mind
IP layer mechanism for IPv4 and IPv6
Notall applications need to be security aware
Mandatory in IPv6, optional in IPv4
Encrypted Tunnel
Gateway 1 Gateway 2
Encrypted Unen
y pt ed crypt
A nencr ed
B
U
Real IP ESP
destination
AH
IPSec processing
Send to B
Inbound Processing
From A
SA Database SPD
SPI & Packet
(Policy)
Use SPI to Was packet properly
index the SAD secured?
Original IP Packet
…
“un-process” …
Architecture & Concepts
Tunnel vs. Transport mode
Security association (SA)
Security parameter index (SPI)
Security policy database (SPD)
SA database (SAD)
Authentication header (AH)
Encapsulating security payload (ESP)
Key management
Authenticated Header
Data integrity
Entire packet has not been tampered with
Authentication
Can “trust” IP address source
Use keyed MAC to authenticate
Symmetric encryption, e.g, DES
One-way hash functions with a shared secret key, e.g,
HMAC-MD5-96 or HMAC-SHA-1-96
Anti-replay feature
Integrity check value
IPSec Authenticated Header
Length of the authentication header
SAD
…
SPI
Sequence Number
ICV
Integrity Check Value - ICV
Keyed Message authentication code (MAC)
calculated over
IP header field that do not change or are
predictable
Source IP address, destination IP, header length, etc.
Prevent spoofing
etc.
IPSec protocol header except the ICV value field
Upper-level data
Transport Mode
Good for host to
host traffic
Tunnel Mode
Good for VPNs,
gateway to
gateway security
Outbound Packet Processing
Form ESP header
Security
parameter index (SPI)
Sequence number
Pad as necessary
Encrypt result [payload, padding, pad length,
next header]
Apply authentication (optional)
Allow rapid detection of replayed/bogus packets
Allow potential parallel processing - decryption &
verifying authentication code
Integrity Check Value (ICV) includes whole ESP
packet minus authentication data field
ESP Transport Example Original IP Header
Variable Length
A B C
IPv6
New New ESP Orig Orig ESP ESP
TCP Data
IP hdr ext hdr hdr IP hdr ext hdr trailer Auth