1 secure socket layer 2 overall what is secure socket layer? ssl protocol stack ssl protocol and its...

27
1 Secure Socket Layer

Upload: misael-bunnell

Post on 15-Dec-2015

226 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

1

Secure Socket Layer

Page 2: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

2

Overall

What is Secure Socket Layer?

SSL Protocol Stack

SSL Protocol and its Components

Page 3: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

3

What is Secure Socket Layer ?

Secure Socket Layer (SSL) is a protocol developed by Netscape for transmitting private documents via the Internet.

The SSL Security protocol provides data encryption, server authentication, message integrity, and optional client authentication for a TCP/IP connection.

SSL is built into all major browsers and web servers.

Page 4: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

4

What is SSL? (cont’d)

Both Netscape Navigator and Internet Explorer support SSL, and many websites use the protocol to obtain confidential user information, such as credit card numbers.

The primary goal of SSL is to provide privacy and reliability between two communicating applications.

Page 5: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

5

SSL Protocol Stack

The SSL Protocol Stack is composed of two layers.

1. The first layer is the higher layer which is composed of SSL Handshake Protocol, SSL Change Cipher Spec Protocol, SSL Alert Protocol, and HTTP, which are used in the management of SSL exchanges.

2. The second layer is the lower layer composed of the SSL Record Protocol, TCP, and IP.

Page 6: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

6

SSL Protocol Stack Table

SSL Handshake

Protocol

SSL Change Cipher Spec

Protocol

SSL Alert Protocol

HTTP

SSL Record Protocol

TCP

IP

Page 7: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

7

SSL Protocol

SSL is layered protocol. At each layer, message may include field for length, description and content. SSL takes the messages to be transmitted, fragments the data into blocks, encrypts, and transmit the result.

The received data is decrypted, verified, reassembled, and then delivered to the client.

Page 8: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

8

SSL Protocol Components

Session and connection states

Record Protocol

Change Cipher Spec Protocol

Alert Protocol

Handshake Protocol

Page 9: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

9

Session and Connection states

Session - An SSL session is an connection between a client and server. In addition, parties may have multiple sessions.

Connection – A connection is a transport that provides a type of service. Connections are peer-to-peer relationship.

Page 10: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

10

Session state

The session state includes the following elements: session identifier - A byte sequence chosen by the server to identify an active or resumable session state

peer certificate - X509.v3[X509] certificate of the peer. This element of the state may be null.

compression method - the algorithm used to compress data prior to encryption.

Page 11: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

11

Session state (cont’d)

cipher spec - Specifies the bulk data encryption algorithm (such as DES, etc.) and a MAC (Message Authentication Code) algorithm. It also defines cryptographic attributes such as the hash_size.

master secret - 48-byte secret shared between the client and server.

is resumable - A flag indicating whether the session can be used to initiate new connections.

Page 12: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

12

Connection state

The connection state includes the following elements: server and client random - Byte sequences that are chosen by the server and client for each connection. server write MAC secret - The secret used in MAC operations on data written by the server. client write MAC secret -The secret used in MAC operations on data written by the client. server write key - The bulk cipher key for data encrypted by the server and decrypted by the client.

Page 13: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

13

Connection state (cont’d)

client write key - The bulk cipher key for data encrypted by the client and decrypted by the server. initialization vectors - When a block cipher in CBC mode is used, an initialization vector (IV) is maintained for each key. sequence numbers - Each party maintains separate sequence numbers for transmitted and received messages for each connection. When a party sends or receives a change cipher spec message, the appropriate sequence number is set to zero.

Page 14: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

14

SSL Record Protocol

The Record Protocol takes an application message to be transmitted, fragments the data into blocks, compresses the data (optionally), applies a MAC, encrypts, adds a header and transmits the resulting unit.

Page 15: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

15

Steps of SSL Record Protocol

Steps:Fragmentation:The record layer fragments information blocks into SSLPlaintext records of 214 bytes or less. Compression: All records are compressed using the compression algorithm. The compression algorithm translates an SSLPlaintext structure into an SSLCompressed structure.Compute a MAC – All records are protected using the encryption and MAC algorithms defined in the current CipherSpec. A shared secret key is used.

Page 16: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

16

SSL Record Protocol Steps (cont’d)

Null or standard stream cipher - Stream ciphers convert SSLCompressed fragment structures to and from stream SSL Ciphertext

CBC block cipher - For block ciphers (such as DES), the encryption and MAC functions convert SSLCompressed fragment structures to and from block SSLCiphertext fragment structures.

Record header

Page 17: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

17

SSL Record Protocol Operation

Page 18: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

18

Change Cipher Spec ProtocolThe change cipher spec protocol exists to signal transitions in ciphering strategies. The protocol consists of a single message, which is encrypted and compressed under the current CipherSpec. The message consists of a single byte of value 1. The change cipher spec message is sent by both the client and server to notify the receiving party that subsequent records will be protected under the just-negotiated CipherSpec and keys.

Page 19: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

19

Change Cipher Spec Protocol (Cont’d)When the client or server receives a change cipher spec message, it copies the pending read state into the current read state. When the client or server writes a change cipher spec message, it copies the pending write state into the current write state.The client sends a change cipher spec message following handshake key exchange and certificate verify messages (if any), and the server sends one after successfully processing the key exchange message it received from the client.

Page 20: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

20

Alert Protocol The Alert Protocol is used to convey SSL-related alerts to the peer entity.

Alert messages are encrypted and compressed, as specified by the current connection state.

Alert messages with a level of fatal, result in the immediate termination of the connection. In this case, other connections corresponding to the session may continue, however the session identifier must be cancel, preventing the failed session from being used to establish new connections.

Page 21: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

21

Handshake Protocol

This protocol allows the server and client to authenticate each other and to negotiate an encryption and MAC algorithm and cryptographic keys to be used to protect data sent in an SSL record.

Page 22: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

22

How Handshake Protocol worksThe client sends a client hello message to which the server must respond with a server hello message.The client hello and server hello are used to establish security enhancement capabilities between client and server. The client hello and server hello establish the following attributes: protocol version, session ID, cipher suite, and compression method.After the hello messages, the server will send its certificate. A server key exchange message may be sent. If the server is authenticated, it may request a certificate from the client, if that is appropriate to the cipher suite selected.

Page 23: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

23

Handshake Protocol works (cont’d)

Now the server will send the server hello done message, indicating that the hello-message phase of the handshake is complete. The server will then wait for a client response. If the server has sent a certificate request message, the client must send the certificate message. The client key exchange message is sent, and the content of that message will depend on the public key algorithm selected between the client hello and the server hello. If the client has sent a certificate with a digitally-signed certificate, then a verify message is sent to explicitly verify the certificate.

Page 24: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

24

Handshake Protocol works (cont’d)

At this point, a change cipher spec message is sent by the client, and the client copies the pending Cipher Spec into the current Cipher Spec. The client then immediately sends the finished message under the new algorithms, keys, and secrets. In response, the server will send its own change cipher spec message, transfer the pending to the current Cipher Spec, and send its Finished message under the new Cipher Spec. At this point, the handshake is complete and the client and server may begin to exchange application layer data.

Page 25: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

25

Page 26: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

26

References

Network Security Essentials by Williams Stallingshttp://home.netscape.com/eng/ssl3/3-SPEC.HTM#7-1http://www.webopedia.com/TERM/S/SSL.htmlhttp://home.netscape.com/security/techbriefs/ssl.htmlhttp://developer.netscape.com/docs/manuals/security/sslin/contents.htm

Page 27: 1 Secure Socket Layer 2 Overall What is Secure Socket Layer? SSL Protocol Stack SSL Protocol and its Components

27

HAVE A NICE DAY!

NO QUESTIONS

THANK YOU