You type hdfcbank.com and a page comes back. On the way, it passed through your Wi-Fi router, your internet provider and a dozen machines you’ll never see. Any of them could have read it, changed it, or answered in HDFC’s place. TLS is the reason none of them can.
It’s the “s” in https and the padlock in your address bar. It rests on a small group of companies that vouch for websites, and in October 2026 one of them, India’s eMudhra, got a single number wrong.
01The job
Three promises in every https:// link
Most people think TLS means encryption. That’s one third of it.
Youphone or laptop
Anyone betweenWi-Fi, ISP, routers
HDFC Bankits server
Without TLSRead itYour password and balance, in plain text.TLS answer: Encryption
Without TLSChange itThe account number in your transfer, on its way to the bank.TLS answer: Integrity
Without TLSPretend to be the bankAnswer for HDFC with a login page of their own.TLS answer: Authentication
Every request crosses machines you don’t control. TLS gives one answer to each of the three things they could do.
Encryption stops anyone in between from reading what you send. Integrity means that if anyone changes a single bit in transit, your browser notices and drops the connection. Authentication proves the server you reached is really the one you asked for.
The third promise is the one people forget, and it matters most. Encryption with the wrong party is worthless: if an attacker can pose as HDFC, you’ll happily set up a perfectly encrypted connection with them and type in your password. Most of TLS’s complexity, including certificates and the companies that issue them, exists to keep that promise.
02The names
SSL and TLS are the same idea, thirty years apart
SSL is the original. TLS is what your browser actually uses today.
Netscape built SSL (Secure Sockets Layer) in the mid-1990s so people could shop online. When the Internet Engineering Task Force took over the standard in 1999, it renamed it TLS (Transport Layer Security). TLS 1.0 was essentially SSL 3.1 with a new name.
Version
Year
Status today
SSL 2.0
Year:1995
Status today:Banned since 2011 (RFC 6176)
SSL 3.0
Year:1996
Status today:Broken by the POODLE attack in 2014, banned in 2015 (RFC 7568)
TLS 1.0
Year:1999
Status today:Deprecated in 2021 (RFC 8996)
TLS 1.1
Year:2006
Status today:Deprecated in 2021 (RFC 8996)
TLS 1.2
Year:2008
Status today:Still widely used and safe when configured well
TLS 1.3
Year:2018
Status today:Current. Faster handshake, weak options removed (RFC 8446)
No browser has spoken SSL for years, yet everyone still says “SSL certificate”. It’s a habit, not a technical choice. The certificate isn’t tied to a protocol version anyway: the same certificate works with TLS 1.2 and 1.3. In this guide, “TLS” means the protocol and “certificate” means the thing hosting companies sell as an “SSL certificate”.
03The building blocks
Two kinds of keys, each with one weakness
TLS uses a slow, clever lock to agree on a fast, simple one.
Symmetric keys: one key locks and unlocks
Think of a locker with one key. Whoever has a copy can open it. In TLS this is AES or ChaCha20, and it’s fast enough that most modern processors have instructions built specifically for AES. It encrypts everything you actually send: pages, images, form data.
Its weakness: both sides need the same key, and you can’t just send it over the network, because the network is exactly who you don’t trust.
Asymmetric keys: a pair that work together
Here each side has a key pair. The public key can be shown to anyone. The private key never leaves its owner. They’re mathematically linked, but you can’t work out the private key from the public one. TLS uses key pairs for two jobs:
Agreeing on a shared secret over a network someone is watching. Both sides end up with the same symmetric key, and the watcher can’t compute it.
Signing. Only the private key can make a signature, and anyone with the public key can check it. This is how a server proves who it is.
Its weakness: it’s slow. That’s why TLS uses key pairs only at the start, to agree on a symmetric key and prove identity, then switches to the fast symmetric key for the actual data.
How two strangers agree on a secret in public
The usual way to picture the key exchange (called Diffie-Hellman) is mixing paint:
Your browser and the server agree, in public, on a base colour: yellow.
Each picks a secret colour and never shares it. Browser: red. Server: blue.
Each mixes its secret into the yellow and sends the result. Anyone watching sees yellow, orange and green go past.
Each adds its own secret to the mix it received. Both end up with the same muddy brown: yellow + red + blue.
The watcher has every public piece but can’t un-mix paint to get red or blue. In real TLS the colours are points on an elliptic curve and “mixing” is multiplication, which is easy forwards and believed to be impossible backwards. HDFC’s server uses X25519, a curve designed for exactly this.
04Proving identity
A certificate is a public key with a signature on it
It answers one question: whose public key is this?
Key exchange alone doesn’t tell you who you’re talking to. An attacker can run a key exchange too. So the server also sends a certificate: a small file that binds a public key to a domain name, signed by a company your device already trusts.
It works like a passport. The passport carries your photo and name; the government’s stamp is what makes anyone believe it. In a certificate, the public key is the photo, the domain is the name, and a Certificate Authority’s signature is the stamp.
See one for yourself
Any public certificate can be downloaded by anyone. This command asks HDFC’s server for its certificate and prints the fields that matter. It works on macOS and Linux, and on Windows through WSL.
subject=C = IN, ST = Maharashtra, L = Mumbai, O = Hdfc Bank Limited, CN = www.hdfc.bank.inissuer=C = US, O = DigiCert Inc, OU = www.digicert.com, CN = GeoTrust TLS RSA CA G1notBefore=Jul 1 00:00:00 2026 GMTnotAfter=Jan 15 23:59:59 2027 GMTX509v3 Subject Alternative Name: DNS:www.hdfc.bank.in, DNS:hdfc.bank.in, DNS:hdfcbank.com, DNS:www.hdfcbank.com
Field
What it means
Subject
What it means:Who the certificate is for. Here, Hdfc Bank Limited in Mumbai.
Subject Alternative Name
What it means:The exact domains it’s valid for. Your browser checks the address bar against this list, not the subject. HDFC’s covers its new hdfc.bank.in domain and the old hdfcbank.com.
Issuer
What it means:Who signed it: GeoTrust TLS RSA CA G1, run by DigiCert.
Not before / not after
What it means:The validity window. HDFC’s is just under 200 days.
Public key
What it means:HDFC’s RSA key, 2048 bits. Breaking it means factoring a 617-digit number.
Signature
What it means:The issuer’s signature over all of the above. Change one character and it no longer verifies.
How a Certificate Authority checks you
A Certificate Authority (CA) won’t sign a certificate for a domain until you prove you control it. For most websites that check is automated and takes seconds. You either put a file with a random token at a set address on your site, or add a DNS record with that token. Only whoever controls the domain can do either.
Type
What the CA checks
Typical use
Domain Validated (DV)
What the CA checks:You control the domain. Nothing about who you are.
Typical use:Most sites, including every free Let’s Encrypt certificate
Organisation Validated (OV)
What the CA checks:The domain, plus that your company legally exists.
Typical use:Banks and large companies; HDFC’s is OV
Extended Validation (EV)
What the CA checks:A stricter version of the OV checks.
Typical use:Once showed a green bar with the company name; most browsers dropped it around 2019
05Trust
Your phone trusts a few roots, and everything hangs off them
Nobody checks HDFC directly. They check who vouched for HDFC, and who vouched for them.
Your browser has never seen HDFC’s certificate before, so how does it decide to trust it? It follows the signatures upward until it reaches one it already knows.
Root certificateDigiCert Global Root G2
Signed by
Itself
Lives in
The trust store on your phone, laptop and browser
Private key
Offline, in a hardware security module
signs the one below
Intermediate certificateGeoTrust TLS RSA CA G1
Signed by
DigiCert Global Root G2
Valid
November 2017 to November 2027
Job
Signs website certificates, day to day
signs the one below
Website (leaf) certificatewww.hdfc.bank.in
Signed by
GeoTrust TLS RSA CA G1
Valid
1 July 2026 to 15 January 2027
Key
RSA, 2048-bit
HDFC Bank’s certificate chain, as its server sent it on 24 October 2026. Your browser checks each signature from the bottom up until it reaches a root it already trusts.
Those known certificates are root certificates. Your operating system and browser ship with a curated list of them, owned by a few dozen organisations. Mozilla, Apple, Microsoft and Google each run a programme that audits every CA before adding its roots, and can remove them at any time. That list is called the trust store, or root store.
A root’s private key is the most valuable secret a CA owns. It sits offline in a hardware security module and is used rarely. The day-to-day signing is done by intermediate certificates, which the root signs. If an intermediate is compromised, it can be revoked without replacing the root on billions of devices.
What your browser checks, every time
The domain in your address bar appears in the certificate’s Subject Alternative Name list.
Today’s date is inside the validity window.
Each signature in the chain verifies with the public key of the certificate above it.
The chain ends at a root in the trust store.
None of the certificates has been revoked.
The server proved it holds the private key, by signing the handshake.
Fail any one and you get the full-page warning. Notice what this means: any CA in the trust store can sign a certificate for any domain. A chain is only as strong as the weakest CA your device trusts. Hold on to that; it’s the whole eMudhra story.
06Step by step
The handshake: seven messages before your page loads
Everything from the last three sections happens here, in about one network round trip.
Before a single byte of the page is sent, your browser and the server run a handshake: they agree on a cipher, exchange key halves, and the server proves its identity. Here’s the TLS 1.3 version, the one HDFC’s server used.
Your browserServer
ClientHello(Browser to server)
I speak TLS 1.3, here are the ciphers I support, I want www.hdfcbank.com, and here’s my half of a key exchange.
ServerHello(Server to browser)
Let’s use TLS_AES_256_GCM_SHA384. Here’s my half of the key exchange.
Both sides now hold the same secret keys. Everything below is encrypted.
EncryptedExtensions(Server to browser)
A few more settings, like which HTTP version we’ll speak.
Certificate(Server to browser)
My certificate, plus the intermediate that signed it.
CertificateVerify(Server to browser)
A signature over this whole conversation, made with my private key. This is the proof.
Finished(Server to browser)
A fingerprint of every message so far, so nothing was tampered with.
Finished(Browser to server)
Same from my side.
Application data(Both ways)
Your page, your login, your transfer.
A full TLS 1.3 handshake: one round trip before any data flows. Orange arrows are encrypted. Note that the certificate itself travels encrypted; in TLS 1.2 anyone watching could read it.
Watch it happen
curl prints each handshake message as it happens. This filters its output down to just those lines.
Your output may look different: the Mac’s built-in curl, for one, formats these lines its own way. Two new session tickets usually follow; the server sends them so a repeat visit can skip some of this work.
Reading the cipher name
TLS_AES_256_GCM_SHA384 looks like noise, but every part means something:
Part
What it does
AES_256
What it does:Encrypts the data with a 256-bit symmetric key, the one both sides just agreed on.
GCM
What it does:Attaches a tag to every record. Change one bit in transit and the tag fails to match, so the connection is dropped. This is the integrity promise.
SHA384
What it does:The hash used to turn the shared secret into the actual encryption keys.
07Real world
When the padlock breaks
Most failures are boring. A few have taken down companies.
The certificate expired
The most common failure by far, and it isn’t an attack. On 3 February 2020, Microsoft Teams went down for hours because a certificate behind its sign-in had expired. Expiry is a feature: it caps how long a stolen key or a mis-issued certificate stays useful. That’s also why lifetimes keep shrinking.
Issued from
Longest validity allowed
Before 15 March 2026
Longest validity allowed:398 days
15 March 2026
Longest validity allowed:200 days
15 March 2027
Longest validity allowed:100 days
15 March 2029
Longest validity allowed:47 days
That schedule is the CA/Browser Forum’s ballot SC-081, which every public CA follows. At 47 days, renewing by hand stops being realistic. Let’s Encrypt already issues 90-day certificates; this site’s current one runs from 22 September to 21 December, and renews itself.
The name doesn’t match
A certificate for www.example.com doesn’t cover example.com unless both are in the Subject Alternative Name list. It’s the second most common warning, usually after someone adds a new subdomain and forgets the certificate.
Nobody trusted vouches for it
A self-signed certificate is one that signs itself, like a passport you printed at home. Fine on your laptop for local development, rejected everywhere else. A related case: many company networks and some antivirus tools install their own root on your machine so they can decrypt and inspect your traffic. Your browser shows a padlock, because your device was told to trust that root.
A trusted CA signs something it shouldn’t
This is the dangerous one, because every check passes. In 2011, attackers broke into a Dutch CA called DigiNotar and issued themselves more than 500 certificates, including one for google.com. They were used to intercept Gmail users in Iran. Every major browser removed DigiNotar’s roots, and the company was bankrupt within weeks.
Two systems now limit the damage:
Certificate Transparency. Public CAs must record every certificate they issue in public, append-only logs, and Chrome and Safari reject most certificates that aren’t logged. Any certificate issued for your domain, by anyone, shows up there. You can search them at crt.sh.
Browser blocklists. Revocation through the CA itself is slow and unreliable, so browsers push their own lists of blocked certificates to every user: CRLSets in Chrome, OneCRL in Firefox. That’s how a bad certificate can be killed worldwide in hours.
08Case study
eMudhra: when a private key is the number 4
No break-in, no stolen files. Just keys small enough to guess.
eMudhra is an Indian Certificate Authority whose roots were in the trust stores of every major browser. On 30 April 2025 it generated 24 new intermediate certificates. Eight of them had private keys that were tiny numbers. On 17 October 2026 a researcher reported it to the browser makers.
Why a small key is no key at all
These were elliptic-curve keys on a curve called P-384. The private key is meant to be a random number up to 384 bits long, and the public key is that number multiplied by a fixed starting point on the curve. Multiplying is easy. Going back from the public key to the number is what’s believed to be impossible, but only because the number could be any one of about 10115 values.
A P-384 private key: any number from 1 up to about
The odds of guessing a properly random P-384 key are about one in the number above. For eMudhra’s keys, one in 255.
eMudhra’s keys were all below 256. The public keys sit in the certificates, which anyone can download. So recovering a private key meant multiplying the starting point by 1, then 2, then 3, and stopping at the match. The security researcher Scott Helme recovered keys of 4, 56 and 115 this way in under a second. It takes a few lines of Python:
Python, using the cryptography library
from cryptography import x509from cryptography.hazmat.primitives.asymmetric import eccert = x509.load_pem_x509_certificate(open("intermediate.pem", "rb").read())target = cert.public_key().public_numbers() # public, in the certificatefor d in range(1, 256): # every possible key below 256 guess = ec.derive_private_key(d, ec.SECP384R1()) if guess.public_key().public_numbers() == target: print("Private key is", d)
What someone holding that key could do
Go back to the chain. An intermediate’s private key is what signs website certificates. With it, an attacker could create a certificate for hdfcbank.com, or any other domain, with a key pair of their own. Every browser check passes: the name matches, the dates are fine, the signature verifies, the chain reaches a trusted root. Combine that with control of a Wi-Fi network or a DNS server and they can pose as the bank, padlock and all.
Six of the eight intermediates were for TLS; the other two could sign software, so malware could have carried a valid publisher signature.
What happened next
Date
Event
17 Oct 2026
Event:Reported. Chrome and Firefox block the eight certificates the same day.
18 Oct
Event:eMudhra revokes them.
19–20 Oct
Event:Apple, then Microsoft, block them.
20 Oct
Event:Mozilla publishes the incident and moves to remove eMudhra’s root from Firefox.
21 Oct
Event:eMudhra’s shares fall 20%, the day’s lower circuit limit.
22 Oct
Event:eMudhra announces it will leave the global TLS certificate business.
Google has also announced that Chrome will stop trusting eMudhra’s root, and says it’s reviewing the company’s other certificates.
eMudhra says a faulty script in its key ceremony created a second set of weak keys with labels similar to the real ones, and the weak set was picked by mistake. It says its systems weren’t breached and none of the eight issued certificates to customers. Both may be true, and the browsers acted anyway, because nobody can prove what happened to keys that were guessable for seventeen months. A certificate signed by eMudhra and one signed by an attacker using the same recovered key are indistinguishable. Once trust in a signature is gone, there’s no partial version of it.
09Your app
TLS in your own app: the parts that are on you
Your host handles the certificate. The ways to break it are all in your code.
Let the platform handle certificates
Vercel, Netlify, Cloudflare, Render and most other hosts issue and renew certificates for your domain automatically, usually through Let’s Encrypt. On your own server, Caddy does the same out of the box, and certbot adds it to nginx. With validity heading to 47 days, anything that relies on someone remembering to renew will eventually fail.
Never switch off certificate checks
This is the mistake AI coding tools make most often. You hit an error like self-signed certificate in certificate chain or unable to get local issuer certificate, ask for a fix, and get one of these. The error disappears, and so does the authentication promise: your app will now talk to anyone who answers, attacker included.
The real fix is almost always one of three: the server isn’t sending its intermediate certificate, the clock on your machine is wrong, or you’re behind a corporate proxy whose root certificate needs adding to your trust store.
Encrypt the connections users never see
The padlock covers the browser and your server. The hop from your server to its database, cache or payment API needs its own TLS. A common trap with Postgres:
Database connection string
# Encrypts, but doesn't check who answeredpostgresql://app:password@db.example.com:5432/app?sslmode=require# Encrypts and checks the certificate and hostnamepostgresql://app:password@db.example.com:5432/app?sslmode=verify-full
verify-full needs your database provider’s CA certificate, which most providers let you download. On Postgres 16 or newer clients, sslrootcert=system uses your machine’s trust store instead.
Force HTTPS, and tell browsers to remember
Redirect every http:// request to https://. Then send this header, so browsers go straight to https:// on future visits and an attacker can’t catch that first unencrypted request:
Only add includeSubDomains once every subdomain you own serves HTTPS, or the ones that don’t will stop loading.
Guard your private keys
If you ever handle certificate files yourself, the .key or .pem file holding the private key is the one secret all of this rests on. Keep it out of git, out of screenshots and out of chat messages. If it leaks, revoke the certificate and issue a new one with a fresh key.
Paste into your AI tool
Audit this codebase for TLS mistakes. 1) Find anything that turns off certificate verification: rejectUnauthorized: false, NODE_TLS_REJECT_UNAUTHORIZED, verify=False, curl -k or --insecure, InsecureSkipVerify, or any HTTP client set up to accept any certificate. 2) Check that every database, cache and third-party API connection uses TLS and verifies the server; for Postgres that means sslmode=verify-full. 3) Look for private keys or .pem, .key or .p12 files in the repo and in git history. 4) Find http:// URLs that should be https://, and check the site sends a Strict-Transport-Security header. For each finding, give the file and line, the risk in one sentence, and a proposed fix. Don’t change any code until I approve.
Search your domain on crt.sh. You should recognise every certificate listed. One you don’t is worth investigating.
Run the openssl command from section 04 against your own domain and check the names and dates.
Before you ship
Your TLS checklist
Tick these off once. Your progress is saved in this browser.
0 of 9 ticked
That’s TLS: a fast lock for the data, a clever one to agree on it, and a chain of signatures that ends at a list on your device. The maths has held up for decades. When it fails, it’s almost always the people and processes around the keys, as eMudhra just showed.
If you’d like a second pair of eyes on how your app handles security, that’s the kind of work Kalqore does.