@Atharva-Bet another great question, here is the process
1 - The client initiates the handshake with a "client hello" message
This message includes the version of TLS supported by the client and a random string called "client random".
2 - The server will reply back to the client with a "server hello"
The server sends a message with has the server's certificate, which cipher suite the server uses, and a random string called "server random".
3 - Authentication
The client verifies the server certificate, to confirm the server's authenticity
4 - Premaster secret
The client generates another random string of bits that is encrypted with the server's public key (from the certificate exchange earlier) and sends this to the server
5 - Decryption of the premaster secret
The server uses its private key to decrypt the premaster secret
6 - Session key generation
The client and server now take "client random" and "server random" + the "premaster secret" (only known to the client and server) and apply a math mathematical formal to generate a session key, which is identical on both ends.
7 - The client sends message to indicate ready to transmit encrypted data with the session key
Client sends an encrypted "finished" message with the session key
8 - The server sends a message to indicate ready to transmit encrypted data with the session key
The server sends an encrypted "finished message
9 - Encrypted communication begins
Best Regards,
Wes Bryan
Knowledge is a road to be traveled upon, not a destination to be reached~~