Lehrstuhl für Netzarchitekturen und Netzdienste
Fakultät für Informatik Technische Universität München
ilab Lab 8 - SSL/TLS and IPSec Outlook: On Layer 4: Goal: Provide - - PowerPoint PPT Presentation
Lehrstuhl fr Netzarchitekturen und Netzdienste Fakultt fr Informatik Technische Universitt Mnchen ilab Lab 8 - SSL/TLS and IPSec Outlook: On Layer 4: Goal: Provide security for one specific port SSL (Secure Socket Layer) /
Lehrstuhl für Netzarchitekturen und Netzdienste
Fakultät für Informatik Technische Universität München
Internetpraktikum 2
On Layer 4:
Goal: Provide security for one specific port
On Layer 3:
Goal: Provide security for IP traffic
Often used for Virtual Private Networks (VPN) / Tunnel
Internetpraktikum 3
Internetpraktikum 4
Used for: Encryption and integrity protection for data sent over a socket
Application flow:
(server/client certificates and digital signatures used)
SSL/TLS uses the reliable transport protocol TCP
Applikation TLS TCP IP Host to Network TCP/IP-Modell
Internetpraktikum 5
TLS can be split into two protocol layers:
parameters
SSL Handshake Protocol SSL Change Cipherspec Protocol SSL Application Data Protocol SSL Alert Protocol SSL Record Protocol TCP Applikation
Internetpraktikum 6
Type:
Version: SSL-Version (major = 3, minor = 3 TLS 1.2) Length: Length of payload Data: Payload to transmit
(e.g. for Application Data Protocol: encrypted data, MAC, padding)
Type
Length Length Data 23 15 7 31
Internetpraktikum 7
Is directly built on top of TCP Processing chain (sending):
H(MAC_write_secret + pad_1 + seq_num + length + data))
TCP header contains the sequence number
“Change Cipherspec”
Internetpraktikum 8
Overview:
set of cryptographic suites
chosen cryptographic suite, certificate
the TLS handshake requires two round trips Client Server 1 2 3
Key Generation Key Generation
4 5
Internetpraktikum 9
ClientHello(Ver,Random, CipherSuite,Compr)
Client Server
ServerHello(Ver,Random, SessionID,CipherSuite,Compr) ServerCertificate ServerHelloDone ClientKeyExchange ChangeCipherSpec Finished ChangeCipherSpec Finished
1 2 3 4 5
Internetpraktikum 10
ClientHello(Ver,Random, CipherSuite,Compr)
Client Server
ServerHello(Ver,Random, SessionID,CipherSuite,Compr) [ServerCertificate] [CertificateRequest] [ServerKeyExchange] ServerHelloDone [ClientCertificate] ClientKeyExchange [CertificateVerify] ChangeCipherSpec Finished ChangeCipherSpec Finished
[...] denotes optional message
1 2 3 4 5
Internetpraktikum 11
Internetpraktikum 12
3 typical configurations:
company)
End-to-End Site-to-Site End-to-Site Branch A Branch B
10.3.2.11 10.3.2.34
Internetpraktikum 13
Shortcomings of IP:
protects data integrity, nor provides confidentiality
Services of IPSec:
IPSec defines two packet formats…
Authentication
Confidentiality (+ Authentication)
… and a key exchange protocol
an insecure channel
Internetpraktikum 14
Security Policy (SP) / Security Policy Database (SPD)
and Host b using encryption mechanism x and authentication mechanism y
Security Association (SA) / Security Association Database (SAD)
specified in the SPD
used key, duration, …
Internetpraktikum 15
Authentication Header vs. Encapsulating Security Payload
The authentication header (AH):
data to be protected
The encapsulating security payload (ESP):
protected
IP header AH header protected data authenticated IP header ESP header protected data ESP trailer authenticated encrypted
Internetpraktikum 16
ESP and AH can be combined for maximum security:
AH
Uses two SAs
IP header ESP header protected data ESP trailer authenticated encrypted AH header
Internetpraktikum 17
IPSec works in two modes:
The difference between the two modes is, that:
Encapsulation of IP packets allows for a gateway protecting traffic
IP header IPSec header protected data New IP header IPSec header protected data Old IP header
Internetpraktikum 18
Site-to-Site Branch A Branch B
10.3.2.11 10.3.2.34
Internetpraktikum 19
Security Parameter Index (SPI) Sequence Number Authentication Data Payload Length 23 15 7 31 Next Header Reserved IP Header Payload authenticated AH
AH authenticates all invariant fields of the IP Header Protocol (IPv4) / Next
Header Feld (IPv6): 51 = AH
Used to identify the currently used SA
Internetpraktikum 20
The ESP-Header directly follows the IP header or the AH header
Protocol (IPv4) or Next-Header (IPv6) field: 50 = ESP
Security Parameter Index (SPI) Sequence Number Initialization Vector Protected Data Pad Pad Length Next Header Authentication Data 23 15 7 31 encrypted authenticated Used to identify the currently used SA
Internetpraktikum 21
Example: IPSec-Tunnel between two networks – Outbound Processing Site-to-Site Branch A Branch B
10.3.2.11 10.3.2.34
Internetpraktikum 22
IPSec outbound processing Lookup appropriate policy No policy? yes no perform outbound processing according to the order given in the SPD no new incoming packet deliver packet Policy is discard? discard packet yes Lookup SAs No SA? IKE yes no
Internetpraktikum 23
Example: IPSec-Tunnel between two networks – Inbound Processing Site-to-Site Branch A Branch B
10.3.2.11 10.3.2.34
Internetpraktikum 24
IP Inbound processing (1) All Fragments Available? no Wait for Fragments Does SA for SPI Exist? no Discard Packet yes yes get SPI from the IPSec header perform ESP/AH inbound processing IPSec header found yes no
Internetpraktikum 25
Currently no working attacks are known Design got criticized by various persons, e.g. Schneier/Ferguson
most operational modes are not used/not needed – AH+ESP fits all
Complex things are prone to errors, i.e. implementation is very difficult
Currently the best working security mechanism for securing IP
communication (on layer 3)