What is a Digital Certificate?

Technology — James William Steven Parker

A digital certificate is a digitally signed data structure used to associate a public cryptographic key with an identity, domain, device or other subject according to a defined trust model. In widely used public-key infrastructure systems, a certificate is commonly issued by a certificate authority and contains information such as the subject, public key, issuer, validity period, serial number and cryptographic signature of the issuer.

X.509 is the principal certificate format used in technologies such as TLS, although certificates can also exist in other formats and specialised trust systems. The certificate itself does not contain the corresponding private key. Its purpose is to allow another party to obtain a public key and determine, according to the relevant validation rules, whether that key is associated with the claimed subject.

The central problem addressed by digital certificates is public-key authentication. Public-key cryptography allows someone to publish a public key while keeping a private key secret, but merely publishing a key does not inherently tell users whose key it is. An attacker could publish a different public key while claiming it belongs to a trusted website or organisation. A certificate addresses this identity-binding problem by having a trusted issuer digitally sign information that associates a public key with a subject. During a TLS connection, for example, a server can provide a certificate containing its public key and identity information. The client validates the certificate chain and other requirements before relying on the key for the protocol's authentication process.

X.509 certificates contain several important fields and extensions. The subject identifies the entity to which the certificate relates, although modern TLS certificates commonly rely on the Subject Alternative Name extension for DNS names and other identifiers rather than relying solely on the historical Common Name field. The issuer identifies the certificate authority or issuing entity. The validity period specifies the not-before and not-after times. The public-key field identifies the key and algorithm.

A serial number provides an identifier assigned by the issuer. Extensions can specify permitted purposes, subject names, constraints, key usage and extended key usage. The certificate also contains the issuer's digital signature, allowing validators to verify that the certificate was signed by the claimed issuer and has not been altered.

Certificate validation involves more than checking whether a signature mathematically verifies. A client may construct a chain from the end-entity certificate through one or more intermediate certificates to a trusted root certificate. The root is typically trusted because it is included in a trust store maintained by an operating system, browser, application or organisation. Validation can include checking signatures, validity periods, subject names, key-usage constraints, basic constraints, certificate policies and revocation information. For TLS, hostname validation is particularly important because a certificate can be cryptographically valid yet not valid for the website being contacted. Certificate validation therefore combines cryptography with policy and trust-store decisions.

Certificates are used in many contexts. TLS certificates authenticate websites and services and support establishment of secure connections. Client certificates can authenticate users or devices in mutual TLS environments. Code-signing certificates can support software publisher authentication. Email certificates can be used with S/MIME to authenticate senders and encrypt messages. Certificates can also identify network devices, services and systems in enterprise environments. Different certificate profiles have different required extensions and validation procedures. A certificate intended for a web server should not automatically be treated as suitable for code signing or client authentication because key-usage and extended-key-usage constraints can restrict its legitimate purposes.

Certificate authorities play a central role in many public trust systems. A root certificate authority can issue intermediate certificates, which in turn issue end-entity certificates. This hierarchy allows root private keys to be kept under particularly strong protection while intermediates perform routine issuance. Certificates can be revoked before their natural expiry if keys are compromised or other circumstances require it.

Revocation information may be distributed through mechanisms such as certificate revocation lists or Online Certificate Status Protocol, although modern systems increasingly use additional approaches such as short-lived certificates to reduce dependence on real-time revocation checking. Certificate transparency systems also provide publicly auditable records for many publicly trusted TLS certificates, helping detect certain forms of inappropriate issuance.

A certificate does not guarantee that the subject is trustworthy in every respect. It establishes a cryptographically validated binding according to the issuer's validation procedures and certificate policy. The level of identity verification can vary substantially between certificate types. A domain-validation TLS certificate generally demonstrates control of a domain rather than proving the legal identity of a particular organisation to the same degree as more extensive validation processes. Certificates can also expire, be revoked, be issued with incorrect information or be compromised through attacks against private keys or certificate authorities. Applications must therefore validate certificates correctly rather than merely checking whether a certificate exists.

Digital certificates are frequently confused with digital signatures, encryption keys and certificate authorities. A certificate is a signed container that carries a public key and associated information. A digital signature is the cryptographic result produced when a signer uses a private key to sign data. A certificate authority is an entity or system that issues or signs certificates. A public-key infrastructure is the broader collection of policies, authorities, certificates, repositories, software and procedures used to manage public-key trust. Certificates therefore provide an important bridge between cryptographic keys and identities, allowing public-key systems to operate at organisational and internet scale without requiring every participant to establish a separate direct trust relationship with every other participant.