Download VPNs and IPsec: Network Security with Confidentiality, Authentication, and Encryption and more Slides Wireless Networking in PDF only on Docsity!
Virtual Private Networks
(VPNs)
What is network-layer
confidentiality?
between two network entities:
- (^) sending entity encrypts datagram payload, payload
could be:
- (^) TCP or UDP segment, ICMP message, OSPF message ….
- (^) all data sent from one entity to other would be
hidden:
- (^) web pages, e-mail, P2P file transfers, TCP SYN packets …
- (^) “blanket coverage”
IP header^ IPsec header^ Secure payload IP header IPsec header Secure payload header IP header^ IPsec payload^ Secure IP header payload header IP payload headquarters branch office salesperson in hotel laptop w/ IPsec router w/ IPv4 and IPsec router w/ IPv4 and IPsec public Internet
Virtual Private Networks
(VPNs)
IPsec services
- (^) data integrity
- (^) origin authentication
- (^) replay attack prevention
- (^) confidentiality
- (^) two protocols providing different service models:
IPsec – tunneling mode
- (^) edge routers IPsec-aware IPsec (^) IPsec IPsec IPsec
hosts IPsec-aware
Two IPsec protocols
- (^) Authentication Header (AH) protocol
- (^) provides source authentication & data integrity but not confidentiality
- (^) Encapsulation Security Protocol (ESP)
- provides source authentication, data integrity, and confidentiality
- (^) more widely used than AH
Security associations (SAs)
- (^) before sending data, “security association (SA)”
established from sending to receiving entity
- (^) SAs are simplex: for only one direction
- (^) ending, receiving entitles maintain state information
about SA
- (^) recall: TCP endpoints also maintain state info
- (^) IP is connectionless; IPsec is connection-oriented!
- (^) how many SAs in VPN w/ headquarters, branch
office, and n traveling salespeople?
Example SA from R1 to R
R1 stores for SA:
- (^) 32-bit SA identifier: Security Parameter Index (SPI)
- (^) origin SA interface (200.168.1.100)
- destination SA interface (193.68.2.23)
- (^) type of encryption used (e.g., 3DES with CBC)
- (^) encryption key
- type of integrity check used (e.g., HMAC with MD5)
- (^) authentication key 200.168.1.100 193.68.2. 172.16.1/ 172.16.2/ security association headquarters Internet branch office R R
IPsec datagram
focus for now on tunnel mode with ESP
new IP header ESP hdr original IP hdr Original IP datagram payload ESP trl ESP auth encrypted “enchilada” authenticated padding pad length next header SPI Seq
What happens? new IP header ESP hdr original IP hdr Original IP datagram payload ESP trl ESP auth encrypted “enchilada” authenticated padding pad length next header SPI Seq
200.168.1.100 193.68.2. 172.16.1/ 172.16.2/ security association headquarters Internet branch office R R
Inside the enchilada:
- (^) ESP trailer: Padding for block ciphers
- (^) ESP header:
- (^) SPI, so receiving entity knows what to do
- Sequence number, to thwart replay attacks
- (^) MAC in ESP auth field is created with shared secret key new IP header ESP hdr original IP hdr Original IP datagram payload ESP trl ESP auth encrypted “enchilada” authenticated padding pad length next header SPI Seq
IPsec sequence numbers
- (^) for new SA, sender initializes seq. # to 0
- (^) each time datagram is sent on SA:
- (^) sender increments seq # counter
- (^) places value in seq # field
- (^) goal:
- prevent attacker from sniffing and replaying a packet
- (^) receipt of duplicate, authenticated IP packets may disrupt service
- (^) method:
- (^) destination checks for duplicates
- (^) doesn’t keep track of all received packets; instead uses a window
Summary: IPsec services
- (^) suppose Trudy sits somewhere between R1 and
R2. she doesn’t know the keys.
- (^) will Trudy be able to see original contents of datagram? How about source, dest IP address, transport protocol, application port?
- (^) flip bits without detection?
- (^) masquerade as R1 using R1’s IP address?
- replay a datagram?
IKE: Internet Key Exchange
- (^) previous examples: manual establishment of IPsec SAs in IPsec endpoints: Example SA SPI: 12345 Source IP: 200.168.1. Dest IP: 193.68.2. Protocol: ESP Encryption algorithm: 3DES-cbc HMAC algorithm: MD Encryption key: 0x7aeaca… HMAC key:0xc0291f…
- (^) manual keying is impractical for VPN with 100s of endpoints
- (^) instead use IPsec IKE (Internet Key Exchange)