Spis treści

Security: TLS 1.2 operating scheme

Transport Layer Security

TLS 1.2 Handshake

1. client Hello

The client initiates the connection by sending the message ClientHellomessage, which contains:

The purpose of this message is to start negotiating security parameters with the server.

Server Hello

([Microsoft Learn][1])

The server responds with the message ServerHellomessage which contains:([Wikipedia][2])

This message confirms the selection of common security parameters for the session.

3 Certificate (Public Key)

The server sends its X.509 certificate containing the public key. The client uses this certificate to:([catchpoint.com][3])

4th Server Key Exchange (Digital Signature)

Depending on the selected cipher suite, the server can send a message ServerKeyExchangemessage that contains:([Wikipedia][2])

The client verifies the signature to ensure that the parameters come from an authorised server.

5 Server Hello Done

([Taro][5])

The server sends a message ServerHelloDonemessage, signalling the end of its part of the negotiation. The client can now continue with the handshake process.

6 Client Key Exchange

The client generates a premaster secret and sends it to the server in a message ClientKeyExchange. Depending on the key exchange method:([ManageEngine][4])

Both parties use the premaster secret and random values to compute the shared master secret.([Wikipedia][2])

7 Change Cipher Spec

([Fortinet Docs][7])

The client sends a message ChangeCipherSpec, informing the server that from this point onwards all messages will be encrypted using the agreed parameters.([takethenotes.com][8])

8 Finished

([Fortinet Docs][7])

The client sends a message Finishedmessage, which is the first encrypted message in the session. It contains a digest of all previous handshake messages, allowing the server to verify the integrity and authenticity of the negotiation.

After receiving and verifying the message Finishedmessage, the server also sends its ChangeCipherSpec i Finishedmessage, completing the handshake process.

From this point onwards, the communication between client and server is encrypted and secure.

sources:

  1. https://www.manageengine.com/key-manager/information-center/what-is-ssl-tls-handshake.html?utm_source=chatgpt.com „What is SSL/TLS handshake? | TLS/SSL handshake protocol - ManageEngine Key Manager Plus”
  2. https://www.cloudflare.com/pl-pl/learning/ssl/what-happens-in-a-tls-handshake/?utm_source=chatgpt.com „What happens in a TLS handshake? | SSL handshake | Cloudflare”
  3. https://takethenotes.com/ssl-tls/?utm_source=chatgpt.com „SSL/TLS - Unlocking The Secrets Of Secure Communication | Take The Notes”
  4. https://www.rfc-editor.org/rfc/rfc5246?utm_source=chatgpt.comRFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2”
  5. https://www.cloudflare.com/learning/ssl/what-happens-in-a-tls-handshake/?utm_source=chatgpt.com „What happens in a TLS handshake? | SSL handshake | Cloudflare”