skip to content

For an S/MIME mailbox certificate, which keyUsage bits and extended key usage make it fit for signing, for encryption, or for both?

level: middleimportance: must knowfreq 36%

answer

  1. two extensions, intersected
  2. signature bits versus key-management bits
  3. RSA transports, elliptic curves agree
  4. the email protection key purpose

basics

~20 s

Signing needs digitalSignature (nonRepudiation optional); encryption needs keyEncipherment for an RSA key or keyAgreement for an elliptic-curve key; dual use sets both. The extended key usage must include id-kp-emailProtection, and clients honour only what both extensions allow.

solid answer

~40 s

RFC 8550 (S/MIME 4.0) says a receiving agent MUST NOT accept a signature verified with a certificate whose `keyUsage` has neither `digitalSignature` nor `nonRepudiation`. For encryption the bit depends on the key: `keyEncipherment` means key transport, which an RSA key does by wrapping the content key; `keyAgreement` means a Diffie-Hellman style exchange, which an elliptic-curve key does with ECDH. The extended key usage must contain `id-kp-emailProtection` (RFC 8550 also accepts `anyExtendedKeyUsage`), and the usable purposes are the intersection of both extensions, so `digitalSignature` plus `emailProtection` signs but cannot encrypt. The CA/Browser Forum S/MIME Baseline Requirements 1.0.16 make both extensions mandatory, ban `anyExtendedKeyUsage`, limit the Strict generation's EKU to `id-kp-emailProtection`, and give EdDSA keys signature bits only.

code

plaintext · 4 lines
plaintext
subjectPublicKeyInfo: id-ecPublicKey, P-256
keyUsage (critical): digitalSignature, keyAgreement
extKeyUsage: id-kp-emailProtection
subjectAltName: [email protected]

go deeper

for a junior

Recall the pairs: digitalSignature for signing, keyEncipherment for RSA encryption, keyAgreement for elliptic-curve encryption, and id-kp-emailProtection as the mail key purpose.

for a middle

Explain why the key type decides the encryption bit, and walk through RFC 8550's intersection rule with an example that signs but cannot encrypt.

for a senior

Read a certificate extract and predict what correspondents' clients will do: verify, encrypt, both or reject, including EKUs that list only client authentication.

for a principal

Connect the profile to policy: which key types the organisation issues decides whether dual-use certificates are even possible, and that shapes recovery and renewal.

## Two extensions that restrict a key An X.509 certificate can limit what its public key may be used for in two places. The **key usage** extension (`keyUsage`) is a bit string of technical operations: signing, key transport, key agreement and so on. The **extended key usage** extension (`extKeyUsage`) is a list of application purposes, each an object identifier called a key purpose. RFC 8550, the S/MIME 4.0 certificate-handling specification, says the usable purposes are the **intersection** of the two. A mailbox certificate is therefore only as useful as the narrower of its two extensions. ## Key usage for signing For an S/MIME signature, the relevant bits are: - `digitalSignature`: the key verifies signatures other than on certificates and revocation lists. - `nonRepudiation`: the key verifies signatures meant as a commitment by the signer; later X.509 editions renamed it `contentCommitment`. RFC 8550 states the rule receivers enforce: an S/MIME receiving agent **MUST NOT accept** the signature of a message if it was verified with a certificate whose `keyUsage` has **neither** of those bits. If the certificate has no `keyUsage` extension at all, receivers **MUST presume** both bits are set. Either bit is enough; `nonRepudiation` is optional in the Baseline Requirements. ## Key usage for encryption An S/MIME message is encrypted with a fresh symmetric content key, and only that key is protected with the recipient's public key. How that is done depends on the key type, and so does the bit, as RFC 5280 defines them: - `keyEncipherment`: the public key encrypts another key, which is **key transport**. RSA keys do this. - `keyAgreement`: the public key takes part in a Diffie-Hellman style agreement. Elliptic-curve keys used with ECDH do this; the way the agreed secret wraps the content key is covered with enveloped data. - `dataEncipherment`: the key encrypts user data directly. RFC 5280 notes this is extremely uncommon, and S/MIME does not need it. ## The extended key usage The key purpose for mail is `id-kp-emailProtection` (OID 1.3.6.1.5.5.7.3.4). RFC 5280 lists the key usage bits that may be consistent with it: `digitalSignature`, `nonRepudiation`, and `keyEncipherment` or `keyAgreement`. RFC 8550 says that when `extKeyUsage` is present, an interpersonal-mail receiving agent **MUST check** that it contains `id-kp-emailProtection` or `anyExtendedKeyUsage`. A certificate whose extension lists only, say, `id-kp-clientAuth` is not a mail certificate. If `extKeyUsage` is absent, `keyUsage` alone decides. ## Profiles side by side The CA/Browser Forum S/MIME Baseline Requirements (1.0.16, 28 September 2026) turn this into fixed profiles for publicly trusted certificates. `keyUsage` SHALL be present and other bits SHALL NOT be set: | Key type | Signing only | Key management only | Dual use | |---|---|---|---| | RSA | `digitalSignature` (+ optional `nonRepudiation`) | `keyEncipherment` | `digitalSignature` + `keyEncipherment` | | Elliptic curve (P-256, P-384, P-521) | `digitalSignature` (+ optional `nonRepudiation`) | `keyAgreement` | `digitalSignature` + `keyAgreement` | | EdDSA (Ed25519, Ed448) | `digitalSignature` (+ optional `nonRepudiation`) | not available | not available | | ML-DSA | `digitalSignature` (+ optional `nonRepudiation`) | not available | not available | | ML-KEM | not available | `keyEncipherment` only | not available | For `extKeyUsage`, which SHALL be present: 1. **Strict** generation: `id-kp-emailProtection` and nothing else. 2. **Multipurpose and Legacy**: `id-kp-emailProtection` required, `id-kp-clientAuth` allowed; other values only in certificates issued before 1 July 2027. 3. Every generation: `id-kp-serverAuth`, `id-kp-codeSigning`, `id-kp-timeStamping` and `anyExtendedKeyUsage` SHALL NOT be present. So `anyExtendedKeyUsage`, which RFC 8550 receivers accept, is never in a publicly trusted S/MIME certificate. The Multipurpose and Legacy profiles also allow `dataEncipherment` beside RSA key management; Strict does not. ## Reading an extract ```plaintext subjectPublicKeyInfo: rsaEncryption, 3072 bit keyUsage (critical): digitalSignature, keyEncipherment extKeyUsage: id-kp-emailProtection subjectAltName: [email protected] ``` This is a dual-use RSA certificate: correspondents can verify Alice's signatures and wrap content keys to her. Replace `keyEncipherment` with nothing and it becomes signing-only: signatures verify, but correspondents' clients will not encrypt to it. Replace the extended key usage with `id-kp-clientAuth` and receivers reject it for mail altogether. ## What to check - The key type in `subjectPublicKeyInfo`, which decides whether encryption means `keyEncipherment` or `keyAgreement`. - Both extensions together, never one alone. - Whether a signing-only certificate has a key-management partner; when it does not, nobody can send that person encrypted mail.

  • Why does an elliptic-curve S/MIME encryption certificate carry keyAgreement rather than keyEncipherment?
    An elliptic-curve key does not encrypt a content key directly. S/MIME uses ephemeral-static ECDH: the sender combines a fresh key pair with the recipient's static public key to derive a secret that wraps the content key. That is key agreement, which RFC 5280's keyAgreement bit describes; keyEncipherment means key transport, the operation an RSA key performs.
  • Should a mailbox signing certificate set the nonRepudiation bit?
    It is optional: the Baseline Requirements say MAY, and RFC 8550 accepts a signature verified with either digitalSignature or nonRepudiation. The bit, renamed contentCommitment in later X.509 editions, states that signatures are meant as commitments. It does not by itself make a signature binding; that depends on key custody and policy.
  • What does an S/MIME receiving agent assume when a certificate has no keyUsage extension at all?
    RFC 8550 says receiving clients MUST presume both digitalSignature and nonRepudiation are set, so signatures can verify. Publicly trusted certificates never hit this case, because the Baseline Requirements make keyUsage mandatory; it mostly arises with certificates from private certification authorities.

  • keyEncipherment is the bit an elliptic-curve encryption certificate needs.
  • The emailProtection key purpose alone makes a certificate usable for encrypting mail.
  • dataEncipherment is what enables a certificate for S/MIME encryption.
  • Any certificate with clientAuth in its extended key usage also works for mail.
  • Without nonRepudiation, clients reject every S/MIME signature.
  • anyExtendedKeyUsage is the safe choice for publicly trusted mail certificates.