<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 李程林</title>
    <description>The latest articles on DEV Community by 李程林 (@_9450dadd96fc0a13901d4).</description>
    <link>https://dev.to/_9450dadd96fc0a13901d4</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4225422%2Fff37d21b-a806-41f6-ab8c-1656d07bd972.jpg</url>
      <title>DEV Community: 李程林</title>
      <link>https://dev.to/_9450dadd96fc0a13901d4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/_9450dadd96fc0a13901d4"/>
    <language>en</language>
    <item>
      <title>How TLS Protects Your Internet Connection: The Complete Guide</title>
      <dc:creator>李程林</dc:creator>
      <pubDate>Wed, 04 Nov 2026 05:30:18 +0000</pubDate>
      <link>https://dev.to/_9450dadd96fc0a13901d4/how-tls-protects-your-internet-connection-the-complete-guide-284k</link>
      <guid>https://dev.to/_9450dadd96fc0a13901d4/how-tls-protects-your-internet-connection-the-complete-guide-284k</guid>
      <description>&lt;p&gt;Every time you visit a website, send an API request, or receive a message, TLS (Transport Layer Security) is working silently in the background. The padlock icon in your browser's address bar is its visible signal — but the cryptography behind it involves a sophisticated combination of every primitive we've covered across this blog.&lt;/p&gt;

&lt;p&gt;TLS is not a single algorithm. It is a protocol orchestration that combines symmetric encryption, asymmetric key exchange, digital signatures, hash functions, and message authentication into a single handshake that completes in milliseconds. Understanding how TLS works means understanding how all these pieces fit together — and why each one is indispensable.&lt;/p&gt;

&lt;p&gt;This guide walks through the TLS 1.3 handshake step by step, maps each phase to the cryptographic primitive it relies on, compares TLS 1.2 and 1.3, and gives you practical configuration guidance.&lt;/p&gt;

&lt;p&gt;A Brief History: From SSL to TLS 1.3&lt;br&gt;
Year    Version Key Milestone&lt;br&gt;
1994    SSL 1.0 Netscape's first attempt (never publicly released)&lt;br&gt;
1995    SSL 2.0 First public release; quickly found to have serious flaws&lt;br&gt;
1996    SSL 3.0 Complete redesign; basis for all TLS versions&lt;br&gt;
1999    TLS 1.0 IETF takes over; essentially SSL 3.1&lt;br&gt;
2006    TLS 1.1 Added protection against CBC attacks&lt;br&gt;
2008    TLS 1.2 SHA-2 cipher suites, AEAD modes, customizable PRFs&lt;br&gt;
2018    TLS 1.3 1-RTT handshake, mandatory forward secrecy, removed all legacy algorithms&lt;br&gt;
TLS 1.0 and 1.1 were deprecated by RFC 8996 in March 2021. TLS 1.2 remains widely used and is still considered secure when properly configured. TLS 1.3 is the current gold standard, supported by all major browsers and servers since 2018–2020.&lt;/p&gt;

&lt;p&gt;The TLS Handshake: Phase by Phase&lt;br&gt;
The TLS handshake is the process where two parties (typically a browser and a server) establish a secure connection. Think of it as a negotiation: "Here's what I can do" → "Here's what I think is best" → "Here's proof I am who I say I am" → "Let's start encrypting."&lt;/p&gt;

&lt;p&gt;Phase 1: Client Hello (The Opening Bid)&lt;br&gt;
The client initiates the connection by sending:&lt;/p&gt;

&lt;p&gt;Protocol version — disguised as TLS 1.2 (0x0303) for middlebox compatibility, with the real version (TLS 1.3 = 0x0304) in the supported_versions extension&lt;br&gt;
32 bytes of random data — the ClientRandom, used later in key derivation&lt;br&gt;
Cipher suite list — in TLS 1.3, only three AEAD suites are defined:&lt;br&gt;
TLS_AES_128_GCM_SHA256&lt;br&gt;
TLS_AES_256_GCM_SHA384&lt;br&gt;
TLS_CHACHA20_POLY1305_SHA256&lt;br&gt;
Supported groups — elliptic curves for key exchange: X25519, P-256, P-384, P-521, X448, ffdhe2048–8192&lt;br&gt;
Signature algorithms — ECDSA-P256-SHA256, Ed25519, RSA-PSS-SHA256, etc.&lt;br&gt;
Key share — the client's ephemeral public key (e.g., an X25519 public key, 32 bytes)&lt;br&gt;
SNI (Server Name Indication) — the hostname the client wants to reach&lt;br&gt;
Crypto primitives involved: Random number generation for ClientRandom, elliptic curve math for the key share.&lt;/p&gt;

&lt;p&gt;Phase 2: Server Hello (The Response)&lt;br&gt;
The server replies with:&lt;/p&gt;

&lt;p&gt;Selected cipher suite — one from the client's list (e.g., TLS_AES_256_GCM_SHA384)&lt;br&gt;
32 bytes of ServerRandom&lt;br&gt;
Key share — the server's ephemeral public key (same curve as the client's)&lt;br&gt;
Supported version — confirms TLS 1.3&lt;br&gt;
At this point, both sides have each other's ephemeral public keys. They can now compute a shared secret using elliptic curve Diffie-Hellman (ECDH).&lt;/p&gt;

&lt;p&gt;Phase 3: Key Derivation (The Mathematical Magic)&lt;br&gt;
This is where the real cryptography happens. Both client and server independently compute the same set of session keys — without ever transmitting them.&lt;/p&gt;

&lt;p&gt;Step 1: Shared Secret via ECDH&lt;/p&gt;

&lt;p&gt;Each side multiplies the other's public key by their own private key on the agreed elliptic curve. Due to the properties of elliptic curve multiplication, both arrive at the same 32-byte shared secret:&lt;/p&gt;

&lt;p&gt;shared_secret = ECDH(client_private, server_public)&lt;br&gt;
             = ECDH(server_private, client_public)&lt;br&gt;
This is the same math behind our ECC key generator and ECDH key exchange tool.&lt;/p&gt;

&lt;p&gt;Step 2: HKDF Key Schedule&lt;/p&gt;

&lt;p&gt;TLS 1.3 uses HKDF (HMAC-based Key Derivation Function, defined in RFC 5869) to derive all session keys from the shared secret. The process involves:&lt;/p&gt;

&lt;p&gt;early_secret = HKDF-Extract(salt: 0, key: 0) — initial extraction&lt;br&gt;
derived_secret = HKDF-Expand-Label(early_secret, "derived", empty_hash) — bridging to handshake&lt;br&gt;
handshake_secret = HKDF-Extract(derived_secret, shared_secret) — core secret&lt;br&gt;
client_hs_key = HKDF-Expand-Label(handshake_secret, "c hs traffic", hello_hash) — client handshake key&lt;br&gt;
server_hs_key = HKDF-Expand-Label(handshake_secret, "s hs traffic", hello_hash) — server handshake key&lt;br&gt;
The HKDF is built on top of HMAC — the same primitive we cover in our HMAC guide. Each expansion step uses HMAC-SHA256 or HMAC-SHA384 depending on the cipher suite.&lt;/p&gt;

&lt;p&gt;Step 3: Application Traffic Keys&lt;/p&gt;

&lt;p&gt;After the handshake is verified, new keys are derived for actual data encryption:&lt;/p&gt;

&lt;p&gt;application_secret = HKDF-Expand-Label(handshake_secret, "c ap traffic" / "s ap traffic", ...)&lt;br&gt;
client_app_key = HKDF-Expand-Label(application_secret, "key", ...)&lt;br&gt;
client_app_iv  = HKDF-Expand-Label(application_secret, "iv", ...)&lt;br&gt;
These are the keys that encrypt your HTTP requests and responses.&lt;/p&gt;

&lt;p&gt;Phase 4: Encrypted Handshake (Server Authentication)&lt;br&gt;
From this point on, all remaining handshake messages are encrypted — a major improvement over TLS 1.2, where the server certificate was sent in the clear.&lt;/p&gt;

&lt;p&gt;The server sends:&lt;/p&gt;

&lt;p&gt;EncryptedExtensions — non-critical extensions (hidden from eavesdroppers)&lt;br&gt;
Certificate — the server's X.509 certificate chain (the same PEM format our PEM certificate parser can decode)&lt;br&gt;
CertificateVerify — a digital signature over the entire handshake transcript, proving the server possesses the private key corresponding to the certificate's public key&lt;br&gt;
Finished — a MAC (message authentication code) over the entire handshake, ensuring no tampering occurred&lt;br&gt;
The client verifies:&lt;/p&gt;

&lt;p&gt;The certificate chain up to a trusted root CA&lt;br&gt;
The CertificateVerify signature using the certificate's public key&lt;br&gt;
The Finished MAC&lt;br&gt;
Crypto primitives involved: Digital signatures (RSA-PSS or Ed25519/ECDSA), SHA hashing for the transcript hash, HMAC for the Finished MAC.&lt;/p&gt;

&lt;p&gt;Phase 5: Client Authentication (Optional)&lt;br&gt;
In most web browsing, only the server is authenticated. But in mutual TLS (mTLS), the client also sends a certificate and CertificateVerify. This is common in API-to-API communication, zero-trust architectures, and enterprise environments.&lt;/p&gt;

&lt;p&gt;Phase 6: Application Data&lt;br&gt;
The handshake is complete. Both sides now use the negotiated symmetric cipher (AES-256-GCM, AES-128-GCM, or ChaCha20-Poly1305) to encrypt all application data. Each record is independently encrypted with a unique nonce derived from the IV and a sequence number.&lt;/p&gt;

&lt;p&gt;Where Each Crypto Primitive Fits&lt;br&gt;
Here's the complete picture of how TLS combines every cryptographic primitive:&lt;/p&gt;

&lt;p&gt;Phase   Primitive   TLS 1.3 Usage   Our Tool&lt;br&gt;
Client Hello    Random generation   ClientRandom (32 bytes) Random Bytes&lt;br&gt;
Key Exchange    Elliptic curve DH   X25519 or P-256 key agreement   ECC Key Gen / ECDH&lt;br&gt;
Key Derivation  HMAC / HKDF All key schedule operations HMAC Generator&lt;br&gt;
Server Auth Digital signature   CertificateVerify (RSA-PSS / Ed25519 / ECDSA)   Digital Signature&lt;br&gt;
Server Auth Hash function   Transcript hash (SHA-256 / SHA-384) SHA Hash&lt;br&gt;
Server Auth X.509 certificate   Server identity proof   CSR Generator / PEM Parser&lt;br&gt;
Data Encryption AEAD cipher AES-256-GCM or ChaCha20-Poly1305    AES Encrypt&lt;br&gt;
TLS is not a single algorithm — it is a symphony of every primitive we've discussed across this blog. If you understand AES, RSA, ECC, SHA, and HMAC individually, TLS is where they all come together.&lt;/p&gt;

&lt;p&gt;TLS 1.2 vs TLS 1.3: What Changed&lt;br&gt;
Feature TLS 1.2 (2008)  TLS 1.3 (2018)&lt;br&gt;
Handshake round trips   2-RTT (full)    1-RTT (full), 0-RTT (resumption)&lt;br&gt;
Cipher suites   37+ (including RC4, 3DES, CBC)  3 (all AEAD)&lt;br&gt;
Key exchange    RSA, DH, ECDH, DHE, ECDHE   ECDHE only (mandatory forward secrecy)&lt;br&gt;
Handshake encryption    Server cert sent in clear   Entire handshake after ServerHello is encrypted&lt;br&gt;
RSA key transport   Supported   Removed — breaks forward secrecy&lt;br&gt;
CBC mode ciphers    Supported   Removed — vulnerable to padding oracle attacks&lt;br&gt;
Compression Supported (vulnerable to CRIME) Removed&lt;br&gt;
Renegotiation   Supported (complex, risky)  Removed&lt;br&gt;
Static DH   Supported   Removed — no forward secrecy&lt;br&gt;
Signature algorithms    Negotiated implicitly   Explicit signature_algorithms extension&lt;br&gt;
PSK resumption  Session IDs / tickets   PSK with (EC)DHE or alone&lt;br&gt;
The 1-RTT Handshake (TLS 1.3)&lt;br&gt;
Client                                    Server&lt;br&gt;
─────────────────────────────────────────────────────&lt;br&gt;
ClientHello (key_share + supported_groups)&lt;br&gt;
 ──────────────────────────────────────────→&lt;br&gt;
                                    ServerHello (key_share)&lt;br&gt;
                                    {EncryptedExtensions}&lt;br&gt;
                                    {Certificate}&lt;br&gt;
                                    {CertificateVerify}&lt;br&gt;
                                    {Finished}&lt;br&gt;
 ←──────────────────────────────────────────&lt;br&gt;
{Client Finished}&lt;br&gt;
 ──────────────────────────────────────────→&lt;br&gt;
[Application Data] ←──────────────────────→ [Application Data]&lt;br&gt;
Messages in {braces} are encrypted. The entire exchange after ServerHello is protected — an eavesdropper cannot see the server's certificate or what algorithms were actually used.&lt;/p&gt;

&lt;p&gt;The 0-RTT Resumption&lt;br&gt;
If the client has connected to the server before, it can send data in the very first message using a Pre-Shared Key (PSK) from the previous session:&lt;/p&gt;

&lt;p&gt;Client                                    Server&lt;br&gt;
─────────────────────────────────────────────────────&lt;br&gt;
ClientHello (key_share + PSK_identity + early_data)&lt;br&gt;
[Early Application Data] ← sent immediately!&lt;br&gt;
 ──────────────────────────────────────────→&lt;br&gt;
                                    ServerHello (PSK acceptance)&lt;br&gt;
                                    {EncryptedExtensions}&lt;br&gt;
                                    ...&lt;br&gt;
 ←──────────────────────────────────────────&lt;br&gt;
Tradeoff: 0-RTT data is not forward secret — if the PSK is compromised, the early data can be decrypted. It is also vulnerable to replay attacks — an attacker can capture and retransmit the 0-RTT message. For this reason, 0-RTT is only safe for idempotent requests (GET, HEAD) and should never be used for state-changing operations like payments or password changes.&lt;/p&gt;

&lt;p&gt;Forward Secrecy: Why It Matters&lt;br&gt;
Forward secrecy (or perfect forward secrecy, PFS) means that compromising a long-term private key does not compromise past session keys.&lt;/p&gt;

&lt;p&gt;In TLS 1.2 with static RSA key exchange, the server's RSA private key was used to decrypt the pre-master secret sent by the client. If an attacker recorded encrypted traffic and later obtained the server's RSA private key, they could decrypt all past sessions.&lt;/p&gt;

&lt;p&gt;In TLS 1.3, all key exchange uses ephemeral ECDH. The server generates a fresh ECDH key pair for every single connection. Even if the server's long-term signing key is compromised, past sessions remain secure because the ephemeral ECDH private keys were discarded immediately after use.&lt;/p&gt;

&lt;p&gt;Scenario    Static RSA (TLS 1.2)    Ephemeral ECDH (TLS 1.3)&lt;br&gt;
Server private key leaked   All past sessions decryptable   Past sessions remain secure&lt;br&gt;
Recording + later key compromise    Traffic exposed Traffic safe&lt;br&gt;
Per-session key independence    No  Yes&lt;br&gt;
This is why TLS 1.3 removed static RSA and static DH entirely — they cannot provide forward secrecy by design.&lt;/p&gt;

&lt;p&gt;Cipher Suites in Detail&lt;br&gt;
TLS 1.3 defines exactly three cipher suites. Each is an AEAD (Authenticated Encryption with Associated Data) algorithm:&lt;/p&gt;

&lt;p&gt;TLS_AES_128_GCM_SHA256&lt;br&gt;
Encryption: AES-128 in GCM mode&lt;br&gt;
Key size: 128 bits&lt;br&gt;
Nonce size: 96 bits (12 bytes)&lt;br&gt;
Authentication tag: 128 bits&lt;br&gt;
Hash: SHA-256 (for HKDF and transcript)&lt;br&gt;
Security level: 128-bit&lt;br&gt;
Best for: General-purpose web traffic; hardware-accelerated on most modern CPUs (AES-NI)&lt;br&gt;
TLS_AES_256_GCM_SHA384&lt;br&gt;
Encryption: AES-256 in GCM mode&lt;br&gt;
Key size: 256 bits&lt;br&gt;
Nonce size: 96 bits&lt;br&gt;
Authentication tag: 128 bits&lt;br&gt;
Hash: SHA-384&lt;br&gt;
Security level: 256-bit&lt;br&gt;
Best for: High-security applications; slightly slower than AES-128-GCM without hardware acceleration&lt;br&gt;
TLS_CHACHA20_POLY1305_SHA256&lt;br&gt;
Encryption: ChaCha20 stream cipher&lt;br&gt;
Key size: 256 bits&lt;br&gt;
Nonce size: 96 bits&lt;br&gt;
Authentication: Poly1305 MAC (128-bit tag)&lt;br&gt;
Hash: SHA-256&lt;br&gt;
Security level: 256-bit&lt;br&gt;
Best for: Devices without AES hardware acceleration (mobile phones, ARM servers); resistant to cache-timing attacks that affect AES&lt;br&gt;
All three provide authenticated encryption — meaning they simultaneously encrypt data for confidentiality and generate an authentication tag for integrity. This eliminates the need for a separate HMAC on the data (unlike TLS 1.2's CBC mode, which required encrypt-then-MAC or MAC-then-encrypt).&lt;/p&gt;

&lt;p&gt;For a deep dive into the symmetric algorithms, see our guides on AES-256 encryption and understand how AES compares to ChaCha20 in performance and security characteristics.&lt;/p&gt;

&lt;p&gt;Certificate Authentication: The Trust Chain&lt;br&gt;
TLS 1.3 servers authenticate using X.509 certificates — the same certificates generated via our CSR generator and parseable by our PEM certificate parser.&lt;/p&gt;

&lt;p&gt;The certificate chain works like this:&lt;/p&gt;

&lt;p&gt;End-entity certificate — contains the server's public key and domain name, signed by a CA&lt;br&gt;
Intermediate CA certificate(s) — signed by the root CA, used to limit root CA exposure&lt;br&gt;
Root CA certificate — pre-installed in the client's trust store (browser or OS)&lt;br&gt;
The client verifies:&lt;/p&gt;

&lt;p&gt;Each certificate's signature using the issuer's public key&lt;br&gt;
Validity dates and domain names&lt;br&gt;
Revocation status (via OCSP or CRL)&lt;br&gt;
Certificate Transparency (CT) logs for public trust&lt;br&gt;
Certificate Types&lt;br&gt;
Type    Validation  Trust Level Use Case&lt;br&gt;
DV (Domain Validated)   Domain ownership only   Basic   Blogs, personal sites&lt;br&gt;
OV (Organization Validated) Business identity + domain  Medium  Business websites&lt;br&gt;
EV (Extended Validation)    Rigorous business verification  Highest Banking, e-commerce&lt;br&gt;
For more on how certificates are requested and signed, see our guide on Certificate Signing Requests.&lt;/p&gt;

&lt;p&gt;Practical TLS Configuration&lt;br&gt;
Server-Side Recommendations&lt;br&gt;
For nginx:&lt;/p&gt;

&lt;p&gt;ssl_protocols TLSv1.2 TLSv1.3;&lt;br&gt;
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;&lt;br&gt;
ssl_prefer_server_ciphers off;  # Let the client choose&lt;br&gt;
ssl_ecdh_curve X25519:secp256r1:secp384r1;&lt;br&gt;
ssl_session_timeout 1d;&lt;br&gt;
ssl_session_cache shared:SSL:50m;&lt;br&gt;
ssl_stapling on;&lt;br&gt;
ssl_stapling_verify on;&lt;br&gt;
For Apache:&lt;/p&gt;

&lt;p&gt;SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1&lt;br&gt;
SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305&lt;br&gt;
SSLHonorCipherOrder off&lt;br&gt;
What to Avoid&lt;br&gt;
Deprecated / Dangerous  Why&lt;br&gt;
TLS 1.0 / 1.1   No AEAD, vulnerable to BEAST, POODLE, Lucky13&lt;br&gt;
RSA key exchange    No forward secrecy&lt;br&gt;
CBC mode ciphers    Padding oracle vulnerabilities&lt;br&gt;
RC4, 3DES, DES  Known cryptographic weaknesses&lt;br&gt;
SHA-1 for signatures    Collision attacks demonstrated&lt;br&gt;
Export-grade ciphers    Intentionally weak (FREAK, Logjam)&lt;br&gt;
Compression CRIME / BREACH attacks&lt;br&gt;
Testing Your Configuration&lt;br&gt;
SSL Labs Server Test — comprehensive grade (A+ to F) for your TLS setup&lt;br&gt;
testssl.sh — command-line tool that checks for vulnerabilities and misconfigurations&lt;br&gt;
cryptcheck.fr — quick grade-based assessment&lt;br&gt;
TLS Beyond HTTPS&lt;br&gt;
While HTTPS is the most visible use case, TLS also protects:&lt;/p&gt;

&lt;p&gt;Protocol    Over TLS?   Description&lt;br&gt;
HTTPS   Yes (port 443)  Web browsing&lt;br&gt;
SMTPS   Yes (port 465/587)  Email submission&lt;br&gt;
IMAPS   Yes (port 993)  Email retrieval&lt;br&gt;
FTPS    Yes (port 990)  File transfer&lt;br&gt;
MQTTS   Yes (port 8883) IoT messaging&lt;br&gt;
DNS over TLS    Yes (port 853)  Encrypted DNS resolution&lt;br&gt;
DNS over HTTPS  Yes (port 443)  DNS within HTTPS&lt;br&gt;
XMPP    Optional    Instant messaging&lt;br&gt;
IRC Optional (port 6697)    Chat&lt;br&gt;
Quantum Threats to TLS&lt;br&gt;
Current TLS 1.3 relies on two quantum-vulnerable primitives:&lt;/p&gt;

&lt;p&gt;ECDH key exchange — Shor's algorithm on a sufficiently large quantum computer could compute the shared secret from the exchanged public keys&lt;br&gt;
RSA/ECDSA signatures — Shor's algorithm could forge CertificateVerify signatures&lt;br&gt;
Post-quantum TLS is being actively standardized:&lt;/p&gt;

&lt;p&gt;ML-KEM (Kyber) for key exchange — replaces or supplements ECDH&lt;br&gt;
ML-DSA (Dilithium) or SLH-DSA (SPHINCS+) for signatures — replaces RSA/ECDSA&lt;br&gt;
Hybrid modes (e.g., X25519 + ML-KEM-768) provide dual security: even if one algorithm is broken, the other still protects the session&lt;br&gt;
Major browsers (Chrome, Firefox) have already experimented with hybrid key exchange using X25519 + Kyber (now ML-KEM). See our Post-Quantum Cryptography guide for the full picture.&lt;/p&gt;

&lt;p&gt;Troubleshooting Checklist&lt;br&gt;
If your TLS connection is failing or showing warnings:&lt;/p&gt;

&lt;p&gt;Certificate expired — check notAfter date in the server certificate&lt;br&gt;
Wrong hostname — certificate CN/SAN must match the requested domain&lt;br&gt;
Incomplete chain — server must send intermediate certificates (not just the leaf)&lt;br&gt;
Protocol mismatch — client requires TLS 1.3 but server only supports TLS 1.2&lt;br&gt;
Cipher suite mismatch — no common cipher suite between client and server&lt;br&gt;
Revoked certificate — check OCSP stapling or CRL distribution&lt;br&gt;
Self-signed certificate — client must explicitly trust the certificate or its CA&lt;br&gt;
HSTS preload — if the domain is in the HSTS preload list, HTTP will be rejected&lt;br&gt;
Frequently Asked Questions&lt;br&gt;
What is the difference between TLS and SSL?&lt;br&gt;
TLS (Transport Layer Security) is the successor to SSL (Secure Sockets Layer). SSL was the original protocol developed by Netscape in the 1990s. When the IETF standardized it, they renamed it TLS. TLS 1.0 was essentially SSL 3.1. All modern implementations use TLS — SSL 2.0 and 3.0 are deprecated and insecure. When people say "SSL certificate," they actually mean a TLS certificate.&lt;/p&gt;

&lt;p&gt;Does TLS use symmetric or asymmetric encryption?&lt;br&gt;
Both. TLS uses asymmetric encryption (ECDH + digital signatures) during the handshake to securely exchange keys and authenticate identities. Then it switches to symmetric encryption (AES-GCM or ChaCha20-Poly1305) for the actual data transfer, because symmetric encryption is roughly 100–1000x faster for bulk data. This hybrid design gives you the best of both worlds: the key distribution advantages of asymmetric crypto and the performance of symmetric crypto.&lt;/p&gt;

&lt;p&gt;What is forward secrecy and why does TLS 1.3 require it?&lt;br&gt;
Forward secrecy means that even if a long-term private key is compromised in the future, past session keys remain secure. TLS 1.3 achieves this by using ephemeral ECDH for every connection — the server generates a fresh key pair each time and discards the private key after the session. This prevents an attacker who records encrypted traffic from decrypting it later, even if they obtain the server's certificate private key.&lt;/p&gt;

&lt;p&gt;What is 0-RTT and is it safe?&lt;br&gt;
0-RTT (Zero Round-Trip Time) allows a returning client to send data in the very first message using a pre-shared key from a previous session. It reduces latency but comes with two caveats: (1) 0-RTT data is not forward secret, and (2) it is vulnerable to replay attacks — an attacker can capture and retransmit the 0-RTT message. Use 0-RTT only for idempotent requests like GET.&lt;/p&gt;

&lt;p&gt;Which cipher suite should I prefer?&lt;br&gt;
For most use cases, TLS_AES_256_GCM_SHA384 provides the strongest security. On mobile devices or CPUs without AES hardware acceleration, TLS_CHACHA20_POLY1305_SHA256 may be faster while still providing 256-bit security. TLS_AES_128_GCM_SHA256 is perfectly adequate for general web traffic and is the most commonly negotiated suite.&lt;/p&gt;

&lt;p&gt;Can TLS 1.3 be broken by quantum computers?&lt;br&gt;
Not yet — but a large enough quantum computer running Shor's algorithm could break the ECDH key exchange and RSA/ECDSA signatures that TLS 1.3 relies on. The solution is post-quantum TLS using algorithms like ML-KEM (Kyber) for key exchange and ML-DSA (Dilithium) for signatures. Hybrid modes combining classical and post-quantum algorithms are already being tested in Chrome and Firefox.&lt;/p&gt;

&lt;p&gt;Further Reading&lt;br&gt;
RFC 8446 — The Transport Layer Security (TLS) Protocol Version 1.3 — The definitive specification&lt;br&gt;
RFC 8996 — Deprecating TLS 1.0 and TLS 1.1 — Official deprecation of legacy versions&lt;br&gt;
RFC 5869 — HMAC-based Extract-and-Expand Key Derivation Function (HKDF) — The key derivation mechanism used by TLS 1.3&lt;br&gt;
The Illustrated TLS 1.3 Connection — Byte-by-byte walkthrough of every handshake message&lt;br&gt;
SSL Labs — TLS Deployment Best Practices — Mozilla's recommended configurations&lt;br&gt;
NIST SP 800-52 Rev. 2 — Guidelines for TLS Implementations — U.S. government TLS requirements&lt;br&gt;
CA/Browser Forum — Baseline Requirements — Certificate issuance standards&lt;br&gt;
ACME Protocol (RFC 8555) — Automated Certificate Management (Let's Encrypt)&lt;br&gt;
Related Articles&lt;br&gt;
AES-256 Encryption — The symmetric cipher that encrypts most TLS 1.3 data traffic&lt;br&gt;
Elliptic Curve Cryptography (ECC) — The math behind ECDH key exchange and ECDSA signatures in TLS&lt;br&gt;
RSA-2048 Encryption — Still used in some TLS certificate signatures, though being phased out&lt;br&gt;
How Digital Signatures Work — The CertificateVerify message that proves server identity&lt;br&gt;
HMAC Message Authentication — The building block of HKDF, which derives all TLS session keys&lt;br&gt;
Post-Quantum Cryptography — The future of TLS in a quantum computing world&lt;/p&gt;

</description>
      <category>tls</category>
      <category>cryptography</category>
      <category>security</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
