AiTechWorlds
AiTechWorlds
Two spies communicating over a public radio frequency face two problems. First: How do I know this is really you and not an enemy impersonating you? Second: How do we speak so others cannot understand us even if they are listening?
TLS solves both problems for the internet. It is the protocol behind the padlock in your browser, the https:// in every URL, and the security that makes online banking possible. Without it, every password, credit card number, and private message would travel across the internet as readable text.
SSL (Secure Sockets Layer) was created by Netscape in 1995. It enabled early e-commerce but was quickly found to have significant vulnerabilities.
| Version | Year | Status |
|---|---|---|
| SSL 2.0 | 1995 | Deprecated — critical vulnerabilities |
| SSL 3.0 | 1996 | Deprecated — POODLE attack (2014) |
| TLS 1.0 | 1999 | Deprecated — BEAST attack |
| TLS 1.1 | 2006 | Deprecated — no longer supported |
| TLS 1.2 | 2008 | Still widely supported |
| TLS 1.3 | 2018 | Current standard — faster, more secure |
The name "SSL" persists in common usage (people still say "SSL certificate"), but the actual protocol in use today is TLS 1.2 or TLS 1.3.
Before encrypted application data can flow, the client and server must negotiate which cryptographic algorithms to use, exchange keys, and verify each other's identity. This is the TLS handshake.
1. ClientHello
→ Client sends: TLS version, list of supported cipher suites, random number (ClientRandom)
2. ServerHello + Certificate + ServerHelloDone
→ Server picks cipher suite, sends its digital certificate, sends ServerRandom
3. Client verifies certificate with a Certificate Authority
4. Key Exchange
→ Client generates pre-master secret, encrypts it with server's public key, sends it
→ Both sides derive the session keys from: pre-master secret + ClientRandom + ServerRandom
5. Finished (both sides)
→ Both sides send a "Finished" message encrypted with the new session key
→ Handshake complete; application data flows
TLS 1.3 reduces handshake to 1 round trip (down from 2 in TLS 1.2):
1. ClientHello
→ Client includes: key share (Diffie-Hellman public value), supported cipher suites
2. ServerHello + Certificate + Finished
→ Server responds with its key share, certificate, and is immediately finished
3. Client Finished
→ Client confirms, handshake complete
TLS 1.3 also supports 0-RTT resumption for returning connections — zero additional round trips for repeated connections to the same server.
A certificate proves a server's identity. But who vouches for the certificate itself?
Certificate Authorities (CAs) are trusted third parties — organizations like DigiCert, Let's Encrypt, Sectigo — whose root certificates are pre-installed in your browser and operating system. When a server presents a certificate signed by a trusted CA, your browser accepts it.
The chain of trust:
Root CA (trusted by your OS/browser)
└── Intermediate CA (signed by root)
└── Server Certificate (signed by intermediate)
How a certificate is issued:
Let's Encrypt made this process free and automated, enabling HTTPS to become the default for virtually every website.
Asymmetric encryption uses a key pair: anything encrypted with the public key can only be decrypted with the private key.
Symmetric encryption uses one shared key for both encryption and decryption.
TLS solves this by using both:
This is called a hybrid cryptosystem. The expensive asymmetric operation happens once; all subsequent traffic uses the cheap symmetric cipher.
HTTPS is simply HTTP running over a TLS connection. The HTTP protocol itself is unchanged — TLS wraps it in an encrypted, authenticated tunnel.
The padlock in your browser means:
What the padlock does NOT mean:
Attackers increasingly use HTTPS on phishing sites. The padlock confirms encryption, not legitimacy.
| Attack | Affected Versions | How It Worked | TLS 1.3 Fix |
|---|---|---|---|
| BEAST (2011) | TLS 1.0 | IV prediction in CBC mode | CBC cipher suites removed |
| POODLE (2014) | SSL 3.0 | Padding oracle in CBC | SSL 3.0 and static RSA removed |
| CRIME/BREACH | TLS 1.2 | Compression side-channel | TLS-level compression removed |
| Heartbleed | OpenSSL implementation | Buffer over-read leaked memory | Implementation fix; not protocol |
| Downgrade attacks | TLS 1.2 | Force negotiation to weak cipher | Forward secrecy mandatory; weak suites removed |
TLS 1.3 also mandates Perfect Forward Secrecy (PFS): session keys are ephemeral (Diffie-Hellman key exchange). Even if a server's private key is stolen in the future, previously recorded sessions cannot be decrypted.
| Feature | TLS 1.2 | TLS 1.3 |
|---|---|---|
| Handshake round trips | 2 RTT | 1 RTT (0-RTT for resumption) |
| Cipher suites supported | Many (including weak ones) | 5 strong ones only |
| Key exchange | RSA static (optional) + DHE | ECDHE only (PFS mandatory) |
| Forward secrecy | Optional | Mandatory |
| Symmetric encryption | AES-CBC, RC4 (deprecated) | AES-GCM, ChaCha20-Poly1305 |
| Hash function | MD5/SHA-1 (legacy) | SHA-256 minimum |
| Server certificate encryption | No | Yes (encrypted in handshake) |
| Known vulnerabilities | POODLE, BEAST possible | All mitigated |
Get this course's notes on Telegram!
Free cheat sheets, summaries & practice exercises