
The server can also send an empty ID, indicating the session cannot be resumed.

If the server doesn’t want to resume the same session, then a new ID is generated. If a match is found and the server wants to use the same session state, it returns the same ID as sent by the client. Session Identifier: Unique number to identify the session for the corresponding connection with the client.If the session ID in the client hello message is not empty, the server will find a match in the session cache.Server Random: 32-byte pseudorandom number used to generate the Master Secret.Server Version: The highest TLS protocol version supported by the server which is also supported by the client.

The Server Hello contains the following information: The steps involved in the TLS handshake are shown below: The entire sequence which involves setting up the session identifier, TLS protocol version, negotiating the cipher suite, certificate authentication of the peers and cryptographic key exchange between peers is called a TLS Handshake. TLS protocol describes the steps to authenticate the peers and set up a secure connection with defined parameters. Handshake: To communicate over a secure channel, two peers must agree on the cryptographic keys and encryption algorithms for that session.Application Data: This protocol ensures that messages are fragmented, compressed, encrypted and transmitted in a secure manner.The change cipher spec message, transmitted by both the client and the server, defines the re-negotiated cipher spec and keys that will be used for all the messages exchanged henceforth. Change Cipher Spec: It defines changes in ciphering strategies.It is used to notify the peer of any error condition that has occurred. Alert: This sub-protocol defines the alert levels and provides a description of the alerts.The higher layer consists of the following sub-protocols:.Transmitting the data from the upper application layer to the lower transport layer and vice versa.Applying the Message Authentication Code (MAC), a hash to maintain the data integrity.Compressing/decompressing the outgoing/incoming data.Fragmenting the message to be transmitted into manageable blocks.TCP Record Protocol Layer – This is the lower layer which lies on top of the TCP layer and is responsible for:.It is designed to work on top of a reliable transport protocol such as TCP (but has been adapted to UDP, as well) and is divided into two sub-layers:

TLS lies in between the application and the transport layer.
