Understanding the TLS Handshake: Unlocking the Secrets Behind the Secure Padlock 🔒
In the world of online browsing, that little padlock symbol next to the URL indicates a secure connection between your browser and the website you’re visiting. But do you know what goes on behind the scenes to achieve this security? In this blog post, we’ll explore the intricate process of the TLS handshake and how it works to keep your data safe.
To aid our discussion, we’ll reference a helpful infographic outlining the various messages exchanged between your web browser (the Client) and the website (the Server). For a better understanding, consider opening the infographic in a separate tab while reading through this guide.
(Infographic source: image shared on Twitter, link included at the end of this post)
Introduction
Before we dive into the handshake process, let’s clarify the two key objectives of SSL/TLS:
- ✅ Verifying the Server’s authenticity
- ✅ Establishing session keys to ensure the security of data transfers
To fully grasp the TLS handshake, it’s essential to understand a couple of concepts:
Record vs. Packet
Each entry in the infographic represents a “Record” that is sent during the TLS handshake, which differs from a Packet. Multiple Records can be bundled within a single Packet, and vice versa.
Cryptographic Basics
Familiarity with the following cryptographic concepts will enhance your understanding of the TLS handshake:
For the sake of simplicity, we will not delve into these concepts beyond mentioning them, allowing us to keep our focus on the handshake process.
Step 1: Client Hello
The TLS handshake begins with the Client sending a Client Hello message. This message contains five critical components:
- SSL Version
- Random Number
- Session ID
- Cipher Suites
- Extensions
Each element plays a role in the overarching goal of establishing a secure TLS connection.
Component Breakdown:
SSL Version
The Client indicates the highest SSL version it supports (e.g., SSL 3.0, TLS 1.0, etc.), while the server responds with its version. The highest mutually supported version is then chosen for the session.
Share this content: