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



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

Transport Level Security

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

Network Security Essentials Chapter 5

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

Communication Systems SSL

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

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

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.

Transport Layer Security Protocols

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

Network Security Part II: Standards

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

, ) I Transport Layer Security

Web Security Considerations

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

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

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

Secure Sockets Layer

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

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

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

Lecture 4: Transport Layer Security (secure Socket Layer)

Security Protocols/Standards

Chapter 7 Transport-Level Security

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

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

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

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

CSC Network Security

CSC 474 Information Systems Security

Communication Security for Applications

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)

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

How To Use Gnutls (Ansi) To Get A Certificate From A Server To A Gnutl (Ancient) To A Password Protected (Anarchic) Key (Oracle) To Anntls (Orcient) (

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

Chapter 17. Transport-Level Security

As enterprises conduct more and more

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

, SNMP, Securing the Web: SSL

SSL Secure Socket Layer

Einführung in SSL mit Wireshark

SSL Handshake Analysis

Three attacks in SSL protocol and their solutions

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

SSL Secure Socket Layer

Web Security. Mahalingam Ramkumar

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

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

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

Web Security (SSL) Tecniche di Sicurezza dei Sistemi 1

mod_ssl Cryptographic Techniques

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

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

Overview. SSL Cryptography Overview CHAPTER 1

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

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

Transport Layer Security

Introduction to Cryptography

Secure Socket Layer. Security Threat Classifications

SSL Protect your users, start with yourself

Information Security

SSL: Secure Socket Layer

Lab 7. Answer. Figure 1

ISA 562 Information System Security

Chapter 51 Secure Sockets Layer (SSL)

Is Your SSL Website and Mobile App Really Secure?

ERserver. iseries. Securing applications with SSL

GNUTLS. a Transport Layer Security Library This is a Draft document Applies to GnuTLS by Nikos Mavroyanopoulos

Chapter 27 Secure Sockets Layer (SSL)

Chapter 34 Secure Sockets Layer (SSL)

The Secure Sockets Layer (SSL)

SBClient SSL. Ehab AbuShmais

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

SSH, SSL, and IPsec: wtf?

Authenticity of Public Keys

Network Security. Lecture 3

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

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

Introduction. Haroula Zouridaki Mohammed Bin Abdullah Waheed Qureshi

Lecture 9: Application of Cryptography

Chapter 10. Network Security

ERserver. iseries. Secure Sockets Layer (SSL)

How To Encrypt Data With Encryption

Contents. 1. Introduction to GnuTLS Downloading and installing Installing for a software distribution Overview...

Secure network protocols: how SSL/TLS, SSH, SFTP and FTPS work

Today s Topics SSL/TLS. Certification Authorities VPN. Server Certificates Client Certificates. Trust Registration Authorities

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

SSL BEST PRACTICES OVERVIEW

Web Security: Encryption & Authentication

Lecture 10: Communications Security

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

Security Policy Revision Date: 23 April 2009

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

Protocol Rollback and Network Security

Netzwerksicherheit: Anwendungen

Low-Level TLS Hacking

Learning Network Security with SSL The OpenSSL Way

Transcription:

Secure Socket Layer (SSL) and Transport Layer Security (TLS) Raj Jain Washington University in Saint Louis Saint Louis, MO 63130 Jain@cse.wustl.edu Audio/Video recordings of this lecture are available at: http://www.cse.wustl.edu/~jain/cse571-07/ 15-1

Overview History and overview of SSL/TLS Products and Implementations Datagram Transport Layer Security (DTLS) Current TLS Issues and Extensions Secure Remote Password (SRP) First part from the textbook. Remainder from Wikipedia and IETF 15-2

Key Features User level Not operating system specific Uses TCP Reliable transmission (No retransmissions at application layer) Features: Crypto negotiation Key Generation for encryption and Integrity Authentication: Servers use Certificates Clients use password or certificates 15-3

SSL/TLS Applications HTTPS = HTTP over port 443 FTPS = FTP over SSL (different from SFTP = FTP over SSH) NNTP over SSL OpenVPN 15-4

History Secure Socket Layer (SSL) V2 on Netscape Navigator 1.1 1995 Private Communication Technology (PCT) by Microsoft fixed some bugs in SSL V2 SSL v3 is most commonly deployed protocol Transport Layer Security (TLS) by IETF [RFC 2246 1999] TLS v1.1 [RFC 4346 2006] TLS v1.2 [draft-ietf-tls-rfc4346-bis-05.txt June 2007] 15-5

SSL v2 vs. v3 Downgrade Attack: Crypto choices not protected in V2. Finished message in v3 contains digest of all previous messages Truncation Attack: V2 closes SSL on TCP connection close Not protected. V3 added session finished message to close SSL session. 15-6

SSL/TLS Basic Protocol Client [Session ID], Ciphers I support, R Alice Certificate, cipher I choose, R Bob Choose S K = f(s, R Alice, R Bob ) {S} Bob, {Keyed Hash of handshake msgs} K = f(s, R Alice, R Bob ) {Keyed hash of handshake msgs} R s are 32B. First 4B = Unix time Secrets: Pre-master secret S, master secret K 6 Keys: Encryption, Integrity, IV (1 per direction) Authenticates server. Client authenticated by password. 15-7 Server

Similar to Phase 2 of IKE Session Resumption Multiple session keys from master secret K HTTP 1.0 used many TCP connections Server stores session ID and master secret 15-8

Version # 0.2 SSL v2 3.0 SSL v3 3.1 TLS v1 V3 clients send v2 client-hello with version 3.0 V2 servers respond with v2 server-hello V3 servers respond with a v3 server-hello 15-9

Cipher Suites V3 has a 2B field for cipher suite Standard numbers for 30 Cipher suites, e.g., SSL_RSA_EXPOERT_WITH _DES40_CBC_SHA Server decides one of the choices offered by Client Crypto Algorithms Key exchange: RSA, Diffie-Hellman, DSA, SRP, PSK Symmetric ciphers: RC4, Triple DES, AES or Camellia. Hash function: HMAC-MD5 or HMAC-SHA 15-10

Export Issues Only 40 bits keys allowed. Servers can encrypt keys using 512b RSA keys. Normally RSA keys are 1024b. 512b Ephemeral key. Server Gated Cryptography/Step-Up: Financial transactions allowed to use longer keys. Server certificates signed by Verisign or Thawte contain SGC extension allowed. Initial handshake using 40b. Client would then send Change Cipher Spec message to renegotiate. 15-11

Encrypted Records Integrity is provided by HMAC using the integrity key Data prefixed by 64b sequence # but the sequence # not sent Block cipher 40B padding in SSLv3, 44B in TLS. Final block of each record is used as IV for the next 15-12

Encoding All exchanges are in records up to 2 14 B or 2 16-1B. Standard allows multiple messages in one record or multiple records. Most implementations use one message per record. Four Record Types: 20 = Change Cipher Spec 21 = Alerts (1 = Warning, 2 = Fatal) 22 = Handshake 23 = Application Data Record header: Record Type Version # Length 1B 2B 2B Each message starts with a 1B message-type and 3B message length. 15-13

Handshake Messages 1 = Client Hello: Version, R Alice, Session ID, Cipher Suites, Compressions 2 = Server Hello: Version, R Bob, Session ID, Chosen Cipher, Chosen Compression 14 = Server Hello Done 16 = Client Key Exchange: Encrypted pre-master key 12 = Server Key Exchange: Modulus p, Exponent g, Signature (export only) 13 = Certificate Request: CA Names (requested by server) 11 = Certificate: sent by server 15 = Certificate Verify:signature of Hash of messages 20 = Handshake Finished: MD5 and SHA Digest of message halves 15-14

Client Generate random PMS S Compute MS K TLS Message Exchange Client Hello: Crypto Choices, R C Server Hello: Crypto Selected, R S Certificate: Server Certificate Certificate Request Certificate: K client Private Key {Client Certificate} Client Key Exchange: K server Public Key {PreMasterSecret} Change Cipher Spec Handshake Finished: Hash and MAC of Previous messages Change Cipher Spec Handshake Finished Server Compute MS K 15-15

Alerts 0 Close notify (warning or fatal) 10 Unexpected message (fatal) 20 Bad record MAC (fatal) 21 Decryption failed (fatal, TLS only) 22 Record overflow (fatal, TLS only) 30 Decompression failure (fatal) 40 Handshake failure (fatal) 41 No certificate (SSL v3 only) (warning or fatal) 42 Bad certificate (warning or fatal) 43 Unsupported certificate (warning or fatal) 44 Certificate revoked (warning or fatal) 45 Certificate expired (warning or fatal) 15-16

Alerts (Cont) 46 Certificate unknown (warning or fatal) 47 Illegal parameter (fatal) 48 Unknown CA (fatal, TLS only) 49 Access denied (fatal, TLS only) 50 Decode error (fatal, TLS only) 51 Decrypt error (TLS only) (warning or fatal) 60 Export restriction (fatal, TLS only) 70 Protocol version (fatal, TLS only) 71 Insufficient security (fatal, TLS only) 80 Internal error (fatal, TLS only) 90 User cancelled (fatal, TLS only) 100 No renegotiation (warning, TLS only) 15-17

SSL Products and Implementations Acceleration: Offload public key encryption/decryption Sometimes all SSL message H/W from F5, Cisco, Nortel, Juniper, Radware,... Software: OpenSSL: C library of SSL/TLS GnuTLS: C Library under GNU Public license Java Secure Socket Extension (JSSE) Network Security Services (NSS): Open source security library includes SSL also 15-18

Datagram Transport Layer Security TLS runs on TCP Suitable for stream-oriented applications Not suitable for datagram applications DTLS uses UDP Need timeout, retransmission, fragmentation Some state is kept in the messages Explicit sequence number As close to TLS as possible RFC 4347, April 2006 15-19

TLS V1.2 TLS: Current Issues Transport Layer Security (TLS) Extensions: Extension Definitions Using Secure Remote Password (SRP) protocol for TLS Authentication Using OpenPGP keys for TLS authentication TLS Elliptic Curve Cipher Suites with SHA-256/384 and AES Galois Counter Mode RSA based AES-GCM Cipher Suites for TLS 15-20

RFC 4346, April 2006 TSL V1.1 IV = Final Block of each record (in V1). Implicit IV to prevent CBC attacks Padding errors Bad Record MAC alert Prevents CBC attacks Sessions resumeable after premature TCP closes Informational notes on TLS attacks 15-21

TLS V1.2 draft-ietf-tls-rfc4346-bis-05.txt, Sep 2007 Merged TLS extensions Replacement of MD5/SHA-1 combination Client specifies hash functions choices Server selects hash function Authenticated encryption with additional data modes Tighter checking of encrypted pre master secret version numbers Info on implementation pitfalls 15-22

TLS Extensions draft-ietf-tls-rfc4366-bis-00.txt, June 2007 Server Name Indication: Clients can indicate the virtual server they are contacting Maximum Fragment Length Negotiation: Client Certificate URLs Trusted CA Indication: from clients Truncated HMAC: Save bandwidth Certificate Status Request: Send OCSP URL 15-23

Secure Remote Password (SRP) x = H(salt,pswd) u = H(A,B) S = (B-kg x ) a+ux K = H(S) All clients and server know g, p, k = H(p,g) Client Client Name A = g a Salt B = g b +kv M 1 = H(H(p) H(g) h(client Name) Salt g a B K) M 2 = H(A M 1 K) Server x = H(salt,pswd) v = g x, Store <v,s> Discard x u = H(A,B) S = (Av u ) b K = H(S) = Session Key Authentication 15-24

SRP Resistant to dictionary attacks Does not require trusted third party No client certificates Currently SRP V6 being standardized in IEEE 1363. V3 described in RFC 2945, Sept 2000. 15-25

Summary SSLv3 allows crypto negotiation, server authentication and key exchange. Uses PKI. TLS extensions allow using SRP and shared secrets DTLS = TLS over UDP Allows UDP applications Secure remote password (allows) authentication is stronger than simple password hashes 15-26

Homework 15 Read chapter 19 of the textbook and Wikipedia Submit answer to the following exercise Exercise 19.3: What is the advantage, in the exportable SSLv3 case, of hashing the 40-bit secret with two non-secret values to produce a 128-bit key? How many keys would have to be tested to bruteforce break a single session? 15-27