secure socket layer

28
Secure Socket Layer & Transport Layer Security

Upload: amar-shah

Post on 18-Jul-2015

136 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: secure socket layer

Secure Socket Layer&

Transport Layer Security

Page 2: secure socket layer

Secure Socket Layer(SSL)

Page 3: secure socket layer

What is SSL?

Page 4: secure socket layer

Cont…

O Transport layer security service.

O Originally developed by Netscape.

O Version 3 designed with public input

O Subsequently became Internet standard

known as TLS (Transport Layer Security).

O Uses TCP to provide a reliable end-to-end

service.

O SSL has two layers of protocols.

Page 5: secure socket layer

Where SSL Fits?

HTTP SMTP POP3

80 25 110

HTTPS SSMTP SPOP3

443 465 995

Secure Sockets

Layer

Transport

Network

Link

Page 6: secure socket layer

Uses Public Key Scheme

O Each client-server pair uses

O 2 public keys

O One for client (browser)

O Created when browser is installed on clientmachine.

O One for server (http server)

O Created when server is installed on serverhardware.

O 2 private keys

O One for client browser

O One for server (http server)

Page 7: secure socket layer

SSL Architecture

Page 8: secure socket layer

SSL Architecture

O SSL session

O An association between client & server

O Created by the Handshake Protocol

O Define a set of cryptographic parameters

O May be shared by multiple SSLconnections

Page 9: secure socket layer

SSL Record Protocol

OConfidentialityO Using symmetric encryption with a shared

secret key defined by Handshake Protocol

O IDEA, RC2-40, DES-40, DES, 3DES,Fortezza, RC4-40, RC4-128

O Message is compressed before encryption

Omessage integrityO Using a MAC (Message Authentication

Code) created using a shared secret keyand a short message

Page 10: secure socket layer

SSL Change Cipher Spec Protocol

O One of 3 SSL specific protocols which use

the SSL Record protocol

O A single message

O Causes pending state to become current

O Hence updating the cipher suite in use

Page 11: secure socket layer

SSL Alert Protocol

O Conveys SSL-related alerts to peer entity

O SeverityO Warning or fatal

O Specific alertO Unexpected message, bad record mac,

decompression failure, handshake failure, illegalparameter

O Close notify, no certificate, bad certificate,unsupported certificate, certificate revoked,certificate expired, certificate unknown

O Compressed & encrypted like all SSL data

Page 12: secure socket layer

SSL Handshake Protocol

OAllows server & client to:O Authenticate each other

O To negotiate encryption & MAC algorithms

O To negotiate cryptographic keys to be used

OComprises a series of messages in phasesO Establish Security Capabilities

O Server Authentication and Key Exchange

O Client Authentication and Key Exchange

O Finish

Page 13: secure socket layer

Cont…

Page 14: secure socket layer

Transport Layer Security

(TLS)

Page 15: secure socket layer

What is TLS?

O The Transport Layer Security (TLS)

protocol is the IETF standard version of

the SSL protocol. The two are very similar,

with slight differences.

Page 16: secure socket layer

Cont…

O IETF standard RFC 2246 similar to SSLv3 with minor differencesO In record format version number

O Uses HMAC for MAC

O A pseudo-random function expands secrets

O Based on HMAC using SHA-1 or MD5

O Has additional alert codes

O Some changes in supported ciphers

O Changes in certificate types & negotiations

O Changes in crypto computations & padding

Page 17: secure socket layer

Version

O The first difference is the version number

(major and minor). The current version of

SSL is 3.0; the current version of TLS is

1.0. In other words, SSLv3.0 is compatible

with TLSv1.0.

Page 18: secure socket layer

Cipher Suite

O Another minor difference between SSL

and TLS is the lack of support for the

Fortezza method. TLS does not support

Fortezza for key exchange or for

encryption/decryption.

Page 19: secure socket layer

Generation of Cryptographic SecretsData Expansion Function

Page 20: secure socket layer

Cont…Master Secret Generation

Page 21: secure socket layer

Cont…Key Material Generation

Page 22: secure socket layer

TLS Layers

O TLS is composed of two layers: the TLSRecord Protocol and the .

O TLS Handshake Protocol. The TLS RecordProtocol provides connection security withsome encryption method such as the DataEncryption Standard (DES).

O The TLS Record Protocol can also be usedwithout encryption.

O The TLS Handshake Protocol allows theserver and client to authenticate each otherand to negotiate an encryption algorithm andcryptographic keys before data is exchanged.

Page 23: secure socket layer

Handshake ProtocolHash for certificate verification in TLS

Page 24: secure socket layer

Message TypeThis field identifies the Handshake message type.

Message Types

Code Description

0 HelloRequest

1 ClientHello

2 ServerHello

11 Certificate

12 ServerKeyExchange

13 CertificateRequest

14 ServerHelloDone

15 CertificateVerify

16 ClientKeyExchange

20 Finished

Page 25: secure socket layer

Hash for finished message in TLS

Page 26: secure socket layer

Alert Protocol

O TLS supports all of the alerts defined in

SSL except for NoCertificate. TLS also

adds some new ones to the list. Table

shows the full list of alerts supported by

TLS.

Page 27: secure socket layer

DescriptionThis field identifies which type of alert is being sent.

Alert description types

Code Description Level types Note

0 Close notify warning/fatal

10 Unexpected message fatal

20 Bad record MAC fatal

Possibly a bad SSL

implementation, or payload has

been tampered with e.g. FTP

firewall rule on FTPS server.

21 Decryption failed fatal TLS only, reserved

22 Record overflow fatal TLS only

30 Decompression failure fatal

40 Handshake failure fatal

41 No certificate warning/fatal SSL 3.0 only, reserved

42 Bad certificate warning/fatal

43 Unsupported certificate warning/fatal

E.g. certificate has only Server

authentication usage enabled and

is presented as a client certificate

Page 28: secure socket layer