ISA 562 Information System Security



Similar documents
CSC 474 Information Systems Security

CSC Network Security

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

Communication Systems SSL

Secure Socket Layer. Security Threat Classifications

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

Web Security Considerations

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

SECURE SOCKETS LAYER (SSL)

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

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.

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

SSL Secure Socket Layer

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

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

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

Transport Layer Security Protocols

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

Communication Security for Applications

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

SSL Secure Socket Layer

Chapter 7 Transport-Level Security

Network Security Essentials Chapter 5

Overview. SSL Cryptography Overview CHAPTER 1

Authenticity of Public Keys

Transport Level Security

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

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

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

Secure Sockets Layer

The Secure Sockets Layer (SSL)

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

Chapter 17. Transport-Level Security

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

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

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

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

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

Information Security

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

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

Network Security Part II: Standards

SSL: Secure Socket Layer

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

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

Digital Certificates (Public Key Infrastructure) Reshma Afshar Indiana State University

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

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

Introduction to Cryptography

Three attacks in SSL protocol and their solutions

Web Security. Mahalingam Ramkumar

Lecture 4: Transport Layer Security (secure Socket Layer)

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

Transport Layer Security (TLS)

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

Protocol Rollback and Network Security

Chapter 10. Network Security

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

How To Understand And Understand The Security Of A Key Infrastructure

Web Security (SSL) Tecniche di Sicurezza dei Sistemi 1

Certificates and network security

Web Application Entity Session Management using the eid Card Frank Cornelis 03/03/2010. Fedict All rights reserved

KEY DISTRIBUTION: PKI and SESSION-KEY EXCHANGE. Mihir Bellare UCSD 1

Lecture 31 SSL. SSL: Secure Socket Layer. History SSL SSL. Security April 13, 2005

Savitribai Phule Pune University

SSL/TLS: The Ugly Truth

SSL A discussion of the Secure Socket Layer

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

Some solutions commonly used in order to guarantee a certain level of safety and security are:

Understanding Digital Certificates and Secure Sockets Layer (SSL)

Network Security. Gaurav Naik Gus Anderson. College of Engineering. Drexel University, Philadelphia, PA. Drexel University. College of Engineering

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

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

Institute of Computer Technology - Vienna University of Technology. L96 - SSL, PGP, Kerberos

Network Security Standards. Key distribution Kerberos SSL/TLS

mod_ssl Cryptographic Techniques

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

Managing SSL certificates in the ServerView Suite

Low-Level TLS Hacking

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

Network Security. Computer Networking Lecture 08. March 19, HKU SPACE Community College. HKU SPACE CC CN Lecture 08 1/23

Computer and Network Security. Outline

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

Security Protocols/Standards

Web Security. Introduction: Understand applicable laws, legal issues and ethical issues regarding computer crime

SSL BEST PRACTICES OVERVIEW

Introduction. Haroula Zouridaki Mohammed Bin Abdullah Waheed Qureshi

Certificates. Noah Zani, Tim Strasser, Andrés Baumeler

Brocade Engineering. PKI Tutorial. Jim Kleinsteiber. February 6, Page 1

The DoD Public Key Infrastructure And Public Key-Enabling Frequently Asked Questions

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

SSL Protect your users, start with yourself

Dr. Cunsheng DING HKUST, Hong Kong. Security Protocols. Security Protocols. Cunsheng Ding, HKUST COMP685C

SBClient SSL. Ehab AbuShmais

As enterprises conduct more and more

SECURE SOCKET LAYER PROTOCOL SIMULATION IN JAVA. A Research Project NAGENDRA KARRI

Entrust Managed Services PKI. Getting started with digital certificates and Entrust Managed Services PKI. Document issue: 1.0

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

SSL Handshake Analysis

Learning Network Security with SSL The OpenSSL Way

Transcription:

Outline ISA 562 Information System Security PKI SSL PKI SSL ISA 562 1 ISA 562 2 Motivation 1- Key Distribution Problem In a secret key cryptosystem, the secret key must be transmitted via a secure channel Inconvenient n parties want to communicate with each other, how many keys total keys are needed and how many other keys must each n store? n entities There will be n(n-1) / 2 keys total Each entity has to store n-1 keys Insecure Is the secure channel really secure? Public key cryptosystem solves the problem Public key known by everyone telephone directory Privacy key is never transmitted ISA 666 3 How many Symmetric Keys needed? Administration Problems: Adding new entities Removing existing entities Changing keys n Total Keys Keys Stored 2 2 1 3 3 2 4 6 3 5 10 4 6 15 5 7 21 6 8 28 7 9 36 8 10 45 9 11 55 10 12 66 11 13 78 12 14 91 13 15 105 14 ISA 666 4 1

Motivation 2- Digital Signature In a secret key cryptosystem, authentication and nonrepudiation may be difficult Authentication You must share a secret key with someone in order to verify his signature Non-repudiation I didn t sign it. You did since you also have the key Public key cryptosystem solves the problem Verification of signature needs only the public key One is solely responsible for his private key Motivation (cont) - Email Security The percentage of email that is actually readable by an attacker, or that can be manipulated while in transit with little chance of discovery is close to 100%. ISA 666 5 ISA 562 6 Is this Key Exchange Secure? Diffie-Hellman Example Alice and Bob want to establish a shared secret key Have agree on the value n=353 (prime) and g=3 Select the random secret values: Alice chooses X a =97, Bob chooses X b =233 Derive the public keys: T a = g Xa mod n = 3 97 mod 353 = 40 (Alice s) T b = g Xb mod n = 3 233 mod 353 = 248 (Bob s) Derive the shared secret key K = T b Xa mod n = 248 97 mod 353 = 160 (Alice s) K = T a Xb mod n = 40 233 mod 353 = 160 (Bob s) ISA 666 7 ISA 666 8 2

Diffie-Hellman Man-in-the-middle Public Key Cryptography Brainstorming What if Alice s public key is forged? Everyone (but Alice) somehow get a fake public key (generate by Bob) and they all believe it is Alice s public key Alice can not communicate with everyone through public key cryptosystem Alice can not decrypt anything encrypted by others using the fake Alice s public key When Alice signs anything with her private key, everyone else will think it is fake How do u you solve this problem? ISA 666 9 ISA 666 10 Certificate A signed message claiming somebody s public key is such & such [Alice s public key is 12345] Bob If Carol does not know Bob or Bob s key, then the certificate signed by Bob doesn t mean much to Carol If Carol knows and trusts David, who can certify Bob s key, then Carol may have some trust on Bob s certificate There could be a chain of certificate that indirectly certify the authenticity of the public key Third Party Trust Model Certificate Authority () Trust Trust 3 rd Party Trust Alice Bob ISA 666 11 ISA 562 12 3

Extended Third Party Trust Model Certificate Authority Trust Trust 3 rd Party Trust Alice Cross Certification Bob Certificate Authority Trust Trust 3 Jane rd Party Trust Joe Public Key Infrastructure (PKI) Not an algorithm Uses public key cryptography Enables secure data transmission over the Internet A PKI is a set of agreed-upon standards, CertificationAuthorities (), structure between multiple s,methods to discover and validate Certification Paths,Operational Protocols, Management Protocols, Interoperable Tools and supporting Legislation Digital Certificates book Jalal Feghhi, Jalil Feghhi, Peter Williams 16 February 2003 13 14 Public Key Infrastructure (PKI) PKI Simplified Model What is PKI for? Facilitate secure distribution of every one s public key Provide some authenticity of the public keys distributed Basic Components of X509 PKI Certification authorities () Registration Authority (RA) Certificate Distribution System Certificates PKI Enabled Application Provider Side Consumer Side Application Service Remote Person Cert. Request Signed Certificate Internet RA Local Person Certification Entity Certs, CRLs Directory ISA 666 15 4

PKI Steps Provides Proof of identity May be housed by or other entity Verifies subscriber based on class level Issues Certificate & posts in Repository PKI Components: Certificate Authority I Basic Responsibilities Key Generation Digital Certificate Generation Certificate Issuance and Distribution Revocation Key Backup and Recovery System Cross-Certification Certification Can validate subscriber public key ISA 562 17 ISA 562 18 PKI Components: Certificate Authority II PKI Components: Certificate Authority III Public keys are issued by a certification authority () A verifies & vouches for the identity information in a Certificate Like a Government for a passport Like a bank for an ATM card. A certificate that the issues to a company binds a public key to the recipient s private key C The has a public and private key pair, just like people and devices The uses its private key to sign the body of the certificate, just as people use personal private keys to sign messages To verify, one must use the s public key to decrypt the signature, just as one would verify a personal signature from another user! 19 ISA 562 20 5

PKI Components: Registration Authority (RA) Basic Responsibilities Registration of Certificate Information Face-to to-face Registration Remote Registration Automatic Registration Revocation Verification level depends on class requested Class 1 can be done from public records Class 3 can be for signing software (more powerful) PKI Components: Certificate Distribution System Provides Repository for: Digital Certificates Certificate Revocation Lists (CRLs) Typically Special Purpose Databases LDAP directories ISA 562 21 ISA 562 22 PKI Components: Certificate I PKI Components: Certificate II A digital Certificate becomes a passport that proves your identity and authenticates you A US passport is issued by a trusted Government when another Government sees it, they trust it A digital Certificate issued by a trusted can also be trusted 23 24 6

PKI Components: Certificate III A certificate binds an entity to a key pair The public key (embedded in a digital certificate) is in a public directory that is freely accessible Now when you download someone s public key, you know that it belongs to a specific person Issuer Subject Issuer Digital Signature PKI Components: Certificate IV Subject Public Key CERTIFITE ISA 562 25 PKI Components: Certificate Example Certificate Expiration and Renewal A period of validity is assigned to each certificate After that date, the certificate expires A certificate can be renewed with a new expiration date assigned If the keys are still valid and remain uncompromised 27 28 7

Certificate Revocation Sometimes there is a need to revoke a certificate before it expires: A hardware crash causes a key to be lost A private key is compromised Termination of affiliation with some organization Revocation is permanent Suspension can be lifted Certificate Revocation List (CRL) CRLs are published by s at well defined interval of times Contains all revoked and suspended certificates It is a responsibility of Users of certificates to download a CRL and verify if a certificate has been revoked User application must deal with the revocation processes ISA 666 29 ISA 562 30 Technology Evolution Simple Certification Hierarchy Directory Services Root RA Subordinate Subordinate RA RA RA Internet RA LRA RA Internet LRA Subordinate End Entity End Entity End Entity X.509 standard is the general model for certification hierarchy If you trust the that signed the certificate, you can trust the certificate Each entity has its own certificate (and may have more than one). The root s certificate is self signed and each sub- is signed by its parent. Each may also issue CRLs. In particular the lowest level s issue CRLs frequently. ISA 562 31 32 8

Simple Certification Hierarchy An Example Trusted Root Alice trusts the root Bob sends a message to Alice Alice needs Bob s certificate, the certificate of the that signed Bob s certificate, and so on up to the root s self signed certificate. Root Certificates built into browser If the is a widely recognized authority, its certificate (along with its public key) will already be embedded in browsers Alice Bob Alice also needs each CRL for each. Only then can Alice verify that Bob s certificate is valid and trusted and so verify the Bob s signature. ISA 562 34 Microsoft Root Microsoft Root You can set up your own Certificate Authority Server Windows Server 2003 or Windows 2000 Server Install the Certificate Services Note that after installing this service the name of the domain or computer cannot change Specify options to generate certificates, including Cryptographic Service Provider Hash algorithm Key length 35 36 9

PKI solving security needs How do we solve the 4 security needs? Confidentiality??? CLASSIFIED Integrity??? PKI solving security needs How do we solve the 4 security needs? Confidentiality Secret Key Public Key CLASSIFIED Integrity Digital Signature Non-Repudiation??? Authentication??? Non-Repudiation Digital Signature Authentication Digital Certificates Digital Signature, Date and Time 37 Digital Signature, Date and Time 38 SSL/TLS/SSH SSL/TLS Overview SSL/TLS overview and basic features SSL Record Protocol SSL Handshake Protocol Other SSL Protocols SSL and TLS differences SSL applications Comparison of IPsec & SSL SSL = Secure Sockets Layer. Originally developed to secure http unreleased v1, flawed but useful v2, good v3. TLS = Transport Layer Security. TLS1.0 = SSL3.0 with minor tweaks SSL3.1 Defined in RFC 2246. Open-source implementation at http://www.openssl.org/. SSL/TLS provides security at TCP layer. Uses TCP to provide reliable, end-to-end transport. Applications need some modification. In fact, usually a thin layer between TCP and HTTP. ISA 562 39 ISA 562 40 10

SSL Functionality Session-Layer Security: Protection of (bi-directional) transport protocol Security Services: Integrity, Authenticity, Confidentiality Client Security: Server must be authenticated (using public-key certificates) Server Security: Client may be authenticated (using public-key certificates) Security Suite: Client and Server negotiate Algorithms and methods SSL Services Peer entity and data authentication Data confidentiality Data integrity Compression/decompression Generation/distribution of session keys Security parameter negotiation. ISA 562 41 ISA 562 42 SSL/TLS Basic Features SSL/TLS widely used in Web browsers and servers to support secure e-commerce over HTTP. Built into Microsoft IE, Netscape, Mozilla, Apache, IIS, The (in)famous browser lock. SSL architecture provides two layers: SSL Record Protocol Upper layer carrying: SSL Handshake Protocol, Change Cipher Spec. Protocol, Alert Protocol, HTTP, any other application protocols. SSL Protocol Architecture A two-layer protocol SSL Handshake Protocol SSL Change Cipher Spec Protocol SSL Alert Protocol SSL Record Protocol HTTP, other apps TCP ISA 562 43 ISA 562 44 11

SSL Connection and Session Each SSL session can be used for multiple SSL connections. SSL Session An association between a client and a server. Created by handshake protocol. Is used to avoid negotiation of new security parameters for each connection. SSL Connection A connection is a transport that provides a suitable type of service. Peer-to-peer, transient Each connection is associate with one session. SSL Session We can view an SSL session as an SSL security association. Created by handshake protocol Defines set of cryptographic parameters (encryption and hash algorithm, master secret, certificates). Carries multiple connections to avoid repeated use of expensive handshake protocol. A SSL session consists of Session ID X.509 public-key certificate of peer (could be null) Compression algorithm Cipher spec: Encryption algorithm, message digest algorithm, etc. Master secret: 48 byte secret shared between the client and server Is reusable ISA 562 45 ISA 562 46 SSL Connection SSL Connection concept State defined by nonces, secret keys for encryption, integrity, and IV. Keys for many connections derived from single master secret created during handshake protocol. An SSL Connection consists of Server and client random numbers Server write MAC secret Client write MAC secret Server write key Client write key Server IV Client IV Sequence number SSL Record Protocol SSL Record Protocol provides secure, reliable channel to second layer : Data origin authentication and integrity. MAC using algorithm similar to HMAC. Based on MD-5 or SHA-1 hash algorithms. MAC protects 64 bit sequence number for anti-replay. Confidentiality. Bulk encryption using symmetric algorithm. IDEA, RC2-40, DES-40 (exportable), DES, 3DES, RC4-40 and RC4-128. Carries application data and SSL management data. ISA 562 47 ISA 562 48 12

SSL Record Protocol SSL Record Protocol Operation Data from application/upper layer SSL protocol partitioned into fragments (max size 2 14 bytes). Optional compression MAC then pad (if needed) finally encrypt. Prepend header. Content type, version, length of fragment. Submit to TCP. ISA 562 49 ISA 562 50 SSL Handshake Protocol Like IPSec, SSL needs symmetric keys: MAC and encryption at Record Layer. Different keys in each direction. These keys are established as part of the SSL Handshake Protocol. As with IKE in IPSec, the SSL Handshake Protocol is a complex protocol with many options SSL Handshake Protocol Security Goals Secure ciphersuite negotiation. Encryption and hash algorithms Authentication and key establishment methods. Entity authentication of participating parties. Participants are client and server. Server nearly always authenticated, client more rarely. Appropriate for most e-commerce applications. Establishment of a fresh, shared secret. Shared secret used to derive further keys. For confidentiality and authentication in SSL Record Protocol. ISA 562 51 ISA 562 52 13

SSL Handshake Protocol Initially SSL session has null compression and encryption algorithm. Both are set by the handshake protocol at the beginning of session. Handshake protocol may be repeated during the session. Four phases Establish Security Capabilities Server Authentication and Key Exchange Client Authentication and Key Exchange Finish ISA 562 53 SSL Connection Steps When you hit an SSL encrypted page here is what usually happens: Server sends certificate to client Client check to see if signing is in trusted list in browser Client computes hash of certificate & compares message digest of certificate by decrypting using s public key ( signed certificate) Client checks validity dates of certificate Client checks URL in certificate to and verifies it matches the current URL Client extracts server s public key from certificate Client creates a session key (symmetric) Client encrypts session key with server s public key and sends it over Server decrypts using private key ISA 562 54 Client Simplified SSLv3/TLS Hello, ciphers I support, R client Certificate, ciphers I chose, R Server Server Phase 1. Establish Security Capabilities Client Server {S} Server, {keyed hash of K & handshake msgs} {keyed hash of all handshake msgs} Data protected with keys derived from K K=f(S, Rclient, RServer} Message marked by * are mandatory; Other messages are optional. ISA 562 55 ISA 562 56 14

Phase 1 (Cont d) Client_hello Version: The highest SSL version understood by the client Random: 4-byte timestamp + 28-byte random number. Session ID: zero for new session, non-zero for a previous session CipherSuite: list of supported algorithms Compression Method: list of supported compression methods Phase 1 (Cont d) Server_hello Version: min (client_hello version, highest version supported by the server) Random: 4-byte timestamp + 28-byte random number. Generated by the server Session ID: CipherSuite: selected from the client s list by the server Compression method: selected from the client s list by the server ISA 562 57 ISA 562 58 Phase 2: Server Authentication and Key Exchange Client Server Server_key_exchange message Not required if The server has sent a certificate with fixed D-H parameters, or RSA key exchange is to be used. Needed for Anonymous D-H RSA key exchange, in which the server is using RSA but has a signature-only RSA key. A Certificate is almost always used. ISA 562 59 ISA 562 60 15

Certificate_request message Request a certificate from the client Two parameters Certificate_type RSA, signature only DSS, signature only Certificate_authorities Server_done message Indicate the end of server hello and associated messages. ISA 562 61 ISA 562 62 Phase 3. Client Authentication and Key Exchange Client Server Phase 3. Client Authentication and Key Exchange Certificate One or a chain of certificates. Client_key_exchange RSA: encrypted pre-master secret with the server s public key. D-H: client s public key. Certificate_verify Only sent following any client certificate that has signing capability Proves the client is the valid owner of the certificate. ISA 562 63 ISA 562 64 16

SSL Handshake Protocol Key Exchange SSL supports several key establishment mechanisms. Most common is RSA encryption Client chooses pre_master_secret, encrypts using public RSA key of server, sends to server. Can also create pre_master_secret from: Fixed Diffie-Hellman Server (and possibly Client) certificate contains DH parameters. Anonymous Diffie-Hellman Each side sends Diffie-Hellman values, but no authentication. Vulnerable to man-in-middle attacks. ISA 562 65 SSL Handshake Protocol Entity Authentication SSL supports several different entity authentication mechanisms. Most common based on RSA. Ability to decrypt pre_master_secret and generate correct MAC in finished message using keys derived from pre_master_secret authenticates server to client DSS or RSA signatures on nonces (and other fields, e.g. Diffie-Hellman values). ISA 562 66 SSL Key Derivation Keys used for MAC and encryption in Record Layer derived from pre_master_secret: Derive master_secret from pre_master_secret and client/server nonces using MD5 and SHA-1 hash functions. Derive key material from master_secret and client/server nonces, by repeated use of hash functions. Split key material up into MAC and encryption keys for Record Protocol as needed. ISA 562 67 SSL Handshake Protocol Run An illustrative protocol run follows. We choose the most common use of SSL. No client authentication. Client sends pre_master_secret using Server s public encryption key from Server certificate. Server authenticated by ability to decrypt to obtain pre_master_secret, and construct correct finished message. Other protocol runs are similar. ISA 562 68 17

SSL Handshake Protocol Run M1: C S: ClientHello Client initiates connection. Sends client version number. 3.1 for TLS. Sends ClientNonce. 28 random bytes plus 4 bytes of time. Offers list of ciphersuites. key exchange and authentication options, encryption algorithms, hash functions. E.g. TLS_RSA_WITH_3DES_EDE_CBC_SHA. ISA 562 69 SSL Handshake Protocol Run M2: S C: ServerHello, ServerCertChain, ServerHelloDone Sends server version number. Sends ServerNonce and SessionID. Selects single ciphersuite from list offered by client. E.g. TLS_RSA_WITH_3DES_EDE_CBC_SHA. Sends ServerCertChain message. Allows client to validate server s public key back to acceptable root of trust. (optional) CertRequest message. Omitted in this protocol run no client authentication. Finally, ServerHelloDone. ISA 562 70 SSL Handshake Protocol Run M3: C S: ClientKeyExchange, ChangeCipherSpec, ClientFinished SSL Handshake Protocol Run M4: S C: ChangeCipherSpec, ServerFinished ClientKeyExchange contains encryption of pre_master_secret under server s public key. ChangeCipherSpec indicates that client is updating cipher suite to be used on this session. Sent using SSL Change Cipher Spec. Protocol. (optional) ClientCertificate, ClientCertificateVerify messages. Only when client is authenticated. Finally, ClientFinished message. A MAC on all messages sent so far (both sides). MAC computed using master_secret. ISA 562 71 ChangeCipherSpec indicates that server is updating cipher suite to be used on this session. Sent using SSL Change Cipher Spec. Protocol. Finally, ServerFinished message. A MAC on all messages sent so far (both sides). MAC computed using master_secret. Server can only compute MAC if it can decrypt pre_master_secret in M3. ISA 562 72 18

SSL Handshake Protocol Run Summary: M1: C S: ClientHello M2: S C: ServerHello, ServerCertChain,ServerHelloDone M3: C S: ClientKeyExchange, ChangeCipherSpec, ClientFinished M4: S C: ChangeCipherSpec, ServerFinished ISA 562 73 SSL Handshake Protocol Run 1. Is the client authenticated to the server in this protocol run? 2. Can an adversary learn the value of pre_master_secret? 3. Is the server authenticated to the client? 4. Who creates the session key in a way SSL connection? 5. Who creates the session key in a two way SSL connection? 1. No! 2. No! Client has validated server s public key; Only holder of private key can decrypt ClientKeyExchange to learn pre_master_secret. 3. Yes! ServerFinished includes MAC on nonces computed using key derived from pre_master_secret. 4. The client 5. The client ISA 562 74 Other SSL Handshake Protocol Runs Many optional/situation-dependent protocol messages: M2 (S C) can include: ServerKeyExchange (e.g. for DH key exchange). CertRequest (for client authentication). M3 (C S) can include: ClientCert (for client authentication), ClientCertVerify (for client authentication). For details, see RFC 2246 (TLS). ISA 562 75 SSL Handshake Protocol Additional Features SSL Handshake Protocol supports session resumption and ciphersuite re-negotiation. Allows authentication and shared secrets to be reused across multiple connections. Eg, next webpage from same website. Allows re-keying of current connection using fresh nonces. Allows change of ciphersuite during session. ClientHello quotes old SessionID. Both sides contribute new nonces, update master_secret and key_block. All protected by existing Record Protocol. ISA 562 76 19

Other SSL Protocols Alert protocol. Management of SSL session, error messages. Fatal errors and warnings. Change cipher spec (CCS) protocol. Used to switch to agreed cipher-spec Both protocols run over Record Protocol (so peers of Handshake Protocol). Alert Protocol Convey SSL related alerts to the peer. Compressed and encrypted. Two types of alerts Fatal (5) SSL immediately terminates the connection. Examples Unexpected message Bad_record_mac Warning (7) Examples Close_notify No_certificate ISA 562 77 ISA 562 78 Change Cipher Spec Protocol Session State Current state The session state in effect Pending state The session being negotiated. Change Cipher Spec Protocol Cause the pending state to be copied into the current state. Application Ports Used with SSL https 443 smtps 465 nntps 563 ldaps 636 pop3s 995 ftp-datas 889 ftps 990 imaps 991 ISA 562 79 ISA 562 80 20

SSL and TLS TLS1.0 = SSL3.0 with minor differences. TLS signalled by version number 3.1. Use of newer HMAC for MAC algorithm. Differences in cipher suites Additional alert codes. More client certificate types. Minor changes in some cryptographic computations And more. SSL/TLS Applications Secure e-commerce using SSL/TLS. Client authentication not needed until client decides to buy something. SSL provides secure channel for sending credit card information. Client authenticated using credit card information, merchant bears (most of) risk. No guarantees about what happens to client data (including credit card details) after session: may be stored on insecure server. ISA 562 81 ISA 562 82 Some SSL/TLS Security Flaws (Historical) flaws in random number generation for SSL. Low quality RNG leads to predictable session keys. Goldberg and Wagner, Dr. Dobb s Journal, Jan. 1996. http://www.ddj.com/documents/s=965/ddj9601h/ Flaws in error reporting. (differing response times by server in event of padding failure and MAC failure) + (analysis of padding method for CBC-mode) = recovery of SSL plaintext. Canvel, Hiltgen, Vaudenay and Vuagnoux, Crypto2003. http://lasecwww.epfl.ch/php_code/publications/search.php?ref=chvv03 Timing attacks. analysis of OpenSSL server response times allows attacker in same LAN segment to derive server s private key! Boneh and Brumley, 12th Usenix Security Symposium. http://crypto.stanford.edu/~dabo/abstracts/ssl-timing.html Comparing IPsec & SSL/TLS I Both have initial (authenticated) key establishment then key derivation. IKE in IPSec Handshake Protocol in SSL/TLS Both protect ciphersuite negotiation. Both use keys established to build a secure channel. ISA 562 83 ISA 562 84 21

Comparing IPsec, SSL/TLS II Operate at different network layers. This brings pros and cons for each protocol suite. Recall `Where shall we put security? discussion. All practical, but not simple. Complexity leads to vulnerabilities. Complexity makes configuration and management harder. Complexity can create computational bottlenecks. Complexity necessary to give both flexibility and security. ISA 562 85 Comparing IPsec & SSL/TLS III Security of both undermined by: Implementation weaknesses. Weak server platform security. Worms, malicious code, rootkits, Weak user platform security. Keystroke loggers, malware, Limited deployment of certificates and infrastructure to support them. Especially client certificates. Lack of user awareness and education. Users click-through on certificate warnings. Users fail to check URLs. Users send sensitive account details to bogus websites ( phishing ) in response to official-looking e-mail. ISA 562 86 22