idnits 2.17.1 draft-ietf-lamps-rfc5751-bis-00.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. == The 'Obsoletes: ' line in the draft header should list only the _numbers_ of the RFCs which will be obsoleted by this document (if approved); it should not include the word 'RFC' in the list. -- The abstract seems to indicate that this document obsoletes RFC5751, but the header doesn't have an 'Obsoletes:' line to match this. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 1160 has weird spacing: '...sedData id-...' == Line 1560 has weird spacing: '...s7-mime any ...' == 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 (July 22, 2016) is 2835 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) == Missing Reference: 'MIME-SECURE' is mentioned on line 1385, but not defined -- Looks like a reference, but probably isn't: '0' on line 2241 -- Looks like a reference, but probably isn't: '1' on line 2242 -- Looks like a reference, but probably isn't: '2' on line 2243 == Missing Reference: 'CMSALG' is mentioned on line 2262, but not defined == Missing Reference: 'CMS-SHA2' is mentioned on line 2262, but not defined == Missing Reference: 'RSAPSS' is mentioned on line 2262, but not defined == Missing Reference: 'RSAOAEP' is mentioned on line 2263, but not defined == Unused Reference: 'RFC2049' is defined on line 1953, but no explicit reference was found in the text == Unused Reference: 'RFC4288' is defined on line 2001, but no explicit reference was found in the text == Unused Reference: 'RFC4289' is defined on line 2005, but no explicit reference was found in the text == Unused Reference: 'RFC2314' is defined on line 2165, but no explicit reference was found in the text == Unused Reference: 'RFC2633' is defined on line 2171, but no explicit reference was found in the text == Unused Reference: 'RFC3852' is defined on line 2178, 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-2' -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS186-3' -- Possible downref: Non-RFC (?) normative reference: ref. 'MIME-SPEC' ** Obsolete normative reference: RFC 2138 (Obsoleted by RFC 2865) ** Obsolete normative reference: RFC 4288 (Obsoleted by RFC 6838) -- Duplicate reference: RFC5035, mentioned in 'RFC5652', was also mentioned in 'RFC5035'. -- Possible downref: Non-RFC (?) normative reference: ref. 'SP800-56A' -- 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: 2 errors (**), 0 flaws (~~), 17 warnings (==), 23 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: RFC5751 (if approved) B. Ramsdell 5 Intended status: Standards Track Brute Squad Labs, Inc. 6 Expires: January 23, 2017 S. Turner 7 sn3rd 8 July 22, 2016 10 Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.5 11 Message Specification 12 draft-ietf-lamps-rfc5751-bis-00 14 Abstract 16 This document defines Secure/Multipurpose Internet Mail Extensions 17 (S/MIME) version 3.5. 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 SPASM 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 http://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 January 23, 2017. 48 Copyright Notice 50 Copyright (c) 2016 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 (http://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 . . . . . . . . . 7 84 1.7. Changes since S/MIME v3.2 . . . . . . . . . . . . . . . . 9 85 2. CMS Options . . . . . . . . . . . . . . . . . . . . . . . . . 9 86 2.1. DigestAlgorithmIdentifier . . . . . . . . . . . . . . . . 9 87 2.2. SignatureAlgorithmIdentifier . . . . . . . . . . . . . . 9 88 2.3. KeyEncryptionAlgorithmIdentifier . . . . . . . . . . . . 10 89 2.4. General Syntax . . . . . . . . . . . . . . . . . . . . . 11 90 2.4.1. Data Content Type . . . . . . . . . . . . . . . . . . 11 91 2.4.2. SignedData Content Type . . . . . . . . . . . . . . . 11 92 2.4.3. EnvelopedData Content Type . . . . . . . . . . . . . 11 93 2.4.4. AuthEnvelopedData Content Type . . . . . . . . . . . 11 94 2.4.5. CompressedData Content Type . . . . . . . . . . . . . 12 95 2.5. Attributes and the SignerInfo Type . . . . . . . . . . . 12 96 2.5.1. Signing Time Attribute . . . . . . . . . . . . . . . 13 97 2.5.2. SMIME Capabilities Attribute . . . . . . . . . . . . 13 98 2.5.3. Encryption Key Preference Attribute . . . . . . . . . 14 99 2.6. SignerIdentifier SignerInfo Type . . . . . . . . . . . . 16 100 2.7. ContentEncryptionAlgorithmIdentifier . . . . . . . . . . 16 101 2.7.1. Deciding Which Encryption Method to Use . . . . . . . 16 102 2.7.2. Choosing Weak Encryption . . . . . . . . . . . . . . 18 103 2.7.3. Multiple Recipients . . . . . . . . . . . . . . . . . 18 104 3. Creating S/MIME Messages . . . . . . . . . . . . . . . . . . 18 105 3.1. Preparing the MIME Entity for Signing, Enveloping, or 106 Compressing . . . . . . . . . . . . . . . . . . . . . . . 19 107 3.1.1. Canonicalization . . . . . . . . . . . . . . . . . . 20 108 3.1.2. Transfer Encoding . . . . . . . . . . . . . . . . . . 21 109 3.1.3. Transfer Encoding for Signing Using multipart/signed 21 110 3.1.4. Sample Canonical MIME Entity . . . . . . . . . . . . 22 111 3.2. The application/pkcs7-mime Media Type . . . . . . . . . . 23 112 3.2.1. The name and filename Parameters . . . . . . . . . . 24 113 3.2.2. The smime-type Parameter . . . . . . . . . . . . . . 25 114 3.3. Creating an Enveloped-Only Message . . . . . . . . . . . 25 115 3.4. Creating an Authenticated Enveloped-Only Message . . . . 26 116 3.5. Creating a Signed-Only Message . . . . . . . . . . . . . 27 117 3.5.1. Choosing a Format for Signed-Only Messages . . . . . 27 118 3.5.2. Signing Using application/pkcs7-mime with SignedData 28 119 3.5.3. Signing Using the multipart/signed Format . . . . . . 28 120 3.6. Creating a Compressed-Only Message . . . . . . . . . . . 31 121 3.7. Multiple Operations . . . . . . . . . . . . . . . . . . . 31 122 3.8. Creating a Certificate Management Message . . . . . . . . 32 123 3.9. Registration Requests . . . . . . . . . . . . . . . . . . 33 124 3.10. Identifying an S/MIME Message . . . . . . . . . . . . . . 33 125 4. Certificate Processing . . . . . . . . . . . . . . . . . . . 33 126 4.1. Key Pair Generation . . . . . . . . . . . . . . . . . . . 34 127 4.2. Signature Generation . . . . . . . . . . . . . . . . . . 34 128 4.3. Signature Verification . . . . . . . . . . . . . . . . . 35 129 4.4. Encryption . . . . . . . . . . . . . . . . . . . . . . . 35 130 4.5. Decryption . . . . . . . . . . . . . . . . . . . . . . . 35 131 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35 132 5.1. Media Type for application/pkcs7-mime . . . . . . . . . . 35 133 5.2. Media Type for application/pkcs7-signature . . . . . . . 36 134 5.3. Register authEnvelopedData smime-type . . . . . . . . . . 37 135 6. Security Considerations . . . . . . . . . . . . . . . . . . . 37 136 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 41 137 7.1. Normative References . . . . . . . . . . . . . . . . . . 41 138 7.2. Informative References . . . . . . . . . . . . . . . . . 44 139 Appendix A. ASN.1 Module . . . . . . . . . . . . . . . . . . . . 47 140 Appendix B. Moving S/MIME v2 Message Specification to Historic 141 Status . . . . . . . . . . . . . . . . . . . . . . . 49 142 Appendix C. Acknowledgments . . . . . . . . . . . . . . . . . . 49 143 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 49 145 1. Introduction 147 S/MIME (Secure/Multipurpose Internet Mail Extensions) provides a 148 consistent way to send and receive secure MIME data. Based on the 149 popular Internet MIME standard, S/MIME provides the following 150 cryptographic security services for electronic messaging 151 applications: authentication, message integrity and non-repudiation 152 of origin (using digital signatures), and data confidentiality (using 153 encryption). As a supplementary service, S/MIME provides for message 154 compression. 156 S/MIME can be used by traditional mail user agents (MUAs) to add 157 cryptographic security services to mail that is sent, and to 158 interpret cryptographic security services in mail that is received. 159 However, S/MIME is not restricted to mail; it can be used with any 160 transport mechanism that transports MIME data, such as HTTP or SIP. 161 As such, S/MIME takes advantage of the object-based features of MIME 162 and allows secure messages to be exchanged in mixed-transport 163 systems. 165 Further, S/MIME can be used in automated message transfer agents that 166 use cryptographic security services that do not require any human 167 intervention, such as the signing of software-generated documents and 168 the encryption of FAX messages sent over the Internet. 170 1.1. Specification Overview 172 This document describes a protocol for adding cryptographic signature 173 and encryption services to MIME data. The MIME standard [MIME-SPEC] 174 provides a general structure for the content of Internet messages and 175 allows extensions for new content-type-based applications. 177 This specification defines how to create a MIME body part that has 178 been cryptographically enhanced according to the Cryptographic 179 Message Syntax (CMS) [CMS], which is derived from PKCS #7 [RFC2315]. 180 This specification also defines the application/pkcs7-mime media type 181 that can be used to transport those body parts. 183 This document also discusses how to use the multipart/signed media 184 type defined in [RFC1847] to transport S/MIME signed messages. 185 multipart/signed is used in conjunction with the 186 application/pkcs7-signature media type, which is used to transport a 187 detached S/MIME signature. 189 In order to create S/MIME messages, an S/MIME agent MUST follow the 190 specifications in this document, as well as the specifications listed 191 in the Cryptographic Message Syntax document [CMS], [RFC3370], 192 [RFC4056], [RFC3560], and [RFC5754]. 194 Throughout this specification, there are requirements and 195 recommendations made for how receiving agents handle incoming 196 messages. There are separate requirements and recommendations for 197 how sending agents create outgoing messages. In general, the best 198 strategy is to "be liberal in what you receive and conservative in 199 what you send". Most of the requirements are placed on the handling 200 of incoming messages, while the recommendations are mostly on the 201 creation of outgoing messages. 203 The separation for requirements on receiving agents and sending 204 agents also derives from the likelihood that there will be S/MIME 205 systems that involve software other than traditional Internet mail 206 clients. S/MIME can be used with any system that transports MIME 207 data. An automated process that sends an encrypted message might not 208 be able to receive an encrypted message at all, for example. Thus, 209 the requirements and recommendations for the two types of agents are 210 listed separately when appropriate. 212 1.2. Definitions 214 For the purposes of this specification, the following definitions 215 apply. 217 ASN.1: Abstract Syntax Notation One, as defined in ITU-T 218 Recommendations X.680, X.681, X.682 and X.683 219 [ASN.1]. 221 BER: Basic Encoding Rules for ASN.1, as defined in ITU- 222 T Recommendation X.690 [X.690]. 224 Certificate: A type that binds an entity's name to a public key 225 with a digital signature. 227 DER: Distinguished Encoding Rules for ASN.1, as defined 228 in ITU-T Recommendation X.690 [X.690]. 230 7-bit data: Text data with lines less than 998 characters 231 long, where none of the characters have the 8th 232 bit set, and there are no NULL characters. 233 and occur only as part of a end-of- 234 line delimiter. 236 8-bit data: Text data with lines less than 998 characters, and 237 where none of the characters are NULL characters. 238 and occur only as part of a 239 end-of-line delimiter. 241 Binary data: Arbitrary data. 243 Transfer encoding: A reversible transformation made on data so 8-bit 244 or binary data can be sent via a channel that only 245 transmits 7-bit data. 247 Receiving agent: Software that interprets and processes S/MIME CMS 248 objects, MIME body parts that contain CMS content 249 types, or both. 251 Sending agent: Software that creates S/MIME CMS content types, 252 MIME body parts that contain CMS content types, or 253 both. 255 S/MIME agent: User software that is a receiving agent, a sending 256 agent, or both. 258 Data Integrity Service: A security service that protects againist 259 unauthorized changes to data by insuring that 260 changes to the data are detectable. [RFC4949] 262 Data Confidentiality: The property that data is not discolsed to 263 system entities unless they have been authorize to 264 know the data. [RFC4949] 266 Data Origination: The corroboration that the source of the data 267 received is as claimed. [RFC4949]. 269 1.3. Conventions Used in This Document 271 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 272 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 273 document are to be interpreted as described in [RFC2119]. 275 We define some additional terms here: 277 SHOULD+ This term means the same as SHOULD. However, the authors 278 expect that a requirement marked as SHOULD+ will be 279 promoted at some future time to be a MUST. 281 SHOULD- This term means the same as SHOULD. However, the authors 282 expect that a requirement marked as SHOULD- will be demoted 283 to a MAY in a future version of this document. 285 MUST- This term means the same as MUST. However, the authors 286 expect that this requirement will no longer be a MUST in a 287 future document. Although its status will be determined at 288 a later time, it is reasonable to expect that if a future 289 revision of a document alters the status of a MUST- 290 requirement, it will remain at least a SHOULD or a SHOULD-. 292 1.4. Compatibility with Prior Practice of S/MIME 294 S/MIME version 3.5 agents ought to attempt to have the greatest 295 interoperability possible with agents for prior versions of S/MIME. 296 S/MIME version 2 is described in RFC 2311 through RFC 2315 inclusive 297 [SMIMEv2], S/MIME version 3 is described in RFC 2630 through RFC 2634 298 inclusive and RFC 5035 [SMIMEv3], S/MIME version 3.1 is described in 299 RFC 3850, RFC 3851, RFC 3852, RFC 2634, and RFC 5035 [SMIMEv3.1], and 300 S/MIME version 3.2 is described in [SMIMEv3.2]. RFC 2311 also has 301 historical information about the development of S/MIME. 303 1.5. Changes from S/MIME v3 to S/MIME v3.1 305 The RSA public key algorithm was changed to a MUST implement key 306 wrapping algorithm, and the Diffie-Hellman (DH) algorithm changed to 307 a SHOULD implement. 309 The AES symmetric encryption algorithm has been included as a SHOULD 310 implement. 312 The RSA public key algorithm was changed to a MUST implement 313 signature algorithm. 315 Ambiguous language about the use of "empty" SignedData messages to 316 transmit certificates was clarified to reflect that transmission of 317 Certificate Revocation Lists is also allowed. 319 The use of binary encoding for some MIME entities is now explicitly 320 discussed. 322 Header protection through the use of the message/rfc822 media type 323 has been added. 325 Use of the CompressedData CMS type is allowed, along with required 326 media type and file extension additions. 328 1.6. Changes from S/MIME v3.1 to S/MIME v3.2 330 Editorial changes, e.g., replaced "MIME type" with "media type", 331 content-type with Content-Type. 333 Moved "Conventions Used in This Document" to Section 1.3. Added 334 definitions for SHOULD+, SHOULD-, and MUST-. 336 Section 1.1 and Appendix A: Added references to RFCs for RSASSA-PSS, 337 RSAES-OAEP, and SHA2 CMS algorithms. Added CMS Multiple Signers 338 Clarification to CMS reference. 340 Section 1.2: Updated references to ASN.1 to X.680 and BER and DER to 341 X.690. 343 Section 1.4: Added references to S/MIME MSG 3.1 RFCs. 345 Section 2.1 (digest algorithm): SHA-256 added as MUST, SHA-1 and MD5 346 made SHOULD-. 348 Section 2.2 (signature algorithms): RSA with SHA-256 added as MUST, 349 and DSA with SHA-256 added as SHOULD+, RSA with SHA-1, DSA with 350 SHA-1, and RSA with MD5 changed to SHOULD-, and RSASSA-PSS with 351 SHA-256 added as SHOULD+. Also added note about what S/MIME v3.1 352 clients support. 354 Section 2.3 (key encryption): DH changed to SHOULD-, and RSAES-OAEP 355 added as SHOULD+. Elaborated requirements for key wrap algorithm. 357 Section 2.5.1: Added requirement that receiving agents MUST support 358 both GeneralizedTime and UTCTime. 360 Section 2.5.2: Replaced reference "sha1WithRSAEncryption" with 361 "sha256WithRSAEncryption", "DES-3EDE-CBC" with "AES-128 CBC", and 362 deleted the RC5 example. 364 Section 2.5.2.1: Deleted entire section (discussed deprecated RC2). 366 Section 2.7, 2.7.1, Appendix A: references to RC2/40 removed. 368 Section 2.7 (content encryption): AES-128 CBC added as MUST, AES-192 369 and AES-256 CBC SHOULD+, tripleDES now SHOULD-. 371 Section 2.7.1: Updated pointers from 2.7.2.1 through 2.7.2.4 to 372 2.7.1.1 to 2.7.1.2. 374 Section 3.1.1: Removed text about MIME character sets. 376 Section 3.2.2 and 3.6: Replaced "encrypted" with "enveloped". Update 377 OID example to use AES-128 CBC oid. 379 Section 3.4.3.2: Replace micalg parameter for SHA-1 with sha-1. 381 Section 4: Updated reference to CERT v3.2. 383 Section 4.1: Updated RSA and DSA key size discussion. Moved last 384 four sentences to security considerations. Updated reference to 385 randomness requirements for security. 387 Section 5: Added IANA registration templates to update media type 388 registry to point to this document as opposed to RFC 2311. 390 Section 6: Updated security considerations. 392 Section 7 : Moved references from Appendix B to this section. 393 Updated references. Added informational references to SMIMEv2, 394 SMIMEv3, and SMIMEv3.1. 396 Appendix B: Added Appendix B to move S/MIME v2 to Historic status. 398 1.7. Changes since S/MIME v3.2 400 - Add the use of AuthEnvelopedData, including defining and 401 registering an smime-type value (Section 2.4.4 and Section 3.4). 403 - Add the use of AES-GCM (Section 2.7). 405 2. CMS Options 407 CMS allows for a wide variety of options in content, attributes, and 408 algorithm support. This section puts forth a number of support 409 requirements and recommendations in order to achieve a base level of 410 interoperability among all S/MIME implementations. [RFC3370] and 411 [RFC5754] provides additional details regarding the use of the 412 cryptographic algorithms. [ESS] provides additional details 413 regarding the use of additional attributes. 415 2.1. DigestAlgorithmIdentifier 417 Sending and receiving agents MUST support SHA-256 [RFC5754] and 418 SHOULD- support SHA-1 [RFC3370]. Receiving agents SHOULD- support 419 MD5 [RFC3370] for the purpose of providing backward compatibility 420 with MD5-digested S/MIME v2 SignedData objects. 422 2.2. SignatureAlgorithmIdentifier 424 Receiving agents: 426 - MUST support RSA with SHA-256. 428 - SHOULD+ support DSA with SHA-256. 430 - SHOULD+ support RSASSA-PSS with SHA-256. 432 - SHOULD- support RSA with SHA-1. 434 - SHOULD- support DSA with SHA-1. 436 - SHOULD- support RSA with MD5. 438 Sending agents: 440 - MUST support RSA with SHA-256. 442 - SHOULD+ support DSA with SHA-256. 444 - SHOULD+ support RSASSA-PSS with SHA-256. 446 - SHOULD- support RSA with SHA-1 or DSA with SHA-1. 448 - SHOULD- support RSA with MD5. 450 See Section 4.1 for information on key size and algorithm references. 452 Note that S/MIME v3.1 clients support verifying id-dsa-with-sha1 and 453 rsaEncryption and might not implement sha256withRSAEncryption. Note 454 that S/MIME v3 clients might only implement signing or signature 455 verification using id-dsa-with-sha1, and might also use id-dsa as an 456 AlgorithmIdentifier in this field. Receiving clients SHOULD 457 recognize id-dsa as equivalent to id-dsa-with-sha1, and sending 458 clients MUST use id-dsa-with-sha1 if using that algorithm. Also note 459 that S/MIME v2 clients are only required to verify digital signatures 460 using the rsaEncryption algorithm with SHA-1 or MD5, and might not 461 implement id-dsa-with-sha1 or id-dsa at all. 463 2.3. KeyEncryptionAlgorithmIdentifier 465 Receiving and sending agents: 467 - MUST support RSA Encryption, as specified in [RFC3370]. 469 - SHOULD+ support RSAES-OAEP, as specified in [RFC3560]. 471 - SHOULD- support DH ephemeral-static mode, as specified in 472 [RFC3370] and [SP800-57]. 474 When DH ephemeral-static is used, a key wrap algorithm is also 475 specified in the KeyEncryptionAlgorithmIdentifier [RFC5652]. The 476 underlying encryption functions for the key wrap and content 477 encryption algorithm ([RFC3370] and [RFC3565]) and the key sizes for 478 the two algorithms MUST be the same (e.g., AES-128 key wrap algorithm 479 with AES-128 content encryption algorithm). As AES-128 CBC is the 480 mandatory-to-implement content encryption algorithm, the AES-128 key 481 wrap algorithm MUST also be supported when DH ephemeral-static is 482 used. 484 Note that S/MIME v3.1 clients might only implement key encryption and 485 decryption using the rsaEncryption algorithm. Note that S/MIME v3 486 clients might only implement key encryption and decryption using the 487 Diffie-Hellman algorithm. Also note that S/MIME v2 clients are only 488 capable of decrypting content-encryption keys using the rsaEncryption 489 algorithm. 491 2.4. General Syntax 493 There are several CMS content types. Of these, only the Data, 494 SignedData, EnvelopedData, AuthEnvelopedData, and CompressedData 495 content types are currently used for S/MIME. 497 2.4.1. Data Content Type 499 Sending agents MUST use the id-data content type identifier to 500 identify the "inner" MIME message content. For example, when 501 applying a digital signature to MIME data, the CMS SignedData 502 encapContentInfo eContentType MUST include the id-data object 503 identifier and the media type MUST be stored in the SignedData 504 encapContentInfo eContent OCTET STRING (unless the sending agent is 505 using multipart/signed, in which case the eContent is absent, per 506 Section 3.5.3 of this document). As another example, when applying 507 encryption to MIME data, the CMS EnvelopedData encryptedContentInfo 508 contentType MUST include the id-data object identifier and the 509 encrypted MIME content MUST be stored in the EnvelopedData 510 encryptedContentInfo encryptedContent OCTET STRING. 512 2.4.2. SignedData Content Type 514 Sending agents MUST use the SignedData content type to apply a 515 digital signature to a message or, in a degenerate case where there 516 is no signature information, to convey certificates. Applying a 517 signature to a message provides authentication, message integrity, 518 and non-repudiation of origin. 520 2.4.3. EnvelopedData Content Type 522 This content type is used to apply data confidentiality to a message. 523 A sender needs to have access to a public key for each intended 524 message recipient to use this service. 526 2.4.4. AuthEnvelopedData Content Type 528 This content type is used to apply data confidentiality and message 529 integrity to a message. This content type does not provide 530 authentication or non-repudiation. A sender needs to have access to 531 a public key for each intended message recipient to use this service. 533 2.4.5. CompressedData Content Type 535 This content type is used to apply data compression to a message. 536 This content type does not provide authentication, message integrity, 537 non-repudiation, or data confidentiality, and is only used to reduce 538 the message's size. 540 See Section 3.7 for further guidance on the use of this type in 541 conjunction with other CMS types. 543 2.5. Attributes and the SignerInfo Type 545 The SignerInfo type allows the inclusion of unsigned and signed 546 attributes along with a signature. 548 Receiving agents MUST be able to handle zero or one instance of each 549 of the signed attributes listed here. Sending agents SHOULD generate 550 one instance of each of the following signed attributes in each 551 S/MIME message: 553 - Signing Time (Section 2.5.1 in this document) 555 - SMIME Capabilities (Section 2.5.2 in this document) 557 - Encryption Key Preference (Section 2.5.3 in this document) 559 - Message Digest (Section 11.2 in [RFC5652]) 561 - Content Type (Section 11.1 in [RFC5652]) 563 Further, receiving agents SHOULD be able to handle zero or one 564 instance of the signingCertificate and signingCertificatev2 signed 565 attributes, as defined in Section 5 of RFC 2634 [ESS] and Section 3 566 of RFC 5035 [ESS]. 568 Sending agents SHOULD generate one instance of the signingCertificate 569 or signingCertificatev2 signed attribute in each SignerInfo 570 structure. 572 Additional attributes and values for these attributes might be 573 defined in the future. Receiving agents SHOULD handle attributes or 574 values that they do not recognize in a graceful manner. 576 Interactive sending agents that include signed attributes that are 577 not listed here SHOULD display those attributes to the user, so that 578 the user is aware of all of the data being signed. 580 2.5.1. Signing Time Attribute 582 The signing-time attribute is used to convey the time that a message 583 was signed. The time of signing will most likely be created by a 584 message originator and therefore is only as trustworthy as the 585 originator. 587 Sending agents MUST encode signing time through the year 2049 as 588 UTCTime; signing times in 2050 or later MUST be encoded as 589 GeneralizedTime. When the UTCTime CHOICE is used, S/MIME agents MUST 590 interpret the year field (YY) as follows: 592 If YY is greater than or equal to 50, the year is interpreted as 593 19YY; if YY is less than 50, the year is interpreted as 20YY. 595 Receiving agents MUST be able to process signing-time attributes that 596 are encoded in either UTCTime or GeneralizedTime. 598 2.5.2. SMIME Capabilities Attribute 600 The SMIMECapabilities attribute includes signature algorithms (such 601 as "sha256WithRSAEncryption"), symmetric algorithms (such as "AES-128 602 CBC"), authenticated symmetric algorithms (such as "AES-GCM") and key 603 encipherment algorithms (such as "rsaEncryption"). There are also 604 several identifiers that indicate support for other optional features 605 such as binary encoding and compression. The SMIMECapabilities were 606 designed to be flexible and extensible so that, in the future, a 607 means of identifying other capabilities and preferences such as 608 certificates can be added in a way that will not cause current 609 clients to break. 611 If present, the SMIMECapabilities attribute MUST be a 612 SignedAttribute; it MUST NOT be an UnsignedAttribute. CMS defines 613 SignedAttributes as a SET OF Attribute. The SignedAttributes in a 614 signerInfo MUST NOT include multiple instances of the 615 SMIMECapabilities attribute. CMS defines the ASN.1 syntax for 616 Attribute to include attrValues SET OF AttributeValue. A 617 SMIMECapabilities attribute MUST only include a single instance of 618 AttributeValue. There MUST NOT be zero or multiple instances of 619 AttributeValue present in the attrValues SET OF AttributeValue. 621 The semantics of the SMIMECapabilities attribute specify a partial 622 list as to what the client announcing the SMIMECapabilities can 623 support. A client does not have to list every capability it 624 supports, and need not list all its capabilities so that the 625 capabilities list doesn't get too long. In an SMIMECapabilities 626 attribute, the object identifiers (OIDs) are listed in order of their 627 preference, but SHOULD be separated logically along the lines of 628 their categories (signature algorithms, symmetric algorithms, key 629 encipherment algorithms, etc.). 631 The structure of the SMIMECapabilities attribute is to facilitate 632 simple table lookups and binary comparisons in order to determine 633 matches. For instance, the DER-encoding for the SMIMECapability for 634 AES-128 CBC MUST be identically encoded regardless of the 635 implementation. Because of the requirement for identical encoding, 636 individuals documenting algorithms to be used in the 637 SMIMECapabilities attribute SHOULD explicitly document the correct 638 byte sequence for the common cases. 640 For any capability, the associated parameters for the OID MUST 641 specify all of the parameters necessary to differentiate between two 642 instances of the same algorithm. 644 The OIDs that correspond to algorithms SHOULD use the same OID as the 645 actual algorithm, except in the case where the algorithm usage is 646 ambiguous from the OID. For instance, in an earlier specification, 647 rsaEncryption was ambiguous because it could refer to either a 648 signature algorithm or a key encipherment algorithm. In the event 649 that an OID is ambiguous, it needs to be arbitrated by the maintainer 650 of the registered SMIMECapabilities list as to which type of 651 algorithm will use the OID, and a new OID MUST be allocated under the 652 smimeCapabilities OID to satisfy the other use of the OID. 654 The registered SMIMECapabilities list specifies the parameters for 655 OIDs that need them, most notably key lengths in the case of 656 variable-length symmetric ciphers. In the event that there are no 657 differentiating parameters for a particular OID, the parameters MUST 658 be omitted, and MUST NOT be encoded as NULL. Additional values for 659 the SMIMECapabilities attribute might be defined in the future. 660 Receiving agents MUST handle a SMIMECapabilities object that has 661 values that it does not recognize in a graceful manner. 663 Section 2.7.1 explains a strategy for caching capabilities. 665 2.5.3. Encryption Key Preference Attribute 667 The encryption key preference attribute allows the signer to 668 unambiguously describe which of the signer's certificates has the 669 signer's preferred encryption key. This attribute is designed to 670 enhance behavior for interoperating with those clients that use 671 separate keys for encryption and signing. This attribute is used to 672 convey to anyone viewing the attribute which of the listed 673 certificates is appropriate for encrypting a session key for future 674 encrypted messages. 676 If present, the SMIMEEncryptionKeyPreference attribute MUST be a 677 SignedAttribute; it MUST NOT be an UnsignedAttribute. CMS defines 678 SignedAttributes as a SET OF Attribute. The SignedAttributes in a 679 signerInfo MUST NOT include multiple instances of the 680 SMIMEEncryptionKeyPreference attribute. CMS defines the ASN.1 syntax 681 for Attribute to include attrValues SET OF AttributeValue. A 682 SMIMEEncryptionKeyPreference attribute MUST only include a single 683 instance of AttributeValue. There MUST NOT be zero or multiple 684 instances of AttributeValue present in the attrValues SET OF 685 AttributeValue. 687 The sending agent SHOULD include the referenced certificate in the 688 set of certificates included in the signed message if this attribute 689 is used. The certificate MAY be omitted if it has been previously 690 made available to the receiving agent. Sending agents SHOULD use 691 this attribute if the commonly used or preferred encryption 692 certificate is not the same as the certificate used to sign the 693 message. 695 Receiving agents SHOULD store the preference data if the signature on 696 the message is valid and the signing time is greater than the 697 currently stored value. (As with the SMIMECapabilities, the clock 698 skew SHOULD be checked and the data not used if the skew is too 699 great.) Receiving agents SHOULD respect the sender's encryption key 700 preference attribute if possible. This, however, represents only a 701 preference and the receiving agent can use any certificate in 702 replying to the sender that is valid. 704 Section 2.7.1 explains a strategy for caching preference data. 706 2.5.3.1. Selection of Recipient Key Management Certificate 708 In order to determine the key management certificate to be used when 709 sending a future CMS EnvelopedData message for a particular 710 recipient, the following steps SHOULD be followed: 712 - If an SMIMEEncryptionKeyPreference attribute is found in a 713 SignedData object received from the desired recipient, this 714 identifies the X.509 certificate that SHOULD be used as the X.509 715 key management certificate for the recipient. 717 - If an SMIMEEncryptionKeyPreference attribute is not found in a 718 SignedData object received from the desired recipient, the set of 719 X.509 certificates SHOULD be searched for a X.509 certificate with 720 the same subject name as the signer of a X.509 certificate that 721 can be used for key management. 723 - Or use some other method of determining the user's key management 724 key. If a X.509 key management certificate is not found, then 725 encryption cannot be done with the signer of the message. If 726 multiple X.509 key management certificates are found, the S/MIME 727 agent can make an arbitrary choice between them. 729 2.6. SignerIdentifier SignerInfo Type 731 S/MIME v3.5 implementations MUST support both issuerAndSerialNumber 732 and subjectKeyIdentifier. Messages that use the subjectKeyIdentifier 733 choice cannot be read by S/MIME v2 clients. 735 It is important to understand that some certificates use a value for 736 subjectKeyIdentifier that is not suitable for uniquely identifying a 737 certificate. Implementations MUST be prepared for multiple 738 certificates for potentially different entities to have the same 739 value for subjectKeyIdentifier, and MUST be prepared to try each 740 matching certificate during signature verification before indicating 741 an error condition. 743 2.7. ContentEncryptionAlgorithmIdentifier 745 Sending and receiving agents: 747 - MUST support encryption and decryption with AES-128 CBC [RFC3565] 748 and AES-128 GCM [RFC5084]. 750 - SHOULD+ support encryption and decryption with AES-192 CBC, 751 AES-256 CBC [RFC3565], AES-192 GCM and AES-256 GCM [RFC5084]. 753 - SHOULD- support encryption and decryption with DES EDE3 CBC, 754 hereinafter called "tripleDES" [RFC3370]. 756 2.7.1. Deciding Which Encryption Method to Use 758 When a sending agent creates an encrypted message, it has to decide 759 which type of encryption to use. The decision process involves using 760 information garnered from the capabilities lists included in messages 761 received from the recipient, as well as out-of-band information such 762 as private agreements, user preferences, legal restrictions, and so 763 on. 765 Section 2.5.2 defines a method by which a sending agent can 766 optionally announce, among other things, its decrypting capabilities 767 in its order of preference. The following method for processing and 768 remembering the encryption capabilities attribute in incoming signed 769 messages SHOULD be used. 771 - If the receiving agent has not yet created a list of capabilities 772 for the sender's public key, then, after verifying the signature 773 on the incoming message and checking the timestamp, the receiving 774 agent SHOULD create a new list containing at least the signing 775 time and the symmetric capabilities. 777 - If such a list already exists, the receiving agent SHOULD verify 778 that the signing time in the incoming message is greater than the 779 signing time stored in the list and that the signature is valid. 780 If so, the receiving agent SHOULD update both the signing time and 781 capabilities in the list. Values of the signing time that lie far 782 in the future (that is, a greater discrepancy than any reasonable 783 clock skew), or a capabilities list in messages whose signature 784 could not be verified, MUST NOT be accepted. 786 The list of capabilities SHOULD be stored for future use in creating 787 messages. 789 Before sending a message, the sending agent MUST decide whether it is 790 willing to use weak encryption for the particular data in the 791 message. If the sending agent decides that weak encryption is 792 unacceptable for this data, then the sending agent MUST NOT use a 793 weak algorithm. The decision to use or not use weak encryption 794 overrides any other decision in this section about which encryption 795 algorithm to use. 797 Section 2.7.1.1 and Section 2.7.1.2 describe the decisions a sending 798 agent SHOULD use in deciding which type of encryption will be applied 799 to a message. These rules are ordered, so the sending agent SHOULD 800 make its decision in the order given. 802 2.7.1.1. Rule 1: Known Capabilities 804 If the sending agent has received a set of capabilities from the 805 recipient for the message the agent is about to encrypt, then the 806 sending agent SHOULD use that information by selecting the first 807 capability in the list (that is, the capability most preferred by the 808 intended recipient) that the sending agent knows how to encrypt. The 809 sending agent SHOULD use one of the capabilities in the list if the 810 agent reasonably expects the recipient to be able to decrypt the 811 message. 813 2.7.1.2. Rule 2: Unknown Capabilities, Unknown Version of S/MIME 815 If the following two conditions are met: 817 - the sending agent has no knowledge of the encryption capabilities 818 of the recipient, and 820 - the sending agent has no knowledge of the version of S/MIME of the 821 recipient, 823 then the sending agent SHOULD use AES-128 CBC because it is a 824 stronger algorithm and is required by S/MIME v3.2. If the sending 825 agent chooses not to use AES-128 CBC in this step, it SHOULD use 826 tripleDES. 828 2.7.2. Choosing Weak Encryption 830 All algorithms that use 40-bit keys are considered by many to be weak 831 encryption. A sending agent that is controlled by a human SHOULD 832 allow a human sender to determine the risks of sending data using a 833 weak encryption algorithm before sending the data, and possibly allow 834 the human to use a stronger encryption method such as tripleDES or 835 AES. 837 2.7.3. Multiple Recipients 839 If a sending agent is composing an encrypted message to a group of 840 recipients where the encryption capabilities of some of the 841 recipients do not overlap, the sending agent is forced to send more 842 than one message. Please note that if the sending agent chooses to 843 send a message encrypted with a strong algorithm, and then send the 844 same message encrypted with a weak algorithm, someone watching the 845 communications channel could learn the contents of the strongly 846 encrypted message simply by decrypting the weakly encrypted message. 848 3. Creating S/MIME Messages 850 This section describes the S/MIME message formats and how they are 851 created. S/MIME messages are a combination of MIME bodies and CMS 852 content types. Several media types as well as several CMS content 853 types are used. The data to be secured is always a canonical MIME 854 entity. The MIME entity and other data, such as certificates and 855 algorithm identifiers, are given to CMS processing facilities that 856 produce a CMS object. Finally, the CMS object is wrapped in MIME. 857 The Enhanced Security Services for S/MIME [ESS] document provides 858 descriptions of how nested, secured S/MIME messages are formatted. 859 ESS provides a description of how a triple-wrapped S/MIME message is 860 formatted using multipart/signed and application/pkcs7-mime for the 861 signatures. 863 S/MIME provides one format for enveloped-only data, several formats 864 for signed-only data, and several formats for signed and enveloped 865 data. Several formats are required to accommodate several 866 environments, in particular for signed messages. The criteria for 867 choosing among these formats are also described. 869 The reader of this section is expected to understand MIME as 870 described in [MIME-SPEC] and [RFC1847]. 872 3.1. Preparing the MIME Entity for Signing, Enveloping, or Compressing 874 S/MIME is used to secure MIME entities. A MIME entity can be a sub- 875 part, sub-parts of a message, or the whole message with all its sub- 876 parts. A MIME entity that is the whole message includes only the 877 MIME message headers and MIME body, and does not include the RFC-822 878 header. Note that S/MIME can also be used to secure MIME entities 879 used in applications other than Internet mail. If protection of the 880 RFC-822 header is required, the use of the message/rfc822 media type 881 is explained later in this section. 883 The MIME entity that is secured and described in this section can be 884 thought of as the "inside" MIME entity. That is, it is the 885 "innermost" object in what is possibly a larger MIME message. 886 Processing "outside" MIME entities into CMS content types is 887 described in Section 3.2, Section 3.5, and elsewhere. 889 The procedure for preparing a MIME entity is given in [MIME-SPEC]. 890 The same procedure is used here with some additional restrictions 891 when signing. The description of the procedures from [MIME-SPEC] is 892 repeated here, but it is suggested that the reader refer to that 893 document for the exact procedure. This section also describes 894 additional requirements. 896 A single procedure is used for creating MIME entities that are to 897 have any combination of signing, enveloping, and compressing applied. 898 Some additional steps are recommended to defend against known 899 corruptions that can occur during mail transport that are of 900 particular importance for clear-signing using the multipart/signed 901 format. It is recommended that these additional steps be performed 902 on enveloped messages, or signed and enveloped messages, so that the 903 message can be forwarded to any environment without modification. 905 These steps are descriptive rather than prescriptive. The 906 implementer is free to use any procedure as long as the result is the 907 same. 909 Step 1. The MIME entity is prepared according to the local 910 conventions. 912 Step 2. The leaf parts of the MIME entity are converted to canonical 913 form. 915 Step 3. Appropriate transfer encoding is applied to the leaves of 916 the MIME entity. 918 When an S/MIME message is received, the security services on the 919 message are processed, and the result is the MIME entity. That MIME 920 entity is typically passed to a MIME-capable user agent where it is 921 further decoded and presented to the user or receiving application. 923 In order to protect outer, non-content-related message header fields 924 (for instance, the "Subject", "To", "From", and "Cc" fields), the 925 sending client MAY wrap a full MIME message in a message/rfc822 926 wrapper in order to apply S/MIME security services to these header 927 fields. It is up to the receiving client to decide how to present 928 this "inner" header along with the unprotected "outer" header. 930 When an S/MIME message is received, if the top-level protected MIME 931 entity has a Content-Type of message/rfc822, it can be assumed that 932 the intent was to provide header protection. This entity SHOULD be 933 presented as the top-level message, taking into account header 934 merging issues as previously discussed. 936 3.1.1. Canonicalization 938 Each MIME entity MUST be converted to a canonical form that is 939 uniquely and unambiguously representable in the environment where the 940 signature is created and the environment where the signature will be 941 verified. MIME entities MUST be canonicalized for enveloping and 942 compressing as well as signing. 944 The exact details of canonicalization depend on the actual media type 945 and subtype of an entity, and are not described here. Instead, the 946 standard for the particular media type SHOULD be consulted. For 947 example, canonicalization of type text/plain is different from 948 canonicalization of audio/basic. Other than text types, most types 949 have only one representation regardless of computing platform or 950 environment that can be considered their canonical representation. 951 In general, canonicalization will be performed by the non-security 952 part of the sending agent rather than the S/MIME implementation. 954 The most common and important canonicalization is for text, which is 955 often represented differently in different environments. MIME 956 entities of major type "text" MUST have both their line endings and 957 character set canonicalized. The line ending MUST be the pair of 958 characters , and the charset SHOULD be a registered charset 959 [CHARSETS]. The details of the canonicalization are specified in 960 [MIME-SPEC]. 962 Note that some charsets such as ISO-2022 have multiple 963 representations for the same characters. When preparing such text 964 for signing, the canonical representation specified for the charset 965 MUST be used. 967 3.1.2. Transfer Encoding 969 When generating any of the secured MIME entities below, except the 970 signing using the multipart/signed format, no transfer encoding is 971 required at all. S/MIME implementations MUST be able to deal with 972 binary MIME objects. If no Content-Transfer-Encoding header field is 973 present, the transfer encoding is presumed to be 7BIT. 975 S/MIME implementations SHOULD however use transfer encoding described 976 in Section 3.1.3 for all MIME entities they secure. The reason for 977 securing only 7-bit MIME entities, even for enveloped data that are 978 not exposed to the transport, is that it allows the MIME entity to be 979 handled in any environment without changing it. For example, a 980 trusted gateway might remove the envelope, but not the signature, of 981 a message, and then forward the signed message on to the end 982 recipient so that they can verify the signatures directly. If the 983 transport internal to the site is not 8-bit clean, such as on a wide- 984 area network with a single mail gateway, verifying the signature will 985 not be possible unless the original MIME entity was only 7-bit data. 987 S/MIME implementations that "know" that all intended recipients are 988 capable of handling inner (all but the outermost) binary MIME objects 989 SHOULD use binary encoding as opposed to a 7-bit-safe transfer 990 encoding for the inner entities. The use of a 7-bit-safe encoding 991 (such as base64) would unnecessarily expand the message size. 992 Implementations MAY "know" that recipient implementations are capable 993 of handling inner binary MIME entities either by interpreting the id- 994 cap-preferBinaryInside SMIMECapabilities attribute, by prior 995 agreement, or by other means. 997 If one or more intended recipients are unable to handle inner binary 998 MIME objects, or if this capability is unknown for any of the 999 intended recipients, S/MIME implementations SHOULD use transfer 1000 encoding described in Section 3.1.3 for all MIME entities they 1001 secure. 1003 3.1.3. Transfer Encoding for Signing Using multipart/signed 1005 If a multipart/signed entity is ever to be transmitted over the 1006 standard Internet SMTP infrastructure or other transport that is 1007 constrained to 7-bit text, it MUST have transfer encoding applied so 1008 that it is represented as 7-bit text. MIME entities that are 7-bit 1009 data already need no transfer encoding. Entities such as 8-bit text 1010 and binary data can be encoded with quoted-printable or base-64 1011 transfer encoding. 1013 The primary reason for the 7-bit requirement is that the Internet 1014 mail transport infrastructure cannot guarantee transport of 8-bit or 1015 binary data. Even though many segments of the transport 1016 infrastructure now handle 8-bit and even binary data, it is sometimes 1017 not possible to know whether the transport path is 8-bit clean. If a 1018 mail message with 8-bit data were to encounter a message transfer 1019 agent that cannot transmit 8-bit or binary data, the agent has three 1020 options, none of which are acceptable for a clear-signed message: 1022 - The agent could change the transfer encoding; this would 1023 invalidate the signature. 1025 - The agent could transmit the data anyway, which would most likely 1026 result in the 8th bit being corrupted; this too would invalidate 1027 the signature. 1029 - The agent could return the message to the sender. 1031 [RFC1847] prohibits an agent from changing the transfer encoding of 1032 the first part of a multipart/signed message. If a compliant agent 1033 that cannot transmit 8-bit or binary data encounters a 1034 multipart/signed message with 8-bit or binary data in the first part, 1035 it would have to return the message to the sender as undeliverable. 1037 3.1.4. Sample Canonical MIME Entity 1039 This example shows a multipart/mixed message with full transfer 1040 encoding. This message contains a text part and an attachment. The 1041 sample message text includes characters that are not US-ASCII and 1042 thus need to be transfer encoded. Though not shown here, the end of 1043 each line is . The line ending of the MIME headers, the 1044 text, and the transfer encoded parts, all MUST be . 1046 Note that this example is not of an S/MIME message. 1048 Content-Type: multipart/mixed; boundary=bar 1050 --bar 1051 Content-Type: text/plain; charset=iso-8859-1 1052 Content-Transfer-Encoding: quoted-printable 1054 =A1Hola Michael! 1056 How do you like the new S/MIME specification? 1058 It's generally a good idea to encode lines that begin with 1059 From=20because some mail transport agents will insert a greater- 1060 than (>) sign, thus invalidating the signature. 1062 Also, in some cases it might be desirable to encode any =20 1063 trailing whitespace that occurs on lines in order to ensure =20 1064 that the message signature is not invalidated when passing =20 1065 a gateway that modifies such whitespace (like BITNET). =20 1067 --bar 1068 Content-Type: image/jpeg 1069 Content-Transfer-Encoding: base64 1071 iQCVAwUBMJrRF2N9oWBghPDJAQE9UQQAtl7LuRVndBjrk4EqYBIb3h5QXIX/LC// 1072 jJV5bNvkZIGPIcEmI5iFd9boEgvpirHtIREEqLQRkYNoBActFBZmh9GC3C041WGq 1073 uMbrbxc+nIs1TIKlA08rVi9ig/2Yh7LFrK5Ein57U/W72vgSxLhe/zhdfolT9Brn 1074 HOxEa44b+EI= 1076 --bar-- 1078 3.2. The application/pkcs7-mime Media Type 1080 The application/pkcs7-mime media type is used to carry CMS content 1081 types including EnvelopedData, SignedData, and CompressedData. The 1082 details of constructing these entities are described in subsequent 1083 sections. This section describes the general characteristics of the 1084 application/pkcs7-mime media type. 1086 The carried CMS object always contains a MIME entity that is prepared 1087 as described in Section 3.1 if the eContentType is id-data. Other 1088 contents MAY be carried when the eContentType contains different 1089 values. See [ESS] for an example of this with signed receipts. 1091 Since CMS content types are binary data, in most cases base-64 1092 transfer encoding is appropriate, in particular, when used with SMTP 1093 transport. The transfer encoding used depends on the transport 1094 through which the object is to be sent, and is not a characteristic 1095 of the media type. 1097 Note that this discussion refers to the transfer encoding of the CMS 1098 object or "outside" MIME entity. It is completely distinct from, and 1099 unrelated to, the transfer encoding of the MIME entity secured by the 1100 CMS object, the "inside" object, which is described in Section 3.1. 1102 Because there are several types of application/pkcs7-mime objects, a 1103 sending agent SHOULD do as much as possible to help a receiving agent 1104 know about the contents of the object without forcing the receiving 1105 agent to decode the ASN.1 for the object. The Content-Type header 1106 field of all application/pkcs7-mime objects SHOULD include the 1107 optional "smime-type" parameter, as described in the following 1108 sections. 1110 3.2.1. The name and filename Parameters 1112 For the application/pkcs7-mime, sending agents SHOULD emit the 1113 optional "name" parameter to the Content-Type field for compatibility 1114 with older systems. Sending agents SHOULD also emit the optional 1115 Content-Disposition field [RFC2138] with the "filename" parameter. 1116 If a sending agent emits the above parameters, the value of the 1117 parameters SHOULD be a file name with the appropriate extension: 1119 Media Type File 1120 Extension 1121 application/pkcs7-mime (SignedData, EnvelopedData) .p7m 1122 application/pkcs7-mime (degenerate SignedData certificate .p7c 1123 management message) 1124 application/pkcs7-mime (CompressedData) .p7z 1125 application/pkcs7-signature (SignedData) .p7s 1127 In addition, the file name SHOULD be limited to eight characters 1128 followed by a three-letter extension. The eight-character filename 1129 base can be any distinct name; the use of the filename base "smime" 1130 SHOULD be used to indicate that the MIME entity is associated with 1131 S/MIME. 1133 Including a file name serves two purposes. It facilitates easier use 1134 of S/MIME objects as files on disk. It also can convey type 1135 information across gateways. When a MIME entity of type 1136 application/pkcs7-mime (for example) arrives at a gateway that has no 1137 special knowledge of S/MIME, it will default the entity's media type 1138 to application/octet-stream and treat it as a generic attachment, 1139 thus losing the type information. However, the suggested filename 1140 for an attachment is often carried across a gateway. This often 1141 allows the receiving systems to determine the appropriate application 1142 to hand the attachment off to, in this case, a stand-alone S/MIME 1143 processing application. Note that this mechanism is provided as a 1144 convenience for implementations in certain environments. A proper 1145 S/MIME implementation MUST use the media types and MUST NOT rely on 1146 the file extensions. 1148 3.2.2. The smime-type Parameter 1150 The application/pkcs7-mime content type defines the optional "smime- 1151 type" parameter. The intent of this parameter is to convey details 1152 about the security applied (signed or enveloped) along with 1153 information about the contained content. This specification defines 1154 the following smime-types. 1156 Name CMS Type Inner Content 1157 enveloped-data EnvelopedData id-data 1158 signed-data SignedData id-data 1159 certs-only SignedData id-data 1160 compressed-data CompressedData id-data 1161 authEnvelopedData AuthEnvelopedData id-data 1163 In order for consistency to be obtained with future specifications, 1164 the following guidelines SHOULD be followed when assigning a new 1165 smime-type parameter. 1167 1. If both signing and encryption can be applied to the content, 1168 then two values for smime-type SHOULD be assigned "signed-*" and 1169 "enveloped-*". If one operation can be assigned, then this can 1170 be omitted. Thus, since "certs-only" can only be signed, 1171 "signed-" is omitted. 1173 2. A common string for a content OID SHOULD be assigned. We use 1174 "data" for the id-data content OID when MIME is the inner 1175 content. 1177 3. If no common string is assigned, then the common string of 1178 "OID." is recommended (for example, 1179 "OID.2.16.840.1.101.3.4.1.2" would be AES-128 CBC). 1181 It is explicitly intended that this field be a suitable hint for mail 1182 client applications to indicate whether a message is "signed" or 1183 "enveloped" without having to tunnel into the CMS payload. 1185 3.3. Creating an Enveloped-Only Message 1187 This section describes the format for enveloping a MIME entity 1188 without signing it. It is important to note that sending enveloped 1189 but not signed messages does not provide for data integrity. It is 1190 possible to replace ciphertext in such a way that the processed 1191 message will still be valid, but the meaning can be altered. 1193 Step 1. The MIME entity to be enveloped is prepared according to 1194 Section 3.1. 1196 Step 2. The MIME entity and other required data is processed into a 1197 CMS object of type EnvelopedData. In addition to encrypting 1198 a copy of the content-encryption key for each recipient, a 1199 copy of the content-encryption key SHOULD be encrypted for 1200 the originator and included in the EnvelopedData (see 1201 [RFC5652], Section 6). 1203 Step 3. The EnvelopedData object is wrapped in a CMS ContentInfo 1204 object. 1206 Step 4. The ContentInfo object is inserted into an 1207 application/pkcs7-mime MIME entity. 1209 The smime-type parameter for enveloped-only messages is "enveloped- 1210 data". The file extension for this type of message is ".p7m". 1212 A sample message would be: 1214 Content-Type: application/pkcs7-mime; smime-type=enveloped-data; 1215 name=smime.p7m 1216 Content-Transfer-Encoding: base64 1217 Content-Disposition: attachment; filename=smime.p7m 1219 rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6 1220 7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H 1221 f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 1222 0GhIGfHfQbnj756YT64V 1224 3.4. Creating an Authenticated Enveloped-Only Message 1226 This section describes the format for enveloping a MIME entity 1227 without signing it. Authenticated enveloped messages provide 1228 confidentiality and integrity. It is important to note that sending 1229 authenticated enveloped messages does not provide for authentication 1230 when using S/MIME. It is possible to replace ciphertext in such a 1231 way that the processed message will still be valid, but the meaning 1232 can be altered. However this is substantially more difficult than it 1233 is for an enveloped-only message as the 1235 Step 1. The MIME entity to be enveloped is prepared according to 1236 Section 3.1. 1238 Step 2. The MIME entity and other required data is processed into a 1239 CMS object of type AuthEnvelopedData. In addition to 1240 encrypting a copy of the content-encryption key for each 1241 recipient, a copy of the content-encryption key SHOULD be 1242 encrypted for the originator and included in the 1243 AuthEnvelopedData (see [RFC5083]). 1245 Step 3. The AuthEnvelopedData object is wrapped in a CMS ContentInfo 1246 object. 1248 Step 4. The ContentInfo object is inserted into an 1249 application/pkcs7-mime MIME entity. 1251 The smime-type parameter for authenticated enveloped-only messages is 1252 "authEnvelopedData". The file extension for this type of message is 1253 ".p7m". 1255 A sample message would be: 1257 Content-Type: application/pkcs7-mime; smime-type=authEnvelopedData; 1258 name=smime.p7m 1259 Content-Transfer-Encoding: base64 1260 Content-Disposition: attachment; filename=smime.p7m 1262 rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6 1263 7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H 1264 f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 1265 0GhIGfHfQbnj756YT64V 1267 3.5. Creating a Signed-Only Message 1269 There are two formats for signed messages defined for S/MIME: 1271 - application/pkcs7-mime with SignedData. 1273 - multipart/signed. 1275 In general, the multipart/signed form is preferred for sending, and 1276 receiving agents MUST be able to handle both. 1278 3.5.1. Choosing a Format for Signed-Only Messages 1280 There are no hard-and-fast rules as to when a particular signed-only 1281 format is chosen. It depends on the capabilities of all the 1282 receivers and the relative importance of receivers with S/MIME 1283 facilities being able to verify the signature versus the importance 1284 of receivers without S/MIME software being able to view the message. 1286 Messages signed using the multipart/signed format can always be 1287 viewed by the receiver whether or not they have S/MIME software. 1288 They can also be viewed whether they are using a MIME-native user 1289 agent or they have messages translated by a gateway. In this 1290 context, "be viewed" means the ability to process the message 1291 essentially as if it were not a signed message, including any other 1292 MIME structure the message might have. 1294 Messages signed using the SignedData format cannot be viewed by a 1295 recipient unless they have S/MIME facilities. However, the 1296 SignedData format protects the message content from being changed by 1297 benign intermediate agents. Such agents might do line wrapping or 1298 content-transfer encoding changes that would break the signature. 1300 3.5.2. Signing Using application/pkcs7-mime with SignedData 1302 This signing format uses the application/pkcs7-mime media type. The 1303 steps to create this format are: 1305 Step 1. The MIME entity is prepared according to Section 3.1. 1307 Step 2. The MIME entity and other required data are processed into a 1308 CMS object of type SignedData. 1310 Step 3. The SignedData object is wrapped in a CMS ContentInfo 1311 object. 1313 Step 4. The ContentInfo object is inserted into an 1314 application/pkcs7-mime MIME entity. 1316 The smime-type parameter for messages using application/pkcs7-mime 1317 with SignedData is "signed-data". The file extension for this type 1318 of message is ".p7m". 1320 A sample message would be: 1322 Content-Type: application/pkcs7-mime; smime-type=signed-data; 1323 name=smime.p7m 1324 Content-Transfer-Encoding: base64 1325 Content-Disposition: attachment; filename=smime.p7m 1327 567GhIGfHfYT6ghyHhHUujpfyF4f8HHGTrfvhJhjH776tbB9HG4VQbnj7 1328 77n8HHGT9HG4VQpfyF467GhIGfHfYT6rfvbnj756tbBghyHhHUujhJhjH 1329 HUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H7n8HHGghyHh 1330 6YT64V0GhIGfHfQbnj75 1332 3.5.3. Signing Using the multipart/signed Format 1334 This format is a clear-signing format. Recipients without any S/MIME 1335 or CMS processing facilities are able to view the message. It makes 1336 use of the multipart/signed media type described in [RFC1847]. The 1337 multipart/signed media type has two parts. The first part contains 1338 the MIME entity that is signed; the second part contains the 1339 "detached signature" CMS SignedData object in which the 1340 encapContentInfo eContent field is absent. 1342 3.5.3.1. The application/pkcs7-signature Media Type 1344 This media type always contains a CMS ContentInfo containing a single 1345 CMS object of type SignedData. The SignedData encapContentInfo 1346 eContent field MUST be absent. The signerInfos field contains the 1347 signatures for the MIME entity. 1349 The file extension for signed-only messages using application/pkcs7- 1350 signature is ".p7s". 1352 3.5.3.2. Creating a multipart/signed Message 1354 Step 1. The MIME entity to be signed is prepared according to 1355 Section 3.1, taking special care for clear-signing. 1357 Step 2. The MIME entity is presented to CMS processing in order to 1358 obtain an object of type SignedData in which the 1359 encapContentInfo eContent field is absent. 1361 Step 3. The MIME entity is inserted into the first part of a 1362 multipart/signed message with no processing other than that 1363 described in Section 3.1. 1365 Step 4. Transfer encoding is applied to the "detached signature" CMS 1366 SignedData object, and it is inserted into a MIME entity of 1367 type application/pkcs7-signature. 1369 Step 5. The MIME entity of the application/pkcs7-signature is 1370 inserted into the second part of the multipart/signed 1371 entity. 1373 The multipart/signed Content-Type has two required parameters: the 1374 protocol parameter and the micalg parameter. 1376 The protocol parameter MUST be "application/pkcs7-signature". Note 1377 that quotation marks are required around the protocol parameter 1378 because MIME requires that the "/" character in the parameter value 1379 MUST be quoted. 1381 The micalg parameter allows for one-pass processing when the 1382 signature is being verified. The value of the micalg parameter is 1383 dependent on the message digest algorithm(s) used in the calculation 1384 of the Message Integrity Check. If multiple message digest 1385 algorithms are used, they MUST be separated by commas per [MIME- 1386 SECURE]. The values to be placed in the micalg parameter SHOULD be 1387 from the following: 1389 Algorithm Value Used 1390 MD5 md5 1391 SHA-1 sha-1 1392 SHA-224 sha-224 1393 SHA-256 sha-256 1394 SHA-384 sha-384 1395 SHA-512 sha-512 1396 Any other (defined separately in algorithm profile or "unknown" if 1397 not defined) 1399 (Historical note: some early implementations of S/MIME emitted and 1400 expected "rsa-md5", "rsa-sha1", and "sha1" for the micalg parameter.) 1401 Receiving agents SHOULD be able to recover gracefully from a micalg 1402 parameter value that they do not recognize. Future names for this 1403 parameter will be consistent with the IANA "Hash Function Textual 1404 Names" registry. 1406 3.5.3.3. Sample multipart/signed Message 1408 Content-Type: multipart/signed; 1409 protocol="application/pkcs7-signature"; 1410 micalg=sha-1; boundary=boundary42 1412 --boundary42 1413 Content-Type: text/plain 1415 This is a clear-signed message. 1417 --boundary42 1418 Content-Type: application/pkcs7-signature; name=smime.p7s 1419 Content-Transfer-Encoding: base64 1420 Content-Disposition: attachment; filename=smime.p7s 1422 ghyHhHUujhJhjH77n8HHGTrfvbnj756tbB9HG4VQpfyF467GhIGfHfYT6 1423 4VQpfyF467GhIGfHfYT6jH77n8HHGghyHhHUujhJh756tbB9HGTrfvbnj 1424 n8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 1425 7GhIGfHfYT64VQbnj756 1427 --boundary42-- 1429 The content that is digested (the first part of the multipart/signed) 1430 consists of the bytes: 1432 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f 70 6c 61 69 1433 6e 0d 0a 0d 0a 54 68 69 73 20 69 73 20 61 20 63 6c 65 61 72 2d 73 69 1434 67 6e 65 64 20 6d 65 73 73 61 67 65 2e 0d 0a 1436 3.6. Creating a Compressed-Only Message 1438 This section describes the format for compressing a MIME entity. 1439 Please note that versions of S/MIME prior to version 3.1 did not 1440 specify any use of CompressedData, and will not recognize it. The 1441 use of a capability to indicate the ability to receive CompressedData 1442 is described in [RFC3274] and is the preferred method for 1443 compatibility. 1445 Step 1. The MIME entity to be compressed is prepared according to 1446 Section 3.1. 1448 Step 2. The MIME entity and other required data are processed into a 1449 CMS object of type CompressedData. 1451 Step 3. The CompressedData object is wrapped in a CMS ContentInfo 1452 object. 1454 Step 4. The ContentInfo object is inserted into an 1455 application/pkcs7-mime MIME entity. 1457 The smime-type parameter for compressed-only messages is "compressed- 1458 data". The file extension for this type of message is ".p7z". 1460 A sample message would be: 1462 Content-Type: application/pkcs7-mime; smime-type=compressed-data; 1463 name=smime.p7z 1464 Content-Transfer-Encoding: base64 1465 Content-Disposition: attachment; filename=smime.p7z 1467 rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6 1468 7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H 1469 f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 1470 0GhIGfHfQbnj756YT64V 1472 3.7. Multiple Operations 1474 The signed-only, enveloped-only, and compressed-only MIME formats can 1475 be nested. This works because these formats are all MIME entities 1476 that encapsulate other MIME entities. 1478 An S/MIME implementation MUST be able to receive and process 1479 arbitrarily nested S/MIME within reasonable resource limits of the 1480 recipient computer. 1482 It is possible to apply any of the signing, encrypting, and 1483 compressing operations in any order. It is up to the implementer and 1484 the user to choose. When signing first, the signatories are then 1485 securely obscured by the enveloping. When enveloping first the 1486 signatories are exposed, but it is possible to verify signatures 1487 without removing the enveloping. This can be useful in an 1488 environment where automatic signature verification is desired, as no 1489 private key material is required to verify a signature. 1491 There are security ramifications to choosing whether to sign first or 1492 encrypt first. A recipient of a message that is encrypted and then 1493 signed can validate that the encrypted block was unaltered, but 1494 cannot determine any relationship between the signer and the 1495 unencrypted contents of the message. A recipient of a message that 1496 is signed then encrypted can assume that the signed message itself 1497 has not been altered, but that a careful attacker could have changed 1498 the unauthenticated portions of the encrypted message. 1500 When using compression, keep the following guidelines in mind: 1502 - Compression of binary encoded encrypted data is discouraged, since 1503 it will not yield significant compression. Base64 encrypted data 1504 could very well benefit, however. 1506 - If a lossy compression algorithm is used with signing, you will 1507 need to compress first, then sign. 1509 3.8. Creating a Certificate Management Message 1511 The certificate management message or MIME entity is used to 1512 transport certificates and/or Certificate Revocation Lists, such as 1513 in response to a registration request. 1515 Step 1. The certificates and/or Certificate Revocation Lists are 1516 made available to the CMS generating process that creates a 1517 CMS object of type SignedData. The SignedData 1518 encapContentInfo eContent field MUST be absent and 1519 signerInfos field MUST be empty. 1521 Step 2. The SignedData object is wrapped in a CMS ContentInfo 1522 object. 1524 Step 3. The ContentInfo object is enclosed in an 1525 application/pkcs7-mime MIME entity. 1527 The smime-type parameter for a certificate management message is 1528 "certs-only". The file extension for this type of message is ".p7c". 1530 3.9. Registration Requests 1532 A sending agent that signs messages MUST have a certificate for the 1533 signature so that a receiving agent can verify the signature. There 1534 are many ways of getting certificates, such as through an exchange 1535 with a certification authority, through a hardware token or diskette, 1536 and so on. 1538 S/MIME v2 [SMIMEv2] specified a method for "registering" public keys 1539 with certificate authorities using an application/pkcs10 body part. 1540 Since that time, the IETF PKIX Working Group has developed other 1541 methods for requesting certificates. However, S/MIME v3.2 does not 1542 require a particular certificate request mechanism. 1544 3.10. Identifying an S/MIME Message 1546 Because S/MIME takes into account interoperation in non-MIME 1547 environments, several different mechanisms are employed to carry the 1548 type information, and it becomes a bit difficult to identify S/MIME 1549 messages. The following table lists criteria for determining whether 1550 or not a message is an S/MIME message. A message is considered an 1551 S/MIME message if it matches any of the criteria listed below. 1553 The file suffix in the table below comes from the "name" parameter in 1554 the Content-Type header field, or the "filename" parameter on the 1555 Content-Disposition header field. These parameters that give the 1556 file suffix are not listed below as part of the parameter section. 1558 Media type parameters file 1559 suffix 1560 application/pkcs7-mime any any 1561 multipart/signed protocol="application/pkcs7-signature" any 1562 application/octet- any p7m, 1563 stream p7s, 1564 p7c, 1565 p7z 1567 4. Certificate Processing 1569 A receiving agent MUST provide some certificate retrieval mechanism 1570 in order to gain access to certificates for recipients of digital 1571 envelopes. This specification does not cover how S/MIME agents 1572 handle certificates, only what they do after a certificate has been 1573 validated or rejected. S/MIME certificate issues are covered in 1574 [RFC5750]. 1576 At a minimum, for initial S/MIME deployment, a user agent could 1577 automatically generate a message to an intended recipient requesting 1578 that recipient's certificate in a signed return message. Receiving 1579 and sending agents SHOULD also provide a mechanism to allow a user to 1580 "store and protect" certificates for correspondents in such a way so 1581 as to guarantee their later retrieval. 1583 4.1. Key Pair Generation 1585 All generated key pairs MUST be generated from a good source of non- 1586 deterministic random input [RFC4086] and the private key MUST be 1587 protected in a secure fashion. 1589 An S/MIME user agent MUST NOT generate asymmetric keys less than 512 1590 bits for use with the RSA or DSA signature algorithms. 1592 For 512-bit RSA with SHA-1 see [RFC3370] and [FIPS186-2] without 1593 Change Notice 1, for 512-bit RSA with SHA-256 see [RFC5754] and 1594 [FIPS186-2] without Change Notice 1, and for 1024-bit through 1595 2048-bit RSA with SHA-256 see [RFC5754] and [FIPS186-2] with Change 1596 Notice 1. The first reference provides the signature algorithm's 1597 object identifier, and the second provides the signature algorithm's 1598 definition. 1600 For 512-bit DSA with SHA-1 see [RFC3370] and [FIPS186-2] without 1601 Change Notice 1, for 512-bit DSA with SHA-256 see [RFC5754] and 1602 [FIPS186-2] without Change Notice 1, for 1024-bit DSA with SHA-1 see 1603 [RFC3370] and [FIPS186-2] with Change Notice 1, for 1024-bit and 1604 above DSA with SHA-256 see [RFC5754] and [FIPS186-3]. The first 1605 reference provides the signature algorithm's object identifier and 1606 the second provides the signature algorithm's definition. 1608 For RSASSA-PSS with SHA-256, see [RFC4056]. For 1024-bit DH, see 1609 [RFC3370]. For 1024-bit and larger DH, see [SP800-56A]; regardless, 1610 use the KDF, which is from X9.42, specified in [RFC3370]. For RSAES- 1611 OAEP, see [RFC3560]. 1613 4.2. Signature Generation 1615 The following are the requirements for an S/MIME agent generated RSA, 1616 RSASSA-PSS, and DSA signatures: 1618 key size <= 1023 : SHOULD NOT (see Security Considerations) 1619 1024 <= key size <= 2048 : SHOULD (see Security Considerations) 1620 2048 < key size : MAY (see Security Considerations) 1622 4.3. Signature Verification 1624 The following are the requirements for S/MIME receiving agents during 1625 signature verification of RSA, RSASSA-PSS, and DSA signatures: 1627 key size <= 1023 : MAY (see Security Considerations) 1628 1024 <= key size <= 2048 : MUST (see Security Considerations) 1629 2048 < key size : MAY (see Security Considerations) 1631 4.4. Encryption 1633 The following are the requirements for an S/MIME agent when 1634 establishing keys for content encryption using the RSA, RSA-OAEP, and 1635 DH algorithms: 1637 key size <= 1023 : SHOULD NOT (see Security Considerations) 1638 1024 <= key size <= 2048 : SHOULD (see Security Considerations) 1639 2048 < key size : MAY (see Security Considerations) 1641 4.5. Decryption 1643 The following are the requirements for an S/MIME agent when 1644 establishing keys for content decryption using the RSA, RSAES-OAEP, 1645 and DH algorithms: 1647 key size <= 1023 : MAY (see Security Considerations) 1648 1024 <= key size <= 2048 : MUST (see Security Considerations) 1649 2048 < key size : MAY (see Security Considerations) 1651 5. IANA Considerations 1653 The following information updates the media type registration for 1654 application/pkcs7-mime and application/pkcs7-signature to refer to 1655 this document as opposed to RFC 2311. 1657 Note that other documents can define additional MIME media types for 1658 S/MIME. 1660 5.1. Media Type for application/pkcs7-mime 1661 Type name: application 1663 Subtype Name: pkcs7-mime 1665 Required Parameters: NONE 1667 Optional Parameters: smime-type/signed-data 1668 smime-type/enveloped-data 1669 smime-type/compressed-data 1670 smime-type/certs-only 1671 name 1673 Encoding Considerations: See Section 3 of this document 1675 Security Considerations: See Section 6 of this document 1677 Interoperability Considerations: See Sections 1-6 of this document 1679 Published Specification: RFC 2311, RFC 2633, and this document 1681 Applications that use this media type: Security applications 1683 Additional information: NONE 1685 Person & email to contact for further information: 1686 S/MIME working group chairs smime-chairs@ietf.org 1688 Intended usage: COMMON 1690 Restrictions on usage: NONE 1692 Author: Sean Turner 1694 Change Controller: S/MIME working group delegated from the IESG 1696 5.2. Media Type for application/pkcs7-signature 1697 Type name: application 1699 Subtype Name: pkcs7-signature 1701 Required Parameters: NONE 1703 Optional Parameters: NONE 1705 Encoding Considerations: See Section 3 of this document 1707 Security Considerations: See Section 6 of this document 1709 Interoperability Considerations: See Sections 1-6 of this document 1711 Published Specification: RFC 2311, RFC 2633, and this document 1713 Applications that use this media type: Security applications 1715 Additional information: NONE 1717 Person & email to contact for further information: 1718 S/MIME working group chairs smime-chairs@ietf.org 1720 Intended usage: COMMON 1722 Restrictions on usage: NONE 1724 Author: Sean Turner 1726 Change Controller: S/MIME working group delegated from the IESG 1728 5.3. Register authEnvelopedData smime-type 1730 IANA is required to register the following value in the "Parameter 1731 Values for the smime-type Parameter" registry. The values to be 1732 registered are: 1734 smime-type value: authEnvelopedData 1736 Reference: [[This Document, Section 3.2.2]] 1738 6. Security Considerations 1740 Cryptographic algorithms will be broken or weakened over time. 1741 Implementers and users need to check that the cryptographic 1742 algorithms listed in this document continue to provide the expected 1743 level of security. The IETF from time to time may issue documents 1744 dealing with the current state of the art. For example: 1746 - The Million Message Attack described in RFC 3218 [RFC3218]. 1748 - The Diffie-Hellman "small-subgroup" attacks described in RFC 2785 1749 [RFC2785]. 1751 - The attacks against hash algorithms described in RFC 4270 1752 [RFC4270]. 1754 This specification uses Public-Key Cryptography technologies. It is 1755 assumed that the private key is protected to ensure that it is not 1756 accessed or altered by unauthorized parties. 1758 It is impossible for most people or software to estimate the value of 1759 a message's content. Further, it is impossible for most people or 1760 software to estimate the actual cost of recovering an encrypted 1761 message content that is encrypted with a key of a particular size. 1762 Further, it is quite difficult to determine the cost of a failed 1763 decryption if a recipient cannot process a message's content. Thus, 1764 choosing between different key sizes (or choosing whether to just use 1765 plaintext) is also impossible for most people or software. However, 1766 decisions based on these criteria are made all the time, and 1767 therefore this specification gives a framework for using those 1768 estimates in choosing algorithms. 1770 The choice of 2048 bits as the RSA asymmetric key size in this 1771 specification is based on the desire to provide at least 100 bits of 1772 security. The key sizes that must be supported to conform to this 1773 specification seem appropriate for the Internet based on [RFC3766]. 1774 Of course, there are environments, such as financial and medical 1775 systems, that may select different key sizes. For this reason, an 1776 implementation MAY support key sizes beyond those recommended in this 1777 specification. 1779 Receiving agents that validate signatures and sending agents that 1780 encrypt messages need to be cautious of cryptographic processing 1781 usage when validating signatures and encrypting messages using keys 1782 larger than those mandated in this specification. An attacker could 1783 send certificates with keys that would result in excessive 1784 cryptographic processing, for example, keys larger than those 1785 mandated in this specification, which could swamp the processing 1786 element. Agents that use such keys without first validating the 1787 certificate to a trust anchor are advised to have some sort of 1788 cryptographic resource management system to prevent such attacks. 1790 Using weak cryptography in S/MIME offers little actual security over 1791 sending plaintext. However, other features of S/MIME, such as the 1792 specification of AES and the ability to announce stronger 1793 cryptographic capabilities to parties with whom you communicate, 1794 allow senders to create messages that use strong encryption. Using 1795 weak cryptography is never recommended unless the only alternative is 1796 no cryptography. 1798 RSA and DSA keys of less than 1024 bits are now considered by many 1799 experts to be cryptographically insecure (due to advances in 1800 computing power), and should no longer be used to protect messages. 1801 Such keys were previously considered secure, so processing previously 1802 received signed and encrypted mail will often result in the use of 1803 weak keys. Implementations that wish to support previous versions of 1804 S/MIME or process old messages need to consider the security risks 1805 that result from smaller key sizes (e.g., spoofed messages) versus 1806 the costs of denial of service. If an implementation supports 1807 verification of digital signatures generated with RSA and DSA keys of 1808 less than 1024 bits, it MUST warn the user. Implementers should 1809 consider providing different warnings for newly received messages and 1810 previously stored messages. Server implementations (e.g., secure 1811 mail list servers) where user warnings are not appropriate SHOULD 1812 reject messages with weak signatures. 1814 Implementers SHOULD be aware that multiple active key pairs can be 1815 associated with a single individual. For example, one key pair can 1816 be used to support confidentiality, while a different key pair can be 1817 used for digital signatures. 1819 If a sending agent is sending the same message using different 1820 strengths of cryptography, an attacker watching the communications 1821 channel might be able to determine the contents of the strongly 1822 encrypted message by decrypting the weakly encrypted version. In 1823 other words, a sender SHOULD NOT send a copy of a message using 1824 weaker cryptography than they would use for the original of the 1825 message. 1827 Modification of the ciphertext can go undetected if authentication is 1828 not also used, which is the case when sending EnvelopedData without 1829 wrapping it in SignedData or enclosing SignedData within it. 1831 If an implementation is concerned about compliance with National 1832 Institute of Standards and Technology (NIST) key size 1833 recommendations, then see [SP800-57]. 1835 If messaging environments make use of the fact that a message is 1836 signed to change the behavior of message processing (examples would 1837 be running rules or UI display hints), without first verifying that 1838 the message is actually signed and knowing the state of the 1839 signature, this can lead to incorrect handling of the message. 1840 Visual indicators on messages may need to have the signature 1841 validation code checked periodically if the indicator is supposed to 1842 give information on the current status of a message. 1844 Many people assume that the use of an authenticated encryption 1845 algorithm is all that is needed to be in a situtation where the 1846 sender of the message will be authenticated. In almost all cases 1847 this is not a correct statement. There are a number of preconditions 1848 that need to hold for an authenticated encryption algorithm to 1849 provide this service: 1851 - The starting key must be bound to a single entity. The use of a 1852 group key only would allow for the statement that a message was 1853 sent by one of the entities that held the key but will not 1854 identify a specific entity. 1856 - The message must have exactly one sender and one recipient. 1857 Having more than one recipient would allow for the second 1858 recipient to create a message that the first recipient would 1859 believe is from the sender by stripping them as a recipient from 1860 the message. 1862 - A direct path needs to exist from the starting key to the key used 1863 as the content encryption key (CEK) which guarantees that no third 1864 party could have seen the resulting CEK. This means that one 1865 needs to be using an algorithm that is called a "Direct 1866 Encryption" or a "Direct Key Agreement" algorithm in other 1867 contexts. This means that the starting key is used directly as 1868 the CEK key, or that the starting key is used to create a secret 1869 which then is transformed into the CEK via a KDF step. 1871 S/MIME implementations almost universally use ephemeral-static rather 1872 than static-static key agreement and do not use a pre-existing shared 1873 secret when doing encryption, this means that the first precondition 1874 is not met. There is a document [RFC6278] which defined how to use 1875 static-static key agreement with CMS so that is readably doable. 1876 Currently, all S/MIME key agreement methods derive a KEK and wrap a 1877 CEK. This violates the third precondition above. New key key 1878 agreement algorithms that directly created the CEK without creating 1879 an intervening KEK would need to be defined. 1881 Even when all of the preconditions are met and origination of a 1882 message is established by the use of an authenticated encryption 1883 algorithm, users need to be aware that there is no way to prove this 1884 to a third party. This is because either of the parties can 1885 successfully create the message (or just alter the content) based on 1886 the fact that the CEK is going to be known to both parties. Thus the 1887 origination is always built on a presumption that "I did not send 1888 this message to myself." 1890 7. References 1892 7.1. Normative References 1894 [ASN.1] "Information Technology - Abstract Syntax Notation 1895 (ASN.1)". 1897 ASN.1 syntax consists of the following references [X.680], 1898 [X.681], [X.682], and [X.683]. 1900 [CHARSETS] 1901 "Character sets assigned by IANA.", 1902 . 1904 [CMS] "Cryptograhic Message Syntax". 1906 This is the set of documents dealing with the 1907 cryptographic message syntax and refers to [RFC5652] and 1908 [RFC5083]. 1910 [ESS] "Enhanced Security Services for S/MIME". 1912 This is the set of documents dealing with enhanged 1913 security services and refers to [RFC2634] and [RFC5035]. 1915 [FIPS186-2] 1916 National Institute of Standards and Technology (NIST), 1917 "Digital Signature Standard (DSS) [With Change Notice 1]", 1918 Federal Information Processing Standards 1919 Publication 186-2, January 2000. 1921 [FIPS186-3] 1922 National Institute of Standards and Technology (NIST), 1923 "Digital Signature Standard (DSS)", Federal Information 1924 Processing Standards Publication 186-3, June 2009. 1926 [MIME-SPEC] 1927 "MIME Message Specifications". 1929 This is the set of documents that define how to use MIME. 1930 This set of documents is [RFC2045], [RFC2046], [RFC2047], 1931 [RFC2049], [RFC4288], and [RFC4289]. 1933 [RFC1847] Galvin, J., Murphy, S., Crocker, S., and N. Freed, 1934 "Security Multiparts for MIME: Multipart/Signed and 1935 Multipart/Encrypted", RFC 1847, DOI 10.17487/RFC1847, 1936 October 1995, . 1938 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 1939 Extensions (MIME) Part One: Format of Internet Message 1940 Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, 1941 . 1943 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 1944 Extensions (MIME) Part Two: Media Types", RFC 2046, 1945 DOI 10.17487/RFC2046, November 1996, 1946 . 1948 [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions) 1949 Part Three: Message Header Extensions for Non-ASCII Text", 1950 RFC 2047, DOI 10.17487/RFC2047, November 1996, 1951 . 1953 [RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 1954 Extensions (MIME) Part Five: Conformance Criteria and 1955 Examples", RFC 2049, DOI 10.17487/RFC2049, November 1996, 1956 . 1958 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1959 Requirement Levels", BCP 14, RFC 2119, 1960 DOI 10.17487/RFC2119, March 1997, 1961 . 1963 [RFC2138] Rigney, C., Rubens, A., Simpson, W., and S. Willens, 1964 "Remote Authentication Dial In User Service (RADIUS)", 1965 RFC 2138, DOI 10.17487/RFC2138, April 1997, 1966 . 1968 [RFC2634] Hoffman, P., Ed., "Enhanced Security Services for S/MIME", 1969 RFC 2634, DOI 10.17487/RFC2634, June 1999, 1970 . 1972 [RFC3274] Gutmann, P., "Compressed Data Content Type for 1973 Cryptographic Message Syntax (CMS)", RFC 3274, 1974 DOI 10.17487/RFC3274, June 2002, 1975 . 1977 [RFC3370] Housley, R., "Cryptographic Message Syntax (CMS) 1978 Algorithms", RFC 3370, DOI 10.17487/RFC3370, August 2002, 1979 . 1981 [RFC3560] Housley, R., "Use of the RSAES-OAEP Key Transport 1982 Algorithm in Cryptographic Message Syntax (CMS)", 1983 RFC 3560, DOI 10.17487/RFC3560, July 2003, 1984 . 1986 [RFC3565] Schaad, J., "Use of the Advanced Encryption Standard (AES) 1987 Encryption Algorithm in Cryptographic Message Syntax 1988 (CMS)", RFC 3565, DOI 10.17487/RFC3565, July 2003, 1989 . 1991 [RFC4056] Schaad, J., "Use of the RSASSA-PSS Signature Algorithm in 1992 Cryptographic Message Syntax (CMS)", RFC 4056, 1993 DOI 10.17487/RFC4056, June 2005, 1994 . 1996 [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, 1997 "Randomness Requirements for Security", BCP 106, RFC 4086, 1998 DOI 10.17487/RFC4086, June 2005, 1999 . 2001 [RFC4288] Freed, N. and J. Klensin, "Media Type Specifications and 2002 Registration Procedures", RFC 4288, DOI 10.17487/RFC4288, 2003 December 2005, . 2005 [RFC4289] Freed, N. and J. Klensin, "Multipurpose Internet Mail 2006 Extensions (MIME) Part Four: Registration Procedures", 2007 BCP 13, RFC 4289, DOI 10.17487/RFC4289, December 2005, 2008 . 2010 [RFC5035] Schaad, J., "Enhanced Security Services (ESS) Update: 2011 Adding CertID Algorithm Agility", RFC 5035, 2012 DOI 10.17487/RFC5035, August 2007, 2013 . 2015 [RFC5083] Housley, R., "Cryptographic Message Syntax (CMS) 2016 Authenticated-Enveloped-Data Content Type", RFC 5083, 2017 DOI 10.17487/RFC5083, November 2007, 2018 . 2020 [RFC5084] Housley, R., "Using AES-CCM and AES-GCM Authenticated 2021 Encryption in the Cryptographic Message Syntax (CMS)", 2022 RFC 5084, DOI 10.17487/RFC5084, November 2007, 2023 . 2025 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 2026 RFC 5652, DOI 10.17487/RFC5652, September 2009, 2027 . 2029 [RFC5754] Turner, S., "Using SHA2 Algorithms with Cryptographic 2030 Message Syntax", RFC 5754, DOI 10.17487/RFC5754, January 2031 2010, . 2033 [SMIMEv3.5] 2034 "S/MIME version 3.5". 2036 This group of documents represents S/MIME version 3.5. 2037 This set of documents are [RFC2634], [RFC5750], [[This 2038 Document]], [RFC5652], and [RFC5035]. 2040 [SP800-56A] 2041 National Institute of Standards and Technology (NIST), 2042 "Special Publication 800-56A Revision 2: Recommendation 2043 Pair-Wise Key Establishment Schemes Using Discrete 2044 Logarithm Cryptography", May 2013. 2046 [X.680] "Information Technology - Abstract Syntax Notation One 2047 (ASN.1): Specification of basic notation. ITU-T 2048 Recommendation X.680 (2002)", ITU-T X.680, ISO/ 2049 IEC 8824-1:2008, November 2008. 2051 [X.681] "Information Technology - Abstract Syntax Notation One 2052 (ASN.1): Information object specification", ITU-T X.681, 2053 ISO/IEC 8824-2:2008, November 2008. 2055 [X.682] "Information Technology - Abstract Syntax Notation One 2056 (ASN.1): Constraint specification", ITU-T X.682, ISO/ 2057 IEC 8824-3:2008, November 2008. 2059 [X.683] "Information Technology - Abstract Syntax Notation One 2060 (ASN.1): Parameteriztion of ASN.1 specifications", 2061 ITU-T X.683, ISO/IEC 8824-4:2008, November 2008. 2063 [X.690] "Information Technology - ASN.1 encoding rules: 2064 Specification of Basic Encoding Rules (BER), Canonical 2065 Encoding Rules (CER) and Distinguished Encoding Rules 2066 (DER).", ITU-T X.690, ISO/IEC 8825-1:2002, July 2002. 2068 7.2. Informative References 2070 [RFC2311] Dusse, S., Hoffman, P., Ramsdell, B., Lundblade, L., and 2071 L. Repka, "S/MIME Version 2 Message Specification", 2072 RFC 2311, DOI 10.17487/RFC2311, March 1998, 2073 . 2075 [RFC2312] Dusse, S., Hoffman, P., Ramsdell, B., and J. Weinstein, 2076 "S/MIME Version 2 Certificate Handling", RFC 2312, 2077 DOI 10.17487/RFC2312, March 1998, 2078 . 2080 [RFC2313] Kaliski, B., "PKCS #1: RSA Encryption Version 1.5", 2081 RFC 2313, DOI 10.17487/RFC2313, March 1998, 2082 . 2084 [RFC2314] Kaliski, B., "PKCS #10: Certification Request Syntax 2085 Version 1.5", RFC 2314, DOI 10.17487/RFC2314, March 1998, 2086 . 2088 [RFC2315] Kaliski, B., "PKCS #7: Cryptographic Message Syntax 2089 Version 1.5", RFC 2315, DOI 10.17487/RFC2315, March 1998, 2090 . 2092 [RFC2630] Housley, R., "Cryptographic Message Syntax", RFC 2630, 2093 DOI 10.17487/RFC2630, June 1999, 2094 . 2096 [RFC2631] Rescorla, E., "Diffie-Hellman Key Agreement Method", 2097 RFC 2631, DOI 10.17487/RFC2631, June 1999, 2098 . 2100 [RFC2632] Ramsdell, B., Ed., "S/MIME Version 3 Certificate 2101 Handling", RFC 2632, DOI 10.17487/RFC2632, June 1999, 2102 . 2104 [RFC2633] Ramsdell, B., Ed., "S/MIME Version 3 Message 2105 Specification", RFC 2633, DOI 10.17487/RFC2633, June 1999, 2106 . 2108 [RFC2785] Zuccherato, R., "Methods for Avoiding the "Small-Subgroup" 2109 Attacks on the Diffie-Hellman Key Agreement Method for S/ 2110 MIME", RFC 2785, DOI 10.17487/RFC2785, March 2000, 2111 . 2113 [RFC3218] Rescorla, E., "Preventing the Million Message Attack on 2114 Cryptographic Message Syntax", RFC 3218, 2115 DOI 10.17487/RFC3218, January 2002, 2116 . 2118 [RFC3766] Orman, H. and P. Hoffman, "Determining Strengths For 2119 Public Keys Used For Exchanging Symmetric Keys", BCP 86, 2120 RFC 3766, DOI 10.17487/RFC3766, April 2004, 2121 . 2123 [RFC3850] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail 2124 Extensions (S/MIME) Version 3.1 Certificate Handling", 2125 RFC 3850, DOI 10.17487/RFC3850, July 2004, 2126 . 2128 [RFC3851] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail 2129 Extensions (S/MIME) Version 3.1 Message Specification", 2130 RFC 3851, DOI 10.17487/RFC3851, July 2004, 2131 . 2133 [RFC3852] Housley, R., "Cryptographic Message Syntax (CMS)", 2134 RFC 3852, DOI 10.17487/RFC3852, July 2004, 2135 . 2137 [RFC4270] Hoffman, P. and B. Schneier, "Attacks on Cryptographic 2138 Hashes in Internet Protocols", RFC 4270, 2139 DOI 10.17487/RFC4270, November 2005, 2140 . 2142 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 2143 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 2144 . 2146 [RFC5750] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet 2147 Mail Extensions (S/MIME) Version 3.2 Certificate 2148 Handling", RFC 5750, DOI 10.17487/RFC5750, January 2010, 2149 . 2151 [RFC5751] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet 2152 Mail Extensions (S/MIME) Version 3.2 Message 2153 Specification", RFC 5751, DOI 10.17487/RFC5751, January 2154 2010, . 2156 [RFC6278] Herzog, J. and R. Khazan, "Use of Static-Static Elliptic 2157 Curve Diffie-Hellman Key Agreement in Cryptographic 2158 Message Syntax", RFC 6278, DOI 10.17487/RFC6278, June 2159 2011, . 2161 [SMIMEv2] "S/MIME version v2". 2163 This group of documents represents S/MIME version 2. This 2164 set of documents are [RFC2311], [RFC2312], [RFC2313], 2165 [RFC2314], and [RFC2315]. 2167 [SMIMEv3] "S/MIME version 3". 2169 This group of documents represents S/MIME version 3. This 2170 set of documents are [RFC2630], [RFC2631], [RFC2632], 2171 [RFC2633], [RFC2634], and [RFC5035]. 2173 [SMIMEv3.1] 2174 "S/MIME version 3.1". 2176 This group of documents represents S/MIME version 3.1. 2177 This set of documents are [RFC2634], [RFC3850], [RFC3851], 2178 [RFC3852], and [RFC5035]. 2180 [SMIMEv3.2] 2181 "S/MIME version 3.2". 2183 This group of documents represents S/MIME version 3.2. 2184 This set of documents are [RFC2634], [RFC5750], [RFC5751], 2185 [RFC5652], and [RFC5035]. 2187 [SP800-57] 2188 National Institute of Standards and Technology (NIST), 2189 "Special Publication 800-57: Recommendation for Key 2190 Management", August 2005. 2192 Appendix A. ASN.1 Module 2194 Note: The ASN.1 module contained herein is unchanged from RFC 3851 2195 [SMIMEv3.1] with the exception of a change to the prefersBinaryInside 2196 ASN.1 comment. This module uses the 1988 version of ASN.1. 2198 SecureMimeMessageV3dot1 2200 { iso(1) member-body(2) us(840) rsadsi(113549) 2201 pkcs(1) pkcs-9(9) smime(16) modules(0) msg-v3dot1(21) } 2203 DEFINITIONS IMPLICIT TAGS ::= 2205 BEGIN 2207 IMPORTS 2209 -- Cryptographic Message Syntax [CMS] 2210 SubjectKeyIdentifier, IssuerAndSerialNumber, 2211 RecipientKeyIdentifier 2212 FROM CryptographicMessageSyntax 2213 { iso(1) member-body(2) us(840) rsadsi(113549) 2214 pkcs(1) pkcs-9(9) smime(16) modules(0) cms-2001(14) }; 2216 -- id-aa is the arc with all new authenticated and unauthenticated 2217 -- attributes produced by the S/MIME Working Group 2219 id-aa OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840) 2220 rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) attributes(2)} 2222 -- S/MIME Capabilities provides a method of broadcasting the 2223 -- symmetric capabilities understood. Algorithms SHOULD be ordered 2224 -- by preference and grouped by type 2226 smimeCapabilities OBJECT IDENTIFIER ::= {iso(1) member-body(2) 2227 us(840) rsadsi(113549) pkcs(1) pkcs-9(9) 15} 2229 SMIMECapability ::= SEQUENCE { 2230 capabilityID OBJECT IDENTIFIER, 2231 parameters ANY DEFINED BY capabilityID OPTIONAL } 2233 SMIMECapabilities ::= SEQUENCE OF SMIMECapability 2235 -- Encryption Key Preference provides a method of broadcasting the 2236 -- preferred encryption certificate. 2238 id-aa-encrypKeyPref OBJECT IDENTIFIER ::= {id-aa 11} 2240 SMIMEEncryptionKeyPreference ::= CHOICE { 2241 issuerAndSerialNumber [0] IssuerAndSerialNumber, 2242 receipentKeyId [1] RecipientKeyIdentifier, 2243 subjectAltKeyIdentifier [2] SubjectKeyIdentifier 2244 } 2246 -- receipentKeyId is spelt incorrectly, but kept for historical 2247 -- reasons. 2249 id-smime OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) 2250 rsadsi(113549) pkcs(1) pkcs9(9) 16 } 2252 id-cap OBJECT IDENTIFIER ::= { id-smime 11 } 2254 -- The preferBinaryInside OID indicates an ability to receive 2255 -- messages with binary encoding inside the CMS wrapper. 2256 -- The preferBinaryInside attribute's value field is ABSENT. 2258 id-cap-preferBinaryInside OBJECT IDENTIFIER ::= { id-cap 1 } 2260 -- The following list OIDs to be used with S/MIME V3 2262 -- Signature Algorithms Not Found in [CMSALG], [CMS-SHA2], [RSAPSS], 2263 -- and [RSAOAEP] 2265 -- 2266 -- md2WithRSAEncryption OBJECT IDENTIFIER ::= 2267 -- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-1(1) 2268 -- 2} 2270 -- 2271 -- Other Signed Attributes 2272 -- 2273 -- signingTime OBJECT IDENTIFIER ::= 2274 -- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) 2275 -- 5} 2276 -- See [CMS] for a description of how to encode the attribute 2277 -- value. 2279 SMIMECapabilitiesParametersForRC2CBC ::= INTEGER 2280 -- (RC2 Key Length (number of bits)) 2282 END 2284 Appendix B. Moving S/MIME v2 Message Specification to Historic Status 2286 The S/MIME v3 [SMIMEv3], v3.1 [SMIMEv3.1], and v3.2 [SMIMEv3.2] are 2287 backwards compatible with the S/MIME v2 Message Specification 2288 [SMIMEv2], with the exception of the algorithms (dropped RC2/40 2289 requirement and added DSA and RSASSA-PSS requirements). Therefore, 2290 it is recommended that RFC 2311 [SMIMEv2] be moved to Historic 2291 status. 2293 Appendix C. Acknowledgments 2295 Many thanks go out to the other authors of the S/MIME version 2 2296 Message Specification RFC: Steve Dusse, Paul Hoffman, Laurence 2297 Lundblade, and Lisa Repka. Without v2, there wouldn't be a v3, v3.1, 2298 v3.2 or v3.5. 2300 A number of the members of the S/MIME Working Group have also worked 2301 very hard and contributed to this document. Any list of people is 2302 doomed to omission, and for that I apologize. In alphabetical order, 2303 the following people stand out in my mind because they made direct 2304 contributions to various versions of this document: 2306 Tony Capel, Piers Chivers, Dave Crocker, Bill Flanigan, Peter 2307 Gutmann, Alfred Hoenes, Paul Hoffman, Russ Housley, William Ottaway, 2308 and John Pawling. 2310 Authors' Addresses 2312 Jim Schaad 2313 August Cellars 2315 Email: ietf@augustcellars.com 2316 Blake Ramsdell 2317 Brute Squad Labs, Inc. 2319 Email: blaker@gmail.com 2321 Sean Turner 2322 sn3rd 2324 Email: sean@sn3rd.com