Web Security (SSL / TLS)

Slides:



Advertisements
Similar presentations
ISA 662 SSL Prof. Ravi Sandhu. 2 © Ravi Sandhu SECURE SOCKETS LAYER (SSL) layered on top of TCP SSL versions 1.0, 2.0, 3.0, 3.1 Netscape protocol later.
Advertisements

Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 4.5 Transport Layer Security.
Cryptography and Network Security Chapter 16
Web security: SSL and TLS
Spring 2012: CS419 Computer Security Vinod Ganapathy SSL, etc.
Lecture 6: Web security: SSL
TLS Introduction 14.2 TLS Record Protocol 14.3 TLS Handshake Protocol 14.4 Summary.
Cryptography and Network Security
Secure Socket Layer.
SSL CS772 Fall Secure Socket layer Design Goals: SSLv2) SSL should work well with the main web protocols such as HTTP. Confidentiality is the top.
17.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 17 Security at the Transport Layer: SSL and TLS.
Socket Layer Security. In this Presentation: need for web security SSL/TLS transport layer security protocols HTTPS secure shell (SSH)
7-1 Chapter 7 – Web Security Use your mentality Wake up to reality —From the song, "I've Got You under My Skin“ by Cole Porter.
An Introduction to Secure Sockets Layer (SSL). Overview Types of encryption SSL History Design Goals Protocol Problems Competing Technologies.
1 SSL/TLS 2 Web security Security requirements Secrecy to prevent eavesdroppers to learn sensitive information Entity authentication Message authentication.
Chapter 7 Web Security MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI.
Transport Layer Security (TLS) Protocol Introduction to networks and communications(CS555) Prof : Dr Kurt maly Student:Abhinav y.
December 2006Prof. Reuven Aviv, SSL1 Web Security with SSL Prof. Reuven Aviv Dept. of Computer Science Tel Hai Academic College.
BASIC CRYPTOGRAPHY CONCEPT. Secure Socket Layer (SSL)  SSL was first used by Netscape.  To ensure security of data sent through HTTP, LDAP or POP3.
Cryptography and Network Security Chapter 17
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 9 Wenbing Zhao Department of Electrical and Computer Engineering.
0 SSL3.0 / TLS1.0 Secure Communication over Insecure Line.
CSCE 790: Computer Network Security Chin-Tser Huang University of South Carolina.
Chapter 8 Web Security.
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. 1.
Transport-level and Web Security (SSL / TLS, SSH)
SSL / TLS in ITDS Arun Vishwanathan 23 rd Dec 2003.
Behzad Akbari Spring 2012 (These slides are based on lecture slides by Lawrie Brown)
Cosc 4765 SSL/TLS and VPN. SSL and TLS We can apply this generally, but also from a prospective of web services. Multi-layered: –S-http (secure http),
Introduction to Secure Sockets Layer (SSL) Protocol Based on:
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Network Security Essentials Chapter 5
Cryptography and Network Security (CS435) Part Fourteen (Web Security)
Web Security : Secure Socket Layer Secure Electronic Transaction.
Cryptography and Network Security (SSL)
December 2008Prof. Reuven Aviv, SSL1 Web Security with SSL Network Security Prof. Reuven Aviv King Mongkut’s University of Technology Faculty of information.
Web Security Network Systems Security
Tunneling and Securing TCP Services Nathan Green.
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 21 – Internet Security.
SMUCSE 5349/7349 SSL/TLS. SMUCSE 5349/7349 Layers of Security.
Web Security Web now widely used by business, government, individuals but Internet & Web are vulnerable have a variety of threats – integrity – confidentiality.
Gold Coast Campus School of Information Technology 2003/16216/3112INT Network Security 1Copyright © Griffith University, INT / 3112INT Network.
1 SSL/TLS. 2 Web security Security requirements Secrecy to prevent eavesdroppers to learn sensitive information Entity authentication Message authentication.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
CSEN 1001 Computer and Network Security Amr El Mougy Mouaz ElAbsawi.
@Yuan Xue CS 285 Network Security Secure Socket Layer Yuan Xue Fall 2013.
Cryptography CSS 329 Lecture 13:SSL.
Page 1 of 17 M. Ufuk Caglayan, CmpE 476 Spring 2000, SSL and SET Notes, March 29, 2000 CmpE 476 Spring 2000 Notes on SSL and SET Dr. M. Ufuk Caglayan Department.
PRESENTATION ON SECURE SOCKET LAYER (SSL) BY: ARZOO THAKUR M.E. C.S.E (REGULAR) BATCH
Network security Presentation AFZAAL AHMAD ABDUL RAZAQ AHMAD SHAKIR MUHAMMD ADNAN WEB SECURITY, THREADS & SSL.
Executive Director and Endowed Chair
Cryptography and Network Security
Secure Sockets Layer (SSL)
UNIT.4 IP Security.
CSCE 715: Network Systems Security
Visit for more Learning Resources
Originally by Yu Yang and Lilly Wang Modified by T. A. Yang
Cryptography and Network Security
Cryptography and Network Security Chapter 16
Secure Web Application-SSL
Cryptography and Network Security
SSL (Secure Socket Layer)
Security at the Transport Layer: SSL and TLS
CSCE 815 Network Security Lecture 16
Cryptography and Network Security Chapter 16
Cryptography and Network Security
Presentation transcript:

Web Security (SSL / TLS) Chapter 17 of Stallings

Web Security HTTP is not a secure protocol simple and stateless client/server application running over TCP/IP Added security measures needed we will see SSL (Secure Socket Layer) and TLS (Transport Layer Security) HTTPS Secure HTTP protocol SSL support is provided for several other TCP/IP applications as well POP3, SMTP, FTP, News, ...

Web Security Threats Integrity Scope of SSL / TLS Confidentiality data modification, insertion cryptographic checksums (HMAC) Confidentiality eavesdropping on the net can be prevented by encryption theft from server machine on-site security measures needed Authentication impersonation, data forgery we will see some cryptographic techniques Denial of service, hacked web servers Scope of SSL / TLS

Where to provide security? Long-lasting discussion, no ultimate answer have seen and will see have seen this lecture

SSL (Secure Socket Layer) originally developed by Netscape version 3 designed with public input subsequently Internet standardization effort started at IETF TLS (Transport Layer Security) working group established TLS can be viewed as SSL v3.1 and compatible with SSL v3

SSL Protocol Stack makes use of TCP (reliable end to end data transfer) adds security features reliable and secure end to end data transfer SSL is not a single protocol two-layers of protocols

Two SSL concepts SSL session SSL connection an association between client and server define a set of cryptographic parameters created by the Handshake Protocol may be shared by multiple SSL connections SSL connection a transient, peer-to-peer, secure communication link associated with (derived from) a SSL session Both are characterized by several parameters that define a session state or connection state

Session state parameters Session identifier chosen by server Peer certificate certificate of the peer entity (server’s if the entity is client, client’s if the entity is server) may be null (which is the likely case for server) Compression method algorithm used for compression Cipher Spec bulk data encryption algorithm (DES, etc.) - may be null (rarely) hash algorithm used in cryptographic checksum (MD5 or SHA-1) Master Secret 48-bytes secret shared between client and server Is resumable a flag that specifies if the session can be used later

Connection State Parameters Random numbers server and client exchange used as nonces during key exchange MAC secret secret key used for MAC operations conventional encryption key initialization vector if CBC mode is used sequence numbers each party maintains separate sequence numbers

SSL Record Protocol serves to SSL connections uses connection parameters provides confidentiality and integrity also fragments (into 214 bytes chunks) and optionally compresses data (in practice no compression) confidentiality IDEA, RC2-40, DES-40, DES, 3DES, Fortezza, RC4-40, RC4-128 message is optionally compressed before encryption message integrity using a MAC with shared secret key similar to HMAC but pads are concatenated rather than XORed

SSL Record Protocol header fields content type (higher layer protocol) Version fragment length

Change Cipher Spec Protocol very simple protocol that uses the record protocol the new state established by the handshake protocol is a pending state that is not yet valid change cipher spec protocol (actually a single command exchanged between client and server) makes this pending state the current one connection parameter changes will see its use in handshake protocol

Alert Protocol conveys SSL-related alerts to peer entity secured using the record protocol and with current connection state parameters each message is two bytes one byte for level (severity) warning (connection may resume) or fatal (connection is terminated) one byte for the alert code unexpected message, bad record MAC, decompression failure handshake failure (no common ground), illegal parameters (inconsistent or unrecognizable parameters) close notify no certificate, bad certificate, unsupported certificate, certificate revoked, certificate expired, certificate unknown

Handshake Protocol The most complex part of SSL Allows server and client to authenticate each other to negotiate encryption and MAC algorithms to negotiate cryptographic keys to be used handshake is done before any data is transmitted so cannot assume a secure record protocol handshake is performed (in an abbreviated way) even if an old session is used

Handshake Protocol a series of messages in phases Establish Security Capabilities Server Authentication and Key Exchange Client Authentication and Key Exchange Finish Handshake message format Message types

Handshake Protocol

Handshake Phase 1 – Establish Security Capabilities Client Hello (a list of client’s preferences) version: highest version supported by client client’s random also includes a timestamp against replay attacks session ID nonzero means client wants to use an existing session state for a new connection state; zero means new connection on a new session compression methods supported by client Cipher Suite a list that contains the combination of crypto algorithms supported by the client in order of preference each entry is a key exchange algorithm and a cipher spec

Handshake Phase 1 – Establish Security Capabilities Server Hello (response to client’s requests) version: version proposed by client if also supported by server, otherwise highest supported by server server’s random same structure as client’s but independent session ID if client offered one and it is also supported by server, then the same ID otherwise a new ID assigned by server compression methods chosen from the client’s list Cipher Suite selected from the client’s list

Key exchange methods how the conventional encryption and MAC keys are exchanged? actually first pre-master secret is exchanged master secret is derived from it other keys are derived from the master secret

Key exchange methods – cont’d Rephrase question: how the pre-master secret is exchanged? RSA server provides an RSA certificate, client encrypts the pre-master secret and sends it Fixed Diffie-Hellman (DH) Server DH parameters are fixed and sent in a certificate Ephemeral DH server certificate contains an RSA or DSS key server creates DH parameters (used one-time) and signs by this key Anonymous DH no certificates, no authentication, just send out DH parameters vulnerable to man-in-the-middle-attacks

Some Cipher Specs Fields Cipher algorithm RC4, RC2, DES, 3DES, DES40 (40-bit DES), IDEA Hash algo. for MAC MD5 or SHA-1 Cipher type stream or block Is Exportable binary IV size size of the init. vector for CBC mode

Handshake Phase 2: Server Auth. and Key Exchange Certificate is needed if anon-DH is not used (which is the case most of the time) needed for server authentication if fixed DH, then certificate contains enough information for key exchange (so server key exchange message is not needed)

Handshake Phase 2: Server Auth. and Key Exchange Server Key Exchange not needed for fixed DH and RSA key exchange (if RSA key is not signature only) message content depends on the key exchange method agreed Anon-DH message contains two DH public parameters and server’s public key Ephemeral DH same as anon-DH plus a signature on them RSA key exchange (if server’s RSA key is signature-only) server sends a temporary RSA encryption key to client in a signed message Signatures contain random values to resist against replay attacks

Handshake Phase 2: Server Auth. and Key Exchange Certificate Request Message although not common in practice, server may request client to send its certificate to authenticate the client two fields: certificate type and acceptable CAs a list of them Certificate types fixed DH (certificate may be signed with RSA or DSS) ephemeral DH (certificate may contain RSA or DSS key) signature only (not used for key exchange but for auth.) RSA or DSS Server Hello Done message server is finished and will wait for client’s response

Handshake Phase 3: Client Auth. and Key Exchange Upon receipt of server hello done client checks the server certificate and server hello parameters after that client starts sending its own messages Client’s Certificate is sent if requested and available

Handshake Phase 3: Client Auth. and Key Exchange Client Key exchange message content depends on the key exchange method agreed RSA 48-byte pre-master secret is encrypted using server’s RSA key (obtained at phase 2) fixed-DH client DH params are in client certificate, so key exchange message is null Anon or ephemeral DH Client DH params and public key are sent no signature even for ephemeral DH no client authentication and authenticated key exchange so far

Handshake Phase 3: Client Auth. and Key Exchange Certificate Verify message in client key exchange message, the client is not authenticated anyone could send the key exchange message a method for authentication is the certificate verify message client shows ownership of private key corresponding the public key in client certificate by signing a hash that contains the master secret and handshake messages except for fixed DH that does not contain a signature key what about authentication for fixed DH case? no authentication but the attacker cannot produce the pre-master and master secrets since it does not know the DH private key

Handshake Phase 4: Finish Wrap-up Change cipher spec messages to make the pending cipher spec the current one

Handshake Phase 4: Finish Finish message a MAC on exchanged handshake messages using the master secret to verify that handshake is successful and both parties have the same master secret client’s finished is verified by server and vice versa the connection state of the record protocol that encrypts and MACs finished message is the new one so this is also verification of all the keys created

Master Secret Creation 48-bytes value generated for a session two stage creation pre-master secret is exchanged during handshake using RSA (client creates, encrypts and sends, server decrypts) or DH (both calculates the same secret) master secret is calculated using pre-master secret and random nonces master_secret = MD5(pre_master_secret + SHA('A' + pre_master_secret + ClientHello.random + ServerHello.random)) + MD5(pre_master_secret + SHA('BB' + pre_master_secret + ClientHello.random + ServerHello.random)) + MD5(pre_master_secret + SHA('CCC' + pre_master_secret + ClientHello.random + ServerHello.random));

Generation of cryptographic parameters encryption keys, MAC secrets, IV are to be generated from a key block obtained from the master secret key_block = MD5(master_secret + SHA(`A' + master_secret + ServerHello.random + ClientHello.random)) + MD5(master_secret + SHA(`BB' + master_secret + ServerHello.random + ClientHello.random)) + MD5(master_secret + SHA(`CCC' + master_secret + ServerHello.random + ClientHello.random)) + [...]; until enough output has been generated. This is actually a kind of a PRNG

TLS (Transport Layer Security) TLS is a proposed Internet Standard (RFC 2246) similar to SSL v3, some difference are given here Version number record format is the same, but the major version 3, minor version 1 (v3.1) MAC TLS uses HMAC with pads XORed (unlike SSL where pads are appended) additional alert codes

TLS (Transport Layer Security) Same cipher suites of SSL except Fortezza actually it is not common in SSL v3 either No ephemeral client certificates in TLS since signature-only certificates are used for that purpose some changes in certificate verify and finished message calculations a different Pseudorandom function (PRF) master secret and key block calculations use PRF in TLS