IPsec TLS
IPsec TLS
Ruben Niederhagen
Alice Bob
Alice Bob
I application layer security (SSH, S-MIME, PGP, . . . )
I transport layer security (TLS/SSL, . . . )
I network layer security (IPsec, . . . )
I data-link layer security (WEP, WPA, WPA2, . . . )
Internet
LAN router ISP router
Internet
LAN router ISP router
Internet
Internet
Internet
mail server
Internet
mail server
SMTP
mail server
Internet
IMAP
mail server
SMTP
mail server
Internet
IMAP
mail server
Internet
Internet
IPsec was mandatory for IPv6 and is now optional; optional for IPv4.
Transport mode:
I only the payload of the IP packet is protected,
I header is not encrypted in ESP, parts of it are authenticated in AH,
I data is protected from source to destination,
I header information is completely in the clear,
I used only between hosts.
Transport mode:
I only the payload of the IP packet is protected,
I header is not encrypted in ESP, parts of it are authenticated in AH,
I data is protected from source to destination,
I header information is completely in the clear,
I used only between hosts.
Tunnel mode:
I entire IP packet is protected (i.e. IP header and data),
I becomes the payload of a new IP packet,
I may contain different source and destination addresses,
I provides data flow confidentiality to some extent,
I can be used between hosts, gateways or host-gateway.
/ department of mathematics and computer science
IPsec – Modes of Operation 13/45
transport mode
Internet
tunnel mode
Internet local network
host gateway
transport mode
Internet
tunnel mode
local network Internet local network
gateway gateway
Protocol TCP
TCP Segment Data
6 Header
IP Header IP Data
Authenticated Fields
IP Header IP Data
Authenticated Fields
Protocol TCP
TCP Segment Data
6 Header
IP Header IP Data
Encrytped Fields
Authenticated Fields
IP Header IP Data
ESP Auth.
IP Header ESP Header original IP Datagram (encapsulated and encrypted) ESP Trailer Data
Encrypted Fields
Authenticated Fields
“We are of two minds about IPsec. On the one hand, IPsec is
far better than any IP security protocol that has come before:
Microsoft PPTP, L2TP, etc. On the other hand, we do not
believe that it will ever result in a secure operational system. It
is far too complex, and the complexity has lead to a large
number of ambiguities, contradictions, inefficiencies, and
weaknesses. It has been very hard work to perform any kind of
security analysis; we do not feel that we fully understand the
system, let alone have fully analyzed it.”
– Ferguson, Schneier, 2003
TL
SS
SS .0
TL
TL
TL .1
TL
L
S
S
S
2
3.
1.
1.
1.
1.
0
3
0
(d
re
fin
ra
ft)
ed
/ department of mathematics and computer science
SSL/TLS 29/45
Protocols in SSL/TLS:
I Handshake Protocol: initiate session.
Authenticate server/client, establish keys.
I Record Protocol: data transfer.
Compute MAC for integrity, encrypt MAC and data.
I Alert Protocol: alert the other side of exceptional conditions.
E.g., errors and warnings.
For DHE and ECDHE, client and server compute joint session key.
Pseudo-random function:
Define a pseudo-random function (PRF) as
Pseudo-random function:
Define a pseudo-random function (PRF) as
where
I opad is the outer padding (0x5c5c5...5c5c),
I and ipad is the inner padding (0x363636...3636).
key key
i_pad XOR o_pad XOR
64 Byte 64 Byte
20 Byte
Compute as many bits as needed to obtain six values from the key block:i
I client MAC key,
I server MAC key,
I client encryption key,
I server encryption key,
I client IV, server IV.
Algorithm SSL 2.0 SSL 3.0 TLS 1.0 TLS 1.1 TLS 1.2 TLS 1.3
RSA Yes Yes Yes Yes Yes No
DH-RSA No Yes Yes Yes Yes No
DHE-RSA No Yes Yes Yes Yes Yes
ECDH-RSA No No Yes Yes Yes No
ECDHE-RSA No No Yes Yes Yes Yes
DH-DSS No Yes Yes Yes Yes No
DHE-DSS No Yes Yes Yes Yes No
ECDH-ECDSA No No Yes Yes Yes No
ECDHE-ECDSA No No Yes Yes Yes Yes
PSK No No Yes Yes Yes No
PSK-RSA No No Yes Yes Yes No
DHE-PSK No No Yes Yes Yes Yes∗
ECDHE-PSK No No Yes Yes Yes Yes∗
SRP No No Yes Yes Yes No
SRP-DSS No No Yes Yes Yes No
SRP-RSA No No Yes Yes Yes No
Kerberos No No Yes Yes Yes No
DH-ANON No Yes Yes Yes Yes No
ECDH-ANON No No Yes Yes Yes No
GOST No No Yes Yes Yes No
∗ Session Resumption