A digital certificate is an electronic document that binds a public key to an identity, such as a domain name, organisation or person, and is signed by a trusted certificate authority.
How digital certificates work
Most certificates follow the X.509 standard, profiled for the internet in RFC 5280. A certificate contains the subject’s name (for websites, the domain names in the Subject Alternative Name field), its public key, the issuer, a serial number, the validity period and the issuer’s digital signature. Browsers and operating systems verify a chain of trust: the server’s certificate is signed by an intermediate CA, which is signed by a root CA stored in the trust store. If the chain, name or dates do not check out, the connection is rejected.
Common types include TLS server certificates for TLS and HTTPS, code-signing certificates for software, S/MIME certificates for email and client certificates for device or user authentication. Certificates can be revoked through CRLs or OCSP, and Certificate Transparency logs (RFC 6962) publicly record every TLS certificate that is issued.
Why certificates matter for security
Certificates are the foundation of trust on the web, which makes them attractive to attackers:
- Compromised CAs – in 2011 hackers broke into the Dutch CA DigiNotar and issued a fraudulent certificate for google.com, used to spy on users in Iran; DigiNotar went bankrupt.
- Stolen code-signing certificates – Stuxnet drivers were signed with certificates stolen from two Taiwanese hardware companies.
- Phishing – free, automated issuance means a padlock proves only domain control, not that a site is honest.
Best practices
- Automate issuance and renewal with ACME (Let’s Encrypt or commercial certificate authorities), as maximum lifetimes keep shrinking.
- Keep an inventory of certificates and monitor Certificate Transparency logs for your domains.
- Protect private keys and code-signing keys in HSMs, and revoke immediately after compromise.