Secure Sockets Layer

The Secure Sockets Layer is an intermediate layer between the application and the transport protocol with the purpose to create secure and reliable communication.

SSL Handshake Protocol

The goal of the protocol is to create an agreement between a client and a server on a set of cryptographic protocols, algorithms and the parameters used for communication between them.

The protocol consists of a sequence of steps:

  1. Client Hello - the client sends to the server the message:
  2. ClientHello(CipherSuite[], CompressionMethod[], ClientRandom)
    

    One CipherSuite defines three encryption protocols:

    1. key-exchange protocol: RSA, Diffie-Hellman;
    2. secret-key encryption algorithm: null, rc4, rc2, des, des40, fortezza;
    3. cryptographic hash algorithm: null, md5, sha;
  3. Server Hello - the server sends to the client the message:
  4. ServerHello(CipherSuite, CompressionMethod, ServerRandom)
    

    The server selects the cipher suite and the compression method and sends the information to the client. After this message, the encryption and compression protocols are selected. The rest of the protocols is used to agree on the secret keys.

  5. Key Exchange - there are two cases:
  6. Finished - the client and the server send to each other the digest of all the messages sent so far and the master-secret:
  7. Client to Server

    hash(AllMessagesSentByClient+MasterSecret)
    

    Server to Client

    hash(AllMessagesSentByServer+MasterSecret)

SSL Application Data Protocol

  1. Client send to server a request:
  2. encrypt(ClientRequest + hash(ClientRequest+MasterKey), ClientWriteKey);
  3. Server decrypts the request, prepares the response, encrypts it and sends it to the client:
  4. encrypt(ServerResponse + hash(ServerResponse), ServerWriteKey);
    

Prev Up Next