idnits 2.17.1 draft-ietf-lamps-rfc5751-bis-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 2 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 1215 has weird spacing: '...sedData id-...' == Line 1668 has weird spacing: '...s7-mime n/a ...' == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (May 22, 2018) is 2164 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '0' on line 2470 -- Looks like a reference, but probably isn't: '1' on line 2471 -- Looks like a reference, but probably isn't: '2' on line 2472 == Unused Reference: 'I-D.ietf-lamps-rfc5750-bis' is defined on line 2218, but no explicit reference was found in the text == Unused Reference: 'RFC2049' is defined on line 2122, but no explicit reference was found in the text == Unused Reference: 'RFC4289' is defined on line 2171, but no explicit reference was found in the text == Unused Reference: 'RFC6838' is defined on line 2204, but no explicit reference was found in the text == Unused Reference: 'RFC2314' is defined on line 2384, but no explicit reference was found in the text == Unused Reference: 'RFC2633' is defined on line 2390, but no explicit reference was found in the text == Unused Reference: 'RFC3852' is defined on line 2397, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. 'CHARSETS' -- Possible downref: Non-RFC (?) normative reference: ref. 'CMS' -- Possible downref: Non-RFC (?) normative reference: ref. 'ESS' -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS186-4' -- Possible downref: Non-RFC (?) normative reference: ref. 'MIME-SPEC' -- Duplicate reference: RFC5035, mentioned in 'RFC5652', was also mentioned in 'RFC5035'. ** Downref: Normative reference to an Informational RFC: RFC 5753 -- Obsolete informational reference (is this intentional?): RFC 1866 (Obsoleted by RFC 2854) -- Obsolete informational reference (is this intentional?): RFC 2313 (Obsoleted by RFC 2437) -- Duplicate reference: RFC2315, mentioned in 'RFC2315', was also mentioned in 'RFC2314'. -- Obsolete informational reference (is this intentional?): RFC 2630 (Obsoleted by RFC 3369, RFC 3370) -- Obsolete informational reference (is this intentional?): RFC 2632 (Obsoleted by RFC 3850) -- Duplicate reference: RFC5035, mentioned in 'RFC2633', was also mentioned in 'RFC5652'. -- Obsolete informational reference (is this intentional?): RFC 3850 (Obsoleted by RFC 5750) -- Obsolete informational reference (is this intentional?): RFC 3851 (Obsoleted by RFC 5751) -- Duplicate reference: RFC5035, mentioned in 'RFC3852', was also mentioned in 'RFC2633'. -- Obsolete informational reference (is this intentional?): RFC 5750 (Obsoleted by RFC 8550) -- Obsolete informational reference (is this intentional?): RFC 5751 (Obsoleted by RFC 8551) Summary: 1 error (**), 0 flaws (~~), 12 warnings (==), 21 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 LAMPS J. Schaad 3 Internet-Draft August Cellars 4 Obsoletes: 5751 (if approved) B. Ramsdell 5 Intended status: Standards Track Brute Squad Labs, Inc. 6 Expires: November 23, 2018 S. Turner 7 sn3rd 8 May 22, 2018 10 Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 4.0 11 Message Specification 12 draft-ietf-lamps-rfc5751-bis-09 14 Abstract 16 This document defines Secure/Multipurpose Internet Mail Extensions 17 (S/MIME) version 4.0. S/MIME provides a consistent way to send and 18 receive secure MIME data. Digital signatures provide authentication, 19 message integrity, and non-repudiation with proof of origin. 20 Encryption provides data confidentiality. Compression can be used to 21 reduce data size. This document obsoletes RFC 5751. 23 Contributing to this document 25 The source for this draft is being maintained in GitHub. Suggested 26 changes should be submitted as pull requests at . Instructions are on that page as well. Editorial 28 changes can be managed in GitHub, but any substantial issues need to 29 be discussed on the LAMPS mailing list. 31 Status of This Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at https://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on November 23, 2018. 48 Copyright Notice 50 Copyright (c) 2018 IETF Trust and the persons identified as the 51 document authors. All rights reserved. 53 This document is subject to BCP 78 and the IETF Trust's Legal 54 Provisions Relating to IETF Documents 55 (https://trustee.ietf.org/license-info) in effect on the date of 56 publication of this document. Please review these documents 57 carefully, as they describe your rights and restrictions with respect 58 to this document. Code Components extracted from this document must 59 include Simplified BSD License text as described in Section 4.e of 60 the Trust Legal Provisions and are provided without warranty as 61 described in the Simplified BSD License. 63 This document may contain material from IETF Documents or IETF 64 Contributions published or made publicly available before November 65 10, 2008. The person(s) controlling the copyright in some of this 66 material may not have granted the IETF Trust the right to allow 67 modifications of such material outside the IETF Standards Process. 68 Without obtaining an adequate license from the person(s) controlling 69 the copyright in such materials, this document may not be modified 70 outside the IETF Standards Process, and derivative works of it may 71 not be created outside the IETF Standards Process, except to format 72 it for publication as an RFC or to translate it into languages other 73 than English. 75 Table of Contents 77 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 78 1.1. Specification Overview . . . . . . . . . . . . . . . . . 4 79 1.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 5 80 1.3. Conventions Used in This Document . . . . . . . . . . . . 6 81 1.4. Compatibility with Prior Practice of S/MIME . . . . . . . 7 82 1.5. Changes from S/MIME v3 to S/MIME v3.1 . . . . . . . . . . 7 83 1.6. Changes from S/MIME v3.1 to S/MIME v3.2 . . . . . . . . . 8 84 1.7. Changes for S/MIME v4.0 . . . . . . . . . . . . . . . . . 9 85 2. CMS Options . . . . . . . . . . . . . . . . . . . . . . . . . 10 86 2.1. DigestAlgorithmIdentifier . . . . . . . . . . . . . . . . 10 87 2.2. SignatureAlgorithmIdentifier . . . . . . . . . . . . . . 10 88 2.3. KeyEncryptionAlgorithmIdentifier . . . . . . . . . . . . 11 89 2.4. General Syntax . . . . . . . . . . . . . . . . . . . . . 12 90 2.4.1. Data Content Type . . . . . . . . . . . . . . . . . . 12 91 2.4.2. SignedData Content Type . . . . . . . . . . . . . . . 12 92 2.4.3. EnvelopedData Content Type . . . . . . . . . . . . . 12 93 2.4.4. AuthEnvelopedData Content Type . . . . . . . . . . . 12 94 2.4.5. CompressedData Content Type . . . . . . . . . . . . . 13 95 2.5. Attributes and the SignerInfo Type . . . . . . . . . . . 13 96 2.5.1. Signing Time Attribute . . . . . . . . . . . . . . . 14 97 2.5.2. SMIME Capabilities Attribute . . . . . . . . . . . . 14 98 2.5.3. Encryption Key Preference Attribute . . . . . . . . . 16 99 2.6. SignerIdentifier SignerInfo Type . . . . . . . . . . . . 17 100 2.7. ContentEncryptionAlgorithmIdentifier . . . . . . . . . . 17 101 2.7.1. Deciding Which Encryption Method to Use . . . . . . . 17 102 2.7.2. Choosing Weak Encryption . . . . . . . . . . . . . . 19 103 2.7.3. Multiple Recipients . . . . . . . . . . . . . . . . . 19 104 3. Creating S/MIME Messages . . . . . . . . . . . . . . . . . . 19 105 3.1. Preparing the MIME Entity for Signing, Enveloping, or 106 Compressing . . . . . . . . . . . . . . . . . . . . . . . 20 107 3.1.1. Canonicalization . . . . . . . . . . . . . . . . . . 21 108 3.1.2. Transfer Encoding . . . . . . . . . . . . . . . . . . 22 109 3.1.3. Transfer Encoding for Signing Using multipart/signed 23 110 3.1.4. Sample Canonical MIME Entity . . . . . . . . . . . . 23 111 3.2. The application/pkcs7-mime Media Type . . . . . . . . . . 24 112 3.2.1. The name and filename Parameters . . . . . . . . . . 25 113 3.2.2. The smime-type Parameter . . . . . . . . . . . . . . 26 114 3.3. Creating an Enveloped-Only Message . . . . . . . . . . . 27 115 3.4. Creating an Authenticated Enveloped-Only Message . . . . 28 116 3.5. Creating a Signed-Only Message . . . . . . . . . . . . . 29 117 3.5.1. Choosing a Format for Signed-Only Messages . . . . . 29 118 3.5.2. Signing Using application/pkcs7-mime with SignedData 30 119 3.5.3. Signing Using the multipart/signed Format . . . . . . 31 120 3.6. Creating a Compressed-Only Message . . . . . . . . . . . 34 121 3.7. Multiple Operations . . . . . . . . . . . . . . . . . . . 34 122 3.8. Creating a Certificate Management Message . . . . . . . . 35 123 3.9. Registration Requests . . . . . . . . . . . . . . . . . . 36 124 3.10. Identifying an S/MIME Message . . . . . . . . . . . . . . 36 125 4. Certificate Processing . . . . . . . . . . . . . . . . . . . 36 126 4.1. Key Pair Generation . . . . . . . . . . . . . . . . . . . 37 127 4.2. Signature Generation . . . . . . . . . . . . . . . . . . 37 128 4.3. Signature Verification . . . . . . . . . . . . . . . . . 37 129 4.4. Encryption . . . . . . . . . . . . . . . . . . . . . . . 38 130 4.5. Decryption . . . . . . . . . . . . . . . . . . . . . . . 38 131 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 38 132 5.1. Media Type for application/pkcs7-mime . . . . . . . . . . 38 133 5.2. Media Type for application/pkcs7-signature . . . . . . . 39 134 5.3. Register authEnveloped-data smime-type . . . . . . . . . 40 135 6. Security Considerations . . . . . . . . . . . . . . . . . . . 40 136 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 45 137 7.1. Normative References . . . . . . . . . . . . . . . . . . 45 138 7.2. Informative References . . . . . . . . . . . . . . . . . 49 139 Appendix A. ASN.1 Module . . . . . . . . . . . . . . . . . . . . 52 140 Appendix B. Historic Mail Considerations . . . . . . . . . . . . 54 141 B.1. DigestAlgorithmIdentifier . . . . . . . . . . . . . . . . 55 142 B.2. Signature Algorithms . . . . . . . . . . . . . . . . . . 55 143 B.3. ContentEncryptionAlgorithmIdentifier . . . . . . . . . . 57 144 B.4. KeyEncryptionAlgorithmIdentifier . . . . . . . . . . . . 57 145 Appendix C. Moving S/MIME v2 Message Specification to Historic 146 Status . . . . . . . . . . . . . . . . . . . . . . . 57 147 Appendix D. Acknowledgments . . . . . . . . . . . . . . . . . . 58 148 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 58 150 1. Introduction 152 S/MIME (Secure/Multipurpose Internet Mail Extensions) provides a 153 consistent way to send and receive secure MIME data. Based on the 154 popular Internet MIME standard, S/MIME provides the following 155 cryptographic security services for electronic messaging 156 applications: authentication, message integrity and non-repudiation 157 of origin (using digital signatures), and data confidentiality (using 158 encryption). As a supplementary service, S/MIME provides message 159 compression. 161 S/MIME can be used by traditional mail user agents (MUAs) to add 162 cryptographic security services to mail that is sent, and to 163 interpret cryptographic security services in mail that is received. 164 However, S/MIME is not restricted to mail; it can be used with any 165 transport mechanism that transports MIME data, such as HTTP or SIP. 166 As such, S/MIME takes advantage of the object-based features of MIME 167 and allows secure messages to be exchanged in mixed-transport 168 systems. 170 Further, S/MIME can be used in automated message transfer agents that 171 use cryptographic security services that do not require any human 172 intervention, such as the signing of software-generated documents and 173 the encryption of FAX messages sent over the Internet. 175 This document defines the version 4.0 of the S/MIME Message 176 specification. As such this document obsoletes version 3.2 of the 177 S/MIME Message specification [RFC5751]. 179 1.1. Specification Overview 181 This document describes a protocol for adding cryptographic signature 182 and encryption services to MIME data. The MIME standard [MIME-SPEC] 183 provides a general structure for the content of Internet messages and 184 allows extensions for new content-type-based applications. 186 This specification defines how to create a MIME body part that has 187 been cryptographically enhanced according to the Cryptographic 188 Message Syntax (CMS) [CMS], which is derived from PKCS #7 [RFC2315]. 189 This specification also defines the application/pkcs7-mime media type 190 that can be used to transport those body parts. 192 This document also discusses how to use the multipart/signed media 193 type defined in [RFC1847] to transport S/MIME signed messages. 194 multipart/signed is used in conjunction with the 195 application/pkcs7-signature media type, which is used to transport a 196 detached S/MIME signature. 198 In order to create S/MIME messages, an S/MIME agent MUST follow the 199 specifications in this document, as well as the specifications listed 200 in the Cryptographic Message Syntax document [CMS], [RFC3370], 201 [RFC4056], [RFC3560], and [RFC5754]. 203 Throughout this specification, there are requirements and 204 recommendations made for how receiving agents handle incoming 205 messages. There are separate requirements and recommendations for 206 how sending agents create outgoing messages. In general, the best 207 strategy is to "be liberal in what you receive and conservative in 208 what you send". Most of the requirements are placed on the handling 209 of incoming messages, while the recommendations are mostly on the 210 creation of outgoing messages. 212 The separation for requirements on receiving agents and sending 213 agents also derives from the likelihood that there will be S/MIME 214 systems that involve software other than traditional Internet mail 215 clients. S/MIME can be used with any system that transports MIME 216 data. An automated process that sends an encrypted message might not 217 be able to receive an encrypted message at all, for example. Thus, 218 the requirements and recommendations for the two types of agents are 219 listed separately when appropriate. 221 1.2. Definitions 223 For the purposes of this specification, the following definitions 224 apply. 226 ASN.1: Abstract Syntax Notation One, as defined in ITU-T 227 Recommendations X.680, X.681, X.682 and X.683 228 [ASN.1]. 230 BER: Basic Encoding Rules for ASN.1, as defined in 231 ITU-T Recommendation X.690 [X.690]. 233 Certificate: A type that binds an entity's name to a public key 234 with a digital signature. 236 DER: Distinguished Encoding Rules for ASN.1, as defined 237 in ITU-T Recommendation X.690 [X.690]. 239 7-bit data: Text data with lines less than 998 characters 240 long, where none of the characters have the 8th 241 bit set, and there are no NULL characters. 242 and occur only as part of a end-of- 243 line delimiter. 245 8-bit data: Text data with lines less than 998 characters, and 246 where none of the characters are NULL characters. 247 and occur only as part of a 248 end-of-line delimiter. 250 Binary data: Arbitrary data. 252 Transfer encoding: A reversible transformation made on data so 8-bit 253 or binary data can be sent via a channel that only 254 transmits 7-bit data. 256 Receiving agent: Software that interprets and processes S/MIME CMS 257 objects, MIME body parts that contain CMS content 258 types, or both. 260 Sending agent: Software that creates S/MIME CMS content types, 261 MIME body parts that contain CMS content types, or 262 both. 264 S/MIME agent: User software that is a receiving agent, a sending 265 agent, or both. 267 Data Integrity Service: A security service that protects against 268 unauthorized changes to data by ensuring that 269 changes to the data are detectable. [RFC4949] 271 Data Confidentiality: The property that data is not disclosed to 272 system entities unless they have been authorized 273 to know the data. [RFC4949] 275 1.3. Conventions Used in This Document 277 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 278 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 279 "OPTIONAL" in this document are to be interpreted as described in BCP 280 14 [RFC2119] [RFC8174] when, and only when, they appear in all 281 capitals, as shown here. 283 We define the additional requirement levels: 285 SHOULD+ This term means the same as SHOULD. However, the authors 286 expect that a requirement marked as SHOULD+ will be 287 promoted at some future time to be a MUST. 289 SHOULD- This term means the same as SHOULD. However, the authors 290 expect that a requirement marked as SHOULD- will be demoted 291 to a MAY in a future version of this document. 293 MUST- This term means the same as MUST. However, the authors 294 expect that this requirement will no longer be a MUST in a 295 future document. Although its status will be determined at 296 a later time, it is reasonable to expect that if a future 297 revision of a document alters the status of a MUST- 298 requirement, it will remain at least a SHOULD or a SHOULD-. 300 The term RSA in this document almost always refers to the PKCS#1 v1.5 301 RSA [RFC2313] signature or encryption algorithms even when not 302 qualified as such. There are a couple of places where it refers to 303 the general RSA cryptographic operation, these can be determined from 304 the context where it is used. 306 1.4. Compatibility with Prior Practice of S/MIME 308 S/MIME version 4.0 agents ought to attempt to have the greatest 309 interoperability possible with agents for prior versions of S/MIME. 310 S/MIME version 2 is described in RFC 2311 through RFC 2315 inclusive 311 [SMIMEv2], S/MIME version 3 is described in RFC 2630 through RFC 2634 312 inclusive and RFC 5035 [SMIMEv3], S/MIME version 3.1 is described in 313 RFC 3850, RFC 3851, RFC 3852, RFC 2634, and RFC 5035 [SMIMEv3.1], and 314 S/MIME version 3.2 is described in [SMIMEv3.2]. [RFC2311] also has 315 historical information about the development of S/MIME. 317 1.5. Changes from S/MIME v3 to S/MIME v3.1 319 The RSA public key algorithm was changed to a MUST implement, key 320 wrap algorithm, and the Diffie-Hellman (DH) algorithm [RFC2631] 321 changed to a SHOULD implement. 323 The AES symmetric encryption algorithm has been included as a SHOULD 324 implement. 326 The RSA public key algorithm was changed to a MUST implement 327 signature algorithm. 329 Ambiguous language about the use of "empty" SignedData messages to 330 transmit certificates was clarified to reflect that transmission of 331 Certificate Revocation Lists is also allowed. 333 The use of binary encoding for some MIME entities is now explicitly 334 discussed. 336 Header protection through the use of the message/rfc822 media type 337 has been added. 339 Use of the CompressedData CMS type is allowed, along with required 340 media type and file extension additions. 342 1.6. Changes from S/MIME v3.1 to S/MIME v3.2 344 Editorial changes, e.g., replaced "MIME type" with "media type", 345 content-type with Content-Type. 347 Moved "Conventions Used in This Document" to Section 1.3. Added 348 definitions for SHOULD+, SHOULD-, and MUST-. 350 Section 1.1 and Appendix A: Added references to RFCs for RSASSA-PSS, 351 RSAES-OAEP, and SHA2 CMS algorithms. Added CMS Multiple Signers 352 Clarification to CMS reference. 354 Section 1.2: Updated references to ASN.1 to X.680 and BER and DER to 355 X.690. 357 Section 1.4: Added references to S/MIME MSG 3.1 RFCs. 359 Section 2.1 (digest algorithm): SHA-256 added as MUST, SHA-1 and MD5 360 made SHOULD-. 362 Section 2.2 (signature algorithms): RSA with SHA-256 added as MUST, 363 and DSA with SHA-256 added as SHOULD+, RSA with SHA-1, DSA with 364 SHA-1, and RSA with MD5 changed to SHOULD-, and RSASSA-PSS with 365 SHA-256 added as SHOULD+. Also added note about what S/MIME v3.1 366 clients support. 368 Section 2.3 (key encryption): DH changed to SHOULD-, and RSAES-OAEP 369 added as SHOULD+. Elaborated requirements for key wrap algorithm. 371 Section 2.5.1: Added requirement that receiving agents MUST support 372 both GeneralizedTime and UTCTime. 374 Section 2.5.2: Replaced reference "sha1WithRSAEncryption" with 375 "sha256WithRSAEncryption", "DES-3EDE-CBC" with "AES-128 CBC", and 376 deleted the RC5 example. 378 Section 2.5.2.1: Deleted entire section (discussed deprecated RC2). 380 Section 2.7, 2.7.1, Appendix A: references to RC2/40 removed. 382 Section 2.7 (content encryption): AES-128 CBC added as MUST, AES-192 383 and AES-256 CBC SHOULD+, tripleDES now SHOULD-. 385 Section 2.7.1: Updated pointers from 2.7.2.1 through 2.7.2.4 to 386 2.7.1.1 to 2.7.1.2. 388 Section 3.1.1: Removed text about MIME character sets. 390 Section 3.2.2 and 3.6: Replaced "encrypted" with "enveloped". Update 391 OID example to use AES-128 CBC oid. 393 Section 3.4.3.2: Replace "micalg" parameter for "SHA-1" with "sha-1". 395 Section 4: Updated reference to CERT v3.2. 397 Section 4.1: Updated RSA and DSA key size discussion. Moved last 398 four sentences to security considerations. Updated reference to 399 randomness requirements for security. 401 Section 5: Added IANA registration templates to update media type 402 registry to point to this document as opposed to RFC 2311. 404 Section 6: Updated security considerations. 406 Section 7: Moved references from Appendix B to this section. Updated 407 references. Added informational references to SMIMEv2, SMIMEv3, and 408 SMIMEv3.1. 410 Appendix C: Added Appendix C to move S/MIME v2 to Historic status. 412 1.7. Changes for S/MIME v4.0 414 - Add the use of AuthEnvelopedData, including defining and 415 registering an smime-type value (Section 2.4.4 and Section 3.4). 417 - Update the content encryption algorithms (Section 2.7 and 418 Section 2.7.1.2): Add AES-256 GCM, add ChaCha200-Poly1305, remove 419 AES-192 CBC, mark tripleDES as historic. 421 - Update the set of signature algorithms (Section 2.2): Add Edwards- 422 curve DSA (EdDSA) and ECDSA, mark DSA as historic 424 - Update the set of digest algorithms (Section 2.1): Add SHA-512, 425 mark SHA-1 as historic. 427 - Update the size of keys to be used for RSA encryption and RSA 428 signing (Section 4). 430 - Create Appendix B which deals with considerations for dealing with 431 historic email messages. 433 2. CMS Options 435 CMS allows for a wide variety of options in content, attributes, and 436 algorithm support. This section puts forth a number of support 437 requirements and recommendations in order to achieve a base level of 438 interoperability among all S/MIME implementations. [RFC3370] and 439 [RFC5754] provides additional details regarding the use of the 440 cryptographic algorithms. [ESS] provides additional details 441 regarding the use of additional attributes. 443 2.1. DigestAlgorithmIdentifier 445 The algorithms here are used for digesting the body of the message 446 and are not the same as the digest algorithms used as part the 447 signature algorithms. The result of this is placed in the message- 448 digest attribute of the signed attributes. It is RECOMMENDED that 449 the algorithm used for digesting the body of the message be of 450 similar or greater strength than the signature algorithm. 452 Sending and Receiving agents: 454 - MUST support SHA-256. 456 - MUST support SHA-512. 458 [RFC5754] provides the details for using these algorithms with 459 S/MIME. 461 2.2. SignatureAlgorithmIdentifier 463 There are different sets of requirements placed on receiving and 464 sending agents. By having the different requirements, the maximum 465 amount of interoperability is achieved as it allows for specialized 466 protection of private key material but maximum signature validation. 468 Receiving agents: 470 - MUST support ECDSA with curve P-256 and SHA-256. 472 - MUST support EdDSA with curve 25519 using Pure EdDSA mode 473 [I-D.ietf-curdle-cms-eddsa-signatures]. 475 - MUST- support RSA PKCS#1 v1.5 with SHA-256. 477 - . SHOULD support RSASSA-PSS with SHA-256. 479 Sending agents: 481 - MUST support at least one of the following algorithms: ECDSA with 482 curve P-256 and SHA-256, or EdDSA with curve 25519 using PureEdDSA 483 mode. 485 - MUST- support RSA PKCS#1 v1.5 with SHA-256. 487 - SHOULD support RSASSA-PSS with SHA-256. 489 Both ECDSA and EdDSA are included in the list of required algorithms 490 for political reasons. NIST is unable to provide the seeds that were 491 used to create their standardized curves; this means that there is a 492 section of the community which believes that there might be a back 493 door to these curves. The EdDSA curves were standardized in the IETF 494 in a more transparent method. However, there are still significant 495 sections of the industry which need to have NIST approved algorithms. 496 For this reason, both sets of curves are represented in the receiving 497 agent list, but there is only a requirement for one curve in the 498 sending agent list. This requirement makes sure that maximum 499 interoperability between receivers and senders will exist. 501 See Section 4.1 for information on key size and algorithm references. 503 2.3. KeyEncryptionAlgorithmIdentifier 505 Receiving and sending agents: 507 - MUST support ECDH ephemeral-static mode for P-256, as specified in 508 [RFC5753]. 510 - MUST support ECDH ephemeral-static mode for X25519 using HKDF-256 511 for the KDF, as specified in 512 [I-D.ietf-curdle-cms-ecdh-new-curves]. 514 - MUST- support RSA Encryption, as specified in [RFC3370]. 516 - SHOULD+ support RSAES-OAEP, as specified in [RFC3560]. 518 When ECDH ephemeral-static is used, a key wrap algorithm is also 519 specified in the KeyEncryptionAlgorithmIdentifier [RFC5652]. The 520 underlying encryption functions for the key wrap and content 521 encryption algorithm ([RFC3370] and [RFC3565]) and the key sizes for 522 the two algorithms MUST be the same (e.g., AES-128 key wrap algorithm 523 with AES-128 content encryption algorithm). As both 128 and 256 bit 524 AES modes are mandatory-to-implement as content encryption algorithms 525 (Section 2.7), both the AES-128 and AES-256 key wrap algorithms MUST 526 be supported when ECDH ephemeral-static is used. Recipients MAY 527 enforce this, but MUST use the weaker of the two as part of any 528 cryptographic strength computation it might do. 530 Appendix B provides information on algorithms support in older 531 versions of S/MIME. 533 2.4. General Syntax 535 There are several CMS content types. Of these, only the Data, 536 SignedData, EnvelopedData, AuthEnvelopedData, and CompressedData 537 content types are currently used for S/MIME. 539 2.4.1. Data Content Type 541 Sending agents MUST use the id-data content type identifier to 542 identify the "inner" MIME message content. For example, when 543 applying a digital signature to MIME data, the CMS SignedData 544 encapContentInfo eContentType MUST include the id-data object 545 identifier and the media type MUST be stored in the SignedData 546 encapContentInfo eContent OCTET STRING (unless the sending agent is 547 using multipart/signed, in which case the eContent is absent, per 548 Section 3.5.3 of this document). As another example, when applying 549 encryption to MIME data, the CMS EnvelopedData encryptedContentInfo 550 contentType MUST include the id-data object identifier and the 551 encrypted MIME content MUST be stored in the EnvelopedData 552 encryptedContentInfo encryptedContent OCTET STRING. 554 2.4.2. SignedData Content Type 556 Sending agents MUST use the SignedData content type to apply a 557 digital signature to a message or, in a degenerate case where there 558 is no signature information, to convey certificates. Applying a 559 signature to a message provides authentication, message integrity, 560 and non-repudiation of origin. 562 2.4.3. EnvelopedData Content Type 564 This content type is used to apply data confidentiality to a message. 565 In order to distribute the symmetric key, a sender needs to have 566 access to a public key for each intended message recipient to use 567 this service. 569 2.4.4. AuthEnvelopedData Content Type 571 This content type is used to apply data confidentiality and message 572 integrity to a message. This content type does not provide 573 authentication or non-repudiation. In order to distribute the 574 symmetric key, a sender needs to have access to a public key for each 575 intended message recipient to use this service. 577 2.4.5. CompressedData Content Type 579 This content type is used to apply data compression to a message. 580 This content type does not provide authentication, message integrity, 581 non-repudiation, or data confidentiality, and is only used to reduce 582 the message's size. 584 See Section 3.7 for further guidance on the use of this type in 585 conjunction with other CMS types. 587 2.5. Attributes and the SignerInfo Type 589 The SignerInfo type allows the inclusion of unsigned and signed 590 attributes along with a signature. These attributes can be required 591 for processing of message (i.e. Message Digest), information the 592 signer supplied (i.e. SMIME Capabilities) that should be processed, 593 or attributes which are not relevant in the current situation (i.e. 594 mlExpansionList [RFC2634] for mail viewers). 596 Receiving agents MUST be able to handle zero or one instance of each 597 of the signed attributes listed here. Sending agents SHOULD generate 598 one instance of each of the following signed attributes in each 599 S/MIME message: 601 - Signing Time (Section 2.5.1 in this document) 603 - SMIME Capabilities (Section 2.5.2 in this document) 605 - Encryption Key Preference (Section 2.5.3 in this document) 607 - Message Digest (Section 11.2 in [RFC5652]) 609 - Content Type (Section 11.1 in [RFC5652]) 611 Further, receiving agents SHOULD be able to handle zero or one 612 instance of the signingCertificate and signingCertificatev2 signed 613 attributes, as defined in Section 5 of RFC 2634 [ESS] and Section 3 614 of RFC 5035 [ESS]. 616 Sending agents SHOULD generate one instance of the signingCertificate 617 or signingCertificatev2 signed attribute in each SignerInfo 618 structure. 620 Additional attributes and values for these attributes might be 621 defined in the future. Receiving agents SHOULD handle attributes or 622 values that they do not recognize in a graceful manner. 624 Interactive sending agents that include signed attributes that are 625 not listed here SHOULD display those attributes to the user, so that 626 the user is aware of all of the data being signed. 628 2.5.1. Signing Time Attribute 630 The signing-time attribute is used to convey the time that a message 631 was signed. The time of signing will most likely be created by a 632 signer and therefore is only as trustworthy as that signer. 634 Sending agents MUST encode signing time through the year 2049 as 635 UTCTime; signing times in 2050 or later MUST be encoded as 636 GeneralizedTime. When the UTCTime CHOICE is used, S/MIME agents MUST 637 interpret the year field (YY) as follows: 639 If YY is greater than or equal to 50, the year is interpreted as 640 19YY; if YY is less than 50, the year is interpreted as 20YY. 642 Receiving agents MUST be able to process signing-time attributes that 643 are encoded in either UTCTime or GeneralizedTime. 645 2.5.2. SMIME Capabilities Attribute 647 The SMIMECapabilities attribute includes signature algorithms (such 648 as "sha256WithRSAEncryption"), symmetric algorithms (such as "AES-128 649 CBC"), authenticated symmetric algorithms (such as "AES-128 GCM") and 650 key encipherment algorithms (such as "rsaEncryption"). The presence 651 of an algorithm based SMIME Capability attribute in this sequence 652 implies that the sender can deal with the algorithm as well as 653 understanding the ASN.1 structures associated with that algorithm. 654 There are also several identifiers that indicate support for other 655 optional features such as binary encoding and compression. The 656 SMIMECapabilities were designed to be flexible and extensible so 657 that, in the future, a means of identifying other capabilities and 658 preferences such as certificates can be added in a way that will not 659 cause current clients to break. 661 If present, the SMIMECapabilities attribute MUST be a 662 SignedAttribute. CMS defines SignedAttributes as a SET OF Attribute. 663 The SignedAttributes in a signerInfo MUST include a single instance 664 of the SMIMECapabilities attribute. CMS defines the ASN.1 syntax for 665 Attribute to include attrValues SET OF AttributeValue. A 666 SMIMECapabilities attribute MUST only include a single instance of 667 AttributeValue. If a signature is detected to violate these 668 requirements, the signature SHOULD be treated as failing. 670 The semantics of the SMIMECapabilities attribute specify a partial 671 list as to what the client announcing the SMIMECapabilities can 672 support. A client does not have to list every capability it 673 supports, and need not list all its capabilities so that the 674 capabilities list doesn't get too long. In an SMIMECapabilities 675 attribute, the object identifiers (OIDs) are listed in order of their 676 preference, but SHOULD be separated logically along the lines of 677 their categories (signature algorithms, symmetric algorithms, key 678 encipherment algorithms, etc.). 680 The structure of the SMIMECapabilities attribute is to facilitate 681 simple table lookups and binary comparisons in order to determine 682 matches. For instance, the encoding for the SMIMECapability for 683 sha256WithRSAEncryption includes rather than omits the NULL 684 parameter. Because of the requirement for identical encoding, 685 individuals documenting algorithms to be used in the 686 SMIMECapabilities attribute SHOULD explicitly document the correct 687 byte sequence for the common cases. 689 For any capability, the associated parameters for the OID MUST 690 specify all of the parameters necessary to differentiate between two 691 instances of the same algorithm. 693 The OIDs that correspond to algorithms SHOULD use the same OID as the 694 actual algorithm, except in the case where the algorithm usage is 695 ambiguous from the OID. For instance, in an earlier specification, 696 rsaEncryption was ambiguous because it could refer to either a 697 signature algorithm or a key encipherment algorithm. In the event 698 that an OID is ambiguous, it needs to be arbitrated by the maintainer 699 of the registered SMIMECapabilities list as to which type of 700 algorithm will use the OID, and a new OID MUST be allocated under the 701 smimeCapabilities OID to satisfy the other use of the OID. 703 The registered SMIMECapabilities list specifies the parameters for 704 OIDs that need them, most notably key lengths in the case of 705 variable-length symmetric ciphers. In the event that there are no 706 differentiating parameters for a particular OID, the parameters MUST 707 be omitted, and MUST NOT be encoded as NULL. Additional values for 708 the SMIMECapabilities attribute might be defined in the future. 709 Receiving agents MUST handle a SMIMECapabilities object that has 710 values that it does not recognize in a graceful manner. 712 Section 2.7.1 explains a strategy for caching capabilities. 714 2.5.3. Encryption Key Preference Attribute 716 The encryption key preference attribute allows the signer to 717 unambiguously describe which of the signer's certificates has the 718 signer's preferred encryption key. This attribute is designed to 719 enhance behavior for interoperating with those clients that use 720 separate keys for encryption and signing. This attribute is used to 721 convey to anyone viewing the attribute which of the listed 722 certificates is appropriate for encrypting a session key for future 723 encrypted messages. 725 If present, the SMIMEEncryptionKeyPreference attribute MUST be a 726 SignedAttribute. CMS defines SignedAttributes as a SET OF Attribute. 727 The SignedAttributes in a signerInfo MUST include a single instance 728 of the SMIMEEncryptionKeyPreference attribute. CMS defines the ASN.1 729 syntax for Attribute to include attrValues SET OF AttributeValue. A 730 SMIMEEncryptionKeyPreference attribute MUST only include a single 731 instance of AttributeValue. If a signature is detected to violate 732 these requirements, the signature SHOULD be treated as failing. 734 The sending agent SHOULD include the referenced certificate in the 735 set of certificates included in the signed message if this attribute 736 is used. The certificate MAY be omitted if it has been previously 737 made available to the receiving agent. Sending agents SHOULD use 738 this attribute if the commonly used or preferred encryption 739 certificate is not the same as the certificate used to sign the 740 message. 742 Receiving agents SHOULD store the preference data if the signature on 743 the message is valid and the signing time is greater than the 744 currently stored value. (As with the SMIMECapabilities, the clock 745 skew SHOULD be checked and the data not used if the skew is too 746 great.) Receiving agents SHOULD respect the sender's encryption key 747 preference attribute if possible. This, however, represents only a 748 preference and the receiving agent can use any certificate in 749 replying to the sender that is valid. 751 Section 2.7.1 explains a strategy for caching preference data. 753 2.5.3.1. Selection of Recipient Key Management Certificate 755 In order to determine the key management certificate to be used when 756 sending a future CMS EnvelopedData message for a particular 757 recipient, the following steps SHOULD be followed: 759 - If an SMIMEEncryptionKeyPreference attribute is found in a 760 SignedData object received from the desired recipient, this 761 identifies the X.509 certificate that SHOULD be used as the X.509 762 key management certificate for the recipient. 764 - If an SMIMEEncryptionKeyPreference attribute is not found in a 765 SignedData object received from the desired recipient, the set of 766 X.509 certificates SHOULD be searched for a X.509 certificate with 767 the same subject name as the signer of a X.509 certificate that 768 can be used for key management. 770 - Or use some other method of determining the user's key management 771 key. If a X.509 key management certificate is not found, then 772 encryption cannot be done with the signer of the message. If 773 multiple X.509 key management certificates are found, the S/MIME 774 agent can make an arbitrary choice between them. 776 2.6. SignerIdentifier SignerInfo Type 778 S/MIME v4.0 implementations MUST support both issuerAndSerialNumber 779 and subjectKeyIdentifier. Messages that use the subjectKeyIdentifier 780 choice cannot be read by S/MIME v2 clients. 782 It is important to understand that some certificates use a value for 783 subjectKeyIdentifier that is not suitable for uniquely identifying a 784 certificate. Implementations MUST be prepared for multiple 785 certificates for potentially different entities to have the same 786 value for subjectKeyIdentifier, and MUST be prepared to try each 787 matching certificate during signature verification before indicating 788 an error condition. 790 2.7. ContentEncryptionAlgorithmIdentifier 792 Sending and receiving agents: 794 - MUST support encryption and decryption with AES-128 GCM and 795 AES-256 GCM [RFC5084]. 797 - MUST- support encryption and decryption with AES-128 CBC 798 [RFC3565]. 800 - SHOULD+ support encryption and decryption with ChaCha20-Poly1305 801 [RFC7905]. 803 2.7.1. Deciding Which Encryption Method to Use 805 When a sending agent creates an encrypted message, it has to decide 806 which type of encryption to use. The decision process involves using 807 information garnered from the capabilities lists included in messages 808 received from the recipient, as well as out-of-band information such 809 as private agreements, user preferences, legal restrictions, and so 810 on. 812 Section 2.5.2 defines a method by which a sending agent can 813 optionally announce, among other things, its decrypting capabilities 814 in its order of preference. The following method for processing and 815 remembering the encryption capabilities attribute in incoming signed 816 messages SHOULD be used. 818 - If the receiving agent has not yet created a list of capabilities 819 for the sender's public key, then, after verifying the signature 820 on the incoming message and checking the timestamp, the receiving 821 agent SHOULD create a new list containing at least the signing 822 time and the symmetric capabilities. 824 - If such a list already exists, the receiving agent SHOULD verify 825 that the signing time in the incoming message is greater than the 826 signing time stored in the list and that the signature is valid. 827 If so, the receiving agent SHOULD update both the signing time and 828 capabilities in the list. Values of the signing time that lie far 829 in the future (that is, a greater discrepancy than any reasonable 830 clock skew), or a capabilities list in messages whose signature 831 could not be verified, MUST NOT be accepted. 833 The list of capabilities SHOULD be stored for future use in creating 834 messages. 836 Before sending a message, the sending agent MUST decide whether it is 837 willing to use weak encryption for the particular data in the 838 message. If the sending agent decides that weak encryption is 839 unacceptable for this data, then the sending agent MUST NOT use a 840 weak algorithm. The decision to use or not use weak encryption 841 overrides any other decision in this section about which encryption 842 algorithm to use. 844 Section 2.7.1.1 and Section 2.7.1.2 describe the decisions a sending 845 agent SHOULD use in deciding which type of encryption will be applied 846 to a message. These rules are ordered, so the sending agent SHOULD 847 make its decision in the order given. 849 2.7.1.1. Rule 1: Known Capabilities 851 If the sending agent has received a set of capabilities from the 852 recipient for the message the agent is about to encrypt, then the 853 sending agent SHOULD use that information by selecting the first 854 capability in the list (that is, the capability most preferred by the 855 intended recipient) that the sending agent knows how to encrypt. The 856 sending agent SHOULD use one of the capabilities in the list if the 857 agent reasonably expects the recipient to be able to decrypt the 858 message. 860 2.7.1.2. Rule 2: Unknown Capabilities, Unknown Version of S/MIME 862 If the following two conditions are met: 864 - the sending agent has no knowledge of the encryption capabilities 865 of the recipient, and 867 - the sending agent has no knowledge of the version of S/MIME of the 868 recipient, 870 then the sending agent SHOULD use AES-256 GCM because it is a 871 stronger algorithm and is required by S/MIME v4.0. If the sending 872 agent chooses not to use AES-256 GCM in this step, given the 873 presumption is that a client implementing AES-GCM would do both 874 AES-256 and AES-128, it SHOULD use AES-128 CBC. 876 2.7.2. Choosing Weak Encryption 878 Algorithms such as RC2 are considered to be weak encryption 879 algorithms. Algorithms such as TripleDES are not state of the art 880 and are considered to be weaker algorithms than AES. A sending agent 881 that is controlled by a human SHOULD allow a human sender to 882 determine the risks of sending data using a weaker encryption 883 algorithm before sending the data, and possibly allow the human to 884 use a stronger encryption algorithm such as AES GCM or AES CBC even 885 if there is a possibility that the recipient will not be able to 886 process that algorithm. 888 2.7.3. Multiple Recipients 890 If a sending agent is composing an encrypted message to a group of 891 recipients where the encryption capabilities of some of the 892 recipients do not overlap, the sending agent is forced to send more 893 than one message. Please note that if the sending agent chooses to 894 send a message encrypted with a strong algorithm, and then send the 895 same message encrypted with a weak algorithm, someone watching the 896 communications channel could learn the contents of the strongly 897 encrypted message simply by decrypting the weakly encrypted message. 899 3. Creating S/MIME Messages 901 This section describes the S/MIME message formats and how they are 902 created. S/MIME messages are a combination of MIME bodies and CMS 903 content types. Several media types as well as several CMS content 904 types are used. The data to be secured is always a canonical MIME 905 entity. The MIME entity and other data, such as certificates and 906 algorithm identifiers, are given to CMS processing facilities that 907 produce a CMS object. Finally, the CMS object is wrapped in MIME. 908 The Enhanced Security Services for S/MIME [ESS] document provides 909 descriptions of how nested, secured S/MIME messages are formatted. 910 ESS provides a description of how a triple-wrapped S/MIME message is 911 formatted using multipart/signed and application/pkcs7-mime for the 912 signatures. 914 S/MIME provides one format for enveloped-only data, several formats 915 for signed-only data, and several formats for signed and enveloped 916 data. Several formats are required to accommodate several 917 environments, in particular for signed messages. The criteria for 918 choosing among these formats are also described. 920 The reader of this section is expected to understand MIME as 921 described in [MIME-SPEC] and [RFC1847]. 923 3.1. Preparing the MIME Entity for Signing, Enveloping, or Compressing 925 S/MIME is used to secure MIME entities. A MIME entity can be a sub- 926 part, sub-parts of a message, or the whole message with all its sub- 927 parts. A MIME entity that is the whole message includes only the 928 MIME message headers and MIME body, and does not include the RFC-822 929 header. Note that S/MIME can also be used to secure MIME entities 930 used in applications other than Internet mail. If protection of the 931 RFC-822 header is required, the use of the message/rfc822 media type 932 is explained later in this section. 934 The MIME entity that is secured and described in this section can be 935 thought of as the "inside" MIME entity. That is, it is the 936 "innermost" object in what is possibly a larger MIME message. 937 Processing "outside" MIME entities into CMS content types is 938 described in Section 3.2, Section 3.5, and elsewhere. 940 The procedure for preparing a MIME entity is given in [MIME-SPEC]. 941 The same procedure is used here with some additional restrictions 942 when signing. The description of the procedures from [MIME-SPEC] is 943 repeated here, but it is suggested that the reader refer to that 944 document for the exact procedure. This section also describes 945 additional requirements. 947 A single procedure is used for creating MIME entities that are to 948 have any combination of signing, enveloping, and compressing applied. 949 Some additional steps are recommended to defend against known 950 corruptions that can occur during mail transport that are of 951 particular importance for clear-signing using the multipart/signed 952 format. It is recommended that these additional steps be performed 953 on enveloped messages, or signed and enveloped messages, so that the 954 message can be forwarded to any environment without modification. 956 These steps are descriptive rather than prescriptive. The 957 implementer is free to use any procedure as long as the result is the 958 same. 960 Step 1. The MIME entity is prepared according to the local 961 conventions. 963 Step 2. The leaf parts of the MIME entity are converted to canonical 964 form. 966 Step 3. Appropriate transfer encoding is applied to the leaves of 967 the MIME entity. 969 When an S/MIME message is received, the security services on the 970 message are processed, and the result is the MIME entity. That MIME 971 entity is typically passed to a MIME-capable user agent where it is 972 further decoded and presented to the user or receiving application. 974 In order to protect outer, non-content-related message header fields 975 (for instance, the "Subject", "To", "From", and "Cc" fields), the 976 sending client MAY wrap a full MIME message in a message/rfc822 977 wrapper in order to apply S/MIME security services to these header 978 fields. It is up to the receiving client to decide how to present 979 this "inner" header along with the unprotected "outer" header. It is 980 RECOMMENDED that a distinction be made between the location of the 981 header. 983 When an S/MIME message is received, if the top-level protected MIME 984 entity has a Content-Type of message/rfc822, it can be assumed that 985 the intent was to provide header protection. This entity SHOULD be 986 presented as the top-level message, taking into account header 987 merging issues as previously discussed. 989 3.1.1. Canonicalization 991 Each MIME entity MUST be converted to a canonical form that is 992 uniquely and unambiguously representable in the environment where the 993 signature is created and the environment where the signature will be 994 verified. MIME entities MUST be canonicalized for enveloping and 995 compressing as well as signing. 997 The exact details of canonicalization depend on the actual media type 998 and subtype of an entity, and are not described here. Instead, the 999 standard for the particular media type SHOULD be consulted. For 1000 example, canonicalization of type text/plain is different from 1001 canonicalization of audio/basic. Other than text types, most types 1002 have only one representation regardless of computing platform or 1003 environment that can be considered their canonical representation. 1004 In general, canonicalization will be performed by the non-security 1005 part of the sending agent rather than the S/MIME implementation. 1007 The most common and important canonicalization is for text, which is 1008 often represented differently in different environments. MIME 1009 entities of major type "text" MUST have both their line endings and 1010 character set canonicalized. The line ending MUST be the pair of 1011 characters , and the charset SHOULD be a registered charset 1012 [CHARSETS]. The details of the canonicalization are specified in 1013 [MIME-SPEC]. 1015 Note that some charsets such as ISO-2022 have multiple 1016 representations for the same characters. When preparing such text 1017 for signing, the canonical representation specified for the charset 1018 MUST be used. 1020 3.1.2. Transfer Encoding 1022 When generating any of the secured MIME entities below, except the 1023 signing using the multipart/signed format, no transfer encoding is 1024 required at all. S/MIME implementations MUST be able to deal with 1025 binary MIME objects. If no Content-Transfer-Encoding header field is 1026 present, the transfer encoding is presumed to be 7BIT. 1028 As a rule, S/MIME implementations SHOULD use transfer encoding 1029 described in Section 3.1.3 for all MIME entities they secure. The 1030 reason for securing only 7-bit MIME entities, even for enveloped data 1031 that is not exposed to the transport, is that it allows the MIME 1032 entity to be handled in any environment without changing it. For 1033 example, a trusted gateway might remove the envelope, but not the 1034 signature, of a message, and then forward the signed message on to 1035 the end recipient so that they can verify the signatures directly. 1036 If the transport internal to the site is not 8-bit clean, such as on 1037 a wide-area network with a single mail gateway, verifying the 1038 signature will not be possible unless the original MIME entity was 1039 only 7-bit data. 1041 In the case where S/MIME implementations can determine that all 1042 intended recipients are capable of handling inner (all but the 1043 outermost) binary MIME objects SHOULD use binary encoding as opposed 1044 to a 7-bit-safe transfer encoding for the inner entities. The use of 1045 a 7-bit-safe encoding (such as base64) unnecessarily expands the 1046 message size. Implementations MAY determine that recipient 1047 implementations are capable of handling inner binary MIME entities 1048 either by interpreting the id-cap-preferBinaryInside 1049 SMIMECapabilities attribute, by prior agreement, or by other means. 1051 If one or more intended recipients are unable to handle inner binary 1052 MIME objects, or if this capability is unknown for any of the 1053 intended recipients, S/MIME implementations SHOULD use transfer 1054 encoding described in Section 3.1.3 for all MIME entities they 1055 secure. 1057 3.1.3. Transfer Encoding for Signing Using multipart/signed 1059 If a multipart/signed entity is ever to be transmitted over the 1060 standard Internet SMTP infrastructure or other transport that is 1061 constrained to 7-bit text, it MUST have transfer encoding applied so 1062 that it is represented as 7-bit text. MIME entities that are 7-bit 1063 data already need no transfer encoding. Entities such as 8-bit text 1064 and binary data can be encoded with quoted-printable or base-64 1065 transfer encoding. 1067 The primary reason for the 7-bit requirement is that the Internet 1068 mail transport infrastructure cannot guarantee transport of 8-bit or 1069 binary data. Even though many segments of the transport 1070 infrastructure now handle 8-bit and even binary data, it is sometimes 1071 not possible to know whether the transport path is 8-bit clean. If a 1072 mail message with 8-bit data were to encounter a message transfer 1073 agent that cannot transmit 8-bit or binary data, the agent has three 1074 options, none of which are acceptable for a clear-signed message: 1076 - The agent could change the transfer encoding; this would 1077 invalidate the signature. 1079 - The agent could transmit the data anyway, which would most likely 1080 result in the 8th bit being corrupted; this too would invalidate 1081 the signature. 1083 - The agent could return the message to the sender. 1085 [RFC1847] prohibits an agent from changing the transfer encoding of 1086 the first part of a multipart/signed message. If a compliant agent 1087 that cannot transmit 8-bit or binary data encountered a 1088 multipart/signed message with 8-bit or binary data in the first part, 1089 it would have to return the message to the sender as undeliverable. 1091 3.1.4. Sample Canonical MIME Entity 1093 This example shows a multipart/mixed message with full transfer 1094 encoding. This message contains a text part and an attachment. The 1095 sample message text includes characters that are not ASCII and thus 1096 need to be transfer encoded. Though not shown here, the end of each 1097 line is . The line ending of the MIME headers, the text, and 1098 the transfer encoded parts, all MUST be . 1100 Note that this example is not of an S/MIME message. 1102 Content-Type: multipart/mixed; boundary=bar 1104 --bar 1105 Content-Type: text/plain; charset=iso-8859-1 1106 Content-Transfer-Encoding: quoted-printable 1108 =A1Hola Michael! 1110 How do you like the new S/MIME specification? 1112 It's generally a good idea to encode lines that begin with 1113 From=20because some mail transport agents will insert a greater- 1114 than (>) sign, thus invalidating the signature. 1116 Also, in some cases it might be desirable to encode any =20 1117 trailing whitespace that occurs on lines in order to ensure =20 1118 that the message signature is not invalidated when passing =20 1119 a gateway that modifies such whitespace (like BITNET). =20 1121 --bar 1122 Content-Type: image/jpeg 1123 Content-Transfer-Encoding: base64 1125 iQCVAwUBMJrRF2N9oWBghPDJAQE9UQQAtl7LuRVndBjrk4EqYBIb3h5QXIX/LC// 1126 jJV5bNvkZIGPIcEmI5iFd9boEgvpirHtIREEqLQRkYNoBActFBZmh9GC3C041WGq 1127 uMbrbxc+nIs1TIKlA08rVi9ig/2Yh7LFrK5Ein57U/W72vgSxLhe/zhdfolT9Brn 1128 HOxEa44b+EI= 1130 --bar-- 1132 3.2. The application/pkcs7-mime Media Type 1134 The application/pkcs7-mime media type is used to carry CMS content 1135 types including EnvelopedData, SignedData, and CompressedData. The 1136 details of constructing these entities are described in subsequent 1137 sections. This section describes the general characteristics of the 1138 application/pkcs7-mime media type. 1140 The carried CMS object always contains a MIME entity that is prepared 1141 as described in Section 3.1 if the eContentType is id-data. Other 1142 contents MAY be carried when the eContentType contains different 1143 values. See [ESS] for an example of this with signed receipts. 1145 Since CMS content types are binary data, in most cases base-64 1146 transfer encoding is appropriate, in particular, when used with SMTP 1147 transport. The transfer encoding used depends on the transport 1148 through which the object is to be sent, and is not a characteristic 1149 of the media type. 1151 Note that this discussion refers to the transfer encoding of the CMS 1152 object or "outside" MIME entity. It is completely distinct from, and 1153 unrelated to, the transfer encoding of the MIME entity secured by the 1154 CMS object, the "inside" object, which is described in Section 3.1. 1156 Because there are several types of application/pkcs7-mime objects, a 1157 sending agent SHOULD do as much as possible to help a receiving agent 1158 know about the contents of the object without forcing the receiving 1159 agent to decode the ASN.1 for the object. The Content-Type header 1160 field of all application/pkcs7-mime objects SHOULD include the 1161 optional "smime-type" parameter, as described in the following 1162 sections. 1164 3.2.1. The name and filename Parameters 1166 For the application/pkcs7-mime, sending agents SHOULD emit the 1167 optional "name" parameter to the Content-Type field for compatibility 1168 with older systems. Sending agents SHOULD also emit the optional 1169 Content-Disposition field [RFC2183] with the "filename" parameter. 1170 If a sending agent emits the above parameters, the value of the 1171 parameters SHOULD be a file name with the appropriate extension: 1173 Media Type File 1174 Extension 1175 application/pkcs7-mime (SignedData, EnvelopedData, .p7m 1176 AuthEnvelopedData) 1177 application/pkcs7-mime (degenerate SignedData certificate .p7c 1178 management message) 1179 application/pkcs7-mime (CompressedData) .p7z 1180 application/pkcs7-signature (SignedData) .p7s 1182 In addition, the file name SHOULD be limited to eight characters 1183 followed by a three-letter extension. The eight-character filename 1184 base can be any distinct name; the use of the filename base "smime" 1185 SHOULD be used to indicate that the MIME entity is associated with 1186 S/MIME. 1188 Including a file name serves two purposes. It facilitates easier use 1189 of S/MIME objects as files on disk. It also can convey type 1190 information across gateways. When a MIME entity of type 1191 application/pkcs7-mime (for example) arrives at a gateway that has no 1192 special knowledge of S/MIME, it will default the entity's media type 1193 to application/octet-stream and treat it as a generic attachment, 1194 thus losing the type information. However, the suggested filename 1195 for an attachment is often carried across a gateway. This often 1196 allows the receiving systems to determine the appropriate application 1197 to hand the attachment off to, in this case, a stand-alone S/MIME 1198 processing application. Note that this mechanism is provided as a 1199 convenience for implementations in certain environments. A proper 1200 S/MIME implementation MUST use the media types and MUST NOT rely on 1201 the file extensions. 1203 3.2.2. The smime-type Parameter 1205 The application/pkcs7-mime content type defines the optional "smime- 1206 type" parameter. The intent of this parameter is to convey details 1207 about the security applied (signed or enveloped) along with 1208 information about the contained content. This specification defines 1209 the following smime-types. 1211 Name CMS Type Inner Content 1212 enveloped-data EnvelopedData id-data 1213 signed-data SignedData id-data 1214 certs-only SignedData id-data 1215 compressed-data CompressedData id-data 1216 authEnveloped-data AuthEnvelopedData id-data 1218 In order for consistency to be obtained with future specifications, 1219 the following guidelines SHOULD be followed when assigning a new 1220 smime-type parameter. 1222 1. If both signing and encryption can be applied to the content, 1223 then three values for smime-type SHOULD be assigned "signed-*", 1224 "authEnv-*", and "enveloped-*". If one operation can be 1225 assigned, then this can be omitted. Thus, since "certs-only" can 1226 only be signed, "signed-" is omitted. 1228 2. A common string for a content OID SHOULD be assigned. We use 1229 "data" for the id-data content OID when MIME is the inner 1230 content. 1232 3. If no common string is assigned, then the common string of 1233 "OID." is recommended (for example, 1234 "OID.2.16.840.1.101.3.4.1.2" would be AES-128 CBC). 1236 It is explicitly intended that this field be a suitable hint for mail 1237 client applications to indicate whether a message is "signed", 1238 "authEnveloped" or "enveloped" without having to tunnel into the CMS 1239 payload. 1241 A registry for additional smime-type parameter values has been 1242 defined in [RFC7114]. 1244 3.3. Creating an Enveloped-Only Message 1246 This section describes the format for enveloping a MIME entity 1247 without signing it. It is important to note that sending enveloped 1248 but not signed messages does not provide for data integrity. The 1249 Enveloped-Only structure does not support authenticated symmetric 1250 algorithms, use the .Authenticated Enveloped structure for these 1251 algorithms. Thus, it is possible to replace ciphertext in such a way 1252 that the processed message will still be valid, but the meaning can 1253 be altered. 1255 Step 1. The MIME entity to be enveloped is prepared according to 1256 Section 3.1. 1258 Step 2. The MIME entity and other required data is processed into a 1259 CMS object of type EnvelopedData. In addition to encrypting 1260 a copy of the content-encryption key for each recipient, a 1261 copy of the content-encryption key SHOULD be encrypted for 1262 the originator and included in the EnvelopedData (see 1263 [RFC5652], Section 6). 1265 Step 3. The EnvelopedData object is wrapped in a CMS ContentInfo 1266 object. 1268 Step 4. The ContentInfo object is inserted into an 1269 application/pkcs7-mime MIME entity. 1271 The smime-type parameter for enveloped-only messages is "enveloped- 1272 data". The file extension for this type of message is ".p7m". 1274 A sample message would be: 1276 Content-Type: application/pkcs7-mime; name=smime.p7m; 1277 smime-type=enveloped-data 1278 Content-Transfer-Encoding: base64 1279 Content-Disposition: attachment; filename=smime.p7m 1281 MIIBHgYJKoZIhvcNAQcDoIIBDzCCAQsCAQAxgcAwgb0CAQAwJjASMRAwDgYDVQQDEw 1282 dDYXJsUlNBAhBGNGvHgABWvBHTbi7NXXHQMA0GCSqGSIb3DQEBAQUABIGAC3EN5nGI 1283 iJi2lsGPcP2iJ97a4e8kbKQz36zg6Z2i0yx6zYC4mZ7mX7FBs3IWg+f6KgCLx3M1eC 1284 bWx8+MDFbbpXadCDgO8/nUkUNYeNxJtuzubGgzoyEd8Ch4H/dd9gdzTd+taTEgS0ip 1285 dSJuNnkVY4/M652jKKHRLFf02hosdR8wQwYJKoZIhvcNAQcBMBQGCCqGSIb3DQMHBA 1286 gtaMXpRwZRNYAgDsiSf8Z9P43LrY4OxUk660cu1lXeCSFOSOpOJ7FuVyU= 1288 3.4. Creating an Authenticated Enveloped-Only Message 1290 This section describes the format for enveloping a MIME entity 1291 without signing it. Authenticated enveloped messages provide 1292 confidentiality and data integrity. It is important to note that 1293 sending authenticated enveloped messages does not provide for proof 1294 of origination when using S/MIME. It is possible for a third party 1295 to replace ciphertext in such a way that the processed message will 1296 still be valid, but the meaning can be altered. However this is 1297 substantially more difficult than it is for an enveloped-only message 1298 as the algorithm does provide a level of authentication. Any 1299 recipient for whom the message is encrypted can replace it without 1300 detection. 1302 Step 1. The MIME entity to be enveloped is prepared according to 1303 Section 3.1. 1305 Step 2. The MIME entity and other required data is processed into a 1306 CMS object of type AuthEnvelopedData. In addition to 1307 encrypting a copy of the content-encryption key for each 1308 recipient, a copy of the content-encryption key SHOULD be 1309 encrypted for the originator and included in the 1310 AuthEnvelopedData (see [RFC5083]). 1312 Step 3. The AuthEnvelopedData object is wrapped in a CMS ContentInfo 1313 object. 1315 Step 4. The ContentInfo object is inserted into an 1316 application/pkcs7-mime MIME entity. 1318 The smime-type parameter for authenticated enveloped-only messages is 1319 "authEnveloped-data". The file extension for this type of message is 1320 ".p7m". 1322 A sample message would be: 1324 Content-Type: application/pkcs7-mime; smime-type=authEnveloped-data; 1325 name=smime.p7m 1326 Content-Transfer-Encoding: base64 1327 Content-Disposition: attachment; filename=smime.p7m 1329 MIIDWQYLKoZIhvcNAQkQARegggNIMIIDRAIBADGBvjCBuwIBADAmMBIxEDAO 1330 BgNVBAMTB0NhcmxSU0ECEEY0a8eAAFa8EdNuLs1dcdAwCwYJKoZIhvcNAQEB 1331 BIGAgyZJo0ERTxA4xdTri5P5tVMyh0RARepTUCORZvlUbcUlaI8IpJZH3/J1 1332 Fv6MxTRS4O/K+ZcTlQmYeWLQvwdltQdOIP3mhpqXzTnOYhTK1IDtF2zx75Lg 1333 vE+ilpcLIzXfJB4RCBPtBWaHAof4Wb+VMQvLkk9OolX4mRSH1LPktgAwggJq 1334 BgkqhkiG9w0BBwEwGwYJYIZIAWUDBAEGMA4EDGPizioC9OHSsnNx4oCCAj7Y 1335 Cb8rOy8+55106newEJohC/aDgWbJhrMKzSOwa7JraXOV3HXD3NvKbl665dRx 1336 vmDwSCNaLCRU5q8/AxQx2SvnAbM+JKcEfC/VFdd4SiHNiUECAApLku2rMi5B 1337 WrhW/FXmx9d+cjum2BRwB3wj0q1wajdB0/kVRbQwg697dnlYyUog4vpJERjr 1338 7KAkawZx1RMHaM18wgZjUNpCBXFS3chQi9mTBp2i2Hf5iZ8OOtTx+rCQUmI6 1339 Jhy03vdcPCCARBjn3v0d3upZYDZddMA41CB9fKnnWFjadV1KpYwv80tqsEfx 1340 Vo0lJQ5VtJ8MHJiBpLVKadRIZ4iH2ULC0JtN5mXE1SrFKh7cqbJ4+7nqSRL3 1341 oBTud3rX41DGshOjpqcYHT4sqYlgZkc6dp0g1+hF1p3cGmjHdpysV2NVSUev 1342 ghHbvSqhIsXFzRSWKiZOigmlkv3R5LnjpYyP4brM62Jl7y0qborvV4dNMz7m 1343 D+5YxSlH0KAe8z6TT3LHuQdN7QCkFoiUSCaNhpAFaakkGIpqcqLhpOK4lXxt 1344 kptCG93eUwNCcTxtx6bXufPR5TUHohvZvfeqMp42kL37FJC/A8ZHoOxXy8+X 1345 X5QYxCQNuofWlvnIWv0Nr8w65x6lgVjPYmd/cHwzQKBTBMXN6pBud/PZL5zF 1346 tw3QHlQkBR+UflMWZKeN9L0KdQ27mQlCo5gQS85aifxoiiA2v9+0hxZw91rP 1347 IW4D+GS7oMMoKj8ZNyCJJsyf5smRZ+WxeBoolb3+TiGcBBCsRnfe6noLZiFO 1348 6Zeu2ZwE 1350 3.5. Creating a Signed-Only Message 1352 There are two formats for signed messages defined for S/MIME: 1354 - application/pkcs7-mime with SignedData. 1356 - multipart/signed. 1358 In general, the multipart/signed form is preferred for sending, and 1359 receiving agents MUST be able to handle both. 1361 3.5.1. Choosing a Format for Signed-Only Messages 1363 There are no hard-and-fast rules as to when a particular signed-only 1364 format is chosen. It depends on the capabilities of all the 1365 receivers and the relative importance of receivers with S/MIME 1366 facilities being able to verify the signature versus the importance 1367 of receivers without S/MIME software being able to view the message. 1369 Messages signed using the multipart/signed format can always be 1370 viewed by the receiver whether or not they have S/MIME software. 1371 They can also be viewed whether they are using a MIME-native user 1372 agent or they have messages translated by a gateway. In this 1373 context, "be viewed" means the ability to process the message 1374 essentially as if it were not a signed message, including any other 1375 MIME structure the message might have. 1377 Messages signed using the SignedData format cannot be viewed by a 1378 recipient unless they have S/MIME facilities. However, the 1379 SignedData format protects the message content from being changed by 1380 benign intermediate agents. Such agents might do line wrapping or 1381 content-transfer encoding changes that would break the signature. 1383 3.5.2. Signing Using application/pkcs7-mime with SignedData 1385 This signing format uses the application/pkcs7-mime media type. The 1386 steps to create this format are: 1388 Step 1. The MIME entity is prepared according to Section 3.1. 1390 Step 2. The MIME entity and other required data are processed into a 1391 CMS object of type SignedData. 1393 Step 3. The SignedData object is wrapped in a CMS ContentInfo 1394 object. 1396 Step 4. The ContentInfo object is inserted into an 1397 application/pkcs7-mime MIME entity. 1399 The smime-type parameter for messages using application/pkcs7-mime 1400 with SignedData is "signed-data". The file extension for this type 1401 of message is ".p7m". 1403 A sample message would be: 1405 Content-Type: application/pkcs7-mime; smime-type=signed-data; 1406 name=smime.p7m 1407 Content-Transfer-Encoding: base64 1408 Content-Disposition: attachment; filename=smime.p7m 1410 MIIDmQYJKoZIhvcNAQcCoIIDijCCA4YCAQExCTAHBgUrDgMCGjAtBgkqhkiG9w0BBw 1411 GgIAQeDQpUaGlzIGlzIHNvbWUgc2FtcGxlIGNvbnRlbnQuoIIC4DCCAtwwggKboAMC 1412 AQICAgDIMAkGByqGSM44BAMwEjEQMA4GA1UEAxMHQ2FybERTUzAeFw05OTA4MTcwMT 1413 EwNDlaFw0zOTEyMzEyMzU5NTlaMBMxETAPBgNVBAMTCEFsaWNlRFNTMIIBtjCCASsG 1414 ByqGSM44BAEwggEeAoGBAIGNze2D6gqeOT7CSCij5EeT3Q7XqA7sU8WrhAhP/5Thc0 1415 h+DNbzREjR/p+vpKGJL+HZMMg23j+bv7dM3F9piuR10DcMkQiVm96nXvn89J8v3UOo 1416 i1TxP7AHCEdNXYjDw7Wz41UIddU5dhDEeL3/nbCElzfy5FEbteQJllzzflvbAhUA4k 1417 emGkVmuBPG2o+4NyErYov3k80CgYAmONAUiTKqOfs+bdlLWWpMdiM5BAI1XPLLGjDD 1418 HlBd3ZtZ4s2qBT1YwHuiNrhuB699ikIlp/R1z0oIXks+kPht6pzJIYo7dhTpzi5dow 1419 fNI4W4LzABfG1JiRGJNkS9+MiVSlNWteL5c+waYTYfEX/Cve3RUP+YdMLRgUpgObo2 1420 OQOBhAACgYBc47ladRSWC6l63eM/qeysXty9txMRNKYWiSgRI9k0hmd1dRMSPUNbb+ 1421 VRv/qJ8qIbPiR9PQeNW2PIu0WloErjhdbOBoA/6CN+GvIkq1MauCcNHu8Iv2YUgFxi 1422 rGX6FYvxuzTU0pY39mFHssQyhPB+QUD9RqdjTjPypeL08oPluKOBgTB/MAwGA1UdEw 1423 EB/wQCMAAwDgYDVR0PAQH/BAQDAgbAMB8GA1UdIwQYMBaAFHBEPoIub4feStN14z0g 1424 vEMrk/EfMB0GA1UdDgQWBBS+bKGz48H37UNwpM4TAeL945f+zTAfBgNVHREEGDAWgR 1425 RBbGljZURTU0BleGFtcGxlLmNvbTAJBgcqhkjOOAQDAzAAMC0CFFUMpBkfQiuJcSIz 1426 jYNqtT1na79FAhUAn2FTUlQLXLLd2ud2HeIQUltDXr0xYzBhAgEBMBgwEjEQMA4GA1 1427 UEAxMHQ2FybERTUwICAMgwBwYFKw4DAhowCQYHKoZIzjgEAwQuMCwCFD1cSW6LIUFz 1428 eXle3YI5SKSBer/sAhQmCq7s/CTFHOEjgASeUjbMpx5g6A== 1430 3.5.3. Signing Using the multipart/signed Format 1432 This format is a clear-signing format. Recipients without any S/MIME 1433 or CMS processing facilities are able to view the message. It makes 1434 use of the multipart/signed media type described in [RFC1847]. The 1435 multipart/signed media type has two parts. The first part contains 1436 the MIME entity that is signed; the second part contains the 1437 "detached signature" CMS SignedData object in which the 1438 encapContentInfo eContent field is absent. 1440 3.5.3.1. The application/pkcs7-signature Media Type 1442 This media type always contains a CMS ContentInfo containing a single 1443 CMS object of type SignedData. The SignedData encapContentInfo 1444 eContent field MUST be absent. The signerInfos field contains the 1445 signatures for the MIME entity. 1447 The file extension for signed-only messages using application/pkcs7- 1448 signature is ".p7s". 1450 3.5.3.2. Creating a multipart/signed Message 1452 Step 1. The MIME entity to be signed is prepared according to 1453 Section 3.1, taking special care for clear-signing. 1455 Step 2. The MIME entity is presented to CMS processing in order to 1456 obtain an object of type SignedData in which the 1457 encapContentInfo eContent field is absent. 1459 Step 3. The MIME entity is inserted into the first part of a 1460 multipart/signed message with no processing other than that 1461 described in Section 3.1. 1463 Step 4. Transfer encoding is applied to the "detached signature" CMS 1464 SignedData object, and it is inserted into a MIME entity of 1465 type application/pkcs7-signature. 1467 Step 5. The MIME entity of the application/pkcs7-signature is 1468 inserted into the second part of the multipart/signed 1469 entity. 1471 The multipart/signed Content-Type has two required parameters: the 1472 protocol parameter and the micalg parameter. 1474 The protocol parameter MUST be "application/pkcs7-signature". Note 1475 that quotation marks are required around the protocol parameter 1476 because MIME requires that the "/" character in the parameter value 1477 MUST be quoted. 1479 The micalg parameter allows for one-pass processing when the 1480 signature is being verified. The value of the micalg parameter is 1481 dependent on the message digest algorithm(s) used in the calculation 1482 of the Message Integrity Check. If multiple message digest 1483 algorithms are used, they MUST be separated by commas per [RFC1847]. 1484 The values to be placed in the micalg parameter SHOULD be from the 1485 following: 1487 Algorithm Value Used 1488 MD5 md5 1489 SHA-1 sha-1 1490 SHA-224 sha-224 1491 SHA-256 sha-256 1492 SHA-384 sha-384 1493 SHA-512 sha-512 1494 Any other (defined separately in algorithm profile or "unknown" if 1495 not defined) 1497 (Historical note: some early implementations of S/MIME emitted and 1498 expected "rsa-md5", "rsa-sha1", and "sha1" for the micalg parameter.) 1499 Receiving agents SHOULD be able to recover gracefully from a micalg 1500 parameter value that they do not recognize. Future names for this 1501 parameter will be consistent with the IANA "Hash Function Textual 1502 Names" registry. 1504 3.5.3.3. Sample multipart/signed Message 1506 Content-Type: multipart/signed; 1507 micalg=sha-1; 1508 boundary="----=_NextBoundry____Fri,_06_Sep_2002_00:25:21"; 1509 protocol="application/pkcs7-signature" 1511 This is a multi-part message in MIME format. 1513 ------=_NextBoundry____Fri,_06_Sep_2002_00:25:21 1515 This is some sample content. 1516 ------=_NextBoundry____Fri,_06_Sep_2002_00:25:21 1517 Content-Type: application/pkcs7-signature; name=smime.p7s 1518 Content-Transfer-Encoding: base64 1519 Content-Disposition: attachment; filename=smime.p7s 1521 MIIDdwYJKoZIhvcNAQcCoIIDaDCCA2QCAQExCTAHBgUrDgMCGjALBgkqhkiG9w0BBw 1522 GgggLgMIIC3DCCApugAwIBAgICAMgwCQYHKoZIzjgEAzASMRAwDgYDVQQDEwdDYXJs 1523 RFNTMB4XDTk5MDgxNzAxMTA0OVoXDTM5MTIzMTIzNTk1OVowEzERMA8GA1UEAxMIQW 1524 xpY2VEU1MwggG2MIIBKwYHKoZIzjgEATCCAR4CgYEAgY3N7YPqCp45PsJIKKPkR5Pd 1525 DteoDuxTxauECE//lOFzSH4M1vNESNH+n6+koYkv4dkwyDbeP5u/t0zcX2mK5HXQNw 1526 yRCJWb3qde+fz0ny/dQ6iLVPE/sAcIR01diMPDtbPjVQh11Tl2EMR4vf+dsISXN/Lk 1527 URu15AmWXPN+W9sCFQDiR6YaRWa4E8baj7g3IStii/eTzQKBgCY40BSJMqo5+z5t2U 1528 tZakx2IzkEAjVc8ssaMMMeUF3dm1nizaoFPVjAe6I2uG4Hr32KQiWn9HXPSgheSz6Q 1529 +G3qnMkhijt2FOnOLl2jB80jhbgvMAF8bUmJEYk2RL34yJVKU1a14vlz7BphNh8Rf8 1530 K97dFQ/5h0wtGBSmA5ujY5A4GEAAKBgFzjuVp1FJYLqXrd4z+p7Kxe3L23ExE0phaJ 1531 KBEj2TSGZ3V1ExI9Q1tv5VG/+onyohs+JH09B41bY8i7RaWgSuOF1s4GgD/oI34a8i 1532 SrUxq4Jw0e7wi/ZhSAXGKsZfoVi/G7NNTSljf2YUeyxDKE8H5BQP1Gp2NOM/Kl4vTy 1533 g+W4o4GBMH8wDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCBsAwHwYDVR0jBBgwFo 1534 AUcEQ+gi5vh95K03XjPSC8QyuT8R8wHQYDVR0OBBYEFL5sobPjwfftQ3CkzhMB4v3j 1535 l/7NMB8GA1UdEQQYMBaBFEFsaWNlRFNTQGV4YW1wbGUuY29tMAkGByqGSM44BAMDMA 1536 AwLQIUVQykGR9CK4lxIjONg2q1PWdrv0UCFQCfYVNSVAtcst3a53Yd4hBSW0NevTFj 1537 MGECAQEwGDASMRAwDgYDVQQDEwdDYXJsRFNTAgIAyDAHBgUrDgMCGjAJBgcqhkjOOA 1538 QDBC4wLAIUM/mGf6gkgp9Z0XtRdGimJeB/BxUCFGFFJqwYRt1WYcIOQoGiaowqGzVI 1540 ------=_NextBoundry____Fri,_06_Sep_2002_00:25:21-- 1542 The content that is digested (the first part of the multipart/signed) 1543 consists of the bytes: 1545 54 68 69 73 20 69 73 20 73 6f 6d 65 20 73 61 6d 70 6c 65 20 63 6f 6e 1546 74 65 6e 74 2e 0d 0a 1548 3.6. Creating a Compressed-Only Message 1550 This section describes the format for compressing a MIME entity. 1551 Please note that versions of S/MIME prior to version 3.1 did not 1552 specify any use of CompressedData, and will not recognize it. The 1553 use of a capability to indicate the ability to receive CompressedData 1554 is described in [RFC3274] and is the preferred method for 1555 compatibility. 1557 Step 1. The MIME entity to be compressed is prepared according to 1558 Section 3.1. 1560 Step 2. The MIME entity and other required data are processed into a 1561 CMS object of type CompressedData. 1563 Step 3. The CompressedData object is wrapped in a CMS ContentInfo 1564 object. 1566 Step 4. The ContentInfo object is inserted into an 1567 application/pkcs7-mime MIME entity. 1569 The smime-type parameter for compressed-only messages is "compressed- 1570 data". The file extension for this type of message is ".p7z". 1572 A sample message would be: 1574 Content-Type: application/pkcs7-mime; smime-type=compressed-data; 1575 name=smime.p7z 1576 Content-Transfer-Encoding: base64 1577 Content-Disposition: attachment; filename=smime.p7z 1579 eNoLycgsVgCi4vzcVIXixNyCnFSF5Py8ktS8Ej0AlCkKVA== 1581 3.7. Multiple Operations 1583 The signed-only, enveloped-only, and compressed-only MIME formats can 1584 be nested. This works because these formats are all MIME entities 1585 that encapsulate other MIME entities. 1587 An S/MIME implementation MUST be able to receive and process 1588 arbitrarily nested S/MIME within reasonable resource limits of the 1589 recipient computer. 1591 It is possible to apply any of the signing, encrypting, and 1592 compressing operations in any order. It is up to the implementer and 1593 the user to choose. When signing first, the signatories are then 1594 securely obscured by the enveloping. When enveloping first the 1595 signatories are exposed, but it is possible to verify signatures 1596 without removing the enveloping. This can be useful in an 1597 environment where automatic signature verification is desired, as no 1598 private key material is required to verify a signature. 1600 There are security ramifications to choosing whether to sign first or 1601 encrypt first. A recipient of a message that is encrypted and then 1602 signed can validate that the encrypted block was unaltered, but 1603 cannot determine any relationship between the signer and the 1604 unencrypted contents of the message. A recipient of a message that 1605 is signed then encrypted can assume that the signed message itself 1606 has not been altered, but that a careful attacker could have changed 1607 the unauthenticated portions of the encrypted message. 1609 When using compression, keep the following guidelines in mind: 1611 - Compression of binary encoded encrypted data is discouraged, since 1612 it will not yield significant compression. Base64 encrypted data 1613 could very well benefit, however. 1615 - If a lossy compression algorithm is used with signing, you will 1616 need to compress first, then sign. 1618 3.8. Creating a Certificate Management Message 1620 The certificate management message or MIME entity is used to 1621 transport certificates and/or Certificate Revocation Lists, such as 1622 in response to a registration request. 1624 Step 1. The certificates and/or Certificate Revocation Lists are 1625 made available to the CMS generating process that creates a 1626 CMS object of type SignedData. The SignedData 1627 encapContentInfo eContent field MUST be absent and 1628 signerInfos field MUST be empty. 1630 Step 2. The SignedData object is wrapped in a CMS ContentInfo 1631 object. 1633 Step 3. The ContentInfo object is enclosed in an 1634 application/pkcs7-mime MIME entity. 1636 The smime-type parameter for a certificate management message is 1637 "certs-only". The file extension for this type of message is ".p7c". 1639 3.9. Registration Requests 1641 A sending agent that signs messages MUST have a certificate for the 1642 signature so that a receiving agent can verify the signature. There 1643 are many ways of getting certificates, such as through an exchange 1644 with a certification authority, through a hardware token or diskette, 1645 and so on. 1647 S/MIME v2 [SMIMEv2] specified a method for "registering" public keys 1648 with certificate authorities using an application/pkcs10 body part. 1649 Since that time, the IETF PKIX Working Group has developed other 1650 methods for requesting certificates. However, S/MIME v4.0 does not 1651 require a particular certificate request mechanism. 1653 3.10. Identifying an S/MIME Message 1655 Because S/MIME takes into account interoperation in non-MIME 1656 environments, several different mechanisms are employed to carry the 1657 type information, and it becomes a bit difficult to identify S/MIME 1658 messages. The following table lists criteria for determining whether 1659 or not a message is an S/MIME message. A message is considered an 1660 S/MIME message if it matches any of the criteria listed below. 1662 The file suffix in the table below comes from the "name" parameter in 1663 the Content-Type header field, or the "filename" parameter on the 1664 Content-Disposition header field. These parameters that give the 1665 file suffix are not listed below as part of the parameter section. 1667 Media type parameters file suffix 1668 application/pkcs7-mime n/a n/a 1669 multipart/signed protocol= n/a 1670 "application/pkcs7-signature" 1671 application/octet-stream n/a p7m, p7s, 1672 p7c, p7z 1674 4. Certificate Processing 1676 A receiving agent MUST provide some certificate retrieval mechanism 1677 in order to gain access to certificates for recipients of digital 1678 envelopes. This specification does not cover how S/MIME agents 1679 handle certificates, only what they do after a certificate has been 1680 validated or rejected. S/MIME certificate issues are covered in 1681 [RFC5750]. 1683 At a minimum, for initial S/MIME deployment, a user agent could 1684 automatically generate a message to an intended recipient requesting 1685 that recipient's certificate in a signed return message. Receiving 1686 and sending agents SHOULD also provide a mechanism to allow a user to 1687 "store and protect" certificates for correspondents in such a way so 1688 as to guarantee their later retrieval. 1690 4.1. Key Pair Generation 1692 All generated key pairs MUST be generated from a good source of non- 1693 deterministic random input [RFC4086] and the private key MUST be 1694 protected in a secure fashion. 1696 An S/MIME user agent MUST NOT generate asymmetric keys less than 2048 1697 bits for use with an RSA signature algorithm. 1699 For 2048-bit through 4096-bit RSA with SHA-256 see [RFC5754] and 1700 [FIPS186-4]. The first reference provides the signature algorithm's 1701 object identifier, and the second provides the signature algorithm's 1702 definition. 1704 For RSASSA-PSS with SHA-256, see [RFC4056]. For RSAES-OAEP, see 1705 [RFC3560]. 1707 4.2. Signature Generation 1709 The following are the requirements for an S/MIME agent generated RSA 1710 and RSASSA-PSS signatures: 1712 key size <= 2047 : SHOULD NOT (Note 1) 1713 2048 <= key size <= 4096 : SHOULD (see Security Considerations) 1714 4096 < key size : MAY (see Security Considerations) 1716 Note 1: see Historical Mail Considerations in Section 6. 1717 Note 2: see Security Considerations in Appendix B. 1719 Key sizes for ECDSA and EdDSA are fixed by the curve. 1721 4.3. Signature Verification 1723 The following are the requirements for S/MIME receiving agents during 1724 signature verification of RSA and RSASSA-PSS signatures: 1726 key size <= 2047 : SHOULD NOT (Note 1) 1727 2048 <= key size <= 4096 : MUST (Note 2) 1728 4096 < key size : MAY (Note 2) 1730 Note 1: see Historical Mail Considerations in Section 6. 1731 Note 2: see Security Considerations in Appendix B. 1733 Key sizes for ECDSA and EdDSA are fixed by the curve. 1735 4.4. Encryption 1737 The following are the requirements for an S/MIME agent when 1738 establishing keys for content encryption using the RSA, and RSA-OAEP 1739 algorithms: 1741 key size <= 2047 : SHOULD NOT (Note 1) 1742 2048 <= key size <= 4096 : SHOULD (Note 2) 1743 4096 < key size : MAY (Note 2) 1745 Note 1: see Historical Mail Considerations in Section 6. 1746 Note 2: see Security Considerations in Appendix B. 1748 Key sizes for ECDH are fixed by the curve. 1750 4.5. Decryption 1752 The following are the requirements for an S/MIME agent when 1753 establishing keys for content decryption using the RSA and RSAES-OAEP 1754 algorithms: 1756 key size <= 2047 : MAY (Note 1) 1757 2048 <= key size <= 4096 : MUST (Note 2) 1758 4096 < key size : MAY (Note 2) 1760 Note 1: see Historical Mail Considerations in Section 6. 1761 Note 2: see Security Considerations in Appendix B. 1763 Key sizes for ECDH are fixed by the curve. 1765 5. IANA Considerations 1767 The following information updates the media type registration for 1768 application/pkcs7-mime and application/pkcs7-signature to refer to 1769 this document as opposed to RFC 2311. 1771 Note that other documents can define additional MIME media types for 1772 S/MIME. 1774 5.1. Media Type for application/pkcs7-mime 1775 Type name: application 1777 Subtype Name: pkcs7-mime 1779 Required Parameters: NONE 1781 Optional Parameters: smime-type/signed-data 1782 smime-type/enveloped-data 1783 smime-type/compressed-data 1784 smime-type/certs-only 1785 name 1787 Encoding Considerations: See Section 3 of this document 1789 Security Considerations: See Section 6 of this document 1791 Interoperability Considerations: See Sections 1-6 of this document 1793 Published Specification: RFC 2311, RFC 2633, and this document 1795 Applications that use this media type: Security applications 1797 Additional information: NONE 1799 Person & email to contact for further information: iesg@ietf.org 1801 Intended usage: COMMON 1803 Restrictions on usage: NONE 1805 Author: Sean Turner 1807 Change Controller: S/MIME working group delegated from the IESG 1809 5.2. Media Type for application/pkcs7-signature 1810 Type name: application 1812 Subtype Name: pkcs7-signature 1814 Required Parameters: NONE 1816 Optional Parameters: NONE 1818 Encoding Considerations: See Section 3 of this document 1820 Security Considerations: See Section 6 of this document 1822 Interoperability Considerations: See Sections 1-6 of this document 1824 Published Specification: RFC 2311, RFC 2633, and this document 1826 Applications that use this media type: Security applications 1828 Additional information: NONE 1830 Person & email to contact for further information: iesg@ietf.org 1832 Intended usage: COMMON 1834 Restrictions on usage: NONE 1836 Author: Sean Turner 1838 Change Controller: S/MIME working group delegated from the IESG 1840 5.3. Register authEnveloped-data smime-type 1842 IANA is required to register the following value in the "Parameter 1843 Values for the smime-type Parameter" registry. The values to be 1844 registered are: 1846 smime-type value: authEnveloped-data 1848 Reference: [[This Document, Section 3.2.2]] 1850 6. Security Considerations 1852 Cryptographic algorithms will be broken or weakened over time. 1853 Implementers and users need to check that the cryptographic 1854 algorithms listed in this document continue to provide the expected 1855 level of security. The IETF from time to time may issue documents 1856 dealing with the current state of the art. For example: 1858 - The Million Message Attack described in RFC 3218 [RFC3218]. 1860 - The Diffie-Hellman "small-subgroup" attacks described in RFC 2785 1861 [RFC2785]. 1863 - The attacks against hash algorithms described in RFC 4270 1864 [RFC4270]. 1866 This specification uses Public-Key Cryptography technologies. It is 1867 assumed that the private key is protected to ensure that it is not 1868 accessed or altered by unauthorized parties. 1870 It is impossible for most people or software to estimate the value of 1871 a message's content. Further, it is impossible for most people or 1872 software to estimate the actual cost of recovering an encrypted 1873 message content that is encrypted with a key of a particular size. 1874 Further, it is quite difficult to determine the cost of a failed 1875 decryption if a recipient cannot process a message's content. Thus, 1876 choosing between different key sizes (or choosing whether to just use 1877 plaintext) is also impossible for most people or software. However, 1878 decisions based on these criteria are made all the time, and 1879 therefore this specification gives a framework for using those 1880 estimates in choosing algorithms. 1882 The choice of 2048 bits as an RSA asymmetric key size in this 1883 specification is based on the desire to provide at least 100 bits of 1884 security. The key sizes that must be supported to conform to this 1885 specification seem appropriate for the Internet based on [RFC3766]. 1886 Of course, there are environments, such as financial and medical 1887 systems, that may select different key sizes. For this reason, an 1888 implementation MAY support key sizes beyond those recommended in this 1889 specification. 1891 Receiving agents that validate signatures and sending agents that 1892 encrypt messages need to be cautious of cryptographic processing 1893 usage when validating signatures and encrypting messages using keys 1894 larger than those mandated in this specification. An attacker could 1895 send certificates with keys that would result in excessive 1896 cryptographic processing, for example, keys larger than those 1897 mandated in this specification, which could swamp the processing 1898 element. Agents that use such keys without first validating the 1899 certificate to a trust anchor are advised to have some sort of 1900 cryptographic resource management system to prevent such attacks. 1902 Some cryptographic algorithms such as RC2 offer little actual 1903 security over sending plaintext. Other algorithms such as TripleDES, 1904 provide security but are no longer considered to be state of the art. 1905 S/MIME requires the use of current state of the art algorithms such 1906 as AES and provides the ability to announce starter cryptographic 1907 capabilities to parties with whom you communicate. This allows the 1908 sender to create messages which can use the strongest common 1909 encryption algorithm. Using algorithms such as RC2 is never 1910 recommended unless the only alternative is no cryptography. 1912 RSA and DSA keys of less than 2048 bits are now considered by many 1913 experts to be cryptographically insecure (due to advances in 1914 computing power), and should no longer be used to protect messages. 1915 Such keys were previously considered secure, so processing previously 1916 received signed and encrypted mail will often result in the use of 1917 weak keys. Implementations that wish to support previous versions of 1918 S/MIME or process old messages need to consider the security risks 1919 that result from smaller key sizes (e.g., spoofed messages) versus 1920 the costs of denial of service. If an implementation supports 1921 verification of digital signatures generated with RSA and DSA keys of 1922 less than 1024 bits, it MUST warn the user. Implementers should 1923 consider providing different warnings for newly received messages and 1924 previously stored messages. Server implementations (e.g., secure 1925 mail list servers) where user warnings are not appropriate SHOULD 1926 reject messages with weak signatures. 1928 Implementers SHOULD be aware that multiple active key pairs can be 1929 associated with a single individual. For example, one key pair can 1930 be used to support confidentiality, while a different key pair can be 1931 used for digital signatures. 1933 If a sending agent is sending the same message using different 1934 strengths of cryptography, an attacker watching the communications 1935 channel might be able to determine the contents of the strongly 1936 encrypted message by decrypting the weakly encrypted version. In 1937 other words, a sender SHOULD NOT send a copy of a message using 1938 weaker cryptography than they would use for the original of the 1939 message. 1941 Modification of the ciphertext in EnvelopedData can go undetected if 1942 authentication is not also used, which is the case when sending 1943 EnvelopedData without wrapping it in SignedData or enclosing 1944 SignedData within it. This is one of the reasons for moving from 1945 EnvelopedData to AuthEnvelopedData as the authenticated encryption 1946 algorithms provide the authentication without needing the SignedData 1947 layer. 1949 If an implementation is concerned about compliance with National 1950 Institute of Standards and Technology (NIST) key size 1951 recommendations, then see [SP800-57]. 1953 If messaging environments make use of the fact that a message is 1954 signed to change the behavior of message processing (examples would 1955 be running rules or UI display hints), without first verifying that 1956 the message is actually signed and knowing the state of the 1957 signature, this can lead to incorrect handling of the message. 1958 Visual indicators on messages may need to have the signature 1959 validation code checked periodically if the indicator is supposed to 1960 give information on the current status of a message. 1962 Many people assume that the use of an authenticated encryption 1963 algorithm is all that is needed to be in a situation where the sender 1964 of the message will be authenticated. In almost all cases this is 1965 not a correct statement. There are a number of preconditions that 1966 need to hold for an authenticated encryption algorithm to provide 1967 this service: 1969 - The starting key must be bound to a single entity. The use of a 1970 group key only would allow for the statement that a message was 1971 sent by one of the entities that held the key but will not 1972 identify a specific entity. 1974 - The message must have exactly one sender and one recipient. 1975 Having more than one recipient would allow for the second 1976 recipient to create a message that the first recipient would 1977 believe is from the sender by stripping them as a recipient from 1978 the message. 1980 - A direct path needs to exist from the starting key to the key used 1981 as the content encryption key (CEK) which guarantees that no third 1982 party could have seen the resulting CEK. This means that one 1983 needs to be using an algorithm that is called a "Direct 1984 Encryption" or a "Direct Key Agreement" algorithm in other 1985 contexts. This means that the starting key is used directly as 1986 the CEK key, or that the starting key is used to create a secret 1987 which then is transformed into the CEK via a KDF step. 1989 S/MIME implementations almost universally use ephemeral-static rather 1990 than static-static key agreement and do not use a shared secret for 1991 encryption, this means that the first precondition is not met. There 1992 is a document [RFC6278] which defined how to use static-static key 1993 agreement with CMS so that is readably doable. Currently, all S/MIME 1994 key agreement methods derive a KEK and wrap a CEK. This violates the 1995 third precondition above. New key agreement algorithms that directly 1996 created the CEK without creating an intervening KEK would need to be 1997 defined. 1999 Even when all of the preconditions are met and origination of a 2000 message is established by the use of an authenticated encryption 2001 algorithm, users need to be aware that there is no way to prove this 2002 to a third party. This is because either of the parties can 2003 successfully create the message (or just alter the content) based on 2004 the fact that the CEK is going to be known to both parties. Thus the 2005 origination is always built on a presumption that "I did not send 2006 this message to myself." 2008 All of the authenticated encryption algorithms in this document use 2009 counter mode for the encryption portion of the algorithm. This means 2010 that the length of the plain text will always be known as the cipher 2011 text length and the plain text length are always the same. This 2012 information can enable passive observers to infer information based 2013 solely on the length of the message. Applications for which this is 2014 a concern need to provide some type of padding so that the length of 2015 the message does not provide this information. 2017 When compression is used with encryption, it has the potential to add 2018 an additional layer of security. However, care needs to be taken 2019 when designing a protocol that relies on this not to create a 2020 compression oracle. Compression oracle attacks require an adaptive 2021 input to the process and attack the unknown content of a message 2022 based on the length of the compressed output, this means that no 2023 attack on the encryption key is necessarily required. 2025 A recent paper on S/MIME and OpenPGP Email security [Efail] has 2026 pointed out a number of problems with the current S/MIME 2027 specifications and how people have implemented mail clients. Due to 2028 the nature of how CBC mode operates, the modes allow for malleability 2029 of plaintexts. This malleability allows for attackers to make 2030 changes in the cipher text and, if parts of the plain text are known, 2031 create arbitrary plaintexts blocks. These changes can be made 2032 without the weak integrity check in CBC mode being triggered. This 2033 type of attack can be prevented by the use of an AEAD algorithm with 2034 a more robust integrity check on the decryption process. It is 2035 therefore recommended that mail systems migrate to using AES-GCM as 2036 quickly as possible and that the decrypted content not be acted on 2037 prior to finishing the integrity check. 2039 The other attack that is highlighted in [Efail] is an error in how 2040 mail clients deal with HTML and multipart/mixed messages. Clients 2041 MUST require that a text/html content type is a complete HTML 2042 document (per [RFC1866]). Clients SHOULD treat each of the different 2043 pieces of the multipart/mixed construct as being of different 2044 origins. Clients MUST treat each encrypted or signed piece of a MIME 2045 message as being of different origins both from unprotected content 2046 and from each other. 2048 7. References 2050 7.1. Normative References 2052 [ASN.1] "Information Technology - Abstract Syntax Notation 2053 (ASN.1)". 2055 ASN.1 syntax consists of the following references [X.680], 2056 [X.681], [X.682], and [X.683]. 2058 [CHARSETS] 2059 "Character sets assigned by IANA.", 2060 . 2062 [CMS] "Cryptographic Message Syntax". 2064 This is the set of documents dealing with the 2065 cryptographic message syntax and refers to [RFC5652] and 2066 [RFC5083]. 2068 [ESS] "Enhanced Security Services for S/MIME". 2070 This is the set of documents dealing with enhanced 2071 security services and refers to [RFC2634] and [RFC5035]. 2073 [FIPS186-4] 2074 National Institute of Standards and Technology (NIST), 2075 "Digital Signature Standard (DSS)", Federal Information 2076 Processing Standards Publication 186-4, July 2013. 2078 [I-D.ietf-curdle-cms-ecdh-new-curves] 2079 Housley, R., "Use of the Elliptic Curve Diffie-Hellman Key 2080 Agreement Algorithm with X25519 and X448 in the 2081 Cryptographic Message Syntax (CMS)", draft-ietf-curdle- 2082 cms-ecdh-new-curves-10 (work in progress), August 2017. 2084 [I-D.ietf-curdle-cms-eddsa-signatures] 2085 Housley, R., "Use of EdDSA Signatures in the Cryptographic 2086 Message Syntax (CMS)", draft-ietf-curdle-cms-eddsa- 2087 signatures-08 (work in progress), October 2017. 2089 [I-D.ietf-lamps-rfc5750-bis] 2090 Schaad, J., Ramsdell, B., and S. Turner, "Secure/ 2091 Multipurpose Internet Mail Extensions (S/ MIME) Version 2092 4.0 Certificate Handling", draft-ietf-lamps-rfc5750-bis-06 2093 (work in progress), May 2018. 2095 [MIME-SPEC] 2096 "MIME Message Specifications". 2098 This is the set of documents that define how to use MIME. 2099 This set of documents is [RFC2045], [RFC2046], [RFC2047], 2100 [RFC2049], [RFC6838], and [RFC4289]. 2102 [RFC1847] Galvin, J., Murphy, S., Crocker, S., and N. Freed, 2103 "Security Multiparts for MIME: Multipart/Signed and 2104 Multipart/Encrypted", RFC 1847, DOI 10.17487/RFC1847, 2105 October 1995, . 2107 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2108 Extensions (MIME) Part One: Format of Internet Message 2109 Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, 2110 . 2112 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2113 Extensions (MIME) Part Two: Media Types", RFC 2046, 2114 DOI 10.17487/RFC2046, November 1996, 2115 . 2117 [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions) 2118 Part Three: Message Header Extensions for Non-ASCII Text", 2119 RFC 2047, DOI 10.17487/RFC2047, November 1996, 2120 . 2122 [RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2123 Extensions (MIME) Part Five: Conformance Criteria and 2124 Examples", RFC 2049, DOI 10.17487/RFC2049, November 1996, 2125 . 2127 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2128 Requirement Levels", BCP 14, RFC 2119, 2129 DOI 10.17487/RFC2119, March 1997, 2130 . 2132 [RFC2183] Troost, R., Dorner, S., and K. Moore, Ed., "Communicating 2133 Presentation Information in Internet Messages: The 2134 Content-Disposition Header Field", RFC 2183, 2135 DOI 10.17487/RFC2183, August 1997, 2136 . 2138 [RFC2634] Hoffman, P., Ed., "Enhanced Security Services for S/MIME", 2139 RFC 2634, DOI 10.17487/RFC2634, June 1999, 2140 . 2142 [RFC3274] Gutmann, P., "Compressed Data Content Type for 2143 Cryptographic Message Syntax (CMS)", RFC 3274, 2144 DOI 10.17487/RFC3274, June 2002, 2145 . 2147 [RFC3370] Housley, R., "Cryptographic Message Syntax (CMS) 2148 Algorithms", RFC 3370, DOI 10.17487/RFC3370, August 2002, 2149 . 2151 [RFC3560] Housley, R., "Use of the RSAES-OAEP Key Transport 2152 Algorithm in Cryptographic Message Syntax (CMS)", 2153 RFC 3560, DOI 10.17487/RFC3560, July 2003, 2154 . 2156 [RFC3565] Schaad, J., "Use of the Advanced Encryption Standard (AES) 2157 Encryption Algorithm in Cryptographic Message Syntax 2158 (CMS)", RFC 3565, DOI 10.17487/RFC3565, July 2003, 2159 . 2161 [RFC4056] Schaad, J., "Use of the RSASSA-PSS Signature Algorithm in 2162 Cryptographic Message Syntax (CMS)", RFC 4056, 2163 DOI 10.17487/RFC4056, June 2005, 2164 . 2166 [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, 2167 "Randomness Requirements for Security", BCP 106, RFC 4086, 2168 DOI 10.17487/RFC4086, June 2005, 2169 . 2171 [RFC4289] Freed, N. and J. Klensin, "Multipurpose Internet Mail 2172 Extensions (MIME) Part Four: Registration Procedures", 2173 BCP 13, RFC 4289, DOI 10.17487/RFC4289, December 2005, 2174 . 2176 [RFC5035] Schaad, J., "Enhanced Security Services (ESS) Update: 2177 Adding CertID Algorithm Agility", RFC 5035, 2178 DOI 10.17487/RFC5035, August 2007, 2179 . 2181 [RFC5083] Housley, R., "Cryptographic Message Syntax (CMS) 2182 Authenticated-Enveloped-Data Content Type", RFC 5083, 2183 DOI 10.17487/RFC5083, November 2007, 2184 . 2186 [RFC5084] Housley, R., "Using AES-CCM and AES-GCM Authenticated 2187 Encryption in the Cryptographic Message Syntax (CMS)", 2188 RFC 5084, DOI 10.17487/RFC5084, November 2007, 2189 . 2191 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 2192 RFC 5652, DOI 10.17487/RFC5652, September 2009, 2193 . 2195 [RFC5753] Turner, S. and D. Brown, "Use of Elliptic Curve 2196 Cryptography (ECC) Algorithms in Cryptographic Message 2197 Syntax (CMS)", RFC 5753, DOI 10.17487/RFC5753, January 2198 2010, . 2200 [RFC5754] Turner, S., "Using SHA2 Algorithms with Cryptographic 2201 Message Syntax", RFC 5754, DOI 10.17487/RFC5754, January 2202 2010, . 2204 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 2205 Specifications and Registration Procedures", BCP 13, 2206 RFC 6838, DOI 10.17487/RFC6838, January 2013, 2207 . 2209 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2210 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2211 May 2017, . 2213 [SMIMEv4.0] 2214 "S/MIME version 4.0". 2216 This group of documents represents S/MIME version 4.0. 2217 This set of documents are [RFC2634], 2218 [I-D.ietf-lamps-rfc5750-bis], [[This Document]], 2219 [RFC5652], and [RFC5035]. 2221 [X.680] "Information Technology - Abstract Syntax Notation One 2222 (ASN.1): Specification of basic notation. ITU-T 2223 Recommendation X.680 (2002)", ITU-T X.680, ISO/ 2224 IEC 8824-1:2008, November 2008. 2226 [X.681] "Information Technology - Abstract Syntax Notation One 2227 (ASN.1): Information object specification", ITU-T X.681, 2228 ISO/IEC 8824-2:2008, November 2008. 2230 [X.682] "Information Technology - Abstract Syntax Notation One 2231 (ASN.1): Constraint specification", ITU-T X.682, ISO/ 2232 IEC 8824-3:2008, November 2008. 2234 [X.683] "Information Technology - Abstract Syntax Notation One 2235 (ASN.1): Parameterization of ASN.1 specifications", 2236 ITU-T X.683, ISO/IEC 8824-4:2008, November 2008. 2238 [X.690] "Information Technology - ASN.1 encoding rules: 2239 Specification of Basic Encoding Rules (BER), Canonical 2240 Encoding Rules (CER) and Distinguished Encoding Rules 2241 (DER).", ITU-T X.690, ISO/IEC 8825-1:2002, July 2002. 2243 7.2. Informative References 2245 [Efail] Poddebniak, D., Muller, J., Dresen, C., Ising, F., 2246 Schinzel, S., Friedberger, S., Somorovsky, J., and J. 2247 Schwenk, "Efail: Breaking S/MIME and OpenPGP Email 2248 Encryption using Exfiltration Channels", Work in 2249 Progress , May 2018. 2251 [FIPS186-2] 2252 National Institute of Standards and Technology (NIST), 2253 "Digital Signature Standard (DSS) [With Change Notice 1]", 2254 Federal Information Processing Standards 2255 Publication 186-2, January 2000. 2257 [RFC1866] Berners-Lee, T. and D. Connolly, "Hypertext Markup 2258 Language - 2.0", RFC 1866, DOI 10.17487/RFC1866, November 2259 1995, . 2261 [RFC2268] Rivest, R., "A Description of the RC2(r) Encryption 2262 Algorithm", RFC 2268, DOI 10.17487/RFC2268, March 1998, 2263 . 2265 [RFC2311] Dusse, S., Hoffman, P., Ramsdell, B., Lundblade, L., and 2266 L. Repka, "S/MIME Version 2 Message Specification", 2267 RFC 2311, DOI 10.17487/RFC2311, March 1998, 2268 . 2270 [RFC2312] Dusse, S., Hoffman, P., Ramsdell, B., and J. Weinstein, 2271 "S/MIME Version 2 Certificate Handling", RFC 2312, 2272 DOI 10.17487/RFC2312, March 1998, 2273 . 2275 [RFC2313] Kaliski, B., "PKCS #1: RSA Encryption Version 1.5", 2276 RFC 2313, DOI 10.17487/RFC2313, March 1998, 2277 . 2279 [RFC2314] Kaliski, B., "PKCS #10: Certification Request Syntax 2280 Version 1.5", RFC 2314, DOI 10.17487/RFC2314, March 1998, 2281 . 2283 [RFC2315] Kaliski, B., "PKCS #7: Cryptographic Message Syntax 2284 Version 1.5", RFC 2315, DOI 10.17487/RFC2315, March 1998, 2285 . 2287 [RFC2630] Housley, R., "Cryptographic Message Syntax", RFC 2630, 2288 DOI 10.17487/RFC2630, June 1999, 2289 . 2291 [RFC2631] Rescorla, E., "Diffie-Hellman Key Agreement Method", 2292 RFC 2631, DOI 10.17487/RFC2631, June 1999, 2293 . 2295 [RFC2632] Ramsdell, B., Ed., "S/MIME Version 3 Certificate 2296 Handling", RFC 2632, DOI 10.17487/RFC2632, June 1999, 2297 . 2299 [RFC2633] Ramsdell, B., Ed., "S/MIME Version 3 Message 2300 Specification", RFC 2633, DOI 10.17487/RFC2633, June 1999, 2301 . 2303 [RFC2785] Zuccherato, R., "Methods for Avoiding the "Small-Subgroup" 2304 Attacks on the Diffie-Hellman Key Agreement Method for 2305 S/MIME", RFC 2785, DOI 10.17487/RFC2785, March 2000, 2306 . 2308 [RFC3218] Rescorla, E., "Preventing the Million Message Attack on 2309 Cryptographic Message Syntax", RFC 3218, 2310 DOI 10.17487/RFC3218, January 2002, 2311 . 2313 [RFC3766] Orman, H. and P. Hoffman, "Determining Strengths For 2314 Public Keys Used For Exchanging Symmetric Keys", BCP 86, 2315 RFC 3766, DOI 10.17487/RFC3766, April 2004, 2316 . 2318 [RFC3850] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail 2319 Extensions (S/MIME) Version 3.1 Certificate Handling", 2320 RFC 3850, DOI 10.17487/RFC3850, July 2004, 2321 . 2323 [RFC3851] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail 2324 Extensions (S/MIME) Version 3.1 Message Specification", 2325 RFC 3851, DOI 10.17487/RFC3851, July 2004, 2326 . 2328 [RFC3852] Housley, R., "Cryptographic Message Syntax (CMS)", 2329 RFC 3852, DOI 10.17487/RFC3852, July 2004, 2330 . 2332 [RFC4134] Hoffman, P., Ed., "Examples of S/MIME Messages", RFC 4134, 2333 DOI 10.17487/RFC4134, July 2005, 2334 . 2336 [RFC4270] Hoffman, P. and B. Schneier, "Attacks on Cryptographic 2337 Hashes in Internet Protocols", RFC 4270, 2338 DOI 10.17487/RFC4270, November 2005, 2339 . 2341 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 2342 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 2343 . 2345 [RFC5750] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet 2346 Mail Extensions (S/MIME) Version 3.2 Certificate 2347 Handling", RFC 5750, DOI 10.17487/RFC5750, January 2010, 2348 . 2350 [RFC5751] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet 2351 Mail Extensions (S/MIME) Version 3.2 Message 2352 Specification", RFC 5751, DOI 10.17487/RFC5751, January 2353 2010, . 2355 [RFC6151] Turner, S. and L. Chen, "Updated Security Considerations 2356 for the MD5 Message-Digest and the HMAC-MD5 Algorithms", 2357 RFC 6151, DOI 10.17487/RFC6151, March 2011, 2358 . 2360 [RFC6194] Polk, T., Chen, L., Turner, S., and P. Hoffman, "Security 2361 Considerations for the SHA-0 and SHA-1 Message-Digest 2362 Algorithms", RFC 6194, DOI 10.17487/RFC6194, March 2011, 2363 . 2365 [RFC6278] Herzog, J. and R. Khazan, "Use of Static-Static Elliptic 2366 Curve Diffie-Hellman Key Agreement in Cryptographic 2367 Message Syntax", RFC 6278, DOI 10.17487/RFC6278, June 2368 2011, . 2370 [RFC7114] Leiba, B., "Creation of a Registry for smime-type 2371 Parameter Values", RFC 7114, DOI 10.17487/RFC7114, January 2372 2014, . 2374 [RFC7905] Langley, A., Chang, W., Mavrogiannopoulos, N., 2375 Strombergson, J., and S. Josefsson, "ChaCha20-Poly1305 2376 Cipher Suites for Transport Layer Security (TLS)", 2377 RFC 7905, DOI 10.17487/RFC7905, June 2016, 2378 . 2380 [SMIMEv2] "S/MIME version v2". 2382 This group of documents represents S/MIME version 2. This 2383 set of documents are [RFC2311], [RFC2312], [RFC2313], 2384 [RFC2314], and [RFC2315]. 2386 [SMIMEv3] "S/MIME version 3". 2388 This group of documents represents S/MIME version 3. This 2389 set of documents are [RFC2630], [RFC2631], [RFC2632], 2390 [RFC2633], [RFC2634], and [RFC5035]. 2392 [SMIMEv3.1] 2393 "S/MIME version 3.1". 2395 This group of documents represents S/MIME version 3.1. 2396 This set of documents are [RFC2634], [RFC3850], [RFC3851], 2397 [RFC3852], and [RFC5035]. 2399 [SMIMEv3.2] 2400 "S/MIME version 3.2". 2402 This group of documents represents S/MIME version 3.2. 2403 This set of documents are [RFC2634], [RFC5750], [RFC5751], 2404 [RFC5652], and [RFC5035]. 2406 [SP800-56A] 2407 National Institute of Standards and Technology (NIST), 2408 "Special Publication 800-56A Revision 2: Recommendation 2409 Pair-Wise Key Establishment Schemes Using Discrete 2410 Logarithm Cryptography", May 2013. 2412 [SP800-57] 2413 National Institute of Standards and Technology (NIST), 2414 "Special Publication 800-57: Recommendation for Key 2415 Management", August 2005. 2417 [TripleDES] 2418 Tuchman, W., "Hellman Presents No Shortcut Solutions to 2419 DES"", IEEE Spectrum v. 16, n. 7, pp 40-41, July 1979. 2421 Appendix A. ASN.1 Module 2423 Note: The ASN.1 module contained herein is unchanged from RFC 3851 2424 [SMIMEv3.1] with the exception of a change to the prefersBinaryInside 2425 ASN.1 comment. This module uses the 1988 version of ASN.1. 2427 SecureMimeMessageV3dot1 2429 { iso(1) member-body(2) us(840) rsadsi(113549) 2430 pkcs(1) pkcs-9(9) smime(16) modules(0) msg-v3dot1(21) } 2432 DEFINITIONS IMPLICIT TAGS ::= 2434 BEGIN 2436 IMPORTS 2438 -- Cryptographic Message Syntax [CMS] 2439 SubjectKeyIdentifier, IssuerAndSerialNumber, 2440 RecipientKeyIdentifier 2441 FROM CryptographicMessageSyntax 2442 { iso(1) member-body(2) us(840) rsadsi(113549) 2443 pkcs(1) pkcs-9(9) smime(16) modules(0) cms-2001(14) }; 2445 -- id-aa is the arc with all new authenticated and unauthenticated 2446 -- attributes produced by the S/MIME Working Group 2448 id-aa OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840) 2449 rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) attributes(2)} 2451 -- S/MIME Capabilities provides a method of broadcasting the 2452 -- symmetric capabilities understood. Algorithms SHOULD be ordered 2453 -- by preference and grouped by type 2455 smimeCapabilities OBJECT IDENTIFIER ::= {iso(1) member-body(2) 2456 us(840) rsadsi(113549) pkcs(1) pkcs-9(9) 15} 2458 SMIMECapability ::= SEQUENCE { 2459 capabilityID OBJECT IDENTIFIER, 2460 parameters ANY DEFINED BY capabilityID OPTIONAL } 2462 SMIMECapabilities ::= SEQUENCE OF SMIMECapability 2464 -- Encryption Key Preference provides a method of broadcasting the 2465 -- preferred encryption certificate. 2467 id-aa-encrypKeyPref OBJECT IDENTIFIER ::= {id-aa 11} 2469 SMIMEEncryptionKeyPreference ::= CHOICE { 2470 issuerAndSerialNumber [0] IssuerAndSerialNumber, 2471 receipentKeyId [1] RecipientKeyIdentifier, 2472 subjectAltKeyIdentifier [2] SubjectKeyIdentifier 2473 } 2475 -- receipentKeyId is spelt incorrectly, but kept for historical 2476 -- reasons. 2478 id-smime OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) 2479 rsadsi(113549) pkcs(1) pkcs9(9) 16 } 2481 id-cap OBJECT IDENTIFIER ::= { id-smime 11 } 2483 -- The preferBinaryInside OID indicates an ability to receive 2484 -- messages with binary encoding inside the CMS wrapper. 2485 -- The preferBinaryInside attribute's value field is ABSENT. 2487 id-cap-preferBinaryInside OBJECT IDENTIFIER ::= { id-cap 1 } 2489 -- The following list OIDs to be used with S/MIME V3 2491 -- Signature Algorithms Not Found in [RFC3370], [RFC5754], [RFC4056], 2492 -- and [RFC3560] 2494 -- 2495 -- md2WithRSAEncryption OBJECT IDENTIFIER ::= 2496 -- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-1(1) 2497 -- 2} 2499 -- 2500 -- Other Signed Attributes 2501 -- 2502 -- signingTime OBJECT IDENTIFIER ::= 2503 -- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) 2504 -- 5} 2505 -- See [CMS] for a description of how to encode the attribute 2506 -- value. 2508 SMIMECapabilitiesParametersForRC2CBC ::= INTEGER 2509 -- (RC2 Key Length (number of bits)) 2511 END 2513 Appendix B. Historic Mail Considerations 2515 Over the course of updating the S/MIME specifications, the set of 2516 recommended algorithms has been modified each time the document has 2517 been updated. This means that if a user has historic emails and 2518 their user agent has been updated to only support the current set of 2519 recommended algorithms some of those old emails will no longer be 2520 accessible. It is strongly suggested that user agents implement some 2521 of the following algorithms for dealing with historic emails. 2523 This appendix contains a number of references to documents that have 2524 been obsoleted or replaced, this is intentional as frequently the 2525 updated documents do not have the same information in them. 2527 B.1. DigestAlgorithmIdentifier 2529 The following algorithms have been called our for some level of 2530 support by previous S/MIME specifications: 2532 - SHA-1 was dropped in [SMIMEv4.0]. SHA-1 is no longer considered 2533 to be secure as it is no longer collision-resistant. The IETF 2534 statement on SHA-1 can be found in [RFC6194] but it is out-of-date 2535 relative to the most recent advances. 2537 - MD5 was dropped in [SMIMEv4.0]. MD5 is no longer considered to be 2538 secure as it is no longer collision-resistant. Details can be 2539 found in [RFC6151]. 2541 B.2. Signature Algorithms 2543 There are a number of problems with validating signatures on 2544 sufficiently historic messages. For this reason it is strongly 2545 suggested that UAs treat these signatures differently from those on 2546 current messages. These problems include: 2548 - CAs are not required to keep certificates on a CRL beyond one 2549 update after a certificate has expired. This means that unless 2550 CRLs are cached as part of the message it is not always possible 2551 to check if a certificate has been revoked. The same problems 2552 exist with OCSP responses as they may be based on a CRL rather 2553 than on the certificate database. 2555 - RSA and DSA keys of less than 2048 bits are now considered by many 2556 experts to be cryptographically insecure (due to advances in 2557 computing power). Such keys were previously considered secure, so 2558 processing of historic signed messages will often result in the 2559 use of weak keys. Implementations that wish to support previous 2560 versions of S/MIME or process old messages need to consider the 2561 security risks that result from smaller key sizes (e.g., spoofed 2562 messages) versus the costs of denial of service. 2564 [SMIMEv3.1] set the lower limit on suggested key sizes for 2565 creating and validation at 1024 bits. Prior to that the lower 2566 bound on key sizes was 512 bits. 2568 - Hash functions used to validate signatures on historic messages 2569 may longer be considered to be secure. (See below.) While there 2570 are not currently any known practical pre-image or second pre- 2571 image attacks against MD5 or SHA-1, the fact they are no longer 2572 considered to be collision resistant the security levels of the 2573 signatures are generally considered suspect. If a message is 2574 known to be historic, that it it has been in the possession of the 2575 client for some time, then it might still be considered to be 2576 secure. 2578 - The previous two issues apply to the certificates used to validate 2579 the binding of the public key to the identity that signed the 2580 message as well. 2582 The following algorithms have been called out for some level of 2583 support by previous S/MIME specifications: 2585 - RSA with MD5 was dropped in [SMIMEv4.0]. MD5 is no longer 2586 considered to be secure as it is no longer collision-resistant. 2587 Details can be found in [RFC6151]. 2589 - RSA and DSA with SHA-1 were dropped in [SMIMEv4.0]. SHA-1 is no 2590 longer considered to be secure as it is no longer collision- 2591 resistant. The IETF statement on SHA-1 can be found in [RFC6194] 2592 but it is out-of-date relative to the most recent advances. 2594 - DSA with SHA-256 was dropped in [SMIMEv4.0]. DSA has been 2595 replaced by elliptic curve versions. 2597 As requirements for mandatory to implement has changed over time, 2598 some issues have been created that can cause interoperability 2599 problems: 2601 - S/MIME v2 clients are only required to verify digital signatures 2602 using the rsaEncryption algorithm with SHA-1 or MD5, and might not 2603 implement id-dsa-with-sha1 or id-dsa at all. 2605 - S/MIME v3 clients might only implement signing or signature 2606 verification using id-dsa-with-sha1, and might also use id-dsa as 2607 an AlgorithmIdentifier in this field. 2609 - Note that S/MIME v3.1 clients support verifying id-dsa-with-sha1 2610 and rsaEncryption and might not implement sha256withRSAEncryption. 2612 NOTE: Receiving clients SHOULD recognize id-dsa as equivalent to id- 2613 dsa-with-sha1. 2615 For 512-bit RSA with SHA-1 see [RFC3370] and [FIPS186-2] without 2616 Change Notice 1, for 512-bit RSA with SHA-256 see [RFC5754] and 2617 [FIPS186-2] without Change Notice 1, and for 1024-bit through 2618 2048-bit RSA with SHA-256 see [RFC5754] and [FIPS186-2] with Change 2619 Notice 1. The first reference provides the signature algorithm's 2620 object identifier, and the second provides the signature algorithm's 2621 definition. 2623 For 512-bit DSA with SHA-1 see [RFC3370] and [FIPS186-2] without 2624 Change Notice 1, for 512-bit DSA with SHA-256 see [RFC5754] and 2625 [FIPS186-2] without Change Notice 1, for 1024-bit DSA with SHA-1 see 2626 [RFC3370] and [FIPS186-2] with Change Notice 1, for 1024-bit and 2627 above DSA with SHA-256 see [RFC5754] and [FIPS186-4]. The first 2628 reference provides the signature algorithm's object identifier and 2629 the second provides the signature algorithm's definition. 2631 B.3. ContentEncryptionAlgorithmIdentifier 2633 The following algorithms have been called out for some level of 2634 support by previous S/MIME specifications: 2636 - RC2/40 [RFC2268] was dropped in [SMIMEv3.2]. The algorithm is 2637 known to be insecure and, if supported, should only be used to 2638 decrypt existing email. 2640 - DES EDE3 CBC [TripleDES], also known as "tripleDES" is dropped in 2641 [SMIMEv4.0]. This algorithms is removed from the supported list 2642 due to the fact that it has a 64-bit block size and the fact that 2643 it offers less that 128-bits of security. This algorithm should 2644 be supported only to decrypt existing email, it should not be used 2645 to encrypt new emails. 2647 B.4. KeyEncryptionAlgorithmIdentifier 2649 The following algorithms have been called out for some level of 2650 support by previous S/MIME specifications: 2652 - DH ephemeral-static mode, as specified in [RFC3370] and 2653 [SP800-57], was dropped in [SMIMEv4.0]. 2655 - RSA key sizes have been increased over time. Decrypting old mail 2656 with smaller key sizes is reasonable, however new mail should use 2657 the updated key sizes. 2659 For 1024-bit DH, see [RFC3370]. For 1024-bit and larger DH, see 2660 [SP800-56A]; regardless, use the KDF, which is from X9.42, specified 2661 in [RFC3370]. 2663 Appendix C. Moving S/MIME v2 Message Specification to Historic Status 2665 The S/MIME v3 [SMIMEv3], v3.1 [SMIMEv3.1], and v3.2 [SMIMEv3.2] are 2666 backwards compatible with the S/MIME v2 Message Specification 2667 [SMIMEv2], with the exception of the algorithms (dropped RC2/40 2668 requirement and added DSA and RSASSA-PSS requirements). Therefore, 2669 it is recommended that RFC 2311 [SMIMEv2] be moved to Historic 2670 status. 2672 Appendix D. Acknowledgments 2674 Many thanks go out to the other authors of the S/MIME version 2 2675 Message Specification RFC: Steve Dusse, Paul Hoffman, Laurence 2676 Lundblade, and Lisa Repka. Without v2, there wouldn't be a v3, v3.1, 2677 v3.2 or v4.0. 2679 Some of the examples in this document were stolen from [RFC4134]. 2680 Thanks go the the people who wrote and verified the examples in that 2681 document. 2683 A number of the members of the S/MIME Working Group have also worked 2684 very hard and contributed to this document. Any list of people is 2685 doomed to omission, and for that I apologize. In alphabetical order, 2686 the following people stand out in my mind because they made direct 2687 contributions to various versions of this document: 2689 Tony Capel, Piers Chivers, Dave Crocker, Bill Flanigan, Peter 2690 Gutmann, Alfred Hoenes, Paul Hoffman, Russ Housley, William Ottaway, 2691 and John Pawling. 2693 The version 4 update to the S/MIME documents was done under the 2694 auspices of the LAMPS Working Group. 2696 Authors' Addresses 2698 Jim Schaad 2699 August Cellars 2701 Email: ietf@augustcellars.com 2703 Blake Ramsdell 2704 Brute Squad Labs, Inc. 2706 Email: blaker@gmail.com 2708 Sean Turner 2709 sn3rd 2711 Email: sean@sn3rd.com