Course contentsShow
← Security
Lesson 185 of 3,0524. Asymmetric Cryptography and PKIFree lesson

Name Constraints and Certificate Extensions

How name constraints, key usage, and extended key usage extensions restrict certificate validity.

Name Constraints and Certificate Extensions

What you'll learn: How special certificate extensions restrict where and how a certificate can be used.


What Are Certificate Extensions?

X.509 certificates can include extensions that add rules beyond the basic "who holds this public key" information. Think of extensions as special clauses in a contract that limit what the certificate holder can and cannot do.

Name Constraints Extension

Name Constraints are like property boundaries for intermediate CA certificates. When a CA issues an intermediate certificate with name constraints, it's saying "you can only issue certificates for these specific domains or organizations—nothing else."

Example scenario: A company CA might issue an intermediate certificate to its European division with a name constraint limiting issuance to *.eu.company.com. That intermediate CA physically cannot issue valid certificates for us.company.com—validators will reject them.

This prevents CA compromise from becoming catastrophic. Even if the European intermediate is hacked, attackers can't issue certificates for the entire internet.

Key Usage Extension

The Key Usage extension specifies what cryptographic operations a certificate's key can perform:

  • digitalSignature - signing data
  • keyEncipherment - encrypting symmetric keys (RSA)
  • keyCertSign - signing other certificates (CA certificates)
  • cRLSign - signing certificate revocation lists

Extended Key Usage Extension

Extended Key Usage (EKU) goes further, specifying application-level purposes:

  • serverAuth - TLS/SSL server certificates
  • clientAuth - TLS/SSL client certificates
  • codeSigning - signing software
  • emailProtection - S/MIME email encryption

A certificate marked for serverAuth only should be rejected if presented for code signing, even if the signature is mathematically valid.


Key Takeaway: Certificate extensions like name constraints, key usage, and extended key usage create guardrails that prevent certificates from being misused outside their intended scope, reducing the damage from compromise or misuse.