Lecture 4: Transport Layer Security (secure Socket Layer)



Similar documents
SECURE SOCKETS LAYER (SSL)

Communication Systems SSL

SECURE SOCKETS LAYER (SSL) SECURE SOCKETS LAYER (SSL) SSL ARCHITECTURE SSL/TLS DIFFERENCES SSL ARCHITECTURE. INFS 766 Internet Security Protocols

Communication Systems 16 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2009

SSL Secure Socket Layer

Outline. Transport Layer Security (TLS) Security Protocols (bmevihim132)

Real-Time Communication Security: SSL/TLS. Guevara Noubir CSU610

CSC 474 Information Systems Security

CSC Network Security

SSL Secure Socket Layer

Secure Socket Layer. Security Threat Classifications

Announcement. Final exam: Wed, June 9, 9:30-11:18 Scope: materials after RSA (but you need to know RSA) Open books, open notes. Calculators allowed.

Web Security Considerations

Communication Security for Applications

Managing and Securing Computer Networks. Guy Leduc. Chapter 4: Securing TCP. connections. connections. Chapter goals: security in practice:

Overview of SSL. Outline. CSC/ECE 574 Computer and Network Security. Reminder: What Layer? Protocols. SSL Architecture

Transport Level Security

Network Security Web Security and SSL/TLS. Angelos Keromytis Columbia University

Secure Socket Layer (SSL) and Transport Layer Security (TLS)

Information Security

Security Engineering Part III Network Security. Security Protocols (I): SSL/TLS

Transport Layer Security Protocols

Cryptography and Network Security Sicurezza delle reti e dei sistemi informatici SSL/TSL

Secure Socket Layer/ Transport Layer Security (SSL/TLS)

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

Lecture 7: Transport Level Security SSL/TLS. Course Admin

Security Protocols and Infrastructures. h_da, Winter Term 2011/2012

Network Security Part II: Standards

Network Security Essentials Chapter 5

How To Understand And Understand The Ssl Protocol ( And Its Security Features (Protocol)

SSL/TLS. What Layer? History. SSL vs. IPsec. SSL Architecture. SSL Architecture. IT443 Network Security Administration Instructor: Bo Sheng

Secure Socket Layer (SSL) and Trnasport Layer Security (TLS)

Secure Sockets Layer

HTTPS: Transport-Layer Security (TLS), aka Secure Sockets Layer (SSL)

3.2: Transport Layer: SSL/TLS Secure Socket Layer (SSL) Transport Layer Security (TLS) Protocol

Secure Socket Layer. Carlo U. Nicola, SGI FHNW With extracts from publications of : William Stallings.

The Secure Sockets Layer (SSL)

Security Protocols HTTPS/ DNSSEC TLS. Internet (IPSEC) Network (802.1x) Application (HTTP,DNS) Transport (TCP/UDP) Transport (TCP/UDP) Internet (IP)

Chapter 7 Transport-Level Security

Chapter 17. Transport-Level Security

WEB Security & SET. Outline. Web Security Considerations. Web Security Considerations. Secure Socket Layer (SSL) and Transport Layer Security (TLS)

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

Secure Socket Layer (TLS) Carlo U. Nicola, SGI FHNW With extracts from publications of : William Stallings.

SSL Handshake Analysis

Transport Layer Security (TLS)

Security Protocols/Standards

INF3510 Information Security University of Oslo Spring Lecture 9 Communication Security. Audun Jøsang

Secure Sockets Layer (SSL ) / Transport Layer Security (TLS) Network Security Products S31213

Overview. SSL Cryptography Overview CHAPTER 1

Authenticity of Public Keys

Protocol Rollback and Network Security

, SNMP, Securing the Web: SSL

Lab Exercise SSL/TLS. Objective. Step 1: Open a Trace. Step 2: Inspect the Trace

Software Engineering 4C03 Research Project. An Overview of Secure Transmission on the World Wide Web. Sean MacDonald

Network Security [2] Plain text Encryption algorithm Public and private key pair Cipher text Decryption algorithm. See next slide

ms-help://ms.technet.2005mar.1033/winnetsv/tnoffline/prodtechnol/winnetsv/plan/ssl...

Authentication applications Kerberos X.509 Authentication services E mail security IP security Web security

Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

Computer and Network Security

ISA 562 Information System Security

TLS/SSL in distributed systems. Eugen Babinciuc

Network Security - Secure upper layer protocols - Background. Security. Question from last lecture: What s a birthday attack? Dr.

Network Security Protocols

As enterprises conduct more and more

TLS and SRTP for Skype Connect. Technical Datasheet

Chapter 27 Secure Sockets Layer (SSL)

Outline. INF3510 Information Security. Lecture 10: Communications Security. Communication Security Analogy. Network Security Concepts

SSL: Secure Socket Layer

Embedded SSL. Christophe Kiennert, Pascal Urien. Embedded SSL - Christophe Kiennert, Pascal Urien 1

SSL and TLS. An Overview of A Secure Communications Protocol. Simon Horman aka Horms. horms@valinux.co.jp horms@verge.net.au horms@debian.

Lecture 10: Communications Security

Cryptography and Network Security IPSEC

Using etoken for SSL Web Authentication. SSL V3.0 Overview

Web Security (SSL) Tecniche di Sicurezza dei Sistemi 1

SSL A discussion of the Secure Socket Layer

Three attacks in SSL protocol and their solutions

Lab 7. Answer. Figure 1

Chapter 51 Secure Sockets Layer (SSL)

Secure Sockets Layer (SSL) / Transport Layer Security (TLS)

TLS-RSA-PSK. Channel Binding using Transport Layer Security with Pre Shared Keys

Web Security. Mahalingam Ramkumar

Chapter 34 Secure Sockets Layer (SSL)

Interested in learning more about security? SSL/TLS: What's Under the Hood. Copyright SANS Institute Author Retains Full Rights

Part III-b. Universität Klagenfurt - IWAS Multimedia Kommunikation (VK) M. Euchner; Mai Siemens AG 2001, ICN M NT

, ) I Transport Layer Security

Chapter 10. Network Security

Overview SSL/TLS HTTPS SSH. TLS Protocol Architecture TLS Handshake Protocol TLS Record Protocol. SSH Protocol Architecture SSH Transport Protocol

Lab Exercise SSL/TLS. Objective. Requirements. Step 1: Capture a Trace

Computer Security and Cryptography

Client Server Registration Protocol

ERserver. iseries. Securing applications with SSL

Differences Between SSLv2, SSLv3, and TLS

7 Network Security. 7.1 Introduction 7.2 Improving the Security 7.3 Internet Security Framework. 7.5 Absolute Security?

Netzwerksicherheit: Anwendungen

Secure Socket Layer. Introduction Overview of SSL What SSL is Useful For

Other VPNs TLS/SSL, PPTP, L2TP. Advanced Computer Networks SS2005 Jürgen Häuselhofer

IxLoad TM : Data HTTP, SSL, and FTP

Einführung in SSL mit Wireshark

ENHANCED SECURITY IN SECURE SOCKET LAYER 3.0 SPECIFICATION

Transcription:

Lecture 4: Transport Layer Security (secure Socket Layer) Recommended reading: Thomas, SSS and TLS essentials (old but very well written) SSL/TLS: layered view HTTP SMTP TCP/UDP IPsec Network layer security HTTP SMTP https SSL / TLS TCP/UDP IP Transport layer security SSL/TLS: operates on top of TCP, but below application layer (can be considered as top sublayer for L4) SSL/TLS: it is NOT a security enhancement of TCP! 1

History of SSL/TLS SSL v1 SSL v2 by Netscape Integrated in never released netscape 1.1 Badly broken! 1994 1995 SSL v3 Redesigned from scratch by Netscape 1996 Public Domain implementation available @ www.openssl.org TLS 1.0 specification in RFC 2246 More recent RFC specification: TLS 1.1, RFC 4346, April 2006 Even more recent: TLS 1.2, Internet Draft, March 2007 Basically SSL with minor modification Also referred to as SSL v3.1 However NOT backward compatible with SSL 3.0 TLS v1 IETF SSL design (versus Netscape) SSL v3.1 1996-1999 Not necessarily limited to Internet transport! Devised for point-to-point relationships in general E.g. EAP-TLS (RFC 2716) TLS mechanisms employed for authentication and integrity protection over L2 EAP Goals Establish a session Agree on algorithms Share secrets Perform authentication Transfer application data Communication privacy Symmetric encryption Data integrity Keyed Message Authentication Code (HMAC) 2

Session vs Connection Connection: Transport service TLS provides encryption and integrity TLS Record Protocol Session: Association between Client and Server Authentication and exchange of security parameters May include several connections Heavy work: done once at the beginning Designed for HTTPv1.0; TLS Handshake Protocol TLS protocol stack Trivial protocols! Error Handling HTTP, etc start cipher Establishes session & Initializes communicaton Data transfer Handshake Protocol Alert Protocol Change Cipher Spec TLS Record Protocol Application on TLS Possibly special app port# Minor modification of apps may be necessary (e.g. see RFC 2817/2818 for - HTTPS #443 - HTTPv1.1 ext TCP 3

Support of applications Typical approach: reserve a special port number for SSL/TLS mediated application Example: port 80 = HTTP over TCP Port 443 = HTTP over SSL/TLS (HTTPS) SSL/TLS common application port numbers ssmtp 465 spop3 995 imaps 991 telnets 992 Alternative approach: slightly modify application to reuse traditional port number E.g. HTTPv1.1: upgrade: TLS/1.0 new command (see RFC 2817) TLS Record Protocol 4

Record Protocol operation Record Protocol: - takes messages to be transmitted from apps - fragments the data into manageable blocks - optionally compresses the data - applies a MAC - encrypts - and transmits the result. - Reverse operation at reception (decryption, verification, decompression, reassembly, delivery to apps) Secret key dependent operation Message Authentication Code computation Uses HMAC see Radius Message Authenticator lesson Secret (symmetric) negotiated during handshake Fragment Encryption Symmetric encryption Algorithm (RC4, DES, 3DES, etc) negotiated during handshake, too Secret key derived from security parameters negotiated during handshake Differs from key used in MAC 5

Fragmentation At application TLS interface DON T get confused with TCP segmentation!! Input: block message of arbitrary size possibly multiple aggregated messages of SAME protocol Fragment size: 2 14 =16384 bytes Compression Based on compression state negotiated Lossless compression, if size increases (may happen in special cases) increase must NOT exceed 1024 bytes but no compression by default Until recently, no compression was employed in TLS & SSLv3! Feature formerly used only in SSLv2 But some specifications recently emerged» RFC 3749 support for DEFLATE (RFC 1951)» RFC 3943 support for Lempel-Ziv-Stac Reason: widespread diffusion of verbose languages e.g. XML 6

SSL Record Protocol Data Unit Application data OR Alert OR Handshake OR Change_cipher_spec 3.1 for TLS 5 bytes header Content type = 1 Version = 1+1 Length = 2 Content Type higher layer protocol 20 = 0x14 = Change Cipher Spec 21 = 0x15 = Alert 22 = 0x16 = Handshake 23 = 0x17 = Application Data Sequence number Not transmitted, but kept at both connection extremes Remember: reliable transport, hence no holes MAC generation Computed through HMAC HMAC(seq.num ctype version len data) Minor differences with SSLv3» No version in SSLv3» Slightly different HMAC construction (RFC final specification not yet finalized at the time ) Hash used in HMAC: MD5 16 bytes hash SHA-1 20 bytes hash Negotiation may decide not to use MAC In practice, always present Sequence number: Not transmitted but included in the MAC to detect missing/extra data and to prevent replay/reordering attacks 7

Encryption Applies to both (compressed) fragment and MAC Symmetric encryption algorithm Block or stream cipher Key generated from security secrets exchanged during handshake Algorithm negotiated during handshake Clear text possible If no encryption negotiated Or in early handshake phases Encryption algorithm CANNOT increase size of more than 1024 bytes If block cipher, padding necessary to achieve block size TLS Handshake Protocol 8

Handshake goals Negotiation and exchange of parameters to agree on algorithms, exchange random values, check for session resumption. Secure negotiation of a shared secret Never transmitted in clear text; derived from crypto parameters exchanged Robust to MITM attacks if connection authenticated Optional authentication for both client and/or server in practice always required for server Through asymmetric, or public key, cryptography Exchange certificates and/ore crypto information Reliable Negotiation: Allow C&S to verify that no tampering by an attacker occurred Attacker cannot tamper communication without being detected by the involved C&S parties CLIENT Handshake Messages Client Hello SERVER Server Hello Certificate Server Key Exchange Mandatory Certificate Request Server Hello Done Certificate Client Key Exchange Certificate Verify Optional and/or only at session start-up Change Ciper Spec Finished Change Cipher Spec Finished Start encryption Application Data 9

TCP segmentation (example) Handshake Layer Server Hello Certificate Server Hello Done TLS Record Layer Server Hello Certificate Server Hello Done TCP Layer Server Hello Certificate Certificate (continued) Server Hello Done Simplified example: server responds to client hello with certificate only Arbitrary correspondence between TLS Records and TCP segments (TLS records fragmented into TCP segments) Obvious! Do you remember TCP? Handshake message format Incapsulated in TLS Record Handshake types: hello_request(0), client_hello(1), server_hello(2), certificate(11), server_key_exchange (12), certificate_request(13), server_hello_done(14), certificate_verify(15), client_key_exchange(16), finished(20) Handshake type Length of remaining message 3 bytes Depends on handshake msg Content type=0x16 Major version Minor version Length of fragment 2 bytes payload 10

Handshake phase 1 CLIENT Client Hello Server Hello SERVER General goal: Create TLS/SSL connection between client and server Detailed goals Agree on TLS/SSL version Define session ID Exchange nonces timestamp + random values used to, e.g., generate keys Agree on cipher algorithms Agree on compression algorithm Client Hello First message, sent in plain text Incapsulated in 5 bytes TLS Record Content: Handshake Type (1 byte), Length (3 bytes), Version (2 bytes) Type 01 for Client Hello Version: 0300 for SSLv3, 0301 for TLS 32 bytes Random (4 bytes Timestamp + 28 bytes random) First 4 bytes in standard UNIX 32-bit format» Seconds since the midnight starting Jan 1, 1970, GMT (Session ID length, session ID) 1+32 bytes either empty or previous session ID» Previous session ID = resumed session state (Cipher Suites length, Cipher suites) 2+Nx2 bytes, in order of client preference (Compression length, compression algorithm) 1+1 byte (in all cases, today: compression algo = 00 = null) 11

PUBLIC-KEY ALGORITHM Cipher suites SYMMETRIC ALGORITHM HASH ALGORITHM TLS_AAAAAAA_WITH_BBBBBBBB_CCCCCCCC TLS_NULL_WITH_NULL_NULL INITIAL (NULL) CIPHER SUITE TLS_RSA_WITH_NULL_MD5 TLS_RSA_WITH_NULL_SHA TLS_RSA_WITH_RC4_128_MD5 TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 TLS_RSA_WITH_3DES_EDE_CBC_SHA TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA TLS_DH_RSA_WITH_DES_CBC_SHA JUST A FEW EXAMPLES (FULL LIST IN RFC) TLS_DHE_DSS_WITH_DES_CBC_SHA TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA TLS_DH_anon_WITH_RC4_128_MD5 Note: arbitrary combination not possible: must choose from a (small) list of combinations Selected from Client list Server Hello In reply to Client Hello, sent in plain text Content: Handshake Type (1 byte), Length (3 bytes) Type = 02 for Server Hello) Version Highest supported by both Client and Server 32 bytes Random (4 bytes Timestamp + 28 bytes random) Different random value than Client Hello (Session ID length, session ID) If Client session ID=0, then generate session ID Otherwise, if resumed session ID OK also for Server, use it; Otherwise generate new one Cipher Suite, 2 bytes Selected from client list (usually best one, but no obligation) Compression algo, 1 byte 12

Downgrade attack MITM doesn t break SSL3.x, but knows very well how to break SSL2.0 (40 bit encryption only) CLIENT SSLv3.1 Client Hello, SSLv3.1 Server Hello, SSLv2.0 Client Hello, SSLv2.0 Server Hello, SSLv2.0 SERVER SSL v3.1 Client assumes that Server supports only SSL 2.0!! Server assumes that client supports only SSL 2.0!! Downgrade attacks on cipher suites, too MITM: remove strong cipher suites, and leave in Client Hello only the ones he knows he can break! Since hello message authentication not viable at the moment (not yet a shared secret available), verification must be necessarily delayed to a subsequent phase Handshake phase 2 & 3 (schematic,, RSA case) CLIENT Signed_ca(server, PublicKey) SERVER (SSLVersion SharedSecret) PublicKey Phase 2: Server sends authentication information (certificate) Along with Public Key (in certificate or in extra msg) Phase 3: Client generates a Shared Secret Length depends on agreed cipher suite (RSA = 46 bytes) And transmits it to Server, encrypted with Public Key Native SSL version included to early combat downgrade attacks 13

Against downgrade attack CLIENT SSLv3.1 Client Hello, SSLv3.1 Server Hello, SSLv2.0 Client Hello, SSLv2.0 Server Hello, v2.0 SERVER SSL v3.1 Signed_ca(server, PublicKey) (SSLv3.1 SharedSecret) PublicKey STOP!! Since (signed) certificate cannot be tampered and since MITM cannot decrypt SharedSecret and must act as pass-through Downgrade attack on SSL version easily discovered! Encrypted SSL version is the one initially proposed, NOT the one negotiated in server hello, of course CLIENT Handshake Phase 2 details Certificate (single or certificate chain) Server Key Exchange Certificate Request (certificate type & certificate authorities) Server Hello Done SERVER Certificate typically a certificate chain Server Key exchange When certificate not issued (no server authentication required UNSAFE!!) When certificate key is for signature only (not for encryption) When certificate key cannot be used for legal reasons E.g. RSA key larger than 512 bits may not be used for encryption outside US, but only for signature Larger RSA key encoded in certificates may be used to sign shorter, temporary, RSA key When Ephemeral Diffie-Hellman used Certificate request Requires client authentication (asks for an acceptable certificate) Server Hello Done empty message 14

Example: Ephemeral Diffie-Hellman /1 Review of DH Server transmits public value g X mod p Client replies with public value g Y mod p Both compute shared key as K = (g Y ) X mod p = (g X ) Y mod p Fixed versus Ephemeral Depends on whether X and Y values are pre-assigned or dynamically generated Support in TLS: Certificate contains key used for signature KeyExchange message contains signed DH parameters If not signed (Anonymous DH), MITM would be trivial! Example: Ephemeral Diffie-Hellman /2 ServerKeyExchange message format: Content type=0x14 Major version=3 Minor version=1 Length of fragment 2 bytes = nn TLS Record Header (5 bytes) 0x14 = Handshake protocol Handshake type=0x0c DH p length 2 bytes Length 3 bytes = nn-4 DH p value *** Handshake Header (4 bytes); 0x0c=ServerKeyEx DH g length 2 bytes DH Ys length 2 bytes DH g value *** DH Ys value *** DH parameters (variable length) Signature RSA 16 MD5 + 20 SHA-1 DSA 20 SHA-1 only Signature size and hash used depends on signature type (RSA or DSA). Note: RSA uses BOTH MD5 and SHA-1 Client replies with DH public value Ys only (p and g are already known by the Server ) 15

Handshake Phase 3 details CLIENT Certificate Client Key Exchange Certificate Verify SERVER Certificate: Client certificate if requested Client Key exchange Transmit encrypted symmetric (premaster) key or information to generate secret key at server side (e.g. Diffie-Hellman Ys) Certificate Verify Signature of something known at both client and server ALL the messages exchanged up to now» Which is not only known, but also useful! Allows to detect at an early stage (more later on this) tampering attacks (e.g. cipher suite downgrade) To prove Client KNOWS the private key behind the certificate Otherwise I could authenticate by simply copying a certificate A (smart) detail on certificate verify Q: Why Certificate Verify does not immediately follows certificate? A: to include connection specific crypto parameters into signature! master secret, client & server random values» Since master secret can be computed only after the ClientKeyExchange message, Certificate Verify follows ClientKeyExchange Otherwise attacker may sniff both certificate and certificate verify and replay it later on to impersonify the user! 16

CLIENT Change Ciper Spec Finished Phase 4 Change Cipher Spec Finished SERVER Phase 4 has two fundamental goals Switch to the new security connection state Hence authentication and encryption based on keys computed with the exchanged security parameters Immediately applied to finished message» First check that everything went OK! If Client and(orserver cannot decrypt finished message, something has gone wrong! Authenticate all the previous handshake messages Finished = digital signature of all the previous handshake messages as transmitted and received by the peer up to now To avoid MITM tampering Change Cipher Spec Defined as a separate protocol (!) Only one message: 1 single byte Fixed content: constant value = 01 (!!!) Change cipher spec protocol 01 Content type=0x14 Major version Minor version TLS Record Header Length of fragment 0x0001 payload Why a separate protocol, and not part of the Handshake? Wise choice! TLS specification allows aggregation of multiple messages of a SAME upper layer protocol into single TLS Record. How this possible with a Change Cipher Spec? (TLS Record is either ALL encrypted, or NOT encrypted) 17

TLS Key Computation Secret hierarchy Pre Master Secret Exchanged during handshake (RSA) Derived from D-H parameters Master Secret Per-connection (explicitly includes timestamp & random) Derived from: Pre Master Secret Timestamp+Random (server) Timestamp+Random (client) Connection state: up to 6 keys Encryption keys Initialization Vectors MAC secrets x 2 (1 set per client, 1 set per server) 18

PRF Pseudo Random Function A fundamental (new) function in TLS SSLv3 and below used different, less robust, approaches Allows to generate an arbitrary amount of crypto material from limited initial material Essential, as the amount of key material depends on cipher suites and is not known or bounded a priori! Used also to generate master key Expansion function P hash A 0 = seed A 1 = HMAC hash (A 0 ) A 2 = HMAC hash (A 1 ) A 3 = HMAC hash (A 2 ) Same secred used in all HMACs Hash = chosen hash function P hash = HMAC hash (A 1 seed) HMAC hash (A 2 seed) HMAC hash (A 3 seed) P hash function of: Chosen hash function Secret seed P hash size: any (unlike HMAC size) 19

PRF (until( TLS 1.1) (TLS1.2 moved to SHA-256) Employs two hash algorithms MD5 and SHA-1 Greater robustness! Must break both Input: Desired length Secret Assume even size, split it in two parts (S 1,S 2 ) Seed Label (an ascii string) PRF(Secret, Label, Seed) = P MD5 (Label Seed) XOR P SHA-1 (Label Seed) MD5 uses S1 as secret SHA-1 uses S2 as secret Source: Stephen Thomas, SSL&TLS Essentials Key generation Master secret [48 bytes]: PRF(pre-master-secret, master secret, Client-Random Server-Random) Key Block [size depends on cipher suites]: PRF(master-secret, key expansion, Server-Random Client-Random) Individual keys: Partition key block into up to 6 fields in the following order: Client MAC, Server MAC, Client Key, Server Key, Client IV, Server IV PRF used also in computation of finished message instead of normal MD5 or SHA-1 Hash. E.g. For client finished message: PRF(master-secret, client finished, MD5(all handshake msg) SHA-1(all handshake msg)) [12 bytes] 20

Abbreviated handshake (3-way) (session resumption) Used to re-generate key material For new connection Avoids to reauthenticate peers Done at start of session only Avoid to re-exchange pre-master-secret Exchange new TS+random values CLIENT Client Hello Server Hello SERVER Change Cipher Spec Finished Change Ciper Spec Finished Application Data TLS connection management & application support 21

Alert Protocol TLS defines special messages to convey alert information between the involved fields Alert Protocol messages encapsulated into TLS Records And accordingly encrypted/authenticated Alert Protocol format (2 bytes): First byte: Alert Level warning(1), fatal(02) Second Byte: Alert Description 23 possible alerts Alert protocol Alert level Alert description Content type=0x15 Major version Minor version TLS Record Header Length of fragment 0x0002 payload Sample alerts See RFC2246 for all alerts and detailed description unexpected_message Inappropriate message received Fatal - should never be observed in communication between proper implementations bad_record_mac Record is received with an incorrect MAC Fatal record_overflow Record length exceeds 2 14 +2048 bytes Fatal handshake_failure Unable to negotiate an acceptable set of security parameters given the options available Fatal bad_certificate, unsupported_certificate, certificate_revoked, certificate_expired, certificate_unknown Various problems with a certificate (corrupted, signatures did not verify, unsupported, revoked, expired, other unspecified issues which render it unacceptable Warning or Fatal, depends on the implementation If fatal, terminate and do not allow resumption with same security parameters (clear all!) 22

Truncation attack TCP TLS TCP FIN An attacker may end connection at any time by sending a TCP FIN Part of the intended information exchange is lost How can Server and Client distinguish this from a transaction that normally completes? Solution: Close Notify Application Data Close Notify Close Notify Issued by any party Close Notify = Alert (warning level) Informs that no more data will be transmitted A connection that ends abruptly without a Close Notify may be a truncation attack A remark: note the weakness of TLS against TCP DOS attacks in general! 23

Conclusive remarks Performance drawbacks: Increased overhead and latency! Mostly for encryption overhead and handshake overhead Computational overhead may kill server performance Up to two orders of magnitude» ref: Transport Layer Security: how much does it really costs? Infocom 99 TLS does NOT protect TCP How to protect non SSL/TLS-aware applications? Tools available to protect a generic TCP connection stunnel = TCP over TLS over TCP» www.stunnel.org» Crazy (tcp tunneled over tcp), but as last resort DOS attacks to TCP remains a significant issue (no protection at all) DTLS Recently specified RFC 4347 Datagram TLS April 2006 TLS over UDP DTLS design goal: Be as most as possible similar to TLS! DTLS vs TLS TLS assumes orderly delivery» DTLS: Sequence number explicitly added in record header TLS assumes reliable delivery» Timeouts added to manage datagram loss TLS may generate large fragments up to 16384B» DTLS includes fragmentation capabilities to fit into single UDP datagram, and recommends Path MTU discovery TLS assumes connection oriented protocol» DTLS connection = (TLS handshake TLS closure Alert) 24