From abc8de79b16077ff4df71be9c46ae97d41613510 Mon Sep 17 00:00:00 2001 From: Adam Djellouli <37275728+djeada@users.noreply.github.com> Date: Fri, 23 Dec 2022 09:12:18 +0100 Subject: [PATCH] added explanation to SSL handshake (#326) --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index ecece13..4d82c75 100644 --- a/README.md +++ b/README.md @@ -290,6 +290,18 @@ Bonus question: what is the RTT of LAN?
How does SSL handshake work?
+SSL handshake is a process that establishes a secure connection between a client and a server. + +1. The client sends a Client Hello message to the server, which includes the client's version of the SSL/TLS protocol, a list of the cryptographic algorithms supported by the client, and a random value. +2. The server responds with a Server Hello message, which includes the server's version of the SSL/TLS protocol, a random value, and a session ID. +3. The server sends a Certificate message, which contains the server's certificate. +4. The server sends a Server Hello Done message, which indicates that the server is done sending messages for the Server Hello phase. +5. The client sends a Client Key Exchange message, which contains the client's public key. +6. The client sends a Change Cipher Spec message, which notifies the server that the client is about to send a message encrypted with the new cipher spec. +7. The client sends an Encrypted Handshake Message, which contains the pre-master secret encrypted with the server's public key. +8. The server sends a Change Cipher Spec message, which notifies the client that the server is about to send a message encrypted with the new cipher spec. +9. The server sends an Encrypted Handshake Message, which contains the pre-master secret encrypted with the client's public key. +10. The client and server can now exchange application data.