← Back to section · Digital Security

Anatomy of an X.509 Certificate: What Is Actually Inside

Version, serial number, subject and issuer, validity, the public key — plus the v3 extensions where SAN, key usage and basic constraints live. A field-by-field tour of what each part does during validation.

Published 22 November 2026 · 6 min read · PQ Frontier

Anatomy of an X.509 Certificate: What Is Actually Inside
AI-generated site artwork
Video explainer · PKI: Certificates and Trust Chains

You interact with X.509 certificates every day — behind every HTTPS connection, every S/MIME email, every signed software package. The wire format (DER-encoded ASN.1) is not human-friendly, but the semantic structure is tidy: a certificate is a statement endorsed by an issuer’s signature, and the statement says “this identity holds this public key”, together with a set of qualifications on that binding. Taken field by field, every element has a specific job in path validation.

The trunk: fixed fields of the TBSCertificate

A certificate has three outer parts: the TBSCertificate (“to be signed”), the signature algorithm identifier, and the signature value. Everything that matters sits in the first part:

  • Version — v3 is universal today, because only v3 supports extensions;
  • Serial number — a positive integer unique per issuer; revocation lists and OCSP queries reference certificates by it. Rules require it to be sufficiently unpredictable, so attackers cannot rehearse an issuance flow and pre-compute a forged certificate;
  • Issuer and Subject — X.500-style distinguished names (DNs) assembled from country, organization, common name and similar attributes. Website identity historically lived in the Subject’s Common Name (CN), but CN matching rules were ambiguous and it has been deprecated: modern browsers look only at the SAN extension, and CN survives as display text;
  • Validity — a not-before and not-after instant; the validation time must fall inside;
  • Subject public key info — an algorithm identifier plus the key itself. In an RSA certificate this holds a modulus and exponent, in ECDSA a point on a curve, in a post-quantum certificate the byte string of an ML-DSA key — the size differences start exactly here;
  • Unique identifiers — optional issuer/subject unique IDs, a legacy of early design that modern certificates essentially never use.

v3 extensions: where the semantics live

Extensions are a list of “OID = value” pairs, each with a criticality flag: a verifier that does not recognize a critical extension must reject the certificate, while an unrecognized non-critical one may be ignored. The load-bearing entries:

  • Subject Alternative Name (SAN) — the authoritative list of identities: DNS names, IP addresses, email addresses, URIs. Wildcards are permitted only as the complete leftmost label (*.example.com matches a.example.com, but neither a.b.example.com nor example.com itself);
  • Basic Constraints — declares whether the certificate is a CA certificate and how many CA levels may follow below it. Leaves say “no”; an intermediate’s path-length constraint is the superior’s main tool for limiting a subordinate’s expansion;
  • Key Usage — a bit-string permission list: digital signature, key encipherment, certificate signing and CRL signing each have their own bit. A CA certificate missing the certificate-signing bit produces invalid children at validation time;
  • Extended Key Usage (EKU) — refines usage by scenario: server authentication, client authentication, code signing and timestamping have distinct OIDs. A certificate can be cryptographically impeccable and still unusable for the task at hand because its EKU is wrong;
  • Authority and Subject Key Identifiers (AKI/SKI) — short hashes of public keys that let a verifier quickly pick the right issuer among candidates — an index for chain building;
  • Pointers (AIA and CRL Distribution Points) — the Authority Information Access extension says where to download the issuer’s certificate and where to query OCSP; the CRL distribution point names where this certificate’s revocation list lives. When a server omits intermediates, clients that support AIA chasing can complete the chain themselves.

Encoding, fingerprints and certificate policies

On the wire a certificate is DER-encoded binary — DER is the deterministic flavour of ASN.1 encoding, guaranteeing one exact byte representation per content, which is what makes signatures verifiable at all. The PEM format you see in text files is nothing more than that same DER, Base64-encoded between header and footer lines. The “certificate fingerprint” of operations folklore is a hash (today usually SHA-256) over the certificate’s complete DER bytes, uniquely identifying the certificate itself, used for out-of-band comparison and pinning. It must not be confused with a public-key fingerprint (a hash over the public-key info), which survives certificate renewal when the key is reused — establishing which of the two someone means at the start of an incident saves a great deal of confusion.

One more extension is easily skipped and should not be: Certificate Policies, which lists the policy OIDs under which the issuer issued the certificate. In the public ecosystem, policy OIDs distinguish validation levels — domain validation (DV), organization validation (OV) and extended validation (EV) each carry CA/B Forum-assigned OIDs — and root programs and auditors use them to check that a CA actually validated at the level it claims. In enterprise and government PKIs, policy OIDs also feed path validation’s policy processing: a verifier may require every certificate in the chain to assert a given policy OID (or one mapped as equivalent), rejecting the chain otherwise. This is the mechanized way to express “the other domain’s checking must meet my level N” in cross-domain trust — the same language as the bridge policy mapping discussed in “CA Hierarchies and Trust Chains”.

Watching the fields work together

When a browser receives a leaf certificate, the fields cooperate like this: the SAN is checked for the requested hostname; the AKI locates the issuer and the chain is built upward, each level re-checked for signature, validity, Basic Constraints and key usage; the leaf’s EKU must contain server authentication; finally, revocation is checked using the locations the AIA and distribution-point extensions provide. When any cell in this grid fails, the error message points at that field — “certificate name mismatch” is a SAN problem, “certificate not trusted” is usually a chain or basic-constraints problem, “certificate expired” is the validity window. With the anatomy in mind, troubleshooting becomes targeted rather than guesswork.

Post-quantum migration changes only the size and algorithm identifiers of the public-key and signature fields: ML-DSA has its own OID, and composite-certificate drafts add an alternate key and alternate signature inside extensions. The X.509 skeleton has not fundamentally changed in three decades, and it will likely survive another algorithm generation — provided practitioners actually understand what each of its fields is saying.

Sources and further reading

Tags: X.509certificatesPKIASN.1