Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add detailed explanation of the TLS handshake process. #2494

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,30 @@ to the browser it undergoes the below process:
* Rendering - Construct DOM Tree → Render Tree → Layout of Render Tree →
Painting the render tree

### TLS Handshake
-----------------

The TLS (Transport Layer Security) handshake is a critical process that ensures secure communication between the client (browser) and the server. Here’s a detailed breakdown of the steps involved:

1. ClientHello: The client initiates the handshake by sending a `ClientHello` message to the server. This message includes:
- The TLS version supported by the client.
- A list of cipher suites (encryption algorithms) the client can use.
- A randomly generated string called the "client random."

2. ServerHello: The server responds with a `ServerHello` message, which includes:
- The selected TLS version.
- The chosen cipher suite from the client’s list.
- A "server random" string.
- The server’s digital certificate, which contains the server’s public key and is signed by a Certificate Authority (CA).

3. Certificate Verification: The client verifies the server’s certificate using its list of trusted CAs. If the certificate is valid, the client proceeds to generate a "pre-master secret," which is encrypted using the server’s public key and sent to the server.

4. Key Exchange: The server decrypts the pre-master secret using its private key. Both the client and server now use the pre-master secret, along with the client random and server random, to generate a symmetric session key. This key will be used for encrypting and decrypting data during the session.

5. Finished Messages: Both the client and server send a `Finished` message to confirm that the handshake is complete. These messages are encrypted using the session key to ensure that the handshake was successful and secure.

6. Secure Communication: Once the handshake is complete, all data exchanged between the client and server is encrypted using the symmetric session key, ensuring confidentiality and integrity.

Browser
-------

Expand Down Expand Up @@ -571,6 +595,7 @@ The components of the browsers are:
support storage mechanisms such as localStorage, IndexedDB, WebSQL and
FileSystem.


HTML parsing
------------

Expand Down