340 likes | 734 Views
IPSec. IP Security (IPSec). IP Security (IPSec). IPSec overview Authentication Header (AH) Encapsulating Security Payload (ESP) Internet Key Exchange (IKE) Main Mode negotiation Quick Mode negotiation Retransmit behavior. Overall Architecture (RFC 1825).
E N D
IPSec IP Security (IPSec)
IP Security (IPSec) • IPSec overview • Authentication Header (AH) • Encapsulating Security Payload (ESP) • Internet Key Exchange (IKE) • Main Mode negotiation • Quick Mode negotiation • Retransmit behavior
Overall Architecture (RFC 1825) • Framework for security protocols to provide: • Data integrity • Data authentication • Data confidentiality • Security association management • Key management
Authentication Header (RFC 1826) IP Header plus Data IP Header plus Data • Data integrity—no twiddling of bits • Origin authentication—definitely came from router • Uses keyed-hash mechanism • Does not provide confidentiality Authentication Data (00ABCDEF) Authentication Data (00ABCDEF) IPHDR AH Data Router Router
Router Router All Data-Encrypted Encapsulating Security Payload (RFC 1827) • Confidentiality • Data origin authentication • Data integrity • Replay protection (optional)
Security Association (SA) • Agreement between two entities on method to communicate securely • Unidirectional—two way communication consists of two SAs Firewall Router Insecure Channel
IKE Policy Negotiation Encryption Algorithm, Hash Algorithm, and Method of Authentication 3DES, MD5, and RSA Signatures, or IDEA, SHA, and DSS Signatures, or Blowfish, SHA, and RSA Encryption IDEA, SHA, and DSS Signatures ISAKMP Policy Tunnel
IPSec Model • Device authentication • Crypto devices obtain digital certificates from CAs • Authorization • Packet selection via ACLs • Security Association (SA) established via ISAKMP/OAKLAY • Privacy and integrity • IPSec-based encryption and digital signature Internal Network Certificate Authority Digital Certificate Digital Certificate IKE Session SA Authenticated Encrypted Tunnel Clear Text Internal Network Encrypted
IPsec Protocols and Formats Authentication Header Encapsulating Security Payload ISAKMP/Oakley Diffie-Hellman Transport Tunnel • Integrity, authentication • Adds confidentiality • Negotiates security parameters • Uses digital certificates • Generates shared secret keys • IP payload only, Layer 4 is obscured • Both end systems need IPsec • Entire datagram • No changes to intermediate systems • DES, 3DES, RC4, IDEA, AES ... • HMAC MD5, HMAC SHA1 Headers Key Exchange Modes Encryption Hashing
IPSec Modes IP HDR DATA Tunnel Mode New IP HDR IPSec HDR IP HDR DATA Encrypted IP HDR DATA Transport Mode IP HDR IPSec HDR DATA Encrypted
Tunnel and Transport Modes • Transport mode for end-to-end session • Tunnel mode for everything else Transport Mode Tunnel Mode Joe’s PC HR Server
Ipsec—Standards Based Internet Dial VLANs IPsec IPsec IPsec Firewall Campus
IPSec Overview • Proposed Internet standard for IP-layer cryptography with IPv4 and IPv6 Router to Router PC to Router Router to Firewall PC to Server
IPSec Process • Initiating the IPSec session • Phase one—exchanging keys • Phase two—setting up security associations • Encrypting/decrypting packets • Rebuilding security associations • Timing out security associations
Initiating the IPSec Session Phase One — ISAKMP • Internet Security Association Key Management Protocol (ISAKMP) • Both sides need to agree on the ISAKMP security parameters (ISAKMP SADB) • ISAKMP parameters • Encryption algorithm • Hash algorithm • Authentication method • Diffie-Hellman modulus • Group lifetime
Initiating the IPSec Session Phase Two • Both sides need to agree on the IPSec security parameters (IPSec SADB) • IPSec parameters • IPSec peer • Endpoint of IPSec tunnel • IPSec proxy • Traffic to be encrypted/decrypted • IPSec transform • Encryption and hashing • IPSec lifetime • Phase two SA regeneration time
Encrypting and Decrypting Packets • Phase one and phase two completes • Security Associations (SA) are created at both IPSec endpoints • Using the negotiated SADB information • Outbound packets are encrypted • Inbound packets are decrypted
Rebuilding Security Associations • To ensure that keys are not compromised they are periodically refreshed • Security associations will be rebuilt when: • The lifetime expires, or • Data volume has been exceeded, or • Another SA is attempted with identical parameters
Security Associations • Combination of mutually agreed security services, protection mechanisms, and cryptographic keys • ISAKMP SA • IPSec SAs • One for inbound traffic • One for outbound traffic • Security Parameters Index (SPI) • Helps identify an SA • Creating SAs • Main Mode for ISAKMP SA • Quick Mode for IPSec SAs
IPSec Headers • Authentication Header (AH) • Provides data origin authentication, data integrity, and replay protection for the entire IP datagram • Encapsulating Security Payload (ESP) • Provides data origin authentication, data integrity, replay protection, and data confidentiality for the ESP-encapsulated portion of the packet
IPSec Modes • Transport mode • Typically used for IPSec peers doing end-to-end security • Provides protection for upper-layer protocol data units (PDUs) • Tunnel mode • Typically used by network routers to protect IP datagrams • Provides protection for entire IP datagrams
AH Transport Mode IP Upper layer PDU IP AH Upper layer PDU Authenticated
AH Tunnel Mode IP Upper layer PDU IP (new) AH IP Upper layer PDU Authenticated
ESP Transport Mode IP Upper layer PDU IP ESP Upper layer PDU ESP Auth Data Encrypted Authenticated
ESP with AH Transport Mode IP Upper layer PDU IP AH ESP Upper layer PDU ESP ESP Auth Encrypted Authenticated with ESP Authenticated with AH
ESP Tunnel Mode IP Upper layer PDU IP (new) ESP IP Upper layer PDU ESP Auth Data Encrypted Authenticated