How do SSL/TLS certificates prove who a website is?

The short answer

A TLS (Transport Layer Security) certificate is a website's digital ID: it proves the server holds the private key for a domain name, but never that the people behind that name are honest.

Animated diagram: How do SSL/TLS certificates prove who a website is?

TLS certificate

An SSL/TLS (Secure Sockets Layer / Transport Layer Security) certificate is a website’s digital ID. It’s where the padlock in your browser comes from. A certificate authority (CA) checks the request and signs the certificate. The basic kind, a domain-validated (DV) certificate, proves only one thing: who controls a domain name.

That’s why the padlock proves less than people think. Google says nearly all phishing sites use HTTPS (Hypertext Transfer Protocol Secure), so they show the lock icon too. In 2023, Chrome 117 swapped the padlock for a different icon on desktop and Android and removed it on iOS. Other kinds, OV (Organization Validation) and EV (Extended Validation) certificates, also carry an organization’s identity. The DV kind does not.

What a certificate authority actually checks

The ACME (Automatic Certificate Management Environment) protocol describes how the check works. The CA gives the owner a random token. The owner joins the token to a thumbprint of their account key. The result is called the key authorization. The owner then publishes it in one of two ways. With http-01, it’s served as a file under /.well-known/acme-challenge/ on port 80. With dns-01, a SHA-256 (Secure Hash Algorithm 256) hash of it goes into a DNS (Domain Name System) TXT record named _acme-challenge.

The CA then fetches the value from several network locations. This is called Multi-Perspective Issuance Corroboration. With two to five remote locations, one is allowed to disagree. If more disagree, nothing is issued. Next, the certificate is recorded in public Certificate Transparency (CT) logs before final issuance. Chrome rejects any certificate that isn’t logged. Last, the CA signs the site’s names, its public key and a validity period of at most 200 days.

How the certificate proves the server on every visit

  1. The server sends it. When you connect, the server sends its certificate in the TLS 1.3 handshake, in the Certificate message.
  2. The server signs the handshake. Right after, it signs the handshake so far with its matching private key. This is the CertificateVerify message.
  3. The browser follows the chain. It checks the signatures up to a root certificate it trusts, kept in the browser’s or the operating system’s root store.
  4. The browser checks dates and name. The certificate must be inside its validity dates. The address you visit must match a name listed inside it, in the subjectAltName field.

Anyone can copy a certificate. Only the real server holds the private key, so only it can make that signature. The result is proof that you reached whoever holds the name. In 2011, a hacked Dutch CA, DigiNotar, issued a fake Google certificate. It was shown to about 300,000 IP (Internet Protocol) addresses, mostly in Iran, before browser makers distrusted the CA.

A padlock is not a trust badge

Many people read the padlock as a sign that a site is safe. It isn’t. A certificate proves who holds a name, never that the name is honest. Phishing gangs get free DV certificates too. The Silent Librarian group used free Let’s Encrypt certificates for its phishing pages. So a name like mybank-secure-login.com can show the same icon as your real bank.

What to do

  • Read the domain name before you type a password. Don’t rely on the icon.
  • Treat the padlock as proof of the name only, never as proof that the site is honest.
  • Watch for long names that only borrow your bank’s name, like mybank-secure-login.com.
  • If you run a website, plan to renew its certificate, since it can last at most 200 days.

#TLSCertificate#SSLCertificate#HTTPS#TLS#CertificateTransparency#Phishing#PKI#CyberSecurity#InfoSec

Watch it in 60 seconds