internet security protocols
internet security protocols
Bart Preneel
February 2011
With thanks to Joris Claessens and Walter Fumy
Context
3
Internet Evolution
1800 Subscriptions worldwide (millions)
mobile
1600 Mobile subscribers
Fixed
1400
Mobile Internet
1200 Fixed Internet
1000 mobile
Internet
800 subscribers
600
400
200
0
1995 2000 2005 2010
4
The Internet - A Network of Networks
Internet
Workstation, Workstation,
PC, Laptop, PC, Laptop,
PDA, ... IP Router IP Router PDA, ...
Transport
TCP/UDP TCP/UDP
IP Network
IP
Link Link
• Network Layer
– Internet Protocol (IP)
• Transport Layer
– Transmission Control Protocol (TCP), User Datagram
Protocol (UDP)
Data Encapsulation
Application Layer Application Layer
Application
(Web, FTP, ... ) (Web, FTP, ... )
Data Data
Internet
7
Internet Standardization
• ISOC/IAB/IESG/IETF
• Internet Engineering Task Force (IETF)
• IETF Working Groups
– Mailing List Information
– Scope of the Working Group
– Goals and Milestones
– Current Internet Drafts & RFCs
– http://www.ietf.org/html.charters/wg-dir.html
• RFCs
– http://www.rfc-editor.org
– ftp://FTP.ISI.EDU/in-notes/
IETF Standards: RFC
– Proposed Standard (PS)
• stable spec Experimental
1999 2004
PAN
Bluetooth Zigbee
14
Bluetooth problems
Security Goals (started in ISO 7498-2)
• confidentiality:
– entities (anonimity)
– data
– traffic flow
• (unilateral or mutual) entity authentication
• data authentication (connection-less or
connection-oriented): data origin authentication
+ data integrity
• access control
• non-repudiation of origin versus deniability
15
Security Protocols & Services
• Cryptographic techniques:
– symmetric encipherment
– message authentication mechanisms
– entity authentication mechanisms
– key establishment mechanisms (e.g., combined
with entity authentication)
confidentiality
integrity
16
Internet Security Protocols
Electronic Commerce Layer
PayPal, Ecash, 3D Secure ...
confidentiality
integrity
Security Associations
(Security Parameters
incl. Shared Keys)
SSL / TLS
SSL/TLS Protocols
Secure
Browser WWW Server
http:// https://
SSL SSL
25
Other WWW security protocols
• PCT: Microsoft’s alternative to SSL
• S-HTTP: S/MIME-like protocol
• SET: for credit card transactions
• XML-Signature: PKCS#7-based signature
on XML documents
• ...
26
SSL / TLS
• “Secure Sockets Layer” (Netscape)
– SSL 2.0: security flaws!
– SSL 3.0: still widely used - not interoperable
with TLS 1.0
• “Transport Layer Security” (IETF)
– TLS 1.0: adopted SSL 3.0 with minor changes
– RFC 2246, 01/99 (PS)
• TLS: security at the transport layer
– can be used (and is intended) for other applications too
– end-to-end secure channel, but nothing more...
– data is only protected during communication 27
– no non-repudiation!
28
SSL/TLS in more detail
• “Record layer” protocol
– fragmentation
– compression (not in practice)
– cryptographic security:
• encryption → data confidentiality
• MAC → data authentication [no digital signatures!]
• “Handshake” protocol
– client and server authentication
– establish cryptographic keys (for encryption and MAC)
– negotiation of cryptographic algorithms
29
Handshake: overview
CLIENT SERVER
Hello Request
Client Hello
Server Hello
Certificate Certificate
Client Key Exchange Server Key Exchange
Certificate Verify Certificate Request
[changecipherspec] Server Hello Done
Finished
[changecipherspec]
Finished
√ start handshake, protocol version, algorithms
√ authentication server + exchange (pre)master secret
√ client authentication
√ end handshake, integrity verification
30
TLS 1.0 Data Encapsulation Options
Integrity
key size 144 160
algorithm HMAC- HMAC-
options MD5 SHA
mandatory
Confidentiality
key size 40 56 128 168
RC4_40
algorithm RC4_40
DES_CBC
RC4 3DES_
options RC2_CBC_40 IDEA_CBC EDE_CBC
DES_CBC_40
31
mandatory
TLS 1.0 Key Management Options
vulnerable to a
meet-in-the- RSA RSA
middle attack DH_DSS DH_DSS
DH_RSA DH_RSA
mandatory DHE_DSS DHE_DSS
DHE_RSA DHE_RSA
32
RFC 3268: AES Ciphersuites for TLS
06/2002
Key Certificate
CipherSuite
Exchange Type
TLS_RSA_WITH_AES_128_CBC_SHA RSA RSA
TLS_DH_DSS_WITH_AES_128_CBC_SHA DH_DSS DSS
TLS_DH_RSA_WITH_AES_128_CBC_SHA DH_RSA RSA
TLS_DHE_DSS_WITH_AES_128_CBC_SHA DHE_DSS DSS
TLS_DHE_RSA_WITH_AES_128_CBC_SHA DHE_RSA RSA
TLS_DH_anon_WITH_AES_128_CBC_SHA DH_anon
TLS_RSA_WITH_AES_256_CBC_SHA RSA RSA
TLS_DH_DSS_WITH_AES_256_CBC_SHA DH_DSS DSS
TLS_DH_RSA_WITH_AES_256_CBC_SHA DH_RSA RSA
TLS_DHE_DSS_WITH_AES_256_CBC_SHA DHE_DSS DSS
TLS_DHE_RSA_WITH_AES_256_CBC_SHA DHE_RSA RSA
33
TLS_DH_anon_WITH_AES_256_CBC_SHA DH_anon
TLS 1.1
RFC 4346 April 2006
TLS 1.2
RFC 5246 - August 2008
35
SSL/TLS: security ?
• SSL/TLS offers an adequate security level but
it is a very complex protocol
• Revocation problematic
39
TLS certificate "NULL" issue.
• [Moxie Marlinspike’09] Black Hat
– browsers may accept bogus SSL certs
– CAs may sign malicious certs
• certificate for www.paypal.com\0.kuleuven.be
will be issued if the request comes from a
kuleuven.be admin
• response by PayPal: suspend Moxie’s account
– http://www.theregister.co.uk/2009/10/06/
paypal_banishes_ssl_hacker/
Security in transport layer
Encapsulation
• IP Authentication Header (AH) IP/IPSec
Decapsulation
– RFC 2402 (PS), 11/98
• IP Encapsulating Security
Payload (ESP) Protected
Data
– RFC 2406 (PS), 11/98
• Internet Key Exchange (IKE)
– RFC 2409 (PS), 11/98 • Large and complex………….
– Application layer protocol for (48 documents)
negotiation of Security Associations • Mandatory for IPv6, optional
for IPv4
(SA) and Key Establishment
IPSec VPN models:
Hosts and Security Gateways
Host-to- Internet
host (not Untrusted Network
VPN)
IPSec Gateway
Internet
Host-to- Untrusted Network
gateway
Trusted
Network
48
IPsec - Security services
• Access control
• Connectionless integrity
• Data origin authentication
• Rejection of replayed packets (a form of
partial sequence integrity)
• Confidentiality
• Limited traffic flow confidentiality
49
IPsec - Concepts
Integrity
(only header fields that are not changed or are changed in a predictable manner)
54
IPsec - AH Tunnel mode
New IP hdr AH (..., Seq. Num., ICV) IP hdr upper layer data
Integrity
(only header fields that are not changed or are changed in a predictable manner))
55
IPsec - ESP header
Confidentiality
Integrity
57
IPsec - ESP Tunnel mode
IP hdr upper layer data
new IP hdr ESP hdr IP hdr upper layer data ESP tlr ICV
Confidentiality
Integrity
58
IPsec: Key management
59
IPsec: Key management
• IKE defines 5 exchanges
– Phase 1: establish a secure channel
• Main mode
• Aggressive mode
– Phase 2: negotiate IPSEC security association
• Quick mode (only hashes, PRFs)
– Informational exchanges: status, new DH group
• based on 5 generic exchanges defined in
ISAKMP
• cookies for anti-clogging 60
IPsec: Key management
• protection suite (negotiated)
– encryption algorithm
– hash algorithm
– authentication method:
• preshared keys, DSA, RSA, encrypted nonces
– Diffie Hellman group: 5 possibilities
61
IKE - Main Mode with Digital Signatures
proposed attributes
selected attributes
Initiator Responder
g x, N i
g y, N r
K derived from
master = prf( Ni || Nr, gxy ) SIGr = Signature on
E(K, IDi, [Cert(i)], SIGi )
H( master, gy || gx || ... || IDr )
SIGi = Signature on
H( master, gx || gy || ... || IDi )
E(K, IDr, [Cert(r)], SIGr )
64
IKE v2 Initial Handshake (1/2)
• Second exchange
– divulge identities
– prove identities using an integrity check based
on the secret associated with their identity
(private key or shared secret key) and the
contents of the first pair of messages in the
exchange
– establish a first IPsec SA (“child-SA”) is during
the initial IKE-SA creation
66
IPsec Overview
• Much better than previous alternatives
• IPsec documents hard to read
• Committee design: too complex
– ESP in Tunnel mode probably sufficient
– Simplify key management
– Clarify cryptographic requirements
• …and thus difficult to implement (securely)
• avoid encryption without data authentication
67
VPN?
• Virtual Private Network
• Connects a private network over a public network.
• Connection is secured by tunneling protocols.
• The nature of the public network is irrelevant to
the user.
• It appears as if the data is being sent over the
private network.
68
69
VPN - Common use
• Remote user access over the Internet
70
Remote user access over the Internet
71
Connecting networks over the Internet
73
VPN - Basic requirements
• User authentication and user authorization
• Data authentication and data confidentiality
• Key management
• Encapsulation
– data of private network is encapsulated in
packets suited for transmission over the public
network. (tunneling protocol)
• Address management
– assign a client’s address on the private net
74
Tunneling
75
Final remarks
Some observations
77
More information (1)
• William Stallings, Cryptography and
Network Security - Principles and Practice,
Fifth Edition, 2009
• N. Doraswamy, D. Harkins, IPSec (2nd
Edition), Prentice Hall, 2003 (outdated)
• Erik Rescorla, SSL and TLS: Designing and
Building Secure Systems, Addison-Wesley,
2000.
• IETF web site: www.ietf.org
– e.g., IETF-TLS Working Group
http://www.ietf.org/html.charters/tls-charter.html 78
More information (2)
• Jon C. Snader, VPNs Illustrated: Tunnels, VPNs,
and IPsec, Addison-Wesley, 2005
• Sheila Frankel, Demystifying the IPsec Puzzle,
Artech House Computer Security Series, 2001
• Anup Gosh, E-Commerce Security, Weak Links,
Best Defenses, Wiley, 1998
• Rolf Oppliger, Security Technologies for the
World Wide Web, Artech House Computer
Security Series 1999
• W3C Security (incl WWW Security FAQ)
http://www.w3.org/Security/
79