idnits 2.17.1
draft-ietf-smime-3851bis-04.txt:
Checking boilerplate required by RFC 5378 and the IETF Trust (see
https://trustee.ietf.org/license-info):
----------------------------------------------------------------------------
** It looks like you're using RFC 3978 boilerplate. You should update this
to the boilerplate described in the IETF Trust License Policy document
(see https://trustee.ietf.org/license-info), which is required now.
-- Found old boilerplate from RFC 3978, Section 5.1 on line 16.
-- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on
line 1961.
-- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1972.
-- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1979.
-- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1985.
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 3 instances of lines with non-RFC6890-compliant IPv4 addresses
in the document. If these are example addresses, they should be changed.
Miscellaneous warnings:
----------------------------------------------------------------------------
== The copyright year in the IETF Trust Copyright Line does not match the
current year
-- The document seems to lack a disclaimer for pre-RFC5378 work, but may
have content which was first submitted before 10 November 2008. If you
have contacted all the original authors and they are all willing to grant
the BCP78 rights to the IETF Trust, then this is fine, and you can ignore
this comment. If not, you may need to add the pre-RFC5378 disclaimer.
(See the Legal Provisions document at
https://trustee.ietf.org/license-info for more information.)
-- The document date (June 30, 2008) is 5751 days in the past. Is this
intentional?
Checking references for intended status: Proposed Standard
----------------------------------------------------------------------------
(See RFCs 3967 and 4897 for information about using normative references
to lower-maturity documents in RFCs)
-- Looks like a reference, but probably isn't: '0' on line 1866
-- Looks like a reference, but probably isn't: '1' on line 1867
-- Looks like a reference, but probably isn't: '2' on line 1868
-- Possible downref: Non-RFC (?) normative reference: ref. 'CERT32'
-- Possible downref: Non-RFC (?) normative reference: ref. 'CHARSETS'
** Obsolete normative reference: RFC 3852 (ref. 'CMS') (Obsoleted by RFC
5652)
-- Possible downref: Non-RFC (?) normative reference: ref. 'CMS-SHA2'
-- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS180-3'
-- Obsolete informational reference (is this intentional?): RFC 2630 (ref.
'SMIMEv3') (Obsoleted by RFC 3369, RFC 3370)
Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 15 comments (--).
Run idnits with the --verbose option for more detailed information about
the items above.
--------------------------------------------------------------------------------
1 S/MIME WG Blake Ramsdell, SendMail
2 Internet Draft Sean Turner, IECA
3 Intended Status: Standard Track June 30, 2008
4 Obsoletes: 3851 (when approved)
5 Expires: December 30, 2008
7 Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2
8 Message Specification
9 draft-ietf-smime-3851bis-04.txt
11 Status of this Memo
13 By submitting this Internet-Draft, each author represents that any
14 applicable patent or other IPR claims of which he or she is aware
15 have been or will be disclosed, and any of which he or she becomes
16 aware will be disclosed, in accordance with Section 6 of BCP 79.
18 Internet-Drafts are working documents of the Internet Engineering
19 Task Force (IETF), its areas, and its working groups. Note that
20 other groups may also distribute working documents as Internet-
21 Drafts.
23 Internet-Drafts are draft documents valid for a maximum of six months
24 and may be updated, replaced, or obsoleted by other documents at any
25 time. It is inappropriate to use Internet-Drafts as reference
26 material or to cite them other than as "work in progress."
28 The list of current Internet-Drafts can be accessed at
29 http://www.ietf.org/ietf/1id-abstracts.txt
31 The list of Internet-Draft Shadow Directories can be accessed at
32 http://www.ietf.org/shadow.html
34 This Internet-Draft will expire on December 30, 2008.
36 Copyright Notice
38 Copyright (C) The IETF Trust (2008).
40 Abstract
42 This document defines Secure/Multipurpose Internet Mail Extensions
43 (S/MIME) version 3.2. S/MIME provides a consistent way to send and
44 receive secure MIME data. Digital signatures provide authentication,
45 message integrity, and non-repudiation with proof of origin.
47 Encryption provides data confidentiality. Compression can be used to
48 reduce data size. This document obsoletes RFC 3851.
50 Discussion
52 This draft is being discussed on the 'ietf-smime' mailing list. To
53 subscribe, send a message to ietf-smime-request@imc.org with the
54 single word subscribe in the body of the message. There is a Web site
55 for the mailing list at .
57 Table of Contents
59 1. Introduction...................................................3
60 1.1. Specification Overview....................................4
61 1.2. Definitions...............................................4
62 1.3. Conventions used in this document.........................5
63 1.4. Compatibility with Prior Practice of S/MIME...............6
64 1.5. Changes From S/MIME v3 to S/MIME v3.1.....................6
65 1.6. Changes Since S/MIME v3.1.................................7
66 2. CMS Options....................................................8
67 2.1. DigestAlgorithmIdentifier.................................8
68 2.2. SignatureAlgorithmIdentifier..............................8
69 2.3. KeyEncryptionAlgorithmIdentifier..........................9
70 2.4. General Syntax............................................9
71 2.5. Attributes and the SignerInfo Type.......................10
72 2.5.1. Signing-Time Attribute..............................11
73 2.5.2. SMIMECapabilities Attribute.........................12
74 2.5.3. Encryption Key Preference Attribute.................13
75 2.6. SignerIdentifier SignerInfo Type.........................14
76 2.7. ContentEncryptionAlgorithmIdentifier.....................15
77 2.7.1. Deciding Which Encryption Method To Use.............15
78 2.7.2. Choosing Weak Encryption............................16
79 2.7.3. Multiple Recipients.................................17
80 3. Creating S/MIME Messages......................................17
81 3.1. Preparing the MIME Entity for Signing, Enveloping or
82 Compressing..............................................17
83 3.2. The application/pkcs7-mime Media Type....................22
84 3.3. Creating an Enveloped-only Message.......................24
85 3.4. Creating a Signed-only Message...........................25
86 3.4.1. Choosing a Format for Signed-only Messages..........25
87 3.4.2. Signing Using application/pkcs7-mime with
88 SignedData..........................................26
89 3.4.3. Signing Using the multipart/signed Format...........26
90 3.5. Creating an Compressed-only Message......................29
91 3.6. Multiple Operations......................................29
92 3.7. Creating a Certificate Management Message................30
93 3.8. Registration Requests....................................31
94 3.9. Identifying an S/MIME Message............................31
95 4. Certificate Processing........................................31
96 4.1. Key Pair Generation......................................32
97 4.2. Signature Generation.....................................32
98 4.3. Signature Verification...................................32
99 4.4. Encryption...............................................32
100 4.5. Decryption...............................................33
101 5. IANA Considerations...........................................34
102 5.1. Media Type for application/pkcs7-mime....................34
103 5.2. Media Type for application/pkcs7-signature...............35
104 6. Security Considerations.......................................36
105 7. References....................................................38
106 7.1. Normative References.....................................38
107 7.2. Informative References...................................40
108 Appendix A. ASN.1 Module.........................................42
109 Appendix B. Moving S/MIME v2 Message Specification to
110 Historic Status......................................44
111 Appendix C. Acknowledgements.....................................45
113 1. Introduction
115 S/MIME (Secure/Multipurpose Internet Mail Extensions) provides a
116 consistent way to send and receive secure MIME data. Based on the
117 popular Internet MIME standard, S/MIME provides the following
118 cryptographic security services for electronic messaging
119 applications: authentication, message integrity and non-repudiation
120 of origin (using digital signatures), and data confidentiality (using
121 encryption). As a supplementary service, S/MIME provides for message
122 compression.
124 S/MIME can be used by traditional mail user agents (MUAs) to add
125 cryptographic security services to mail that is sent, and to
126 interpret cryptographic security services in mail that is received.
127 However, S/MIME is not restricted to mail; it can be used with any
128 transport mechanism that transports MIME data, such as HTTP or SIP.
129 As such, S/MIME takes advantage of the object-based features of MIME
130 and allows secure messages to be exchanged in mixed-transport
131 systems.
133 Further, S/MIME can be used in automated message transfer agents that
134 use cryptographic security services that do not require any human
135 intervention, such as the signing of software-generated documents and
136 the encryption of FAX messages sent over the Internet.
138 1.1. Specification Overview
140 This document describes a protocol for adding cryptographic signature
141 and encryption services to MIME data. The MIME standard [MIME-SPEC]
142 provides a general structure for the content of Internet messages and
143 allows extensions for new content type based applications.
145 This specification defines how to create a MIME body part that has
146 been cryptographically enhanced according to CMS [CMS], which is
147 derived from PKCS #7 [PKCS-7]. This specification also defines the
148 application/pkcs7-mime media type that can be used to transport those
149 body parts.
151 This document also discusses how to use the multipart/signed media
152 type defined in [MIME-SECURE] to transport S/MIME signed messages.
153 multipart/signed is used in conjunction with the application/pkcs7-
154 signature media type, which is used to transport a detached S/MIME
155 signature.
157 In order to create S/MIME messages, an S/MIME agent MUST follow the
158 specifications in this document, as well as the specifications listed
159 in the Cryptographic Message Syntax document [CMS], [CMSALG],
160 [RSAPSS], [RSAOAEP], and [CMS-SHA2].
162 Throughout this specification, there are requirements and
163 recommendations made for how receiving agents handle incoming
164 messages. There are separate requirements and recommendations for
165 how sending agents create outgoing messages. In general, the best
166 strategy is to "be liberal in what you receive and conservative in
167 what you send". Most of the requirements are placed on the handling
168 of incoming messages while the recommendations are mostly on the
169 creation of outgoing messages.
171 The separation for requirements on receiving agents and sending
172 agents also derives from the likelihood that there will be S/MIME
173 systems that involve software other than traditional Internet mail
174 clients. S/MIME can be used with any system that transports MIME
175 data. An automated process that sends an encrypted message might not
176 be able to receive an encrypted message at all, for example. Thus,
177 the requirements and recommendations for the two types of agents are
178 listed separately when appropriate.
180 1.2. Definitions
182 For the purposes of this specification, the following definitions
183 apply.
185 ASN.1: Abstract Syntax Notation One, as defined in CCITT X.208
186 [X.208-88].
188 BER: Basic Encoding Rules for ASN.1, as defined in CCITT X.209
189 [X.690-02].
191 Certificate: A type that binds an entity's name to a public key with
192 a digital signature.
194 DER: Distinguished Encoding Rules for ASN.1, as defined in CCITT
195 X.509 [X.690-02].
197 7-bit data: Text data with lines less than 998 characters long, where
198 none of the characters have the 8th bit set, and there are no NULL
199 characters. and occur only as part of a end of
200 line delimiter.
202 8-bit data: Text data with lines less than 998 characters, and where
203 none of the characters are NULL characters. and occur only
204 as part of a end of line delimiter.
206 Binary data: Arbitrary data.
208 Transfer Encoding: A reversible transformation made on data so 8-bit
209 or binary data can be sent via a channel that only transmits 7-bit
210 data.
212 Receiving agent: Software that interprets and processes S/MIME CMS
213 objects, MIME body parts that contain CMS content types, or both.
215 Sending agent: Software that creates S/MIME CMS content types, MIME
216 body parts that contain CMS content types, or both.
218 S/MIME agent: User software that is a receiving agent, a sending
219 agent, or both.
221 1.3. Conventions used in this document
223 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
224 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
225 document are to be interpreted as described in [MUSTSHOULD].
227 We define some additional terms here:
229 SHOULD+ This term means the same as SHOULD. However, the authors
230 expect that a requirement marked as SHOULD+ will be promoted at
231 some future time to be a MUST.
233 SHOULD- This term means the same as SHOULD. However, the authors
234 expect a requirement marked as SHOULD- will be demoted to a MAY
235 in a future version of this document.
237 MUST- This term means the same as MUST. However, the authors
238 expect that this requirement will no longer be a MUST in a future
239 document. Although its status will be determined at a later
240 time, it is reasonable to expect that if a future revision of a
241 document alters the status of a MUST- requirement, it will remain
242 at least a SHOULD or a SHOULD-.
244 1.4. Compatibility with Prior Practice of S/MIME
246 S/MIME version 3.2 agents SHOULD attempt to have the greatest
247 interoperability possible with agents for prior versions of S/MIME.
248 S/MIME version 2 is described in RFC 2311 through RFC 2315 inclusive
249 [SMIMEv2], S/MIME version 3 is described in RFC 2630 through RFC 2634
250 inclusive [SMIMEv3], and S/MIME version 3.1 is described in RFC 3850
251 through RFC 3852 and RFC 2634 [SMIMEv3.1]. RFC 2311 also has
252 historical information about the development of S/MIME.
254 1.5. Changes From S/MIME v3 to S/MIME v3.1
256 The RSA public key algorithm was changed to a MUST implement key
257 wrapping algorithm, and the Diffie-Hellman algorithm changed to a
258 SHOULD implement.
260 The AES symmetric encryption algorithm has been included as a SHOULD
261 implement.
263 The RSA public key algorithm was changed to a MUST implement
264 signature algorithm.
266 Ambiguous language about the use of "empty" SignedData messages to
267 transmit certificates was clarified to reflect that transmission of
268 certificate revocation lists is also allowed.
270 The use of binary encoding for some MIME entities is now explicitly
271 discussed.
273 Header protection through the use of the message/rfc822 media type
274 has been added.
276 Use of the CompressedData CMS type is allowed, along with required
277 media type and file extension additions.
279 1.6. Changes Since S/MIME v3.1
281 Editorial changes, e.g., replaced "MIME type" with "media type",
282 content-type with Content-Type.
284 Moved "Conventions Used in This Document" to Section 1.2. Added
285 definitions for SHOULD+, SHOULD-, and MUST-.
287 Sec 1.1 and Appendix A: Added references to RFCs for RSA-PSS, RSA-
288 OAEP, and SHA2 CMS Algorithms. Added CMS Multiple Signers
289 Clarification to CMS reference.
291 Sec 1.3: Added references to S/MIME MSG 3.1 RFCs.
293 Sec 2.1 (digest algorithm): SHA-256 added as MUST, SHA-1 and MD5 made
294 SHOULD-.
296 Sec 2.2 (signature algorithms): RSA with SHA-256 added as the MUST,
297 RSA with SHA-1, DSA with SHA-1, and RSA with MD5 changed to SHOULD-,
298 and RSA-PSS with SHA-256 added as SHOULD+. Also added note about what
299 S/MIME v3.1 clients support.
301 Sec 2.3 (key encryption): DH changed to SHOULD- and RSA-OAEP added as
302 SHOULD+.
304 Sec 2.5.1: Added requirement that receiving agents MUST support both
305 GeneralizedTime and UTCTime.
307 Sec 2.5.2: Replaced reference "sha1WithRSAEncrption" with
308 "sha256WithRSAEncryption", "DES-3EDE-CBC" and "AES-128 CBC", and
309 deleted the RC5 example.
311 Sec 2.5.2.1, 2.7, 2.7.1, Appendix A: references to RC2/40 removed.
313 Sec 2.7 (content encryption): AES-128 CBC added as MUST, AES-192 and
314 AES-256 CBC SHOULD+, tripleDES now SHOULD-.
316 Sec 2.7.1: Updated pointers from 2.7.2.1 through 2.7.2.4 to 2.7.1.1
317 to 2.7.1.2.
319 Sec 3.2.2: Replaced "encrypted" with "enveloped." Update OID example
320 to use AES-128 CBC oid.
322 Sec 4: Updated reference to CERT v3.2.
324 Sec 4.1: Updated RSA key size discussion. Moved last four sentences
325 to security considerations. Updated reference to randomness
326 requirements for security.
328 Sec 5: Added IANA registration templates to update media type
329 registry to point to this document as opposed to RFC 2311.
331 Sec 6: Updated Security Considerations.
333 Sec 7: Moved references from Appendix B to this section. Update
334 references. Added informational references to SMIMEv2, SMIMEv3, and
335 SMIMEv3.1.
337 App B: Added Appendix B to move S/MIME v2 to historic status.
339 2. CMS Options
341 CMS allows for a wide variety of options in content, attributes, and
342 algorithm support. This section puts forth a number of support
343 requirements and recommendations in order to achieve a base level of
344 interoperability among all S/MIME implementations. [CMSALG] and [CMS-
345 SHA2] provides additional details regarding the use of the
346 cryptographic algorithms. [ESS] provides additional details
347 regarding the use of additional attributes.
349 2.1. DigestAlgorithmIdentifier
351 Sending and receiving agents MUST support SHA-256 [CMS-SHA2] and
352 SHOULD- support SHA-1 [CMSALG]. Receiving agents SHOULD- support MD5
353 [CMSALG] for the purpose of providing backward compatibility with
354 MD5-digested S/MIME v2 SignedData objects.
356 2.2. SignatureAlgorithmIdentifier
358 Receiving agents:
360 - MUST support RSA with SHA-256, as specified in [CMS-SHA2]
362 - SHOULD+ support RSA-PSS with SHA-256, as specified in [RSAPSS]
364 - SHOULD- support RSA with SHA-1, as specified in [CMSALG]
366 - SHOULD- support DSA with SHA-1, as specified in [CMSALG]
368 - SHOULD- support RSA with MD5, as specified in [CMSALG].
370 Sending agents:
372 - MUST support RSA with SHA-256, as specified in [CMS-SHA2]
374 - SHOULD+ support RSA-PSS with SHA-256, as specified in [RSAPSS]
376 - SHOULD- support RSA with SHA-1 or DSA with SHA-1, as specified in
377 [CMSALG]
379 - SHOULD- support RSA with MD5, as specified in [CMSALG].
381 Note that S/MIME v3.1 clients support verifying id-dsa-with-sha1 and
382 rsaEncryption and might not implement sha256withRSAEncryption. Note
383 that S/MIME v3 clients might only implement signing or signature
384 verification using id-dsa-with-sha1, and might also use id-dsa as an
385 AlgorithmIdentifier in this field. Receiving clients SHOULD
386 recognize id-dsa as equivalent to id-dsa-with-sha1, and sending
387 clients MUST use id-dsa-with-sha1 if using that algorithm. Also note
388 that S/MIME v2 clients are only required to verify digital signatures
389 using the rsaEncryption algorithm with SHA-1 or MD5, and might not
390 implement id-dsa-with-sha1 or id-dsa at all.
392 2.3. KeyEncryptionAlgorithmIdentifier
394 Receiving and sending agents:
396 - MUST support RSA Encryption, as specified in [CMSALG]
398 - SHOULD+ support RSA-OAEP, as specified in [RSAOAEP]
400 - SHOULD- support DH ephemeral-static mode, as specified
401 in [CMSALG].
403 Note that S/MIME v3.1 clients might only implement key encryption and
404 decryption using the rsaEncryption algorithm. Note that S/MIME v3
405 clients might only implement key encryption and decryption using the
406 Diffie-Hellman algorithm. Also note that S/MIME v2 clients are only
407 capable of decrypting content-encryption keys using the rsaEncryption
408 algorithm.
410 2.4. General Syntax
412 There are several CMS content types. Of these, only the Data,
413 SignedData, EnvelopedData, and CompressedData content types are
414 currently used for S/MIME.
416 2.4.1. Data Content Type
418 Sending agents MUST use the id-data content type identifier to
419 identify the "inner" MIME message content. For example, when
420 applying a digital signature to MIME data, the CMS SignedData
421 encapContentInfo eContentType MUST include the id-data object
422 identifier and the media type MUST be stored in the SignedData
423 encapContentInfo eContent OCTET STRING (unless the sending agent is
424 using multipart/signed, in which case the eContent is absent, per
425 section 3.4.3 of this document). As another example, when applying
426 encryption to MIME data, the CMS EnvelopedData encryptedContentInfo
427 contentType MUST include the id-data object identifier and the
428 encrypted MIME content MUST be stored in the EnvelopedData
429 encryptedContentInfo encryptedContent OCTET STRING.
431 2.4.2. SignedData Content Type
433 Sending agents MUST use the SignedData content type to apply a
434 digital signature to a message or, in a degenerate case where there
435 is no signature information, to convey certificates. Applying a
436 signature to a message provides authentication, message integrity,
437 and non-repudiation of origin.
439 2.4.3. EnvelopedData Content Type
441 This content type is used to apply data confidentiality to a message.
442 A sender needs to have access to a public key for each intended
443 message recipient to use this service.
445 2.4.4. CompressedData Content Type
447 This content type is used to apply data compression to a message.
448 This content type does not provide authentication, message integrity,
449 non-repudiation, or data confidentiality, and is only used to reduce
450 the message's size.
452 See section 3.6 for further guidance on the use of this type in
453 conjunction with other CMS types.
455 2.5. Attributes and the SignerInfo Type
457 The SignerInfo type allows the inclusion of unsigned and signed
458 attributes along with a signature.
460 Receiving agents MUST be able to handle zero or one instance of each
461 of the signed attributes listed here. Sending agents SHOULD generate
462 one instance of each of the following signed attributes in each
463 S/MIME message:
465 - signingTime (section 2.5.1 in this document)
467 - sMIMECapabilities (section 2.5.2 in this document)
469 - sMIMEEncryptionKeyPreference (section 2.5.3 in this document)
471 - id-messageDigest (section 11.2 in [CMS])
473 - id-contentType (section 11.1 in [CMS])
475 Further, receiving agents SHOULD be able to handle zero or one
476 instance in the signingCertificate signed attribute, as defined in
477 section 5 of [ESS].
479 Sending agents SHOULD generate one instance of the signingCertificate
480 signed attribute in each SignerInfo structure.
482 Additional attributes and values for these attributes might be
483 defined in the future. Receiving agents SHOULD handle attributes or
484 values that they do not recognize in a graceful manner.
486 Interactive sending agents that include signed attributes that are
487 not listed here SHOULD display those attributes to the user, so that
488 the user is aware of all of the data being signed.
490 2.5.1. Signing-Time Attribute
492 The signing-time attribute is used to convey the time that a message
493 was signed. The time of signing will most likely be created by a
494 message originator and therefore is only as trustworthy as the
495 originator.
497 Sending agents MUST encode signing time through the year 2049 as
498 UTCTime; signing times in 2050 or later MUST be encoded as
499 GeneralizedTime. When the UTCTime CHOICE is used, S/MIME agents MUST
500 interpret the year field (YY) as follows:
502 If YY is greater than or equal to 50, the year is interpreted as
503 19YY; if YY is less than 50, the year is interpreted as 20YY.
505 Receiving agents MUST be able to process signing-time attributes that
506 are encoded in either UTCTime or GeneralizedTime.
508 2.5.2. SMIMECapabilities Attribute
510 The SMIMECapabilities attribute includes signature algorithms (such
511 as "sha256WithRSAEncryption"), symmetric algorithms (such as "AES-128
512 CBC"), and key encipherment algorithms (such as "rsaEncryption").
513 There are also several identifiers which indicate support for other
514 optional features such as binary encoding and compression. The
515 SMIMECapabilities were designed to be flexible and extensible so
516 that, in the future, a means of identifying other capabilities and
517 preferences such as certificates can be added in a way that will not
518 cause current clients to break.
520 If present, the SMIMECapabilities attribute MUST be a
521 SignedAttribute; it MUST NOT be an UnsignedAttribute. CMS defines
522 SignedAttributes as a SET OF Attribute. The SignedAttributes in a
523 signerInfo MUST NOT include multiple instances of the
524 SMIMECapabilities attribute. CMS defines the ASN.1 syntax for
525 Attribute to include attrValues SET OF AttributeValue. A
526 SMIMECapabilities attribute MUST only include a single instance of
527 AttributeValue. There MUST NOT be zero or multiple instances of
528 AttributeValue present in the attrValues SET OF AttributeValue.
530 The semantics of the SMIMECapabilities attribute specify a partial
531 list as to what the client announcing the SMIMECapabilities can
532 support. A client does not have to list every capability it
533 supports, and need not list all its capabilities so that the
534 capabilities list doesn't get too long. In an SMIMECapabilities
535 attribute, the object identifiers (OIDs) are listed in order of their
536 preference, but SHOULD be separated logically along the lines of
537 their categories (signature algorithms, symmetric algorithms, key
538 encipherment algorithms, etc.)
540 The structure of the SMIMECapabilities attribute is to facilitate
541 simple table lookups and binary comparisons in order to determine
542 matches. For instance, the DER-encoding for the SMIMECapability for
543 AES-128 CBC MUST be identically encoded regardless of the
544 implementation. Because of the requirement for identical encoding,
545 individuals documenting algorithms to be used in the
546 SMIMECapabilities attribute SHOULD explicitly document the correct
547 byte sequence for the common cases.
549 For any capability, the associated parameters for the OID MUST
550 specify all of the parameters necessary to differentiate between two
551 instances of the same algorithm.
553 The OIDs that correspond to algorithms SHOULD use the same OID as the
554 actual algorithm, except in the case where the algorithm usage is
555 ambiguous from the OID. For instance, in an earlier specification,
556 rsaEncryption was ambiguous because it could refer to either a
557 signature algorithm or a key encipherment algorithm. In the event
558 that an OID is ambiguous, it needs to be arbitrated by the maintainer
559 of the registered SMIMECapabilities list as to which type of
560 algorithm will use the OID, and a new OID MUST be allocated under the
561 smimeCapabilities OID to satisfy the other use of the OID.
563 The registered SMIMECapabilities list specifies the parameters for
564 OIDs that need them, most notably key lengths in the case of
565 variable-length symmetric ciphers. In the event that there are no
566 differentiating parameters for a particular OID, the parameters MUST
567 be omitted, and MUST NOT be encoded as NULL. Additional values for
568 the SMIMECapabilities attribute might be defined in the future.
569 Receiving agents MUST handle a SMIMECapabilities object that has
570 values that it does not recognize in a graceful manner.
572 Section 2.7.1 explains a strategy for caching capabilities.
574 2.5.3. Encryption Key Preference Attribute
576 The encryption key preference attribute allows the signer to
577 unambiguously describe which of the signer's certificates has the
578 signer's preferred encryption key. This attribute is designed to
579 enhance behavior for interoperating with those clients that use
580 separate keys for encryption and signing. This attribute is used to
581 convey to anyone viewing the attribute which of the listed
582 certificates is appropriate for encrypting a session key for future
583 encrypted messages.
585 If present, the SMIMEEncryptionKeyPreference attribute MUST be a
586 SignedAttribute; it MUST NOT be an UnsignedAttribute. CMS defines
587 SignedAttributes as a SET OF Attribute. The SignedAttributes in a
588 signerInfo MUST NOT include multiple instances of the
589 SMIMEEncryptionKeyPreference attribute. CMS defines the ASN.1 syntax
590 for Attribute to include attrValues SET OF AttributeValue. A
591 SMIMEEncryptionKeyPreference attribute MUST only include a single
592 instance of AttributeValue. There MUST NOT be zero or multiple
593 instances of AttributeValue present in the attrValues SET OF
594 AttributeValue.
596 The sending agent SHOULD include the referenced certificate in the
597 set of certificates included in the signed message if this attribute
598 is used. The certificate MAY be omitted if it has been previously
599 made available to the receiving agent. Sending agents SHOULD use
600 this attribute if the commonly used or preferred encryption
601 certificate is not the same as the certificate used to sign the
602 message.
604 Receiving agents SHOULD store the preference data if the signature on
605 the message is valid and the signing time is greater than the
606 currently stored value. (As with the SMIMECapabilities, the clock
607 skew SHOULD be checked and the data not used if the skew is too
608 great.) Receiving agents SHOULD respect the sender's encryption key
609 preference attribute if possible. This, however, represents only a
610 preference and the receiving agent can use any certificate in
611 replying to the sender that is valid.
613 Section 2.7.1 explains a strategy for caching preference data.
615 2.5.3.1. Selection of Recipient Key Management Certificate
617 In order to determine the key management certificate to be used when
618 sending a future CMS EnvelopedData message for a particular
619 recipient, the following steps SHOULD be followed:
621 - If an SMIMEEncryptionKeyPreference attribute is found in a
622 SignedData object received from the desired recipient, this
623 identifies the X.509 certificate that SHOULD be used as the X.509
624 key management certificate for the recipient.
626 - If an SMIMEEncryptionKeyPreference attribute is not found in a
627 SignedData object received from the desired recipient, the set of
628 X.509 certificates SHOULD be searched for a X.509 certificate
629 with the same subject name as the signer of a X.509 certificate
630 which can be used for key management.
632 - Or use some other method of determining the user's key management
633 key. If a X.509 key management certificate is not found, then
634 encryption cannot be done with the signer of the message. If
635 multiple X.509 key management certificates are found, the S/MIME
636 agent can make an arbitrary choice between them.
638 2.6. SignerIdentifier SignerInfo Type
640 S/MIME v3.2 implementations MUST support both issuerAndSerialNumber
641 as well as subjectKeyIdentifier. Messages that use the
642 subjectKeyIdentifier choice cannot be read by S/MIME v2 clients.
644 It is important to understand that some certificates use a value for
645 subjectKeyIdentifier that is not suitable for uniquely identifying a
646 certificate. Implementations MUST be prepared for multiple
647 certificates for potentially different entities to have the same
648 value for subjectKeyIdentifier, and MUST be prepared to try each
649 matching certificate during signature verification before indicating
650 an error condition.
652 2.7. ContentEncryptionAlgorithmIdentifier
654 Sending and receiving agents:
656 - MUST support encryption and decryption with AES-128 CBC [CMSAES]
658 - SHOULD+ support encryption and decryption with AES-192 CBC and
659 AES-256 CBC [CMSAES]
661 - SHOULD- support encryption and decryption with DES EDE3 CBC,
662 hereinafter called "tripleDES" [CMSALG].
664 2.7.1. Deciding Which Encryption Method To Use
666 When a sending agent creates an encrypted message, it has to decide
667 which type of encryption to use. The decision process involves using
668 information garnered from the capabilities lists included in messages
669 received from the recipient, as well as out-of-band information such
670 as private agreements, user preferences, legal restrictions, and so
671 on.
673 Section 2.5.2 defines a method by which a sending agent can
674 optionally announce, among other things, its decrypting capabilities
675 in its order of preference. The following method for processing and
676 remembering the encryption capabilities attribute in incoming signed
677 messages SHOULD be used.
679 - If the receiving agent has not yet created a list of capabilities
680 for the sender's public key, then, after verifying the signature
681 on the incoming message and checking the timestamp, the receiving
682 agent SHOULD create a new list containing at least the signing
683 time and the symmetric capabilities.
685 - If such a list already exists, the receiving agent SHOULD verify
686 that the signing time in the incoming message is greater than the
687 signing time stored in the list and that the signature is valid.
688 If so, the receiving agent SHOULD update both the signing time
689 and capabilities in the list. Values of the signing time that
690 lie far in the future (that is, a greater discrepancy than any
691 reasonable clock skew), or a capabilities list in messages whose
692 signature could not be verified, MUST NOT be accepted.
694 The list of capabilities SHOULD be stored for future use in creating
695 messages.
697 Before sending a message, the sending agent MUST decide whether it is
698 willing to use weak encryption for the particular data in the
699 message. If the sending agent decides that weak encryption is
700 unacceptable for this data, then the sending agent MUST NOT use a
701 weak algorithm. The decision to use or not use weak encryption
702 overrides any other decision in this section about which encryption
703 algorithm to use.
705 Sections 2.7.1.1 through 2.7.1.2 describe the decisions a sending
706 agent SHOULD use in deciding which type of encryption will be applied
707 to a message. These rules are ordered, so the sending agent SHOULD
708 make its decision in the order given.
710 2.7.1.1. Rule 1: Known Capabilities
712 If the sending agent has received a set of capabilities from the
713 recipient for the message the agent is about to encrypt, then the
714 sending agent SHOULD use that information by selecting the first
715 capability in the list (that is, the capability most preferred by the
716 intended recipient) that the sending agent knows how to encrypt. The
717 sending agent SHOULD use one of the capabilities in the list if the
718 agent reasonably expects the recipient to be able to decrypt the
719 message.
721 2.7.1.2. Rule 2: Unknown Capabilities, Unknown Version of S/MIME
723 If the following two conditions are met:
725 - The sending agent has no knowledge of the encryption capabilities
726 of the recipient, and
728 - The sending agent has no knowledge of the version of S/MIME of the
729 recipient,
731 then the sending agent SHOULD use AES-128 because it is a stronger
732 algorithm and is required by S/MIME v3.2. If the sending agent
733 chooses not to use AES-128 in this step, it SHOULD use tripleDES.
735 2.7.2. Choosing Weak Encryption
737 All algorithms that use 40 bit keys are considered by many to be weak
738 encryption. A sending agent that is controlled by a human SHOULD
739 allow a human sender to determine the risks of sending data using a
740 weak encryption algorithm before sending the data, and possibly allow
741 the human to use a stronger encryption method such as tripleDES or
742 AES.
744 2.7.3. Multiple Recipients
746 If a sending agent is composing an encrypted message to a group of
747 recipients where the encryption capabilities of some of the
748 recipients do not overlap, the sending agent is forced to send more
749 than one message. Please note that if the sending agent chooses to
750 send a message encrypted with a strong algorithm, and then send the
751 same message encrypted with a weak algorithm, someone watching the
752 communications channel could learn the contents of the strongly-
753 encrypted message simply by decrypting the weakly-encrypted message.
755 3. Creating S/MIME Messages
757 This section describes the S/MIME message formats and how they are
758 created. S/MIME messages are a combination of MIME bodies and CMS
759 content types. Several media types as well as several CMS content
760 types are used. The data to be secured is always a canonical MIME
761 entity. The MIME entity and other data, such as certificates and
762 algorithm identifiers, are given to CMS processing facilities which
763 produce a CMS object. Finally, the CMS object is wrapped in MIME.
764 The Enhanced Security Services for S/MIME [ESS] document provides
765 descriptions of how nested, secured S/MIME messages are formatted.
766 ESS provides a description of how a triple-wrapped S/MIME message is
767 formatted using multipart/signed and application/pkcs7-mime for the
768 signatures.
770 S/MIME provides one format for enveloped-only data, several formats
771 for signed-only data, and several formats for signed and enveloped
772 data. Several formats are required to accommodate several
773 environments, in particular for signed messages. The criteria for
774 choosing among these formats are also described.
776 The reader of this section is expected to understand MIME as
777 described in [MIME-SPEC] and [MIME-SECURE].
779 3.1. Preparing the MIME Entity for Signing, Enveloping or Compressing
781 S/MIME is used to secure MIME entities. A MIME entity can be a sub-
782 part, sub-parts of a message, or the whole message with all its sub-
783 parts. A MIME entity that is the whole message includes only the
784 MIME message headers and MIME body, and does not include the RFC-822
785 header. Note that S/MIME can also be used to secure MIME entities
786 used in applications other than Internet mail. If protection of the
787 RFC-822 header is required, the use of the message/rfc822 media type
788 is explained later in this section.
790 The MIME entity that is secured and described in this section can be
791 thought of as the "inside" MIME entity. That is, it is the
792 "innermost" object in what is possibly a larger MIME message.
793 Processing "outside" MIME entities into CMS content types is
794 described in Section 3.2, 3.4, and elsewhere.
796 The procedure for preparing a MIME entity is given in [MIME-SPEC].
797 The same procedure is used here with some additional restrictions
798 when signing. Description of the procedures from [MIME-SPEC] are
799 repeated here, but it is suggested that the reader refer to that
800 document for the exact procedure. This section also describes
801 additional requirements.
803 A single procedure is used for creating MIME entities that are to
804 have any combination of signing, enveloping, and compressing applied.
805 Some additional steps are recommended to defend against known
806 corruptions that can occur during mail transport that are of
807 particular importance for clear-signing using the multipart/signed
808 format. It is recommended that these additional steps be performed
809 on enveloped messages, or signed and enveloped messages, so that the
810 message can be forwarded to any environment without modification.
812 These steps are descriptive rather than prescriptive. The
813 implementer is free to use any procedure as long as the result is the
814 same.
816 Step 1. The MIME entity is prepared according to the local
817 conventions.
819 Step 2. The leaf parts of the MIME entity are converted to
820 canonical form.
822 Step 3. Appropriate transfer encoding is applied to the leaves
823 of the MIME entity.
825 When an S/MIME message is received, the security services on the
826 message are processed, and the result is the MIME entity. That MIME
827 entity is typically passed to a MIME-capable user agent where it is
828 further decoded and presented to the user or receiving application.
830 In order to protect outer, non-content related message header fields
831 (for instance, the "Subject", "To", "From" and "Cc" fields), the
832 sending client MAY wrap a full MIME message in a message/rfc822
833 wrapper in order to apply S/MIME security services to these header
834 fields. It is up to the receiving client to decide how to present
835 this "inner" header along with the unprotected "outer" header.
837 When an S/MIME message is received, if the top-level protected MIME
838 entity has a Content-Type of message/rfc822, it can be assumed that
839 the intent was to provide header protection. This entity SHOULD be
840 presented as the top-level message, taking into account header
841 merging issues as previously discussed.
843 3.1.1. Canonicalization
845 Each MIME entity MUST be converted to a canonical form that is
846 uniquely and unambiguously representable in the environment where the
847 signature is created and the environment where the signature will be
848 verified. MIME entities MUST be canonicalized for enveloping and
849 compressing as well as signing.
851 The exact details of canonicalization depend on the actual media type
852 and subtype of an entity, and are not described here. Instead, the
853 standard for the particular media type SHOULD be consulted. For
854 example, canonicalization of type text/plain is different from
855 canonicalization of audio/basic. Other than text types, most types
856 have only one representation regardless of computing platform or
857 environment which can be considered their canonical representation.
858 In general, canonicalization will be performed by the non-security
859 part of the sending agent rather than the S/MIME implementation.
861 The most common and important canonicalization is for text, which is
862 often represented differently in different environments. MIME
863 entities of major type "text" MUST have both their line endings and
864 character set canonicalized. The line ending MUST be the pair of
865 characters , and the charset SHOULD be a registered charset
866 [CHARSETS]. The details of the canonicalization are specified in
867 [MIME-SPEC]. The chosen charset SHOULD be named in the charset
868 parameter so that the receiving agent can unambiguously determine the
869 charset used.
871 Note that some charsets such as ISO-2022 have multiple
872 representations for the same characters. When preparing such text
873 for signing, the canonical representation specified for the charset
874 MUST be used.
876 3.1.2. Transfer Encoding
878 When generating any of the secured MIME entities below, except the
879 signing using the multipart/signed format, no transfer encoding is
880 required at all. S/MIME implementations MUST be able to deal with
881 binary MIME objects. If no Content-Transfer-Encoding header field is
882 present, the transfer encoding is presumed to be 7BIT.
884 S/MIME implementations SHOULD however use transfer encoding described
885 in section 3.1.3 for all MIME entities they secure. The reason for
886 securing only 7-bit MIME entities, even for enveloped data that are
887 not exposed to the transport, is that it allows the MIME entity to be
888 handled in any environment without changing it. For example, a
889 trusted gateway might remove the envelope, but not the signature, of
890 a message, and then forward the signed message on to the end
891 recipient so that they can verify the signatures directly. If the
892 transport internal to the site is not 8-bit clean, such as on a wide-
893 area network with a single mail gateway, verifying the signature will
894 not be possible unless the original MIME entity was only 7-bit data.
896 S/MIME implementations which "know" that all intended recipient(s)
897 are capable of handling inner (all but the outermost) binary MIME
898 objects SHOULD use binary encoding as opposed to a 7-bit-safe
899 transfer encoding for the inner entities. The use of a 7-bit-safe
900 encoding (such as base64) would unnecessarily expand the message
901 size. Implementations MAY "know" that recipient implementations are
902 capable of handling inner binary MIME entities either by interpreting
903 the id-cap-preferBinaryInside sMIMECapabilities attribute, by prior
904 agreement, or by other means.
906 If one or more intended recipients are unable to handle inner binary
907 MIME objects, or if this capability is unknown for any of the
908 intended recipients, S/MIME implementations SHOULD use transfer
909 encoding described in section 3.1.3 for all MIME entities they
910 secure.
912 3.1.3. Transfer Encoding for Signing Using multipart/signed
914 If a multipart/signed entity is ever to be transmitted over the
915 standard Internet SMTP infrastructure or other transport that is
916 constrained to 7-bit text, it MUST have transfer encoding applied so
917 that it is represented as 7-bit text. MIME entities that are 7-bit
918 data already need no transfer encoding. Entities such as 8-bit text
919 and binary data can be encoded with quoted-printable or base-64
920 transfer encoding.
922 The primary reason for the 7-bit requirement is that the Internet
923 mail transport infrastructure cannot guarantee transport of 8-bit or
924 binary data. Even though many segments of the transport
925 infrastructure now handle 8-bit and even binary data, it is sometimes
926 not possible to know whether the transport path is 8-bit clean. If a
927 mail message with 8-bit data were to encounter a message transfer
928 agent that can not transmit 8-bit or binary data, the agent has three
929 options, none of which are acceptable for a clear-signed message:
931 - The agent could change the transfer encoding; this would
932 invalidate the signature.
934 - The agent could transmit the data anyway, which would most likely
935 result in the 8th bit being corrupted; this too would invalidate
936 the signature.
938 - The agent could return the message to the sender.
940 [MIME-SECURE] prohibits an agent from changing the transfer encoding
941 of the first part of a multipart/signed message. If a compliant
942 agent that can not transmit 8-bit or binary data encounters a
943 multipart/signed message with 8-bit or binary data in the first part,
944 it would have to return the message to the sender as undeliverable.
946 3.1.4. Sample Canonical MIME Entity
948 This example shows a multipart/mixed message with full transfer
949 encoding. This message contains a text part and an attachment. The
950 sample message text includes characters that are not US-ASCII and
951 thus need to be transfer encoded. Though not shown here, the end of
952 each line is . The line ending of the MIME headers, the
953 text, and transfer encoded parts, all MUST be .
955 Note that this example is not of an S/MIME message.
957 Content-Type: multipart/mixed; boundary=bar
959 --bar
960 Content-Type: text/plain; charset=iso-8859-1
961 Content-Transfer-Encoding: quoted-printable
963 =A1Hola Michael!
965 How do you like the new S/MIME specification?
967 It's generally a good idea to encode lines that begin with
968 From=20because some mail transport agents will insert a greater-
969 than (>) sign, thus invalidating the signature.
971 Also, in some cases it might be desirable to encode any =20
972 trailing whitespace that occurs on lines in order to ensure =20
973 that the message signature is not invalidated when passing =20
974 a gateway that modifies such whitespace (like BITNET). =20
975 --bar
976 Content-Type: image/jpeg
977 Content-Transfer-Encoding: base64
979 iQCVAwUBMJrRF2N9oWBghPDJAQE9UQQAtl7LuRVndBjrk4EqYBIb3h5QXIX/LC//
980 jJV5bNvkZIGPIcEmI5iFd9boEgvpirHtIREEqLQRkYNoBActFBZmh9GC3C041WGq
981 uMbrbxc+nIs1TIKlA08rVi9ig/2Yh7LFrK5Ein57U/W72vgSxLhe/zhdfolT9Brn
982 HOxEa44b+EI=
984 --bar--
986 3.2. The application/pkcs7-mime Media Type
988 The application/pkcs7-mime media type is used to carry CMS content
989 types including EnvelopedData, SignedData, and CompressedData. The
990 details of constructing these entities are described in subsequent
991 sections. This section describes the general characteristics of the
992 application/pkcs7-mime media type.
994 The carried CMS object always contains a MIME entity that is prepared
995 as described in section 3.1 if the eContentType is id-data. Other
996 contents MAY be carried when the eContentType contains different
997 values. See [ESS] for an example of this with signed receipts.
999 Since CMS content types are binary data, in most cases base-64
1000 transfer encoding is appropriate, in particular, when used with SMTP
1001 transport. The transfer encoding used depends on the transport
1002 through which the object is to be sent, and is not a characteristic
1003 of the media type.
1005 Note that this discussion refers to the transfer encoding of the CMS
1006 object or "outside" MIME entity. It is completely distinct from, and
1007 unrelated to, the transfer encoding of the MIME entity secured by the
1008 CMS object, the "inside" object, which is described in section 3.1.
1010 Because there are several types of application/pkcs7-mime objects, a
1011 sending agent SHOULD do as much as possible to help a receiving agent
1012 know about the contents of the object without forcing the receiving
1013 agent to decode the ASN.1 for the object. The Content-Type header
1014 field of all application/pkcs7-mime objects SHOULD include the
1015 optional "smime-type" parameter, as described in the following
1016 sections.
1018 3.2.1. The name and filename Parameters
1020 For the application/pkcs7-mime, sending agents SHOULD emit the
1021 optional "name" parameter to the Content-Type field for compatibility
1022 with older systems. Sending agents SHOULD also emit the optional
1023 Content-Disposition field [CONTDISP] with the "filename" parameter.
1024 If a sending agent emits the above parameters, the value of the
1025 parameters SHOULD be a file name with the appropriate extension:
1027 Media Type File Extension
1028 application/pkcs7-mime (SignedData, EnvelopedData) .p7m
1029 application/pkcs7-mime (degenerate SignedData .p7c
1030 certificate management message)
1031 application/pkcs7-mime (CompressedData) .p7z
1032 application/pkcs7-signature (SignedData) .p7s
1034 In addition, the file name SHOULD be limited to eight characters
1035 followed by a three letter extension. The eight character filename
1036 base can be any distinct name; the use of the filename base "smime"
1037 SHOULD be used to indicate that the MIME entity is associated with
1038 S/MIME.
1040 Including a file name serves two purposes. It facilitates easier use
1041 of S/MIME objects as files on disk. It also can convey type
1042 information across gateways. When a MIME entity of type
1043 application/pkcs7-mime (for example) arrives at a gateway that has no
1044 special knowledge of S/MIME, it will default the entity's media type
1045 to application/octet-stream and treat it as a generic attachment,
1046 thus losing the type information. However, the suggested filename
1047 for an attachment is often carried across a gateway. This often
1048 allows the receiving systems to determine the appropriate application
1049 to hand the attachment off to, in this case, a stand-alone S/MIME
1050 processing application. Note that this mechanism is provided as a
1051 convenience for implementations in certain environments. A proper
1052 S/MIME implementation MUST use the media types and MUST NOT rely on
1053 the file extensions.
1055 3.2.2. The smime-type parameter
1057 The application/pkcs7-mime content type defines the optional "smime-
1058 type" parameter. The intent of this parameter is to convey details
1059 about the security applied (signed or enveloped) along with
1060 information about the contained content. This specification defines
1061 the following smime-types.
1063 Name CMS type Inner Content
1064 enveloped-data EnvelopedData id-data
1065 signed-data SignedData id-data
1066 certs-only SignedData none
1067 compressed-data CompressedData id-data
1069 In order for consistency to be obtained with future specifications,
1070 the following guidelines SHOULD be followed when assigning a new
1071 smime-type parameter.
1073 1. If both signing and encryption can be applied to the content,
1074 then two values for smime-type SHOULD be assigned "signed-*" and
1075 "encrypted-*". If one operation can be assigned then this can be
1076 omitted. Thus since "certs-only" can only be signed, "signed-"
1077 is omitted.
1079 2. A common string for a content OID SHOULD be assigned. We use
1080 "data" for the id-data content OID when MIME is the inner
1081 content.
1083 3. If no common string is assigned, then the common string of
1084 "OID." is recommended (for example,
1085 "OID.2.16.840.1.101.3.4.1.2" would be AES-128 CBC).
1087 It is explicitly intended that this field be a suitable hint for mail
1088 client applications to indicate whether a message is "signed" or
1089 "encrypted" without having to tunnel into the CMS payload.
1091 3.3. Creating an Enveloped-only Message
1093 This section describes the format for enveloping a MIME entity
1094 without signing it. It is important to note that sending enveloped
1095 but not signed messages does not provide for data integrity. It is
1096 possible to replace ciphertext in such a way that the processed
1097 message will still be valid, but the meaning can be altered.
1099 Step 1. The MIME entity to be enveloped is prepared according to
1100 section 3.1.
1102 Step 2. The MIME entity and other required data is processed
1103 into a CMS object of type EnvelopedData. In addition to
1104 encrypting a copy of the content-encryption key for each
1105 recipient, a copy of the content-encryption key SHOULD be
1106 encrypted for the originator and included in the EnvelopedData
1107 (see [CMS] Section 6).
1109 Step 3. The EnvelopedData object is wrapped in a CMS ContentInfo
1110 object.
1112 Step 4. The ContentInfo object is inserted into an
1113 application/pkcs7-mime MIME entity.
1115 The smime-type parameter for enveloped-only messages is "enveloped-
1116 data". The file extension for this type of message is ".p7m".
1118 A sample message would be:
1120 Content-Type: application/pkcs7-mime; smime-type=enveloped-data;
1121 name=smime.p7m
1122 Content-Transfer-Encoding: base64
1123 Content-Disposition: attachment; filename=smime.p7m
1125 rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6
1126 7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H
1127 f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4
1128 0GhIGfHfQbnj756YT64V
1130 3.4. Creating a Signed-only Message
1132 There are two formats for signed messages defined for S/MIME:
1134 - application/pkcs7-mime with SignedData; and,
1136 - multipart/signed.
1138 In general, the multipart/signed form is preferred for sending, and
1139 receiving agents MUST be able to handle both.
1141 3.4.1. Choosing a Format for Signed-only Messages
1143 There are no hard-and-fast rules when a particular signed-only format
1144 is chosen because it depends on the capabilities of all the receivers
1145 and the relative importance of receivers with S/MIME facilities being
1146 able to verify the signature versus the importance of receivers
1147 without S/MIME software being able to view the message.
1149 Messages signed using the multipart/signed format can always be
1150 viewed by the receiver whether they have S/MIME software or not. They
1151 can also be viewed whether they are using a MIME-native user agent or
1152 they have messages translated by a gateway. In this context, "be
1153 viewed" means the ability to process the message essentially as if it
1154 were not a signed message, including any other MIME structure the
1155 message might have.
1157 Messages signed using the SignedData format cannot be viewed by a
1158 recipient unless they have S/MIME facilities. However, the
1159 SignedData format protects the message content from being changed by
1160 benign intermediate agents. Such agents might do line wrapping or
1161 content-transfer encoding changes which would break the signature.
1163 3.4.2. Signing Using application/pkcs7-mime with SignedData
1165 This signing format uses the application/pkcs7-mime media type. The
1166 steps to create this format are:
1168 Step 1. The MIME entity is prepared according to section 3.1.
1170 Step 2. The MIME entity and other required data is processed
1171 into a CMS object of type SignedData.
1173 Step 3. The SignedData object is wrapped in a CMS ContentInfo
1174 object.
1176 Step 4. The ContentInfo object is inserted into an
1177 application/pkcs7-mime MIME entity.
1179 The smime-type parameter for messages using application/pkcs7-mime
1180 with SignedData is "signed-data". The file extension for this type
1181 of message is ".p7m".
1183 A sample message would be:
1185 Content-Type: application/pkcs7-mime; smime-type=signed-data;
1186 name=smime.p7m
1187 Content-Transfer-Encoding: base64
1188 Content-Disposition: attachment; filename=smime.p7m
1190 567GhIGfHfYT6ghyHhHUujpfyF4f8HHGTrfvhJhjH776tbB9HG4VQbnj7
1191 77n8HHGT9HG4VQpfyF467GhIGfHfYT6rfvbnj756tbBghyHhHUujhJhjH
1192 HUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H7n8HHGghyHh
1193 6YT64V0GhIGfHfQbnj75
1195 3.4.3. Signing Using the multipart/signed Format
1197 This format is a clear-signing format. Recipients without any S/MIME
1198 or CMS processing facilities are able to view the message. It makes
1199 use of the multipart/signed media type described in [MIME-SECURE].
1200 The multipart/signed media type has two parts. The first part
1201 contains the MIME entity that is signed; the second part contains the
1202 "detached signature" CMS SignedData object in which the
1203 encapContentInfo eContent field is absent.
1205 3.4.3.1. The application/pkcs7-signature Media Type
1207 This media type always contains a CMS ContentInfo containing a single
1208 CMS object of type SignedData. The SignedData encapContentInfo
1209 eContent field MUST be absent. The signerInfos field contains the
1210 signatures for the MIME entity.
1212 The file extension for signed-only messages using application/pkcs7-
1213 signature is ".p7s".
1215 3.4.3.2. Creating a multipart/signed Message
1217 Step 1. The MIME entity to be signed is prepared according to
1218 section 3.1, taking special care for clear-signing.
1220 Step 2. The MIME entity is presented to CMS processing in order
1221 to obtain an object of type SignedData in which the
1222 encapContentInfo eContent field is absent.
1224 Step 3. The MIME entity is inserted into the first part of a
1225 multipart/signed message with no processing other than that
1226 described in section 3.1.
1228 Step 4. Transfer encoding is applied to the "detached signature"
1229 CMS SignedData object and it is inserted into a MIME entity of
1230 type application/pkcs7-signature.
1232 Step 5. The MIME entity of the application/pkcs7-signature is
1233 inserted into the second part of the multipart/signed entity.
1235 The multipart/signed Content-Type has two required parameters: the
1236 protocol parameter and the micalg parameter.
1238 The protocol parameter MUST be "application/pkcs7-signature". Note
1239 that quotation marks are required around the protocol parameter
1240 because MIME requires that the "/" character in the parameter value
1241 MUST be quoted.
1243 The micalg parameter allows for one-pass processing when the
1244 signature is being verified. The value of the micalg parameter is
1245 dependent on the message digest algorithm(s) used in the calculation
1246 of the Message Integrity Check. If multiple message digest
1247 algorithms are used they MUST be separated by commas per [MIME-
1248 SECURE]. The values to be placed in the micalg parameter SHOULD be
1249 from the following:
1251 Algorithm Value used
1253 MD5 md5
1254 SHA-1 sha1
1255 SHA-224 sha224
1256 SHA-256 sha256
1257 SHA-384 sha384
1258 SHA-512 sha512
1259 Any other (defined separately in algorithm profile or "unknown"
1260 if not defined)
1262 (Historical note: some early implementations of S/MIME emitted and
1263 expected "rsa-md5" and "rsa-sha1" for the micalg parameter.)
1264 Receiving agents SHOULD be able to recover gracefully from a micalg
1265 parameter value that they do not recognize.
1267 The SHA-224, SHA-384, and SHA-512 algorithms [FIPS180-3] are not
1268 currently recommended in S/MIME, and are included here for
1269 completeness.
1271 3.4.3.3. Sample multipart/signed Message
1273 Content-Type: multipart/signed;
1274 protocol="application/pkcs7-signature";
1275 micalg=sha1; boundary=boundary42
1277 --boundary42
1278 Content-Type: text/plain
1280 This is a clear-signed message.
1282 --boundary42
1283 Content-Type: application/pkcs7-signature; name=smime.p7s
1284 Content-Transfer-Encoding: base64
1285 Content-Disposition: attachment; filename=smime.p7s
1287 ghyHhHUujhJhjH77n8HHGTrfvbnj756tbB9HG4VQpfyF467GhIGfHfYT6
1288 4VQpfyF467GhIGfHfYT6jH77n8HHGghyHhHUujhJh756tbB9HGTrfvbnj
1289 n8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4
1290 7GhIGfHfYT64VQbnj756
1292 --boundary42--
1294 The content that is digested (the first part of the multipart/signed)
1295 are the bytes:
1297 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f 70 6c 61 69
1298 6e 0d 0a 0d 0a 54 68 69 73 20 69 73 20 61 20 63 6c 65 61 72 2d 73 69
1299 67 6e 65 64 20 6d 65 73 73 61 67 65 2e 0d 0a
1301 3.5. Creating an Compressed-only Message
1303 This section describes the format for compressing a MIME entity.
1304 Please note that versions of S/MIME prior to version 3.1 did not
1305 specify any use of CompressedData, and will not recognize it. The
1306 use of a capability to indicate the ability to receive CompressedData
1307 is described in [CMSCOMPR] and is the preferred method for
1308 compatibility.
1310 Step 1. The MIME entity to be compressed is prepared according
1311 to section 3.1.
1313 Step 2. The MIME entity and other required data is processed
1314 into a CMS object of type CompressedData.
1316 Step 3. The CompressedData object is wrapped in a CMS
1317 ContentInfo object.
1319 Step 4. The ContentInfo object is inserted into an
1320 application/pkcs7-mime MIME entity.
1322 The smime-type parameter for compressed-only messages is "compressed-
1323 data". The file extension for this type of message is ".p7z".
1325 A sample message would be:
1327 Content-Type: application/pkcs7-mime; smime-type=compressed-data;
1328 name=smime.p7z
1329 Content-Transfer-Encoding: base64
1330 Content-Disposition: attachment; filename=smime.p7z
1332 rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6
1333 7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H
1334 f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4
1335 0GhIGfHfQbnj756YT64V
1337 3.6. Multiple Operations
1339 The signed-only, encrypted-only, and compressed-only MIME formats can
1340 be nested. This works because these formats are all MIME entities
1341 that encapsulate other MIME entities.
1343 An S/MIME implementation MUST be able to receive and process
1344 arbitrarily nested S/MIME within reasonable resource limits of the
1345 recipient computer.
1347 It is possible to apply any of the signing, encrypting, and
1348 compressing operations in any order. It is up to the implementer and
1349 the user to choose. When signing first, the signatories are then
1350 securely obscured by the enveloping. When enveloping first the
1351 signatories are exposed, but it is possible to verify signatures
1352 without removing the enveloping. This can be useful in an
1353 environment were automatic signature verification is desired, as no
1354 private key material is required to verify a signature.
1356 There are security ramifications to choosing whether to sign first or
1357 encrypt first. A recipient of a message that is encrypted and then
1358 signed can validate that the encrypted block was unaltered, but
1359 cannot determine any relationship between the signer and the
1360 unencrypted contents of the message. A recipient of a message that
1361 is signed-then-encrypted can assume that the signed message itself
1362 has not been altered, but that a careful attacker could have changed
1363 the unauthenticated portions of the encrypted message.
1365 When using compression, keep the following guidelines in mind:
1367 - Compression of binary encoded encrypted data is discouraged, since
1368 it will not yield significant compression. Base64 encrypted data
1369 could very well benefit, however.
1371 - If a lossy compression algorithm is used with signing, you will
1372 need to compress first, then sign.
1374 3.7. Creating a Certificate Management Message
1376 The certificate management message or MIME entity is used to
1377 transport certificates and/or certificate revocation lists, such as
1378 in response to a registration request.
1380 Step 1. The certificates and/or certificate revocation lists are
1381 made available to the CMS generating process which creates a CMS
1382 object of type SignedData. The SignedData encapContentInfo
1383 eContent field MUST be absent and signerInfos field MUST be
1384 empty.
1386 Step 2. The SignedData object is wrapped in a CMS ContentInfo
1387 object.
1389 Step 3. The ContentInfo object is enclosed in an
1390 application/pkcs7-mime MIME entity.
1392 The smime-type parameter for a certificate management message is
1393 "certs-only". The file extension for this type of message is ".p7c".
1395 3.8. Registration Requests
1397 A sending agent that signs messages MUST have a certificate for the
1398 signature so that a receiving agent can verify the signature. There
1399 are many ways of getting certificates, such as through an exchange
1400 with a certificate authority, through a hardware token or diskette,
1401 and so on.
1403 S/MIME v2 [SMIMEv2] specified a method for "registering" public keys
1404 with certificate authorities using an application/pkcs10 body part.
1405 Since that time, the IETF PKIX Working Group has developed other
1406 methods for requesting certificates. However, S/MIME v3.2 does not
1407 require a particular certificate request mechanism.
1409 3.9. Identifying an S/MIME Message
1411 Because S/MIME takes into account interoperation in non-MIME
1412 environments, several different mechanisms are employed to carry the
1413 type information, and it becomes a bit difficult to identify S/MIME
1414 messages. The following table lists criteria for determining whether
1415 or not a message is an S/MIME message. A message is considered an
1416 S/MIME message if it matches any of the criteria listed below.
1418 The file suffix in the table below comes from the "name" parameter in
1419 the Content-Type header field, or the "filename" parameter on the
1420 Content-Disposition header field. These parameters that give the
1421 file suffix are not listed below as part of the parameter section.
1423 Media type: application/pkcs7-mime
1424 parameters: any
1425 file suffix: any
1427 Media type: multipart/signed
1428 parameters: protocol="application/pkcs7-signature"
1429 file suffix: any
1431 Media type: application/octet-stream
1432 parameters: any
1433 file suffix: p7m, p7s, p7c, p7z
1435 4. Certificate Processing
1437 A receiving agent MUST provide some certificate retrieval mechanism
1438 in order to gain access to certificates for recipients of digital
1439 envelopes. This specification does not cover how S/MIME agents
1440 handle certificates, only what they do after a certificate has been
1441 validated or rejected. S/MIME certificate issues are covered in
1442 [CERT32].
1444 At a minimum, for initial S/MIME deployment, a user agent could
1445 automatically generate a message to an intended recipient requesting
1446 that recipient's certificate in a signed return message. Receiving
1447 and sending agents SHOULD also provide a mechanism to allow a user to
1448 "store and protect" certificates for correspondents in such a way so
1449 as to guarantee their later retrieval.
1451 4.1. Key Pair Generation
1453 All generated key pairs MUST be generated from a good source of non-
1454 deterministic random input [RANDOM] and the private key MUST be
1455 protected in a secure fashion.
1457 An S/MIME user agent MUST NOT generate asymmetric keys less than 512
1458 bits for use with the RSA or DSA signature algorithms.
1460 4.2. Signature Generation
1462 The following are the requirements for an S/MIME agent generated RSA
1463 or DSA signature:
1465 512 <= key size < 1024 : MAY (see Security Considerations)
1466 1024 <= key size <= 2048 : SHOULD (see Security Considerations)
1467 2048 < key size <= 4096 : MAY (see Security Considerations)
1469 4.3. Signature Verification
1471 The following are the requirements for S/MIME receiving agents during
1472 signature verification of RSA or DSA signatures:
1474 512 <= key size <= 2048 : MUST (see Security Considerations)
1475 2048 < key size <= 4096 : MAY (see Security Considerations)
1477 4.4. Encryption
1479 The following are the requirements for an S/MIME agent when
1480 establishing keys for content encryption using the RSA or DH
1481 algorithms:
1483 512 <= key size < 1024 : MAY (see Security Considerations)
1484 1024 <= key size <= 2048 : SHOULD (see Security Considerations)
1485 2048 < key size <= 4096 : MAY (see Security Considerations)
1487 4.5. Decryption
1489 The following are the requirements for an S/MIME agent when
1490 establishing keys for content decryption using the RSA or DH
1491 algorithms:
1493 512 <= key size <= 2048 : MUST (see Security Considerations)
1494 2048 < key size <= 4096 : MAY (see Security Considerations)
1496 5. IANA Considerations
1498 The following is intended to provide sufficient information to update
1499 the media type registration for application/pkcs7-mime and
1500 application/pkcs7-signature to refer to this document as opposed to
1501 RFC 2311.
1503 5.1. Media Type for application/pkcs7-mime
1505 Type name: application
1507 Subtype Name: pkcs7-mime
1509 Required Parameters: NONE
1511 Optional Parameters: smime-type/signed-data
1512 smime-type/enveloped-data
1513 smime-type/compressed-data
1514 smime-type/certs-only
1516 Encoding Considerations: See Section 3 of this document
1518 Security Considerations: See Section 6 of this document
1520 Interoperability Considerations: See Sections 1-6 of this document
1522 Published Specification: RFC 2311, RFC 2633, and this document
1524 Applications that use this media type: Security applications
1526 Additional information: NONE
1528 Person & email to contact for further information: S/MIME working
1529 group chairs smime-chairs@tools.ietf.org
1531 Intended usage: COMMON
1533 Restrictions on usage: NONE
1535 Author: Sean Turner
1537 Change Controller: S/MIME working group delegated from the IESG
1539 5.2. Media Type for application/pkcs7-signature
1541 Type name: application
1543 Subtype Name: pkcs7-signature
1545 Required Parameters: NONE
1547 Optional Parameters: NONE
1549 Encoding Considerations: See Section 3 of this document
1551 Security Considerations: See Section 6 of this document
1553 Interoperability Considerations: See Sections 1-6 of this document
1555 Published Specification: RFC 2311, RFC 2633, and this document
1557 Applications that use this media type: Security applications
1559 Additional information: NONE
1561 Person & email to contact for further information: S/MIME working
1562 group chairs smime-chairs@tools.ietf.org
1564 Intended usage: COMMON
1566 Restrictions on usage: NONE
1568 Author: Sean Turner
1570 Change Controller: S/MIME working group delegated from the IESG
1572 6. Security Considerations
1574 Cryptographic algorithms will be broken or weakened over time.
1575 Implementers and users need to check that the cryptographic
1576 algorithms listed in this document continue to provide the expected
1577 level of security. The IETF from time to time may issue documents
1578 dealing with the current state of the art. For example:
1580 - The Million Message Attack described in RFC 3218 [MMA].
1582 - The Diffie-Hellman "small-subgroup" attacks described in
1583 RFC 2785 [DHSUB].
1585 - The attacks against hash algorithms described in
1586 RFC 4270 [HASH-ATTACK]
1588 This specification uses Public-Key Cryptography technologies. It is
1589 assumed that the private is protected to ensure that it is not
1590 accessed or altered by unauthorized parties.
1592 It is impossible for most people or software to estimate the value of
1593 a message content. Further, it is impossible for most people or
1594 software to estimate the actual cost of recovering an encrypted
1595 message content that is encrypted with a key of a particular size.
1596 Further, it is quite difficult to determine the cost of a failed
1597 decryption if a recipient cannot process a message content. Thus,
1598 choosing between different key sizes (or choosing whether to just use
1599 plaintext) is also impossible for most people or software. However,
1600 decisions based on these criteria are made all the time, and
1601 therefore this specification gives a framework for using those
1602 estimates in choosing algorithms.
1604 The choice of 1024 bits as the RSA, DSA, and DH asymmetric key size
1605 in this specification is based on the desire to provide 80 bits of
1606 security. This key size seems prudent for the Internet based on
1607 Section 4.3 of [STRENGTH]. There are other environments (e.g.,
1608 government, financial, and medical) that may consider this key size
1609 to be inadequate. Likewise, there are other environments that may
1610 consider this key size to be excessive.
1612 Larger keys are not necessarily better keys. Larger keys take more
1613 computational resources, and this can quickly become impractical. In
1614 fact, support for an excessively large key offers a denial of service
1615 opportunity if the attacker can cause excessive cryptographic
1616 processing by providing such a public key. One mitigation approach
1617 would require that the corresponding public key certificate be
1618 validated to a trust anchor prior to use, thus ensuring that only
1619 trusted public keys are used. However, some implementations may
1620 choose to perform signature verification (or key establishment for
1621 encryption) in parallel with certificate validation, even if
1622 certificate validation fails. In such cases, measures should be
1623 included to limit the impact, for example by limiting cryptographic
1624 processing time or requiring certificate validation prior to the use
1625 of large keys.
1627 Today, 512-bit RSA, DSA, and DH keys are considered by many experts
1628 to be cryptographically insecure.
1630 Using weak cryptography in S/MIME offers little actual security over
1631 sending plaintext. However, other features of S/MIME, such as the
1632 specification of AES and the ability to announce stronger
1633 cryptographic capabilities to parties with whom you communicate,
1634 allow senders to create messages that use strong encryption. Using
1635 weak cryptography is never recommended unless the only alternative is
1636 no cryptography. When feasible, sending and receiving agents SHOULD
1637 inform senders and recipients of the relative cryptographic strength
1638 of messages.
1640 Implementers SHOULD be aware that multiple active key pairs can be
1641 associated with a single individual. For example, one key pair can
1642 be used to support confidentiality, while a different key pair can be
1643 used for digital signatures.
1645 If a sending agent is sending the same message using different
1646 strengths of cryptography, an attacker watching the communications
1647 channel might be able to determine the contents of the strongly-
1648 encrypted message by decrypting the weakly-encrypted version. In
1649 other words, a sender SHOULD NOT send a copy of a message using
1650 weaker cryptography than they would use for the original of the
1651 message.
1653 Modification of the ciphertext can go undetected if authentication is
1654 not also used, which is the case when sending EnvelopedData without
1655 wrapping it in SignedData or enclosing SignedData within it.
1657 7. References
1659 7.1. Normative References
1661 [CERT32] Ramsdell, B., and S. Turner, "S/MIME Version 3.2
1662 Certificate Handling", work in progress.
1664 [CHARSETS] Character sets assigned by IANA. See
1665 http://www.iana.org/assignments/character-sets
1667 [CMS] Housley, R., "Cryptographic Message Syntax (CMS)", RFC
1668 3852, July 2004.
1670 Housley, R., "Cryptographic Message Syntax (CMS)
1671 Multiple Signer Clarification", RFC 4852, April 2007.
1673 [CMSAES] Schaad, J., "Use of the Advanced Encryption Standard
1674 (AES) Encryption Algorithm in Cryptographic Message
1675 Syntax (CMS)", RFC 3565, July 2003.
1677 [CMSALG] Housley, R., "Cryptographic Message Syntax (CMS)
1678 Algorithms", RFC 3370, August 2002.
1680 [CMSCOMPR] Gutmann, P., "Compressed Data Content Type for
1681 Cryptographic Message Syntax (CMS)", RFC 3274, June
1682 2002.
1684 [CMS-SHA2] Turner. S., "Using SHA2 Algorithms with Cryptographic
1685 Message Syntax", work in progress.
1687 [CONTDISP] Troost, R., Dorner, S., and K. Moore, "Communicating
1688 Presentation Information in Internet Messages: The
1689 Content-Disposition Header Field", RFC 2183, August
1690 1997.
1692 [ESS] Hoffman, P., "Enhanced Security Services for S/MIME",
1693 RFC 2634, June 1999.
1695 [FIPS180-3] National Institute of Standards and Technology (NIST),
1696 "Secure Hash Standard (SHS)", FIPS Publication 180-3,
1697 June 2007.
1699 [MIME-SPEC] Freed, N. and N. Borenstein, "Multipurpose Internet
1700 Mail Extensions (MIME) Part One: Format of Internet
1701 Message Bodies", RFC 2045, November 1996.
1703 Freed, N. and N. Borenstein, "Multipurpose Internet
1704 Mail Extensions (MIME) Part Two: Media Types", RFC
1705 2046, November 1996.
1707 Moore, K., "MIME (Multipurpose Internet Mail
1708 Extensions) Part Three: Message Header Extensions for
1709 Non-ASCII Text", RFC 2047, November 1996.
1711 Freed, N., and J. Klensin, , "Multipurpose Internet
1712 Mail Extensions (MIME) Part Four: Registration
1713 Procedures", BCP 13, RFC 4289, December 2005.
1715 Freed, N., and J. Klensin, "Media Type Specifications
1716 and Registration Procedures ", BCP 13, RFC 4288,
1717 December 2005.
1719 Freed, N. and N. Borenstein, "Multipurpose Internet
1720 Mail Extensions (MIME) Part Five: Conformance Criteria
1721 and Examples", RFC 2049, November 1996.
1723 [MIME-SECURE] Galvin, J., Murphy, S., Crocker, S., and N. Freed,
1724 "Security Multiparts for MIME: Multipart/Signed and
1725 Multipart/Encrypted", RFC 1847, October 1995.
1727 [MUSTSHOULD] Bradner, S., "Key words for use in RFCs to Indicate
1728 Requirement Levels", BCP 14, RFC 2119, March 1997.
1730 [RANDOM] Eastlake 3rd, D., Crocker, S., and J. Schiller,
1731 "Randomness Requirements for Security", BCP 106, RFC
1732 4086, June 2005.
1734 [RSAPSS] Schaad, J., "Use of RSASA-PSS Signature Algorithm in
1735 Cryptographic Message Syntax (CMS)", RFC 4056, June
1736 2005.
1738 [RSAOAEP] Housley, R. "Use of the RSAES-OAEP Key Transport
1739 Algorithm in the Cryptographic Message Syntax (CMS)",
1740 RFC 3560, July 2003
1742 [X.208-88] ITU-T Recommandation X.208 (1988) | ISO/IEC 8824-
1743 1:1988. Specification of Abstract Syntax Notation One
1744 (ASN.1).
1746 [X.690-02] ITU-T Recommendation X.690 (2002) | ISO/IEC 8825-
1747 1:2002. Information Technology - ASN.1 encoding
1748 rules: Specification of Basic Encoding Rules (BER),
1749 Canonical Encoding Rules (CER) and Distinguished
1750 Encoding Rules (DER).
1752 7.2. Informative References
1754 [DHSUB] Zuccherato, R., "Methods for Avoiding the "Small-
1755 Subgroup" Attacks on the Diffie-Hellman Key Agreement
1756 Method for S/MIME", RFC 2785, March 2000.
1758 [HASH-ATTACK] Hoffman, P., Schneier, B., "Attacks on Cryptographic
1759 Hashes in Internet Protocols", RFC 4270, November
1760 2005.
1762 [MMA] Rescorla, E., "Preventing the Million Message Attack
1763 on Cryptographic Message Syntax", RFC 3218, January
1764 2002.
1766 [PKCS-7] Kaliski, B., "PKCS #7: Cryptographic Message Syntax
1767 Version 1.5", RFC 2315, March 1998.
1769 [SMIMEv2] Dusse, S., Hoffman, P., Ramsdell, B., Lundblade, L.,
1770 and L. Repka, "S/MIME Version 2 Message
1771 Specification", RFC 2311, March 1998.
1773 Dusse, S., Hoffman, P., Ramsdell, B., and J.
1774 Weinstein, "S/MIME Version 2 Certificate Handling",
1775 RFC 2312, March 1998.
1777 Kaliski, B., "PKCS #1: RSA Encryption Version 1.5",
1778 RFC 2313, March 1998.
1780 Kaliski, B., "PKCS #10: Certificate Request Syntax
1781 Version 1.5", RFC 2314, March 1998.
1783 Kaliski, B., "PKCS #7: Certificate Message Syntax
1784 Version 1.5", RFC 2314, March 1998.
1786 [SMIMEv3] Housley, R., "Cryptographic Message Syntax", RFC 2630,
1787 June 1999.
1789 Rescorla, E., "Diffie-Hellman Key Agreement Method",
1790 RFC 2631, June 1999.
1792 Ramsdell, B., "S/MIME Version 3 Certificate Handling",
1793 RFC 2632, June 1999.
1795 Ramsdell, B., "S/MIME Version 3 Message
1796 Specification", RFC 2633, June 1999.
1798 Hoffman, P., "Enhanced Security Services for S/MIME",
1799 RFC 2634, June 1999.
1801 [SMIMEv3.1] Housley, R., "Cryptographic Message Syntax", RFC 3852,
1802 July 2004.
1804 Ramsdell, B., "S/MIME Version 3.1 Certificate
1805 Handling", RFC 3850, July 2004.
1807 Ramsdell, B., "S/MIME Version 3.1 Message
1808 Specification", RFC 3851, July 2004.
1810 Hoffman, P., "Enhanced Security Services for S/MIME",
1811 RFC 2634, June 1999.
1813 [STRENGTH] Orman, H., and P. Hoffman, "Determining Strengths For
1814 Public Keys Used For Exchanging Symmetric Keys", BCP
1815 86, RFC 3766, April 2004.
1817 Appendix A. ASN.1 Module
1819 NOTE: The ASN.1 module contained herein is unchanged from RFC 3851
1820 [SMIMEv3], with the exception of a minor change to the
1821 prefersBinaryInside ASN.1 comment.
1823 SecureMimeMessageV3dot1
1825 { iso(1) member-body(2) us(840) rsadsi(113549)
1826 pkcs(1) pkcs-9(9) smime(16) modules(0) msg-v3dot1(21) }
1828 DEFINITIONS IMPLICIT TAGS ::=
1830 BEGIN
1832 IMPORTS
1834 -- Cryptographic Message Syntax
1835 SubjectKeyIdentifier, IssuerAndSerialNumber,
1836 RecipientKeyIdentifier
1837 FROM CryptographicMessageSyntax
1838 { iso(1) member-body(2) us(840) rsadsi(113549)
1839 pkcs(1) pkcs-9(9) smime(16) modules(0) cms-2001(14) };
1841 -- id-aa is the arc with all new authenticated and unauthenticated
1842 -- attributes produced the by S/MIME Working Group
1844 id-aa OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
1845 rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) attributes(2)}
1847 -- S/MIME Capabilities provides a method of broadcasting the
1848 -- symmetric capabilities understood. Algorithms SHOULD be ordered
1849 -- by preference and grouped by type
1851 smimeCapabilities OBJECT IDENTIFIER ::= {iso(1) member-body(2)
1852 us(840) rsadsi(113549) pkcs(1) pkcs-9(9) 15}
1854 SMIMECapability ::= SEQUENCE {
1855 capabilityID OBJECT IDENTIFIER,
1856 parameters ANY DEFINED BY capabilityID OPTIONAL }
1858 SMIMECapabilities ::= SEQUENCE OF SMIMECapability
1860 -- Encryption Key Preference provides a method of broadcasting the
1861 -- preferred encryption certificate.
1863 id-aa-encrypKeyPref OBJECT IDENTIFIER ::= {id-aa 11}
1865 SMIMEEncryptionKeyPreference ::= CHOICE {
1866 issuerAndSerialNumber [0] IssuerAndSerialNumber,
1867 receipentKeyId [1] RecipientKeyIdentifier,
1868 subjectAltKeyIdentifier [2] SubjectKeyIdentifier
1869 }
1871 id-smime OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
1872 rsadsi(113549) pkcs(1) pkcs9(9) 16 }
1874 id-cap OBJECT IDENTIFIER ::= { id-smime 11 }
1876 -- The preferBinaryInside OID indicates an ability to receive
1877 -- messages with binary encoding inside the CMS wrapper
1879 id-cap-preferBinaryInside OBJECT IDENTIFIER ::= { id-cap 1 }
1881 -- The following list the OIDs to be used with S/MIME V3
1883 -- Signature Algorithms Not Found in [CMSALG]
1885 --
1887 -- md2WithRSAEncryption OBJECT IDENTIFIER ::=
1888 -- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-1(1)
1889 -- 2}
1891 --
1893 -- Other Signed Attributes
1894 --
1895 -- signingTime OBJECT IDENTIFIER ::=
1896 -- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
1897 -- 5}
1898 -- See [CMS] for a description of how to encode the attribute
1899 -- value.
1901 SMIMECapabilitiesParametersForRC2CBC ::= INTEGER
1902 -- (RC2 Key Length (number of bits))
1904 END
1906 Appendix B. Moving S/MIME v2 Message Specification to Historic Status
1908 The S/MIME v3 [SMIMEv3], v3.1 [SMIMEv3.1], and v3.2 (this document)
1909 Message Specifications are backwards S/MIME v2 Message Specification
1910 [SMIMEv2], with the exception of the algorithms (dropped RC2/40
1911 requirement and added DSA and RSA-PSS requirements). Therefore, it is
1912 recommended that RFC 2311 [SMIMEv2] be moved to Historic status.
1914 Appendix C. Acknowledgements
1916 Many thanks go out to the other authors of the S/MIME Version 2
1917 Message Specification RFC: Steve Dusse, Paul Hoffman, Laurence
1918 Lundblade and Lisa Repka. Without v2, there wouldn't be a v3, v3.1 or
1919 v3.2.
1921 A number of the members of the S/MIME Working Group have also worked
1922 very hard and contributed to this document. Any list of people is
1923 doomed to omission, and for that I apologize. In alphabetical order,
1924 the following people stand out in my mind due to the fact that they
1925 made direct contributions to this document.
1927 Tony Capel, Piers Chivers, Dave Crocker, Bill Flanigan, Peter
1928 Gutmann, Paul Hoffman, Russ Housley, William Ottaway, John Pawling,
1929 Jim Schaad, and Alfred Hoenes.
1931 Author's Addresses
1933 Blake Ramsdell
1934 SendMail
1936 Email: blake@sendmail.com
1938 Sean Turner
1940 IECA, Inc.
1941 3057 Nutley Street, Suite 106
1942 Fairfax, VA 22031
1943 USA
1945 Email: turners@ieca.com
1947 Full Copyright Statement
1949 Copyright (C) The IETF Trust (2008).
1951 This document is subject to the rights, licenses and restrictions
1952 contained in BCP 78, and except as set forth therein, the authors
1953 retain all their rights.
1955 This document and the information contained herein are provided on an
1956 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
1957 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
1958 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
1959 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
1960 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
1961 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
1963 Intellectual Property
1965 The IETF takes no position regarding the validity or scope of any
1966 Intellectual Property Rights or other rights that might be claimed to
1967 pertain to the implementation or use of the technology described in
1968 this document or the extent to which any license under such rights
1969 might or might not be available; nor does it represent that it has
1970 made any independent effort to identify any such rights. Information
1971 on the procedures with respect to rights in RFC documents can be
1972 found in BCP 78 and BCP 79.
1974 Copies of IPR disclosures made to the IETF Secretariat and any
1975 assurances of licenses to be made available, or the result of an
1976 attempt made to obtain a general license or permission for the use of
1977 such proprietary rights by implementers or users of this
1978 specification can be obtained from the IETF on-line IPR repository at
1979 http://www.ietf.org/ipr.
1981 The IETF invites any interested party to bring to its attention any
1982 copyrights, patents or patent applications, or other proprietary
1983 rights that may cover technology that may be required to implement
1984 this standard. Please address the information to the IETF at
1985 ietf-ipr@ietf.org.
1987 Acknowledgment
1989 Funding for the RFC Editor function is provided by the IETF
1990 Administrative Support Activity (IASA).