The certification authorities, be it the root certification authority or any sub-CA's are used to sign other certificates. So to verify a trust path to a trusted certificate - usually the root - they are required to have a public key in them that can be used for verification of the certificates that they have issued. This corresponds to a key usage extensionkey usage extension that indicates such usage:
The
keyCertSign
bit is asserted when the subject public key is used for verifying signatures on public key certificates. If thekeyCertSign
bit is asserted, then the cA bit in the basic constraints extension (Section 4.2.1.9) MUST also be asserted.
The
cRLSign
bit is asserted when the subject public key is used for verifying signatures on certificate revocation lists (e.g., CRLs, delta CRLs, or ARLs).
Leaf certificates can be used for anything except signing certificates or(by definition) and CRL's (by common practice). That means that the key usage may indicate anything else. Of course, the type of the key pair and the public key should be such that the key usage can be met:
Note:
- In TLS 1.3 the leaf key is exclusively used for entity authentication, which corresponds to
digitalSignature
.
Here is a table that in TLS 1.3 the leafindicates how specific key is exclusivelytypes can be used for entity authentication, which corresponds to digitalSignature
.
Key type | Signature | Encapsulation | Key agreement |
---|---|---|---|
RSA keys | Yes | Yes | No |
DH keys | No | No | Yes |
DSA keys | Yes | No | No |
EC keys (Koblitz & Prime curves) | Yes | No | Yes |
Ed25519 & Ed448 | Yes | No | No |
X25519 & X448 | No | No | Yes |
Note that RSAIn the case of public keys can, the actions would be used for both signature verification andverification and encryption, but not for the first two usages.
Both key agreement. Diffie-Hellman (DH) keys and key encapsulation can just be used for key agreementestablishment. Most Elliptic CurveHowever, if the keys canare part of a persistent certificate then they cannot be used for signature verification andforward secrecy, which is why key agreement in e.g. TLS 1.3 is performed using (although the modern Ed25519ephemeral keys, and Ed448 safe-curves differ ever so slightly from their cousinsthe signing keys are used for the required entity authentication.
Key agreement algorithms can be used to implement the integrated encryption scheme or IES. So any key agreement) key pair can also be indirectly used for encryption. That said, usually it is best to use a
These tables are original content; the X.509 RFC doesn't explicitly mention that the public key should be compatible with the intent indicated in the key usage / certificate for one and only one particular use case- it seems to be implied that they should be compatible.