RFC 5750
Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 Certificate Handling
Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 Certificate Handling ๐โจ
Okay bestie, this is RFC 5750 ๐ It's a Standards Track doc from January 2010, written by B. Ramsdell (Brute Squad Labs) and S. Turner (IECA). It's listed under ISSN 2070-1721. It obsoletes RFC 3850, so 3850 is officially retired and this is the new version ๐ฅ
Abstract ๐ธ
This doc lays out the rules for how S/MIME v3.2 agents handle X.509 certificates ๐ S/MIME is what lets you send and receive secure MIME messages, and certificates are a huge part of how agents process everything. S/MIME agents validate certificates the way RFC 5280 describes, the Internet X.509 Public Key Infrastructure Certificate and CRL Profile. Agents must meet the certificate processing requirements in this document as well as the ones in RFC 5280. This doc obsoletes RFC 3850 ๐ฆ
Status of This Memo ๐
This is an Internet Standards Track document โจ
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). More info on Internet Standards is in Section 2 of RFC 5741 ๐ง
Info about the current status of this document, any errata, and how to send feedback on it can be found at http://www.rfc-editor.org/info/rfc5750 ๐
Copyright Notice ยฉ๏ธ
Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved. ๐
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they stand on the date this document was published. Please actually read these, bestie, because they spell out your rights and restrictions for this document ๐ Code Components pulled out of this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License.
This document might contain material from IETF Documents or IETF Contributions that were published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of that material might not have granted the IETF Trust the right to allow modifications outside the IETF Standards Process. Without getting an adequate license from those copyright holders, this document must not be modified outside the IETF Standards Process, and derivative works of it must not be created outside the IETF Standards Process. The exceptions are formatting it for publication as an RFC or translating it into languages other than English ๐
Table of Contents ๐๏ธ
1. Introduction ....................................................3
1.1. Definitions ................................................3
1.2. Conventions Used in This Document ..........................4
1.3. Compatibility with Prior Practice S/MIME ...................4
1.4. Changes from S/MIME v3 to S/MIME v3.1 ......................5
1.5. Changes since S/MIME v3.1 ..................................5
2. CMS Options .....................................................6
2.1. Certificate Revocation Lists ...............................6
2.2. Certificate Choices ........................................6
2.3. CertificateSet .............................................7
3. Using Distinguished Names for Internet Mail .....................8
4. Certificate Processing ..........................................9
4.1. Certificate Revocation Lists ..............................10
4.2. Certificate Path Validation ...............................11
4.3. Certificate and CRL Signing Algorithms and Key Sizes ......11
4.4. PKIX Certificate Extensions ...............................12
5. Security Considerations ........................................15
6. References .....................................................17
6.1. Reference Conventions .....................................17
6.2. Normative References ......................................17
6.3. Informative References ....................................19
Appendix A. Moving S/MIME v2 Certificate Handling to Historic
Status.................................................21
Appendix B. Acknowledgments........................................21
1. Introduction โจ
S/MIME (Secure/Multipurpose Internet Mail Extensions) v3.2, described in [SMIME-MSG], is how you send and receive secure MIME messages ๐ Before an agent uses a public key to provide any security services, the S/MIME agent MUST verify that the public key is valid. No skipping this step ๐ S/MIME agents MUST use PKIX certificates to validate public keys, as described in the Internet X.509 Public Key Infrastructure (PKIX) Certificate and CRL Profile [KEYM]. On top of what [KEYM] asks for, S/MIME agents MUST also meet the certificate processing requirements documented in this document ๐ซถ
This spec vibes perfectly with the Cryptographic Message Syntax (CMS) RFC 5652 [CMS], because it uses the data types CMS defines ๐ง It also inherits every flavour of certificate-based key management architecture that CMS supports, so it's a whole buffet ๐
1.1. Definitions ๐
For the purposes of this document, the following definitions apply.
- ASN.1: Abstract Syntax Notation One, as defined in ITU-T X.680 [X.680].
- Attribute certificate (AC): An X.509 AC is its own separate structure, apart from a subject's public key X.509 certificate. A subject can have multiple X.509 ACs tied to each of its public key X.509 certificates, and each X.509 AC binds one or more attributes to one of the subject's public key X.509 certificates. The X.509 AC syntax is defined in [ACAUTH].
- Certificate: A type that binds an entity's name to a public key with a digital signature. This type is defined in the Internet X.509 Public Key Infrastructure (PKIX) Certificate and CRL Profile [KEYM]. It also contains the distinguished name of the certificate issuer (the signer), an issuer-specific serial number, the issuer's signature algorithm identifier, a validity period, and extensions also defined in that document.
- Certificate Revocation List (CRL): A type that contains information about certificates whose validity an issuer has prematurely revoked. The information consists of an issuer name, the time of issue, the next scheduled time of issue, a list of certificate serial numbers and their associated revocation times, and extensions as defined in [KEYM]. The CRL is signed by the issuer. The type intended by this specification is the one defined in [KEYM].
- Receiving agent: Software that interprets and processes S/MIME CMS objects, MIME body parts that contain CMS objects, or both.
- Sending agent: Software that creates S/MIME CMS objects, MIME body parts that contain CMS objects, or both.
- S/MIME agent: User software that is a receiving agent, a sending agent, or both.
1.2. Conventions Used in This Document ๐
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [MUSTSHOULD].
We define some extra terms here too:
- SHOULD+: This term means the same as SHOULD. However, the authors expect that a requirement marked as SHOULD+ will be promoted at some future time to be a MUST.
- SHOULD-: This term means the same as SHOULD. However, the authors expect that a requirement marked as SHOULD- will be demoted to a MAY in a future version of this document.
- MUST-: This term means the same as MUST. However, the authors expect that this requirement will no longer be a MUST in a future document. Its status will be decided later, but it's reasonable to expect that if a future revision changes the status of a MUST- requirement, it will stay at least a SHOULD or a SHOULD-. ๐ฅน
1.3. Compatibility with Prior Practice S/MIME ๐ค
S/MIME version 3.2 agents ought to try for the greatest interoperability possible with agents running prior versions of S/MIME.
Here's the version history:
- S/MIME version 2 is described in RFC 2311 through RFC 2315 inclusive [SMIMEv2].
- S/MIME version 3 is described in RFC 2630 through RFC 2634 inclusive and RFC 5035 [SMIMEv3].
- S/MIME version 3.1 is described in RFC 3850, RFC 3851, RFC 3852, RFC 2634, and RFC 5035 [SMIMEv3.1].
RFC 2311 also has historical info about how S/MIME was developed ๐
1.4. Changes from S/MIME v3 to S/MIME v3.1 ๐ฆ
Here's the glow-up from v3 to v3.1:
- Version 1 and version 2 CRLs MUST be supported.
- Multiple certification authority (CA) certificates with the same subject and public key, but with overlapping validity periods, MUST be supported.
- Version 2 attribute certificates SHOULD be supported, and version 1 attribute certificates MUST NOT be used.
- The MD2 digest algorithm for certificate signatures is discouraged now, and security language was added ๐ซ
- Email address use in certificates got clarified. Certificates that don't contain an email address have no requirements for verifying the email address associated with the certificate.
- Receiving agents SHOULD display certificate information when showing the results of signature verification.
- Receiving agents MUST NOT accept a signature made with a certificate that doesn't have the
digitalSignatureornonRepudiationbit set. Absolutely not ๐ - The interpretation of the key usage and extended key usage extensions got clarified.
1.5. Changes since S/MIME v3.1 ๐
Here's everything that changed after v3.1:
- Conventions Used in This Document: Moved to Section 1.2. Added definitions for SHOULD+, SHOULD-, and MUST-.
- Section 1.1: Updated ASN.1 definition and reference.
- Section 1.3: Added text about v3.1 RFCs.
- Section 3: Aligned email address text with RFC 5280. Updated the note to show that the
emailAddressIA5Stringupper bound is 255 characters. Added text about matching email addresses. - Section 4.2: Added text explaining how S/MIME agents locate the correct user certificate.
- Section 4.3: RSA with SHA-256 (PKCS #1 v1.5) was added as MUST. DSA with SHA-256 was added as SHOULD+. RSA with SHA-1, DSA with SHA-1, and RSA with MD5 were changed to SHOULD-. RSASSA-PSS with SHA-256 was added as SHOULD+. Key sizes got updated and the pointer to the PKIX RFCs changed โจ
- Section 4.4.1: Aligned with PKIX on use of the basic constraints extension in CA certificates. Clarified which extension is used to stop end entities from using their keys to perform issuing authority operations.
- Section 5: Updated security considerations ๐
- Section 7: Moved references from Appendix B to Section 6, and updated the references.
- Appendix A: Moved Appendix A to Appendix B. Added a new Appendix A to move S/MIME v2 Certificate Handling to Historic Status ๐ฐ๏ธ
2. CMS Options โจ
okay so the CMS message format is giving a wide variety of options in content and algorithm support ๐ . This section drops a bunch of support requirements and recommendations so every S/MIME implementation hits a base level of interoperability ๐ซถ. Most of the CMS format for S/MIME messages is defined in [SMIME-MSG] ๐.
2.1. Certificate Revocation Lists ๐
Receiving agents MUST support the Certificate Revocation List (CRL) format defined in [KEYM]. If sending agents include CRLs in outgoing messages, the CRL format defined in [KEYM] MUST be used. In all cases, both v1 and v2 CRLs MUST be supported. ๐
All agents MUST be capable of performing revocation checks using CRLs as specified in [KEYM]. All agents MUST perform revocation status checking in accordance with [KEYM]. Receiving agents MUST recognize CRLs in received S/MIME messages. ๐ฅ
Agents SHOULD store CRLs received in messages for use in processing later messages. ๐๏ธ
2.2. Certificate Choices ๐
Receiving agents MUST support v1 X.509 and v3 X.509 certificates as profiled in [KEYM]. End-entity certificates MAY include an Internet mail address, as described in Section 3. ๐ธ
Receiving agents SHOULD support X.509 version 2 attribute certificates. See [ACAUTH] for details about the profile for attribute certificates. ๐ฆ
2.2.1. Historical Note about CMS Certificates ๐ฐ๏ธ
okay history moment ๐ The CMS message format supports a choice of certificate formats for public key content types: PKIX, PKCS #6 extended certificates [PKCS6], and PKIX attribute certificates.
The PKCS #6 format is not in widespread use ๐. Also, PKIX certificate extensions cover much of the same functionality and flexibility that PKCS #6 was going for, so the vibe is: sending and receiving agents MUST NOT use PKCS #6 extended certificates. Not me using the old stuff ๐.
X.509 version 1 attribute certificates aren't widely implemented either, and they've been superseded by version 2 attribute certificates ๐. Sending agents MUST NOT send version 1 attribute certificates. Bye bye v1 ๐ซ .
2.3. CertificateSet ๐ง
Receiving agents MUST be able to handle an arbitrary number of certificates, with arbitrary relationships to the message sender and to each other, in arbitrary order ๐. A lot of the time, the certificates in a signed message form a chain of certification from the sender up to a particular root. There can also be situations where the certificates in a signed message are unrelated and just included for convenience ๐.
Sending agents SHOULD include any certificates for the user's public key(s) and associated issuer certificates. This makes it more likely that the intended recipient can establish trust in the originator's public key(s) โจ. It's especially important when sending a message to recipients who might not have access to the sender's public key any other way, or when sending a signed message to a new recipient ๐ซถ. Certificates can be left out of outgoing messages if S/MIME objects are sent within a group of correspondents who have already gotten access to each other's certificates some other way, like a shared directory or manual certificate distribution ๐. Receiving S/MIME agents SHOULD be able to handle messages without certificates by using a database or directory lookup scheme ๐.
A sending agent SHOULD include at least one chain of certificates up to, but not including, a certification authority (CA) that it believes the recipient may trust as authoritative ๐. A receiving agent MUST be able to handle an arbitrarily large number of certificates and chains ๐ช.
Agents MAY send CA certificates, which means cross-certificates, self-issued certificates, and self-signed certificates ๐ฆ. Note that receiving agents SHOULD NOT simply trust any self-signed certificates as valid CAs ๐ซ, but SHOULD use some other mechanism to determine whether this is a CA that should be trusted ๐ต๏ธ. Also, when certificates contain Digital Signature Algorithm (DSA) public keys, the parameters may be located in the root certificate. That means the recipient needs both the end-entity certificate and the root certificate to do a signature verification, and it's a valid example of a case where transmitting the root certificate may be required ๐ฏ.
Receiving agents MUST support chaining based on the distinguished name fields. Other methods of building certificate chains MAY be supported ๐งฉ.
Receiving agents SHOULD support the decoding of X.509 attribute certificates included in CMS objects. All other issues about generating and using X.509 attribute certificates are outside the scope of this specification. One specification that covers attribute certificate use is [SECLABEL] ๐.
3. Using Distinguished Names for Internet Mail ๐ง
End-entity certificates MAY contain an Internet mail address, as described in [KEYM], Section 4.2.1.6. The email address SHOULD be in the subjectAltName extension, and SHOULD NOT be in the subject distinguished name ๐.
Receiving agents MUST recognize and accept certificates that contain no email address ๐. Agents are allowed to offer an alternative way to associate an email address with a certificate that doesn't contain one, like using the agent's address book if it has one ๐. Receiving agents MUST recognize email addresses in the subjectAltName field ๐ฌ. Receiving agents MUST also recognize email addresses in the Distinguished Name field, in the PKCS #9 [PKCS9] emailAddress attribute:
pkcs-9-at-emailAddress OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) 1 }
Note that this attribute MUST be encoded as IA5String and has an upper bound of 255 characters ๐. The right side of the email address SHOULD be treated as ASCII-case-insensitive ๐ .
Sending agents SHOULD make the address in the From or Sender header of a mail message match an Internet mail address in the signer's certificate ๐ซ. Receiving agents MUST check that the address in the From or Sender header of a mail message matches an Internet mail address in the signer's certificate, if one is present, whenever mail addresses are present in the certificate ๐ต๏ธโโ๏ธ. A receiving agent SHOULD provide some explicit alternate processing if this comparison fails. That could mean showing the recipient the addresses in the certificate or other certificate details ๐.
A receiving agent SHOULD display a subject name or other certificate details when it shows whether signature verification succeeded or failed โ โ.
All subject and issuer names MUST be populated (aka not an empty SEQUENCE) in S/MIME-compliant X.509 certificates ๐งพ. The one exception: the subject distinguished name (DN) in a user's (i.e., end-entity) certificate MAY be an empty SEQUENCE. In that case, the subjectAltName extension will include the subject's identifier and MUST be marked as critical ๐จ.
4. Certificate Processing ๐๏ธ
S/MIME agents need some certificate retrieval mechanism so they can get the certificates of recipients for digital envelopes ๐. There are lots of ways to build one. [X.500] directory service is a great example of a certificate retrieval-only mechanism that works with classic X.500 Distinguished Names ๐๏ธ. Another option the IETF is looking at is providing certificate retrieval services as part of the existing Domain Name System (DNS) ๐. Until those mechanisms are widely used, their usefulness may be limited by how few of the correspondent's certificates can actually be retrieved ๐ฌ. At a minimum, for initial S/MIME deployment, a user agent could automatically generate a message to an intended recipient asking for the recipient's certificate in a signed return message ๐จ.
Receiving and sending agents SHOULD also provide a way for a user to "store and protect" certificates for correspondents, in a way that guarantees they can be retrieved later ๐. In lots of environments, it makes sense to link the certificate retrieval and storage mechanisms together in some kind of certificate database ๐๏ธ. In its simplest form, a certificate database would be local to one user and work like an "address book" storing that user's frequent correspondents ๐. That way, retrieval would be limited to the certificates a user has stored (probably from incoming messages) ๐ฅ. A full certificate retrieval and storage solution may combine two or more mechanisms to give the user the most flexibility and usefulness ๐. For example, a secure Internet mail agent may check a centralized certificate retrieval mechanism when a certificate can't be found in the user's local certificate storage and retrieval database ๐.
Receiving and sending agents SHOULD provide a way to import and export certificates, using a CMS certs-only message ๐ค. This allows importing and exporting full certificate chains instead of just a single certificate ๐. This is described in [SMIME-MSG] ๐.
Agents MUST handle multiple valid certification authority (CA) certificates that contain the same subject name and the same public keys but have overlapping validity intervals ๐ซถ.
4.1. Certificate Revocation Lists ๐
In general, it's always better to get the latest CRL information from a CA than to rely on information stored away from incoming messages โฐ. A receiving agent SHOULD have access to some CRL retrieval mechanism so it can get certificate revocation information when validating certification paths ๐ค๏ธ. A receiving or sending agent SHOULD also provide a way for a user to store incoming certificate revocation information for correspondents, in a way that guarantees it can be retrieved later ๐พ.
Receiving and sending agents SHOULD retrieve and use CRL information every time a certificate is verified as part of certification path validation, even if the certificate was already verified in the past ๐. Still, in many cases (like off-line verification) getting the latest CRL information may be difficult or impossible ๐ด. So how much CRL information gets used may depend on how valuable the protected information is โ๏ธ. How valuable CRL information is in a particular context is beyond the scope of this specification, but it may be governed by the policies associated with particular certification paths ๐โจ.
All agents MUST be capable of performing revocation checks using CRLs as specified in [KEYM]. All agents MUST perform revocation status checking in accordance with [KEYM]. Receiving agents MUST recognize CRLs in received S/MIME messages ๐ซถ.
4.2. Certificate Path Validation ๐งญ
Okay bestie, when you're building a user agent for secure messaging, certificate, CRL, and certification path validation SHOULD be highly automated while still acting in the best interests of the user. ๐ Certificate, CRL, and path validation MUST be performed as per [KEYM] when validating a correspondent's public key. This is non-negotiable ๐ญ because you need it before using a public key to provide security services like verifying a signature, encrypting a content-encryption key (e.g., RSA), or forming a pairwise symmetric key (e.g., Diffie-Hellman) to be used to encrypt or decrypt a content-encryption key.
Certificates and CRLs reach the path validation procedure in two ways: a) incoming messages, and b) certificate and CRL retrieval mechanisms. โจ Certificates and CRLs in incoming messages don't have to come in any particular order, and they don't have to be related to the sender or recipient of the message (although in most cases they will be related to the sender). Incoming certificates and CRLs SHOULD be cached for use in path validation and optionally stored for later use. ๐๏ธ This temporary certificate and CRL cache SHOULD be used to augment any other certificate and CRL retrieval mechanisms for path validation on incoming signed messages. Main character cache energy ๐ธ
When verifying a signature and the certificates that are included in the message, if a signingCertificate attribute from RFC 2634 [ESS] or a signingCertificateV2 attribute from RFC 5035 [ESS] is found in an S/MIME message, it SHALL be used to identify the signer's certificate. ๐ฅ Otherwise, the certificate is identified in an S/MIME message, either using the issuerAndSerialNumber, which identifies the signer's certificate by the issuer's distinguished name and the certificate serial number, or the subjectKeyIdentifier, which identifies the signer's certificate by a key identifier.
When decrypting an encrypted message, if a SMIMEEncryptionKeyPreference attribute is found in an encapsulating SignedData, it SHALL be used to identify the originator's certificate found in OriginatorInfo. ๐ See [CMS] for the CMS fields that reference the originator's and recipient's certificates.
4.3. Certificate and CRL Signing Algorithms and Key Sizes ๐
Certificates and Certificate Revocation Lists (CRLs) are signed by the certificate issuer. Receiving agents:
- MUST support RSA with SHA-256
- SHOULD+ support DSA with SHA-256
- SHOULD+ support RSASSA-PSS with SHA-256
- SHOULD- support RSA with SHA-1
- SHOULD- support DSA with SHA-1
- SHOULD- support RSA with MD5
Here are the RSA and RSASSA-PSS key size requirements for S/MIME receiving agents during certificate and CRL signature verification. ๐งฎ
key size <= 1023 : MAY (see Section 5)
1024 <= key size <= 4096 : MUST (see Section 5)
4096 < key size : MAY (see Section 5)
And these are the DSA key size requirements for S/MIME receiving agents during certificate and CRL signature verification:
key size <= 1023 : MAY (see Section 5)
1024 <= key size <= 3072 : MUST (see Section 5)
For 512-bit RSA with SHA-1 see [KEYMALG] and [FIPS186-2] without Change Notice 1. For 512-bit RSA with SHA-256 see [RSAOAEP] and [FIPS186-2] without Change Notice 1. For 1024-bit through 3072-bit RSA with SHA-256 see [RSAOAEP] and [FIPS186-2] with Change Notice 1. For 4096-bit RSA with SHA-256 see [RSAOAEP] and [PKCS1]. In either case, the first reference gives you the signature algorithm's object identifier and the second gives you the signature algorithm's definition. ๐
For 512-bit DSA with SHA-1 see [KEYMALG] and [FIPS186-2] without Change Notice 1. For 512-bit DSA with SHA-256 see [KEYMALG2] and [FIPS186-2] without Change Notice 1. For 1024-bit DSA with SHA-1 see [KEYMALG] and [FIPS186-2] with Change Notice 1. For 1024-bit through 3072 DSA with SHA-256 see [KEYMALG2] and [FIPS186-3]. In either case, the first reference gives you the signature algorithm's object identifier and the second gives you the signature algorithm's definition. ๐
For RSASSA-PSS with SHA-256 see [RSAPSS]. โจ
4.4. PKIX Certificate Extensions ๐งฉ
PKIX describes an extensible framework where the basic certificate information can be extended, and it describes how those extensions can be used to control the process of issuing and validating certificates. The PKIX Working Group is constantly working on identifying and creating extensions that have value in particular certification environments. There are also active efforts underway to issue PKIX certificates for business purposes. ๐ผ This document identifies the minimum required set of certificate extensions that have the greatest value in the S/MIME environment. The syntax and semantics of all the identified extensions are defined in [KEYM].
Sending and receiving agents MUST correctly handle the basic constraints, key usage, authority key identifier, subject key identifier, and subject alternative names certificate extensions when they appear in end-entity and CA certificates. Some mechanism SHOULD exist to gracefully handle other certificate extensions when they appear in end-entity or CA certificates. ๐ซถ
Certificates issued for the S/MIME environment SHOULD NOT contain any critical extensions (extensions that have the critical field set to TRUE) other than those listed here. These extensions SHOULD be marked as non-critical unless the proper handling of the extension is deemed critical to the correct interpretation of the associated certificate. Other extensions may be included, but those extensions SHOULD NOT be marked as critical. ๐ซ
Interpretation and syntax for all extensions MUST follow [KEYM], unless otherwise specified here.
4.4.1. Basic Constraints ๐๏ธ
The basic constraints extension serves to delimit the role and position that an issuing authority or end-entity certificate plays in a certification path. ๐ค๏ธ
For example, certificates issued to CAs and subordinate CAs contain a basic constraint extension that identifies them as issuing authority certificates. End-entity certificates contain the key usage extension that restrains end entities from using the key when performing issuing authority operations (see Section 4.4.2).
As per [KEYM], certificates MUST contain a basicConstraints extension in CA certificates, and SHOULD NOT contain that extension in end-entity certificates. ๐
4.4.2. Key Usage Certificate Extension ๐
The key usage extension serves to limit the technical purposes for which a public key listed in a valid certificate may be used. Issuing authority certificates may contain a key usage extension that restricts the key to signing certificates, certificate revocation lists, and other data.
For example, a certification authority may create subordinate issuer certificates that contain a key usage extension specifying that the corresponding public key can be used to sign end user certificates and sign CRLs. ๐๏ธ
If a key usage extension is included in a PKIX certificate, then it MUST be marked as critical. ๐จ
S/MIME receiving agents MUST NOT accept the signature of a message if it was verified using a certificate that contains the key usage extension without either the digitalSignature or nonRepudiation bit set. Sometimes S/MIME is used as a secure message transport for applications beyond interpersonal messaging. In such cases, the S/MIME-enabled application can specify additional requirements concerning the digitalSignature or nonRepudiation bits within this extension. ๐
If the key usage extension is not specified, receiving clients MUST presume that the digitalSignature and nonRepudiation bits are set. ๐
4.4.3. Subject Alternative Name ๐ฌ
The subject alternative name extension is used in S/MIME as the preferred means to convey the email address(es) that correspond(s) to the entity for this certificate. ๐ Any email addresses present MUST be encoded using the rfc822Name CHOICE of the GeneralName type as described in [KEYM], Section 4.2.1.6. Since the SubjectAltName type is a SEQUENCE OF GeneralName, multiple email addresses MAY be present. ๐ฆ
4.4.4. Extended Key Usage Extension ๐ฏ
The extended key usage extension also serves to limit the technical purposes for which a public key listed in a valid certificate may be used. So the set of technical purposes for the certificate is the intersection of the uses indicated in the key usage and extended key usage extensions. ๐ง
For example, if the certificate contains a key usage extension indicating digital signature and an extended key usage extension that includes the email protection OID, then the certificate may be used for signing but not encrypting S/MIME messages. If the certificate contains a key usage extension indicating digital signature but no extended key usage extension, then the certificate may also be used to sign but not encrypt S/MIME messages. โ๏ธ
If the extended key usage extension is present in the certificate, then interpersonal message S/MIME receiving agents MUST check that it contains either the emailProtection or the anyExtendedKeyUsage OID as defined in [KEYM]. S/MIME uses other than interpersonal messaging MAY require the explicit presence of the extended key usage extension or other OIDs to be present in the extension, or both. ๐
5. Security Considerations ๐โจ
Okay bestie, this part is SERIOUS ๐ญ. Every security issue a cryptographic app has to deal with also lands on an S/MIME agent. That includes protecting the user's private key, stopping various attacks, and helping the user avoid mistakes like accidentally encrypting a message for the wrong recipient ๐. The full list is way beyond this document, but here are some big concerns ๐ .
When you're processing certificates, there are so many places it can fail. The processing might happen in a user agent, a security gateway, or some other program, so there's no single way to handle failures ๐คทโโ๏ธ. Just because the methods aren't listed here doesn't mean they don't matter. Please don't assume that ๐ โโ๏ธ. If a certificate isn't provably valid and tied to the message, the software should take immediate and noticeable steps to tell the end user ๐จ.
Some of the many places signature and certificate checking can fail:
- no Internet mail addresses in a certificate match the sender of a message, if the certificate contains at least one mail address
- no certificate chain leads to a trusted CA
- no ability to check the CRL for a certificate
- an invalid CRL was received
- the CRL being checked is expired
- the certificate is expired
- the certificate has been revoked
There are certainly other ways a certificate can be invalid too ๐. It's the processing software's job to check them all thoroughly and decide what to do when a check fails ๐ซถ.
It's possible for a CA to have multiple unexpired CRLs ๐. If an agent is consulting CRLs during certificate validation, it SHOULD make sure that the most recently issued CRL for that CA is the one it checks. Why? Because an S/MIME message sender could deliberately include an older unexpired CRL in the message ๐ค. That older CRL might not list recently revoked certificates, which could lead an agent to accept a certificate that was revoked in a later CRL. Not iconic at all ๐.
Time matters here too โฐ. When an agent figures out the time for a certificate validity check, it has to be careful to use a reliable time. Unless the time comes from a trusted agent, it MUST NOT be the SigningTime attribute found in an S/MIME message ๐ โโ๏ธ. For most sending agents, SigningTime could be deliberately set to send the receiving agent off to check a CRL with out-of-date revocation status for a certificate. It could also cause an improper result when checking the Validity field of a certificate ๐ตโ๐ซ.
In addition to the Security Considerations identified in [KEYM], be extra careful when processing certificates that haven't first been validated to a trust anchor ๐ง. Untrusted sources can manufacture certificates to mount denial of service or other attacks ๐ฅ. For example, keys picked to require excessive cryptographic processing could be used for denial-of-service attacks. So could extensive lists of CRL Distribution Point (CDP) and/or Authority Information Access (AIA) addresses in the certificate ๐. Attacker-specified CDP and/or AIA addresses could also be put into fake certificates. That would let the originator detect receipt of the message even if signature verification fails ๐ต๏ธโโ๏ธ.
The 4096-bit RSA key size requirement for certificate and CRL verification is bigger than the 2048-bit RSA key sizes for message signature generation/verification or message encryption/decryption in [SMIME-MSG] ๐. The reason is that many root CAs in certificate stores have already issued root certificates with 4096-bit keys. The standard that defines comparable key sizes for DSA isn't available yet. For context, [FIPS186-2] without Change Notice 1 allowed DSA key sizes between 512 and 1024 bits. [FIPS186-2] with Change Notice 1 only allowed DSA key sizes of 1024 bits. [FIPS186-3] allowed DSA key sizes from 1024 to 3072 bits ๐งพ. Also, 4096-bit keys are normally only used by Root certificates and not by subordinate CA certificates, which lengthens the root CA certificate's validity period ๐ณ.
RSA and DSA keys under 1024 bits are now considered by many experts to be cryptographically insecure, thanks to advances in computing power ๐ฅ๏ธ๐ฅ. They should no longer be used to sign certificates or CRLs. These keys used to be considered secure, though, so processing mail that was signed and encrypted earlier might mean processing certificates or CRLs signed with weak keys ๐ฌ. Implementations that want to support previous versions of S/MIME or process old messages need to weigh the security risks of accepting certificates and CRLs with smaller key sizes (e.g., spoofed certificates) against the costs of denial of service โ๏ธ. If an implementation supports verification of certificates or CRLs made with RSA and DSA keys under 1024 bits, it MUST warn the user ๐จ. Implementers should consider giving a stronger warning for weak signatures on certificates and CRLs tied to newly received messages than for those tied to previously stored messages. Server implementations (e.g., secure mail list servers) where user warnings aren't appropriate SHOULD reject messages with weak cryptography ๐ โโ๏ธ.
If an implementation is concerned about compliance with National Institute of Standards and Technology (NIST) key size recommendations, then check out [SP800-57] ๐๐.
6. References ๐
6.1. Reference Conventions
- [CMS] refers to [RFC5652].
- [ESS] refers to [RFC2634] and [RFC5035].
- [SMIMEv2] refers to [RFC2311], [RFC2312], [RFC2313], [RFC2314], and [RFC2315].
- [SMIMEv3] refers to [RFC2630], [RFC2631], [RFC2632], [RFC2633], [RFC2634], and [RFC5035].
- [SMIMv3.1] refers to [RFC2634], [RFC3850], [RFC3851], [RFC3852], and [RFC5035].
6.2. Normative References
- [ACAUTH] Farrell, S., Housley, R., and S. Turner, "An Internet Attribute Certificate Profile for Authorization", RFC 5755, January 2010.
- [RFC2634] Hoffman, P., Ed., "Enhanced Security Services for S/MIME", RFC 2634, June 1999.
- [RFC5035] Schaad, J., "Enhanced Security Services (ESS) Update: Adding CertID Algorithm Agility", RFC 5035, August 2007.
- [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", RFC 5652, September 2009.
- [FIPS186-2] National Institute of Standards and Technology (NIST), "Digital Signature Standard (DSS)", FIPS Publication 186-3, January 2000. [With Change Notice 1]
- [FIPS186-3] National Institute of Standards and Technology (NIST), FIPS Publication 186-3: Digital Signature Standard, June 2009.
- [KEYM] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, May 2008.
- [KEYMALG] Bassham, L., Polk, W., and R. Housley, "Algorithms and Identifiers for the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 3279, April 2002.
- [KEYMALG2] Dang, Q., Santesson, S., Moriarty, K., Brown, D., and T. Polk, "Internet X.509 Public Key Infrastructure: Additional Algorithms and Identifiers for DSA and ECDSA", RFC 5758, January 2010.
- [MUSTSHOULD] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
- [PKCS1] Jonsson, J. and B. Kaliski, "Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1", RFC 3447, February 2003.
- [PKCS9] Nystrom, M. and B. Kaliski, "PKCS #9: Selected Object Classes and Attribute Types Version 2.0", RFC 2985, November 2000.
- [RSAPSS] Schaad, J., "Use of the RSASSA-PSS Signature Algorithm in Cryptographic Message Syntax (CMS)", RFC 4056, June 2005.
- [RSAOAEP] Schaad, J., Kaliski, B., and R. Housley, "Additional Algorithms and Identifiers for RSA Cryptography for use in the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 4055, June 2005.
- [SMIME-MSG] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 Message Specification", RFC 5751, January 2010.
- [X.680] ITU-T Recommendation X.680 (2002) | ISO/IEC 8824-1:2002. Information Technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation.
6.3. Informative References
- [PKCS6] RSA Laboratories, "PKCS #6: Extended-Certificate Syntax Standard", November 1993.
- [SECLABEL] Nicolls, W., "Implementing Company Classification Policy with the S/MIME Security Label", RFC 3114, May 2002.
- [RFC2311] Dusse, S., Hoffman, P., Ramsdell, B., Lundblade, L., and L. Repka, "S/MIME Version 2 Message Specification", RFC 2311, March 1998.
- [RFC2312] Dusse, S., Hoffman, P., Ramsdell, B., and J. Weinstein, "S/MIME Version 2 Certificate Handling", RFC 2312, March 1998.
- [RFC2313] Kaliski, B., "PKCS #1: RSA Encryption Version 1.5", RFC 2313, March 1998.
- [RFC2314] Kaliski, B., "PKCS #10: Certification Request Syntax Version 1.5", RFC 2314, March 1998.
- [RFC2315] Kaliski, B., "PKCS #7: Cryptographic Message Syntax Version 1.5", RFC 2315, March 1998.
- [RFC2630] Housley, R., "Cryptographic Message Syntax", RFC 2630, June 1999.
- [RFC2631] Rescorla, E., "Diffie-Hellman Key Agreement Method", RFC 2631, June 1999.
- [RFC2632] Ramsdell, B., Ed., "S/MIME Version 3 Certificate Handling", RFC 2632, June 1999.
- [RFC2633] Ramsdell, B., Ed., "S/MIME Version 3 Message Specification", RFC 2633, June 1999.
- [RFC3850] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.1 Certificate Handling", RFC 3850, July 2004.
- [RFC3851] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.1 Message Specification", RFC 3851, July 2004.
- [RFC3852] Housley, R., "Cryptographic Message Syntax (CMS)", RFC 3852, July 2004.
- [SP800-57] National Institute of Standards and Technology (NIST), Special Publication 800-57: Recommendation for Key Management, August 2005.
- [X.500] ITU-T Recommendation X.500 (1997) | ISO/IEC 9594-1:1997, Information technology - Open Systems Interconnection - The Directory: Overview of concepts, models and services.
Appendix A. Moving S/MIME v2 Certificate Handling to Historic Status โจ
okay so S/MIME v3 [SMIMEv3], v3.1 [SMIMEv3.1], and v3.2 (this document) are backwards compatible with the S/MIME v2 Certificate Handling Specification [SMIMEv2] ๐. The one exception is the algorithms: v3.2 drops the RC2/40 requirement and adds DSA and RSASSA-PSS requirements ๐ฅ.
Because of that, it is recommended that RFC 2312 [SMIMEv2] be moved to Historic status ๐ฆ.
Appendix B. Acknowledgments ๐ซถ
Many thanks to the other authors of the S/MIME v2 RFC: Steve Dusse, Paul Hoffman, and Jeff Weinstein ๐. Without v2, there wouldn't be a v3, v3.1, or v3.2 ๐ญ.
A bunch of the S/MIME Working Group members also worked super hard on this document ๐ธ. Any list of people is doomed to leave someone out, and for that I apologize ๐. In alphabetical order, these people stand out because they made direct contributions to this document โญ:
Bill Flanigan, Trevor Freeman, Elliott Ginsburg, Alfred Hoenes, Paul Hoffman, Russ Housley, David P. Kemp, Michael Myers, John Pawling, Denis Pinkas, and Jim Schaad ๐.
Authors' Addresses ๐
Blake Ramsdell
Brute Squad Labs, Inc.
EMail: blaker@gmail.com
Sean Turner
IECA, Inc.
3057 Nutley Street, Suite 106
Fairfax, VA 22031
USA
EMail: turners@ieca.com
๐ฆ where this page comes from
- ietf: rfc5750 2010-01
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms