KeyUsage, EKU and CA constraints
KeyUsage is nine bits
keyUsage (2.5.29.15) is a BIT STRING whose bits name the permitted cryptographic operations. The order is fixed by the specification and the first bit is digitalSignature.
| Bit | Name | Meaning |
|---|---|---|
| 0 | digitalSignature | Signing and verifying, including the TLS handshake |
| 1 | contentCommitment | Non-repudiation signatures (the old nonRepudiation) |
| 2 | keyEncipherment | Key transport, as in RSA key exchange |
| 3 | dataEncipherment | Encrypting data directly |
| 4 | keyAgreement | Key agreement such as ECDH |
| 5 | keyCertSign | Signing other certificates (CA only) |
| 6 | cRLSign | Signing CRLs |
| 7 | encipherOnly | Meaningful only with keyAgreement |
| 8 | decipherOnly | Meaningful only with keyAgreement |
A TLS server certificate usually asserts digitalSignature and, for RSA, keyEncipherment; an ECDSA certificate may use keyAgreement. For a CA certificate the important bits are keyCertSign and cRLSign.
EKU names the purpose
extendedKeyUsage (2.5.29.37) is a list of OIDs. Without serverAuth (1.3.6.1.5.5.7.3.1) a certificate is hard to use for TLS servers; clientAuth is for mutual TLS, codeSigning for executables, emailProtection for S/MIME, while timeStamping and OCSPSigning belong to those services alone.
- No EKU means no restriction, but public TLS policy requires serverAuth.
- anyExtendedKeyUsage (2.5.29.37.0) permits every purpose and blocks nothing.
- An EKU without serverAuth is reported here as a note.
Basic Constraints decides who is a CA
basicConstraints (2.5.29.19) holds a cA boolean and an optional pathLenConstraint integer. Only a certificate with cA true may issue others. pathLenConstraint caps the number of intermediate CAs beneath it.
Two mistakes are common: issuing a CA certificate without basicConstraints or with CA:FALSE, and leaving keyCertSign out of a CA certificate. Both fail validation at once. A CA without keyCertSign is critical here, and so is a certificate used as an issuer that is not a CA.
pathLen counts intermediate CAs only. End certificates are not counted, so a pathLen=0 intermediate issuing end certificates is correct.
Questions
If KeyUsage is absent, may the key do anything?
Technically there is no restriction, but current policy expects the extension. This tool marks a certificate without KeyUsage as a note.
What breaks when a CA certificate lacks keyCertSign?
It has no authority to sign other certificates, so anything it issued is rejected in validation. It is the first condition a chain verifier checks.
What does pathLen count?
The number of intermediate CAs allowed below that CA. pathLen=0 allows only end certificates; adding another intermediate violates it.
Expand the extensions to see KeyUsage bits, EKU and CA constraints as encoded.
Open the toolThis article follows RFC 5280 (X.509), RFC 6125 (host name verification), RFC 6960 (OCSP), RFC 7469 (HPKP), RFC 8555 (ACME) and the CA/Browser Forum Baseline Requirements. Every example certificate is synthetic, made for this site, and tied to no real domain.