Network Security SSL and TLS

TLS (Transport Layer Security) is the protocol that powers the padlock icon in your browser's address bar. It encrypts the connection between your browser and a website so that passwords, credit card numbers, and personal information travel across the internet in scrambled form that only you and the website can read. SSL (Secure Sockets Layer) was TLS's predecessor — it is now outdated and insecure, but the name "SSL" persists in everyday conversation.

What Problem TLS Solves

Without TLS, every HTTP connection sends data in plain text. Anyone positioned on the same network — a coffee shop router, an ISP employee, an attacker with packet-sniffing software — can read every word you type into a web form.

WITHOUT TLS (HTTP):
You type into a form: username=alice password=sunshine2020
Network packet shows: username=alice&password=sunshine2020 ← visible to anyone

WITH TLS (HTTPS):
You type:  username=alice password=sunshine2020
Network packet shows: 7xKp!mR#9vLq...3nBf  ← unreadable ciphertext

The TLS Handshake — How a Secure Connection Forms

Before any encrypted data flows, your browser and the server perform a handshake — a brief negotiation that establishes encryption parameters and verifies the server's identity.

TLS 1.3 Handshake (simplified):

Browser                          Server
   │                               │
   │──── ClientHello ─────────────►│
   │     (supported TLS versions,  │
   │      cipher suites,           │
   │      random number)           │
   │                               │
   │◄─── ServerHello ──────────────│
   │     (chosen cipher suite,     │
   │      server's certificate,    │
   │      server's public key)     │
   │                               │
   │  [Browser verifies cert]      │
   │                               │
   │──── Key Exchange ────────────►│
   │  (generates session key       │
   │   using server's public key)  │
   │                               │
   │◄════ Encrypted Data ══════════│
   │══════ Flows Both Ways ═══════►│

TLS Certificates — Proving Identity

A TLS certificate is a digital document that proves a website is genuinely operated by who it claims to be. When you connect to your bank, the certificate tells your browser "this server really is MyBank.com, verified by a trusted authority." Without certificates, attackers could redirect your traffic to a fake lookalike site and your browser would have no way to know the difference.

Certificate Anatomy

A TLS Certificate Contains:
┌─────────────────────────────────────────────────────┐
│ Domain:       estudy247.com                         │
│ Issued To:    Estudy247 Inc                         │
│ Issued By:    DigiCert Inc (Certificate Authority)  │
│ Valid From:   2024-01-01                            │
│ Valid Until:  2025-01-01                            │
│ Public Key:   [server's public encryption key]      │
│ Signature:    [DigiCert's digital signature]        │
└─────────────────────────────────────────────────────┘

Certificate Authorities (CAs)

A Certificate Authority is an organization that issues and vouches for certificates. Your browser comes pre-loaded with a list of trusted CAs. When a website presents a certificate signed by a trusted CA, the browser accepts it. If someone creates a fake certificate not signed by a trusted CA, the browser shows a security warning.

SSL vs TLS — Version History

Version  | Year | Status
---------|------|--------------------------------------------------
SSL 1.0  | 1995 | Never released (too many vulnerabilities)
SSL 2.0  | 1995 | Broken — DEPRECATED, do not use
SSL 3.0  | 1996 | Broken (POODLE attack 2014) — DEPRECATED
TLS 1.0  | 1999 | Deprecated 2020 (BEAST, POODLE attacks)
TLS 1.1  | 2006 | Deprecated 2020
TLS 1.2  | 2008 | Acceptable but older, still widely supported
TLS 1.3  | 2018 | Current standard — faster, more secure, use this

Any server still supporting SSL 2.0, SSL 3.0, TLS 1.0, or TLS 1.1 carries known vulnerabilities. Security audits check for these outdated protocol versions and recommend disabling them.

TLS 1.3 Improvements Over TLS 1.2

Improvement               | TLS 1.2            | TLS 1.3
--------------------------|--------------------|--------------------------
Handshake round trips     | 2 round trips      | 1 round trip (faster)
Forward secrecy           | Optional           | Always on
Weak cipher suites        | Some supported     | All removed
0-RTT resumption          | Not available      | Available (with tradeoffs)
Security of key exchange  | RSA key exchange   | Only Diffie-Hellman (safer)

Forward Secrecy Explained

Forward secrecy means that even if an attacker records encrypted traffic today and later obtains the server's private key, they still cannot decrypt the past traffic. TLS 1.3 generates a fresh session key for every connection. There is no long-term key that unlocks past sessions.

WITHOUT Forward Secrecy (TLS 1.2 with RSA key exchange):
Attacker records 1000 encrypted sessions.
Later steals server's private key.
→ Can decrypt ALL 1000 sessions retroactively.

WITH Forward Secrecy (TLS 1.3 with Ephemeral Diffie-Hellman):
Attacker records 1000 sessions.
Later steals server's private key.
→ Cannot decrypt ANY session (each used a unique ephemeral key).

Common TLS Attacks to Know

Attack              | What It Does                | Defense
--------------------|-----------------------------|-----------------------
SSL Stripping       | Downgrades HTTPS to HTTP    | HSTS header
Certificate Spoofing| Fake cert to impersonate    | Certificate Pinning, CAA
Heartbleed (2014)   | Leaked server memory        | Patch OpenSSL
POODLE (2014)       | Exploits SSL 3.0 padding    | Disable SSL 3.0
BEAST (2011)        | Breaks TLS 1.0 CBC          | Use TLS 1.2+

TLS is the foundation of secure internet communication. Every HTTPS website, every secure API, every encrypted email connection uses TLS. Keeping TLS configurations current — enforcing TLS 1.2 minimum, preferring TLS 1.3, using strong cipher suites, and validating certificates properly — is a basic and critical responsibility for anyone who operates a web-facing service.

Leave a Comment

Your email address will not be published. Required fields are marked *