
Have you ever noticed that little lock icon in your browser and wondered what is it?
Let's try to understand:
The answer is the TLS (Transport Layer Security) protocol, which is designed to secure internet communication.
Let’s go through the handshake steps using the RSA algorithm:
- Connection: The server listens for new connections on port 443.
- Client Hello: The client sends a "client hello" to port 443 with its supported versions, cipher suites, and a "client random" string.
- Server Hello: The server responds with a "server hello," selects the TLS version and cipher, and sends its SSL certificate along with a unique "server random."
- Verification: The client checks the server's certificate with a Certificate Authority (CA) to confirm the domain owner's identity.
- Premaster Secret: The client creates a "premaster secret" string, encrypts it with the server's public key from the certificate, and sends it to the server.
- Decryption: The server decrypts the premaster secret using its private key.
- Session Keys: Both parties generate identical session keys using the client random, server random, and premaster secret.
- Finished: Both sides send "finished" messages encrypted with the session key to confirm the handshake.
- Completion: The handshake is complete, and all further communication is secured through the session keys.
While RSA-based key exchange is now considered less secure than newer methods like Diffie-Hellman, TLS 1.2 was still supported by 99.3% of websites as of early 2021.
What are your thoughts on this? Thanks for reading!
#tls #browser #handshake #software #tech #engineering

English













