draft-ietf-smime-3851bis-11.txt   rfc5751.txt 
S/MIME WG B. Ramsdell
Internet Draft Brute Squad Labs
Intended Status: Standard Track S. Turner
Obsoletes: 3851 (when approved) IECA
Expires: November 12, 2009 May 12, 2009
Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 Internet Engineering Task Force (IETF) B. Ramsdell
Message Specification Request for Comments: 5751 Brute Squad Labs
draft-ietf-smime-3851bis-11.txt Obsoletes: 3851 S. Turner
Category: Standards Track IECA
ISSN: 2070-1721 January 2010
Status of this Memo Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2
Message Specification
This Internet-Draft is submitted to IETF in full conformance with the Abstract
provisions of BCP 78 and BCP 79. This document may contain material
from IETF Documents or IETF Contributions published or made publicly
available before November 10, 2008. The person(s) controlling the
copyright in some of this material may not have granted the IETF
Trust the right to allow modifications of such material outside the
IETF Standards Process. Without obtaining an adequate license from
the person(s) controlling the copyright in such materials, this
document may not be modified outside the IETF Standards Process, and
derivative works of it may not be created outside the IETF Standards
Process, except to format it for publication as an RFC or to
translate it into languages other than English.
Internet-Drafts are working documents of the Internet Engineering This document defines Secure/Multipurpose Internet Mail Extensions
Task Force (IETF), its areas, and its working groups. Note that (S/MIME) version 3.2. S/MIME provides a consistent way to send and
other groups may also distribute working documents as Internet- receive secure MIME data. Digital signatures provide authentication,
Drafts. message integrity, and non-repudiation with proof of origin.
Encryption provides data confidentiality. Compression can be used to
reduce data size. This document obsoletes RFC 3851.
Internet-Drafts are draft documents valid for a maximum of six months Status of This Memo
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at This is an Internet Standards Track document.
http://www.ietf.org/ietf/1id-abstracts.txt
The list of Internet-Draft Shadow Directories can be accessed at This document is a product of the Internet Engineering Task Force
http://www.ietf.org/shadow.html (IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by
the Internet Engineering Steering Group (IESG). Further
information on Internet Standards is available in Section 2 of
RFC 5741.
This Internet-Draft will expire on November 12, 2009. Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc5751.
Copyright Notice Copyright Notice
Copyright (c) 2009 IETF Trust and the persons identified as the Copyright (c) 2010 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents in effect on the date of Provisions Relating to IETF Documents
publication of this document (http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info) in effect on the date of
Please review these documents carefully, as they describe your rights publication of this document. Please review these documents
and restrictions with respect to this document. carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
Abstract include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
This document defines Secure/Multipurpose Internet Mail Extensions described in the Simplified BSD License.
(S/MIME) version 3.2. S/MIME provides a consistent way to send and
receive secure MIME data. Digital signatures provide authentication,
message integrity, and non-repudiation with proof of origin.
Encryption provides data confidentiality. Compression can be used to
reduce data size. This document obsoletes RFC 3851.
Discussion
This draft is being discussed on the 'ietf-smime' mailing list. To This document may contain material from IETF Documents or IETF
subscribe, send a message to ietf-smime-request@imc.org with the Contributions published or made publicly available before November
single word subscribe in the body of the message. There is a Web site 10, 2008. The person(s) controlling the copyright in some of this
for the mailing list at <http://www.imc.org/ietf-smime/>. material may not have granted the IETF Trust the right to allow
modifications of such material outside the IETF Standards Process.
Without obtaining an adequate license from the person(s) controlling
the copyright in such materials, this document may not be modified
outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other
than English.
Table of Contents Table of Contents
1. Introduction................................................ 3 1. Introduction ....................................................4
1.1. Specification Overview................................. 4 1.1. Specification Overview .....................................4
1.2. Definitions............................................ 5 1.2. Definitions ................................................5
1.3. Conventions used in this document...................... 5 1.3. Conventions Used in This Document ..........................6
1.4. Compatibility with Prior Practice of S/MIME............ 6 1.4. Compatibility with Prior Practice of S/MIME ................7
1.5. Changes From S/MIME v3 to S/MIME v3.1.................. 6 1.5. Changes from S/MIME v3 to S/MIME v3.1 ......................7
1.6. Changes Since S/MIME v3.1.............................. 7 1.6. Changes since S/MIME v3.1 ..................................7
2. CMS Options ................................................ 8 2. CMS Options .....................................................9
2.1. DigestAlgorithmIdentifier.............................. 8 2.1. DigestAlgorithmIdentifier ..................................9
2.2. SignatureAlgorithmIdentifier .......................... 9 2.2. SignatureAlgorithmIdentifier ...............................9
2.3. KeyEncryptionAlgorithmIdentifier....................... 9 2.3. KeyEncryptionAlgorithmIdentifier ..........................10
2.4. General Syntax......................................... 10 2.4. General Syntax ............................................11
2.5. Attributes and the SignerInfo Type .................... 11 2.5. Attributes and the SignerInfo Type ........................12
2.6. SignerIdentifier SignerInfo Type....................... 15 2.6. SignerIdentifier SignerInfo Type ..........................16
2.7. ContentEncryptionAlgorithmIdentifier................... 15 2.7. ContentEncryptionAlgorithmIdentifier ......................16
3. Creating S/MIME Messages.................................... 18 3. Creating S/MIME Messages .......................................18
3.1. Preparing the MIME Entity for Signing, Enveloping or 3.1. Preparing the MIME Entity for Signing, Enveloping,
Compressing............................................ 18 or Compressing ............................................19
3.2. The application/pkcs7-mime Media Type .....................23
3.2. The application/pkcs7-mime Media Type.................. 22 3.3. Creating an Enveloped-Only Message ........................25
3.3. Creating an Enveloped-only Message .................... 25 3.4. Creating a Signed-Only Message ............................26
3.4. Creating a Signed-only Message......................... 26 3.5. Creating a Compressed-Only Message ........................30
3.5. Creating a Compressed-only Message .................... 29 3.6. Multiple Operations .......................................30
3.6. Multiple Operations.................................... 30 3.7. Creating a Certificate Management Message .................31
3.7. Creating a Certificate Management Message.............. 31 3.8. Registration Requests .....................................32
3.8. Registration Requests.................................. 31 3.9. Identifying an S/MIME Message .............................32
3.9. Identifying an S/MIME Message.......................... 32 4. Certificate Processing .........................................32
4. Certificate Processing ..................................... 32 4.1. Key Pair Generation .......................................33
4.1. Key Pair Generation.................................... 32 4.2. Signature Generation ......................................33
4.2. Signature Generation................................... 33 4.3. Signature Verification ....................................34
4.3. Signature Verification................................. 33 4.4. Encryption ................................................34
4.4. Encryption............................................. 34 4.5. Decryption ................................................34
4.5. Decryption............................................. 34 5. IANA Considerations ............................................34
5. IANA Considerations......................................... 34 5.1. Media Type for application/pkcs7-mime .....................34
5.1. Media Type for application/pkcs7-mime.................. 34 5.2. Media Type for application/pkcs7-signature ................35
5.2. Media Type for application/pkcs7-signature............. 35 6. Security Considerations ........................................36
6. Security Considerations..................................... 36 7. References .....................................................38
7. References.................................................. 38 7.1. Reference Conventions .....................................38
7.1. Normative References................................... 38 7.2. Normative References ......................................39
7.2. Informative References................................. 40 7.3. Informative References ....................................41
Appendix A. ASN.1 Module....................................... 42 Appendix A. ASN.1 Module ..........................................43
Appendix B. Moving S/MIME v2 Message Specification to Historic Appendix B. Moving S/MIME v2 Message Specification to Historic
Status............................................. 46 Status ................................................45
Appendix C. Acknowledgments.................................... 46 Appendix C. Acknowledgments .......................................45
Authors' Addresses............................................. 46
1. Introduction 1. Introduction
S/MIME (Secure/Multipurpose Internet Mail Extensions) provides a S/MIME (Secure/Multipurpose Internet Mail Extensions) provides a
consistent way to send and receive secure MIME data. Based on the consistent way to send and receive secure MIME data. Based on the
popular Internet MIME standard, S/MIME provides the following popular Internet MIME standard, S/MIME provides the following
cryptographic security services for electronic messaging cryptographic security services for electronic messaging
applications: authentication, message integrity and non-repudiation applications: authentication, message integrity and non-repudiation
of origin (using digital signatures), and data confidentiality (using of origin (using digital signatures), and data confidentiality (using
encryption). As a supplementary service, S/MIME provides for message encryption). As a supplementary service, S/MIME provides for message
compression. compression.
skipping to change at page 4, line 10 skipping to change at page 4, line 30
transport mechanism that transports MIME data, such as HTTP or SIP. transport mechanism that transports MIME data, such as HTTP or SIP.
As such, S/MIME takes advantage of the object-based features of MIME As such, S/MIME takes advantage of the object-based features of MIME
and allows secure messages to be exchanged in mixed-transport and allows secure messages to be exchanged in mixed-transport
systems. systems.
Further, S/MIME can be used in automated message transfer agents that Further, S/MIME can be used in automated message transfer agents that
use cryptographic security services that do not require any human use cryptographic security services that do not require any human
intervention, such as the signing of software-generated documents and intervention, such as the signing of software-generated documents and
the encryption of FAX messages sent over the Internet. the encryption of FAX messages sent over the Internet.
1.1. Specification Overview 1.1. Specification Overview
This document describes a protocol for adding cryptographic signature This document describes a protocol for adding cryptographic signature
and encryption services to MIME data. The MIME standard [MIME-SPEC] and encryption services to MIME data. The MIME standard [MIME-SPEC]
provides a general structure for the content of Internet messages and provides a general structure for the content of Internet messages and
allows extensions for new content type based applications. allows extensions for new content-type-based applications.
This specification defines how to create a MIME body part that has This specification defines how to create a MIME body part that has
been cryptographically enhanced according to the Cryptographic been cryptographically enhanced according to the Cryptographic
Message Syntax (CMS) RFC 3852 and RFC 4853 [CMS], which is derived Message Syntax (CMS) RFC 5652 [CMS], which is derived from PKCS #7
from PKCS #7 [PKCS-7]. This specification also defines the [PKCS-7]. This specification also defines the application/pkcs7-mime
application/pkcs7-mime media type that can be used to transport those media type that can be used to transport those body parts.
body parts.
This document also discusses how to use the multipart/signed media This document also discusses how to use the multipart/signed media
type defined in [MIME-SECURE] to transport S/MIME signed messages. type defined in [MIME-SECURE] to transport S/MIME signed messages.
multipart/signed is used in conjunction with the application/pkcs7- multipart/signed is used in conjunction with the application/pkcs7-
signature media type, which is used to transport a detached S/MIME signature media type, which is used to transport a detached S/MIME
signature. signature.
In order to create S/MIME messages, an S/MIME agent MUST follow the In order to create S/MIME messages, an S/MIME agent MUST follow the
specifications in this document, as well as the specifications listed specifications in this document, as well as the specifications listed
in the Cryptographic Message Syntax document [CMS], [CMSALG], in the Cryptographic Message Syntax document [CMS], [CMSALG],
[RSAPSS], [RSAOAEP], and [CMS-SHA2]. [RSAPSS], [RSAOAEP], and [CMS-SHA2].
Throughout this specification, there are requirements and Throughout this specification, there are requirements and
recommendations made for how receiving agents handle incoming recommendations made for how receiving agents handle incoming
messages. There are separate requirements and recommendations for messages. There are separate requirements and recommendations for
how sending agents create outgoing messages. In general, the best how sending agents create outgoing messages. In general, the best
strategy is to "be liberal in what you receive and conservative in strategy is to "be liberal in what you receive and conservative in
what you send". Most of the requirements are placed on the handling what you send". Most of the requirements are placed on the handling
of incoming messages while the recommendations are mostly on the of incoming messages, while the recommendations are mostly on the
creation of outgoing messages. creation of outgoing messages.
The separation for requirements on receiving agents and sending The separation for requirements on receiving agents and sending
agents also derives from the likelihood that there will be S/MIME agents also derives from the likelihood that there will be S/MIME
systems that involve software other than traditional Internet mail systems that involve software other than traditional Internet mail
clients. S/MIME can be used with any system that transports MIME clients. S/MIME can be used with any system that transports MIME
data. An automated process that sends an encrypted message might not data. An automated process that sends an encrypted message might not
be able to receive an encrypted message at all, for example. Thus, be able to receive an encrypted message at all, for example. Thus,
the requirements and recommendations for the two types of agents are the requirements and recommendations for the two types of agents are
listed separately when appropriate. listed separately when appropriate.
1.2. Definitions 1.2. Definitions
For the purposes of this specification, the following definitions For the purposes of this specification, the following definitions
apply. apply.
ASN.1: Abstract Syntax Notation One, as defined in ITU-T ASN.1: Abstract Syntax Notation One, as defined in ITU-T
Recommendation X.680 [X.680]. Recommendation X.680 [X.680].
BER: Basic Encoding Rules for ASN.1, as defined in ITU-T BER: Basic Encoding Rules for ASN.1, as defined in ITU-
Recommendation X.690 [X.690]. T Recommendation X.690 [X.690].
Certificate: A type that binds an entity's name to a public key with Certificate: A type that binds an entity's name to a public key
a digital signature. with a digital signature.
DER: Distinguished Encoding Rules for ASN.1, as defined in ITU-T DER: Distinguished Encoding Rules for ASN.1, as defined
Recommendation X.690 [X.690]. in ITU-T Recommendation X.690 [X.690].
7-bit data: Text data with lines less than 998 characters long, where 7-bit data: Text data with lines less than 998 characters
none of the characters have the 8th bit set, and there are no NULL long, where none of the characters have the 8th
characters. <CR> and <LF> occur only as part of a <CR><LF> end of bit set, and there are no NULL characters. <CR>
line delimiter. and <LF> occur only as part of a <CR><LF> end-of-
line delimiter.
8-bit data: Text data with lines less than 998 characters, and where 8-bit data: Text data with lines less than 998 characters, and
none of the characters are NULL characters. <CR> and <LF> occur only where none of the characters are NULL characters.
as part of a <CR><LF> end of line delimiter. <CR> and <LF> occur only as part of a <CR><LF>
end-of-line delimiter.
Binary data: Arbitrary data. Binary data: Arbitrary data.
Transfer Encoding: A reversible transformation made on data so 8-bit Transfer encoding: A reversible transformation made on data so 8-bit
or binary data can be sent via a channel that only transmits 7-bit or binary data can be sent via a channel that only
data. transmits 7-bit data.
Receiving agent: Software that interprets and processes S/MIME CMS Receiving agent: Software that interprets and processes S/MIME CMS
objects, MIME body parts that contain CMS content types, or both. objects, MIME body parts that contain CMS content
types, or both.
Sending agent: Software that creates S/MIME CMS content types, MIME Sending agent: Software that creates S/MIME CMS content types,
body parts that contain CMS content types, or both. MIME body parts that contain CMS content types, or
both.
S/MIME agent: User software that is a receiving agent, a sending S/MIME agent: User software that is a receiving agent, a sending
agent, or both. agent, or both.
1.3. Conventions used in this document 1.3. Conventions Used in This Document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [MUSTSHOULD]. document are to be interpreted as described in [MUSTSHOULD].
We define some additional terms here: We define some additional terms here:
SHOULD+ This term means the same as SHOULD. However, the authors SHOULD+ This term means the same as SHOULD. However, the authors
expect that a requirement marked as SHOULD+ will be promoted at expect that a requirement marked as SHOULD+ will be
some future time to be a MUST. promoted at some future time to be a MUST.
SHOULD- This term means the same as SHOULD. However, the authors SHOULD- This term means the same as SHOULD. However, the authors
expect that a requirement marked as SHOULD- will be demoted to a expect that a requirement marked as SHOULD- will be demoted
MAY in a future version of this document. to a MAY in a future version of this document.
MUST- This term means the same as MUST. However, the authors MUST- This term means the same as MUST. However, the authors
expect that this requirement will no longer be a MUST in a future expect that this requirement will no longer be a MUST in a
document. Although its status will be determined at a later future document. Although its status will be determined at
time, it is reasonable to expect that if a future revision of a a later time, it is reasonable to expect that if a future
document alters the status of a MUST- requirement, it will remain revision of a document alters the status of a MUST-
at least a SHOULD or a SHOULD-. requirement, it will remain at least a SHOULD or a SHOULD-.
1.4. Compatibility with Prior Practice of S/MIME 1.4. Compatibility with Prior Practice of S/MIME
S/MIME version 3.2 agents ought to attempt to have the greatest S/MIME version 3.2 agents ought to attempt to have the greatest
interoperability possible with agents for prior versions of S/MIME. interoperability possible with agents for prior versions of S/MIME.
S/MIME version 2 is described in RFC 2311 through RFC 2315 inclusive S/MIME version 2 is described in RFC 2311 through RFC 2315 inclusive
[SMIMEv2], S/MIME version 3 is described in RFC 2630 through RFC 2634 [SMIMEv2], S/MIME version 3 is described in RFC 2630 through RFC 2634
inclusive and RFC 5035[SMIMEv3], and S/MIME version 3.1 is described inclusive and RFC 5035 [SMIMEv3], and S/MIME version 3.1 is described
in RFC 3850, RFC 3851, RFC 3852, RFC 2634, RFC 4853, and RFC 5035 in RFC 3850, RFC 3851, RFC 3852, RFC 2634, and RFC 5035 [SMIMEv3.1].
[SMIMEv3.1]. RFC 2311 also has historical information about the RFC 2311 also has historical information about the development of
development of S/MIME. S/MIME.
1.5. Changes From S/MIME v3 to S/MIME v3.1 1.5. Changes from S/MIME v3 to S/MIME v3.1
The RSA public key algorithm was changed to a MUST implement key The RSA public key algorithm was changed to a MUST implement key
wrapping algorithm, and the Diffie-Hellman algorithm changed to a wrapping algorithm, and the Diffie-Hellman (DH) algorithm changed to
SHOULD implement. a SHOULD implement.
The AES symmetric encryption algorithm has been included as a SHOULD The AES symmetric encryption algorithm has been included as a SHOULD
implement. implement.
The RSA public key algorithm was changed to a MUST implement The RSA public key algorithm was changed to a MUST implement
signature algorithm. signature algorithm.
Ambiguous language about the use of "empty" SignedData messages to Ambiguous language about the use of "empty" SignedData messages to
transmit certificates was clarified to reflect that transmission of transmit certificates was clarified to reflect that transmission of
certificate revocation lists is also allowed. Certificate Revocation Lists is also allowed.
The use of binary encoding for some MIME entities is now explicitly The use of binary encoding for some MIME entities is now explicitly
discussed. discussed.
Header protection through the use of the message/rfc822 media type Header protection through the use of the message/rfc822 media type
has been added. has been added.
Use of the CompressedData CMS type is allowed, along with required Use of the CompressedData CMS type is allowed, along with required
media type and file extension additions. media type and file extension additions.
1.6. Changes Since S/MIME v3.1 1.6. Changes since S/MIME v3.1
Editorial changes, e.g., replaced "MIME type" with "media type", Editorial changes, e.g., replaced "MIME type" with "media type",
content-type with Content-Type. content-type with Content-Type.
Moved "Conventions Used in This Document" to Section 1.3. Added Moved "Conventions Used in This Document" to Section 1.3. Added
definitions for SHOULD+, SHOULD-, and MUST-. definitions for SHOULD+, SHOULD-, and MUST-.
Sec 1.1 and Appendix A: Added references to RFCs for RSASSA-PSS, Section 1.1 and Appendix A: Added references to RFCs for RSASSA-PSS,
RSAES-OAEP, and SHA2 CMS Algorithms. Added CMS Multiple Signers RSAES-OAEP, and SHA2 CMS algorithms. Added CMS Multiple Signers
Clarification to CMS reference. Clarification to CMS reference.
Sec 1.2: Updated references to ASN.1 to X.680 and BER and DER to Section 1.2: Updated references to ASN.1 to X.680 and BER and DER to
X.690. X.690.
Sec 1.4: Added references to S/MIME MSG 3.1 RFCs. Section 1.4: Added references to S/MIME MSG 3.1 RFCs.
Sec 2.1 (digest algorithm): SHA-256 added as MUST, SHA-1 and MD5 made Section 2.1 (digest algorithm): SHA-256 added as MUST, SHA-1 and MD5
SHOULD-. made SHOULD-.
Sec 2.2 (signature algorithms): RSA with SHA-256 added as MUST, and Section 2.2 (signature algorithms): RSA with SHA-256 added as MUST,
DSA with SHA-256 added as SHOULD+, RSA with SHA-1, DSA with SHA-1, and DSA with SHA-256 added as SHOULD+, RSA with SHA-1, DSA with
and RSA with MD5 changed to SHOULD-, and RSASSA-PSS with SHA-256 SHA-1, and RSA with MD5 changed to SHOULD-, and RSASSA-PSS with
added as SHOULD+. Also added note about what S/MIME v3.1 clients SHA-256 added as SHOULD+. Also added note about what S/MIME v3.1
support. clients support.
Sec 2.3 (key encryption): DH changed to SHOULD- and RSAES-OAEP added Section 2.3 (key encryption): DH changed to SHOULD-, and RSAES-OAEP
as SHOULD+. Elaborated requirements for key wrap algorithm. added as SHOULD+. Elaborated requirements for key wrap algorithm.
Sec 2.5.1: Added requirement that receiving agents MUST support both Section 2.5.1: Added requirement that receiving agents MUST support
GeneralizedTime and UTCTime. both GeneralizedTime and UTCTime.
Sec 2.5.2: Replaced reference "sha1WithRSAEncryption" with Section 2.5.2: Replaced reference "sha1WithRSAEncryption" with
"sha256WithRSAEncryption", "DES-3EDE-CBC" with "AES-128 CBC", and "sha256WithRSAEncryption", "DES-3EDE-CBC" with "AES-128 CBC", and
deleted the RC5 example. deleted the RC5 example.
Sec 2.5.2.1: Deleted entire section (discussed deprecated RC2). Section 2.5.2.1: Deleted entire section (discussed deprecated RC2).
Sec 2.7, 2.7.1, Appendix A: references to RC2/40 removed. Section 2.7, 2.7.1, Appendix A: references to RC2/40 removed.
Sec 2.7 (content encryption): AES-128 CBC added as MUST, AES-192 and Section 2.7 (content encryption): AES-128 CBC added as MUST, AES-192
AES-256 CBC SHOULD+, tripleDES now SHOULD-. and AES-256 CBC SHOULD+, tripleDES now SHOULD-.
Sec 2.7.1: Updated pointers from 2.7.2.1 through 2.7.2.4 to 2.7.1.1 Section 2.7.1: Updated pointers from 2.7.2.1 through 2.7.2.4 to
to 2.7.1.2. 2.7.1.1 to 2.7.1.2.
Sec 3.1.1: Removed text about MIME character sets. Section 3.1.1: Removed text about MIME character sets.
Sec 3.2.2 and 3.6: Replaced "encrypted" with "enveloped". Update OID Section 3.2.2 and 3.6: Replaced "encrypted" with "enveloped". Update
example to use AES-128 CBC oid. OID example to use AES-128 CBC oid.
Sec 3.4.3.2: Replace micalg parameter for SHA-1 with sha-1. Section 3.4.3.2: Replace micalg parameter for SHA-1 with sha-1.
Sec 4: Updated reference to CERT v3.2. Section 4: Updated reference to CERT v3.2.
Sec 4.1: Updated RSA and DSA key size discussion. Moved last four Section 4.1: Updated RSA and DSA key size discussion. Moved last
sentences to security considerations. Updated reference to randomness four sentences to security considerations. Updated reference to
requirements for security. randomness requirements for security.
Sec 5: Added IANA registration templates to update media type Section 5: Added IANA registration templates to update media type
registry to point to this document as opposed to RFC 2311. registry to point to this document as opposed to RFC 2311.
Sec 6: Updated Security Considerations. Section 6: Updated security considerations.
Sec 7: Moved references from Appendix B to this section. Updated Section 7: Moved references from Appendix B to this section. Updated
references. Added informational references to SMIMEv2, SMIMEv3, and references. Added informational references to SMIMEv2, SMIMEv3, and
SMIMEv3.1. SMIMEv3.1.
App B: Added Appendix B to move S/MIME v2 to historic status. Appendix B: Added Appendix B to move S/MIME v2 to Historic status.
2. CMS Options 2. CMS Options
CMS allows for a wide variety of options in content, attributes, and CMS allows for a wide variety of options in content, attributes, and
algorithm support. This section puts forth a number of support algorithm support. This section puts forth a number of support
requirements and recommendations in order to achieve a base level of requirements and recommendations in order to achieve a base level of
interoperability among all S/MIME implementations. [CMSALG] and [CMS- interoperability among all S/MIME implementations. [CMSALG] and
SHA2] provides additional details regarding the use of the [CMS-SHA2] provides additional details regarding the use of the
cryptographic algorithms. [ESS] provides additional details cryptographic algorithms. [ESS] provides additional details
regarding the use of additional attributes. regarding the use of additional attributes.
2.1. DigestAlgorithmIdentifier 2.1. DigestAlgorithmIdentifier
Sending and receiving agents MUST support SHA-256 [CMS-SHA2] and Sending and receiving agents MUST support SHA-256 [CMS-SHA2] and
SHOULD- support SHA-1 [CMSALG]. Receiving agents SHOULD- support MD5 SHOULD- support SHA-1 [CMSALG]. Receiving agents SHOULD- support MD5
[CMSALG] for the purpose of providing backward compatibility with [CMSALG] for the purpose of providing backward compatibility with
MD5-digested S/MIME v2 SignedData objects. MD5-digested S/MIME v2 SignedData objects.
2.2. SignatureAlgorithmIdentifier 2.2. SignatureAlgorithmIdentifier
Receiving agents: Receiving agents:
- MUST support RSA with SHA-256 - MUST support RSA with SHA-256.
- SHOULD+ support DSA with SHA-256 - SHOULD+ support DSA with SHA-256.
- SHOULD+ support RSASSA-PSS with SHA-256 - SHOULD+ support RSASSA-PSS with SHA-256.
- SHOULD- support RSA with SHA-1 - SHOULD- support RSA with SHA-1.
- SHOULD- support DSA with SHA-1 - SHOULD- support DSA with SHA-1.
- SHOULD- support RSA with MD5. - SHOULD- support RSA with MD5.
Sending agents: Sending agents:
- MUST support RSA with SHA-256 - MUST support RSA with SHA-256.
- SHOULD+ support DSA with SHA-256 - SHOULD+ support DSA with SHA-256.
- SHOULD+ support RSASSA-PSS with SHA-256 - SHOULD+ support RSASSA-PSS with SHA-256.
- SHOULD- support RSA with SHA-1 or DSA with SHA-1 - SHOULD- support RSA with SHA-1 or DSA with SHA-1.
- SHOULD- support RSA with MD5. - SHOULD- support RSA with MD5.
See section 4.1 for information on key size and algorithm references. See Section 4.1 for information on key size and algorithm references.
Note that S/MIME v3.1 clients support verifying id-dsa-with-sha1 and Note that S/MIME v3.1 clients support verifying id-dsa-with-sha1 and
rsaEncryption and might not implement sha256withRSAEncryption. Note rsaEncryption and might not implement sha256withRSAEncryption. Note
that S/MIME v3 clients might only implement signing or signature that S/MIME v3 clients might only implement signing or signature
verification using id-dsa-with-sha1, and might also use id-dsa as an verification using id-dsa-with-sha1, and might also use id-dsa as an
AlgorithmIdentifier in this field. Receiving clients SHOULD AlgorithmIdentifier in this field. Receiving clients SHOULD
recognize id-dsa as equivalent to id-dsa-with-sha1, and sending recognize id-dsa as equivalent to id-dsa-with-sha1, and sending
clients MUST use id-dsa-with-sha1 if using that algorithm. Also note clients MUST use id-dsa-with-sha1 if using that algorithm. Also note
that S/MIME v2 clients are only required to verify digital signatures that S/MIME v2 clients are only required to verify digital signatures
using the rsaEncryption algorithm with SHA-1 or MD5, and might not using the rsaEncryption algorithm with SHA-1 or MD5, and might not
implement id-dsa-with-sha1 or id-dsa at all. implement id-dsa-with-sha1 or id-dsa at all.
2.3. KeyEncryptionAlgorithmIdentifier 2.3. KeyEncryptionAlgorithmIdentifier
Receiving and sending agents: Receiving and sending agents:
- MUST support RSA Encryption, as specified in [CMSALG] - MUST support RSA Encryption, as specified in [CMSALG].
- SHOULD+ support RSAES-OAEP, as specified in [RSAOAEP]
- SHOULD- support DH ephemeral-static mode, as specified - SHOULD+ support RSAES-OAEP, as specified in [RSAOAEP].
in [CMSALG] and [SP800-57].
- SHOULD- support DH ephemeral-static mode, as specified in
[CMSALG] and [SP800-57].
When DH ephemeral-static is used, a key wrap algorithm is also When DH ephemeral-static is used, a key wrap algorithm is also
specified in the KeyEncryptionAlgorithmIdentifier [CMS]. The specified in the KeyEncryptionAlgorithmIdentifier [CMS]. The
underlying encryption functions for the key wrap and content underlying encryption functions for the key wrap and content
encryption algorithm ([CMSALG] and [CMSAES]) and the key sizes for encryption algorithm ([CMSALG] and [CMSAES]) and the key sizes for
the two algorithms MUST be the same (e.g., AES-128 key wrap algorithm the two algorithms MUST be the same (e.g., AES-128 key wrap algorithm
with AES 128 content encryption algorithm). As AES 128 CBC is the with AES-128 content encryption algorithm). As AES-128 CBC is the
mandatory to implement content encryption algorithm, the AES-128 key mandatory-to-implement content encryption algorithm, the AES-128 key
wrap algorithm MUST also be supported when DH ephemeral-static is wrap algorithm MUST also be supported when DH ephemeral-static is
used. used.
Note that S/MIME v3.1 clients might only implement key encryption and Note that S/MIME v3.1 clients might only implement key encryption and
decryption using the rsaEncryption algorithm. Note that S/MIME v3 decryption using the rsaEncryption algorithm. Note that S/MIME v3
clients might only implement key encryption and decryption using the clients might only implement key encryption and decryption using the
Diffie-Hellman algorithm. Also note that S/MIME v2 clients are only Diffie-Hellman algorithm. Also note that S/MIME v2 clients are only
capable of decrypting content-encryption keys using the rsaEncryption capable of decrypting content-encryption keys using the rsaEncryption
algorithm. algorithm.
2.4. General Syntax 2.4. General Syntax
There are several CMS content types. Of these, only the Data, There are several CMS content types. Of these, only the Data,
SignedData, EnvelopedData, and CompressedData content types are SignedData, EnvelopedData, and CompressedData content types are
currently used for S/MIME. currently used for S/MIME.
2.4.1. Data Content Type 2.4.1. Data Content Type
Sending agents MUST use the id-data content type identifier to Sending agents MUST use the id-data content type identifier to
identify the "inner" MIME message content. For example, when identify the "inner" MIME message content. For example, when
applying a digital signature to MIME data, the CMS SignedData applying a digital signature to MIME data, the CMS SignedData
encapContentInfo eContentType MUST include the id-data object encapContentInfo eContentType MUST include the id-data object
identifier and the media type MUST be stored in the SignedData identifier and the media type MUST be stored in the SignedData
encapContentInfo eContent OCTET STRING (unless the sending agent is encapContentInfo eContent OCTET STRING (unless the sending agent is
using multipart/signed, in which case the eContent is absent, per using multipart/signed, in which case the eContent is absent, per
section 3.4.3 of this document). As another example, when applying Section 3.4.3 of this document). As another example, when applying
encryption to MIME data, the CMS EnvelopedData encryptedContentInfo encryption to MIME data, the CMS EnvelopedData encryptedContentInfo
contentType MUST include the id-data object identifier and the contentType MUST include the id-data object identifier and the
encrypted MIME content MUST be stored in the EnvelopedData encrypted MIME content MUST be stored in the EnvelopedData
encryptedContentInfo encryptedContent OCTET STRING. encryptedContentInfo encryptedContent OCTET STRING.
2.4.2. SignedData Content Type 2.4.2. SignedData Content Type
Sending agents MUST use the SignedData content type to apply a Sending agents MUST use the SignedData content type to apply a
digital signature to a message or, in a degenerate case where there digital signature to a message or, in a degenerate case where there
is no signature information, to convey certificates. Applying a is no signature information, to convey certificates. Applying a
signature to a message provides authentication, message integrity, signature to a message provides authentication, message integrity,
and non-repudiation of origin. and non-repudiation of origin.
2.4.3. EnvelopedData Content Type 2.4.3. EnvelopedData Content Type
This content type is used to apply data confidentiality to a message. This content type is used to apply data confidentiality to a message.
A sender needs to have access to a public key for each intended A sender needs to have access to a public key for each intended
message recipient to use this service. message recipient to use this service.
2.4.4. CompressedData Content Type 2.4.4. CompressedData Content Type
This content type is used to apply data compression to a message. This content type is used to apply data compression to a message.
This content type does not provide authentication, message integrity, This content type does not provide authentication, message integrity,
non-repudiation, or data confidentiality, and is only used to reduce non-repudiation, or data confidentiality, and is only used to reduce
the message's size. the message's size.
See section 3.6 for further guidance on the use of this type in See Section 3.6 for further guidance on the use of this type in
conjunction with other CMS types. conjunction with other CMS types.
2.5. Attributes and the SignerInfo Type 2.5. Attributes and the SignerInfo Type
The SignerInfo type allows the inclusion of unsigned and signed The SignerInfo type allows the inclusion of unsigned and signed
attributes along with a signature. attributes along with a signature.
Receiving agents MUST be able to handle zero or one instance of each Receiving agents MUST be able to handle zero or one instance of each
of the signed attributes listed here. Sending agents SHOULD generate of the signed attributes listed here. Sending agents SHOULD generate
one instance of each of the following signed attributes in each one instance of each of the following signed attributes in each
S/MIME message: S/MIME message:
- signingTime (section 2.5.1 in this document) - Signing Time (section (Section 2.5.1 in this document)
- sMIMECapabilities (section 2.5.2 in this document) - SMIME Capabilities (section (Section 2.5.2 in this document)
- sMIMEEncryptionKeyPreference (section 2.5.3 in this document) - Encryption Key Preference (section (Section 2.5.3 in this
document)
- id-messageDigest (section 11.2 in [CMS]) - Message Digest (section (Section 11.2 in [CMS])
- id-contentType (section 11.1 in [CMS]) - Content Type (section (Section 11.1 in [CMS])
Further, receiving agents SHOULD be able to handle zero or one Further, receiving agents SHOULD be able to handle zero or one
instance of the signingCertificate and signingCertificatev2 signed instance of the signingCertificate and signingCertificatev2 signed
attributes, as defined in section 5 of RFC 2634 [ESS] and section 3 attributes, as defined in Section 5 of RFC 2634 [ESS] and Section 3
of RFC 5035 [ESS]. of RFC 5035 [ESS].
Sending agents SHOULD generate one instance of the signingCertificate Sending agents SHOULD generate one instance of the signingCertificate
or signingCertificatev2 signed attribute in each SignerInfo or signingCertificatev2 signed attribute in each SignerInfo
structure. structure.
Additional attributes and values for these attributes might be Additional attributes and values for these attributes might be
defined in the future. Receiving agents SHOULD handle attributes or defined in the future. Receiving agents SHOULD handle attributes or
values that they do not recognize in a graceful manner. values that they do not recognize in a graceful manner.
Interactive sending agents that include signed attributes that are Interactive sending agents that include signed attributes that are
not listed here SHOULD display those attributes to the user, so that not listed here SHOULD display those attributes to the user, so that
the user is aware of all of the data being signed. the user is aware of all of the data being signed.
2.5.1. Signing-Time Attribute 2.5.1. Signing Time Attribute
The signing-time attribute is used to convey the time that a message The signing-time attribute is used to convey the time that a message
was signed. The time of signing will most likely be created by a was signed. The time of signing will most likely be created by a
message originator and therefore is only as trustworthy as the message originator and therefore is only as trustworthy as the
originator. originator.
Sending agents MUST encode signing time through the year 2049 as Sending agents MUST encode signing time through the year 2049 as
UTCTime; signing times in 2050 or later MUST be encoded as UTCTime; signing times in 2050 or later MUST be encoded as
GeneralizedTime. When the UTCTime CHOICE is used, S/MIME agents MUST GeneralizedTime. When the UTCTime CHOICE is used, S/MIME agents MUST
interpret the year field (YY) as follows: interpret the year field (YY) as follows:
If YY is greater than or equal to 50, the year is interpreted as If YY is greater than or equal to 50, the year is interpreted as
19YY; if YY is less than 50, the year is interpreted as 20YY. 19YY; if YY is less than 50, the year is interpreted as 20YY.
Receiving agents MUST be able to process signing-time attributes that Receiving agents MUST be able to process signing-time attributes that
are encoded in either UTCTime or GeneralizedTime. are encoded in either UTCTime or GeneralizedTime.
2.5.2. SMIMECapabilities Attribute 2.5.2. SMIME Capabilities Attribute
The SMIMECapabilities attribute includes signature algorithms (such The SMIMECapabilities attribute includes signature algorithms (such
as "sha256WithRSAEncryption"), symmetric algorithms (such as "AES-128 as "sha256WithRSAEncryption"), symmetric algorithms (such as "AES-128
CBC"), and key encipherment algorithms (such as "rsaEncryption"). CBC"), and key encipherment algorithms (such as "rsaEncryption").
There are also several identifiers which indicate support for other There are also several identifiers that indicate support for other
optional features such as binary encoding and compression. The optional features such as binary encoding and compression. The
SMIMECapabilities were designed to be flexible and extensible so SMIMECapabilities were designed to be flexible and extensible so
that, in the future, a means of identifying other capabilities and that, in the future, a means of identifying other capabilities and
preferences such as certificates can be added in a way that will not preferences such as certificates can be added in a way that will not
cause current clients to break. cause current clients to break.
If present, the SMIMECapabilities attribute MUST be a If present, the SMIMECapabilities attribute MUST be a
SignedAttribute; it MUST NOT be an UnsignedAttribute. CMS defines SignedAttribute; it MUST NOT be an UnsignedAttribute. CMS defines
SignedAttributes as a SET OF Attribute. The SignedAttributes in a SignedAttributes as a SET OF Attribute. The SignedAttributes in a
signerInfo MUST NOT include multiple instances of the signerInfo MUST NOT include multiple instances of the
skipping to change at page 13, line 17 skipping to change at page 13, line 46
AttributeValue present in the attrValues SET OF AttributeValue. AttributeValue present in the attrValues SET OF AttributeValue.
The semantics of the SMIMECapabilities attribute specify a partial The semantics of the SMIMECapabilities attribute specify a partial
list as to what the client announcing the SMIMECapabilities can list as to what the client announcing the SMIMECapabilities can
support. A client does not have to list every capability it support. A client does not have to list every capability it
supports, and need not list all its capabilities so that the supports, and need not list all its capabilities so that the
capabilities list doesn't get too long. In an SMIMECapabilities capabilities list doesn't get too long. In an SMIMECapabilities
attribute, the object identifiers (OIDs) are listed in order of their attribute, the object identifiers (OIDs) are listed in order of their
preference, but SHOULD be separated logically along the lines of preference, but SHOULD be separated logically along the lines of
their categories (signature algorithms, symmetric algorithms, key their categories (signature algorithms, symmetric algorithms, key
encipherment algorithms, etc.) encipherment algorithms, etc.).
The structure of the SMIMECapabilities attribute is to facilitate The structure of the SMIMECapabilities attribute is to facilitate
simple table lookups and binary comparisons in order to determine simple table lookups and binary comparisons in order to determine
matches. For instance, the DER-encoding for the SMIMECapability for matches. For instance, the DER-encoding for the SMIMECapability for
AES-128 CBC MUST be identically encoded regardless of the AES-128 CBC MUST be identically encoded regardless of the
implementation. Because of the requirement for identical encoding, implementation. Because of the requirement for identical encoding,
individuals documenting algorithms to be used in the individuals documenting algorithms to be used in the
SMIMECapabilities attribute SHOULD explicitly document the correct SMIMECapabilities attribute SHOULD explicitly document the correct
byte sequence for the common cases. byte sequence for the common cases.
skipping to change at page 13, line 46 skipping to change at page 14, line 26
signature algorithm or a key encipherment algorithm. In the event signature algorithm or a key encipherment algorithm. In the event
that an OID is ambiguous, it needs to be arbitrated by the maintainer that an OID is ambiguous, it needs to be arbitrated by the maintainer
of the registered SMIMECapabilities list as to which type of of the registered SMIMECapabilities list as to which type of
algorithm will use the OID, and a new OID MUST be allocated under the algorithm will use the OID, and a new OID MUST be allocated under the
smimeCapabilities OID to satisfy the other use of the OID. smimeCapabilities OID to satisfy the other use of the OID.
The registered SMIMECapabilities list specifies the parameters for The registered SMIMECapabilities list specifies the parameters for
OIDs that need them, most notably key lengths in the case of OIDs that need them, most notably key lengths in the case of
variable-length symmetric ciphers. In the event that there are no variable-length symmetric ciphers. In the event that there are no
differentiating parameters for a particular OID, the parameters MUST differentiating parameters for a particular OID, the parameters MUST
be omitted, and MUST NOT be encoded as NULL. Additional values for be omitted, and MUST NOT be encoded as NULL. Additional values for
the SMIMECapabilities attribute might be defined in the future. the SMIMECapabilities attribute might be defined in the future.
Receiving agents MUST handle a SMIMECapabilities object that has Receiving agents MUST handle a SMIMECapabilities object that has
values that it does not recognize in a graceful manner. values that it does not recognize in a graceful manner.
Section 2.7.1 explains a strategy for caching capabilities. Section 2.7.1 explains a strategy for caching capabilities.
2.5.3. Encryption Key Preference Attribute 2.5.3. Encryption Key Preference Attribute
The encryption key preference attribute allows the signer to The encryption key preference attribute allows the signer to
unambiguously describe which of the signer's certificates has the unambiguously describe which of the signer's certificates has the
signer's preferred encryption key. This attribute is designed to signer's preferred encryption key. This attribute is designed to
enhance behavior for interoperating with those clients that use enhance behavior for interoperating with those clients that use
separate keys for encryption and signing. This attribute is used to separate keys for encryption and signing. This attribute is used to
convey to anyone viewing the attribute which of the listed convey to anyone viewing the attribute which of the listed
certificates is appropriate for encrypting a session key for future certificates is appropriate for encrypting a session key for future
encrypted messages. encrypted messages.
skipping to change at page 14, line 39 skipping to change at page 15, line 18
The sending agent SHOULD include the referenced certificate in the The sending agent SHOULD include the referenced certificate in the
set of certificates included in the signed message if this attribute set of certificates included in the signed message if this attribute
is used. The certificate MAY be omitted if it has been previously is used. The certificate MAY be omitted if it has been previously
made available to the receiving agent. Sending agents SHOULD use made available to the receiving agent. Sending agents SHOULD use
this attribute if the commonly used or preferred encryption this attribute if the commonly used or preferred encryption
certificate is not the same as the certificate used to sign the certificate is not the same as the certificate used to sign the
message. message.
Receiving agents SHOULD store the preference data if the signature on Receiving agents SHOULD store the preference data if the signature on
the message is valid and the signing time is greater than the the message is valid and the signing time is greater than the
currently stored value. (As with the SMIMECapabilities, the clock currently stored value. (As with the SMIMECapabilities, the clock
skew SHOULD be checked and the data not used if the skew is too skew SHOULD be checked and the data not used if the skew is too
great.) Receiving agents SHOULD respect the sender's encryption key great.) Receiving agents SHOULD respect the sender's encryption key
preference attribute if possible. This, however, represents only a preference attribute if possible. This, however, represents only a
preference and the receiving agent can use any certificate in preference and the receiving agent can use any certificate in
replying to the sender that is valid. replying to the sender that is valid.
Section 2.7.1 explains a strategy for caching preference data. Section 2.7.1 explains a strategy for caching preference data.
2.5.3.1. Selection of Recipient Key Management Certificate 2.5.3.1. Selection of Recipient Key Management Certificate
In order to determine the key management certificate to be used when In order to determine the key management certificate to be used when
sending a future CMS EnvelopedData message for a particular sending a future CMS EnvelopedData message for a particular
recipient, the following steps SHOULD be followed: recipient, the following steps SHOULD be followed:
- If an SMIMEEncryptionKeyPreference attribute is found in a - If an SMIMEEncryptionKeyPreference attribute is found in a
SignedData object received from the desired recipient, this SignedData object received from the desired recipient, this
identifies the X.509 certificate that SHOULD be used as the X.509 identifies the X.509 certificate that SHOULD be used as the X.509
key management certificate for the recipient. key management certificate for the recipient.
- If an SMIMEEncryptionKeyPreference attribute is not found in a - If an SMIMEEncryptionKeyPreference attribute is not found in a
SignedData object received from the desired recipient, the set of SignedData object received from the desired recipient, the set of
X.509 certificates SHOULD be searched for a X.509 certificate X.509 certificates SHOULD be searched for a X.509 certificate with
with the same subject name as the signer of a X.509 certificate the same subject name as the signer of a X.509 certificate that can
which can be used for key management. be used for key management.
- Or use some other method of determining the user's key management - Or use some other method of determining the user's key management
key. If a X.509 key management certificate is not found, then key. If a X.509 key management certificate is not found, then
encryption cannot be done with the signer of the message. If encryption cannot be done with the signer of the message. If
multiple X.509 key management certificates are found, the S/MIME multiple X.509 key management certificates are found, the S/MIME
agent can make an arbitrary choice between them. agent can make an arbitrary choice between them.
2.6. SignerIdentifier SignerInfo Type 2.6. SignerIdentifier SignerInfo Type
S/MIME v3.2 implementations MUST support both issuerAndSerialNumber S/MIME v3.2 implementations MUST support both issuerAndSerialNumber
as well as subjectKeyIdentifier. Messages that use the and subjectKeyIdentifier. Messages that use the subjectKeyIdentifier
subjectKeyIdentifier choice cannot be read by S/MIME v2 clients. choice cannot be read by S/MIME v2 clients.
It is important to understand that some certificates use a value for It is important to understand that some certificates use a value for
subjectKeyIdentifier that is not suitable for uniquely identifying a subjectKeyIdentifier that is not suitable for uniquely identifying a
certificate. Implementations MUST be prepared for multiple certificate. Implementations MUST be prepared for multiple
certificates for potentially different entities to have the same certificates for potentially different entities to have the same
value for subjectKeyIdentifier, and MUST be prepared to try each value for subjectKeyIdentifier, and MUST be prepared to try each
matching certificate during signature verification before indicating matching certificate during signature verification before indicating
an error condition. an error condition.
2.7. ContentEncryptionAlgorithmIdentifier 2.7. ContentEncryptionAlgorithmIdentifier
Sending and receiving agents: Sending and receiving agents:
- MUST support encryption and decryption with AES-128 CBC [CMSAES] - MUST support encryption and decryption with AES-128 CBC
[CMSAES].
- SHOULD+ support encryption and decryption with AES-192 CBC and - SHOULD+ support encryption and decryption with AES-192 CBC and
AES-256 CBC [CMSAES] AES-256 CBC [CMSAES].
- SHOULD- support encryption and decryption with DES EDE3 CBC, - SHOULD- support encryption and decryption with DES EDE3 CBC,
hereinafter called "tripleDES" [CMSALG]. hereinafter called "tripleDES" [CMSALG].
2.7.1. Deciding Which Encryption Method To Use 2.7.1. Deciding Which Encryption Method to Use
When a sending agent creates an encrypted message, it has to decide When a sending agent creates an encrypted message, it has to decide
which type of encryption to use. The decision process involves using which type of encryption to use. The decision process involves using
information garnered from the capabilities lists included in messages information garnered from the capabilities lists included in messages
received from the recipient, as well as out-of-band information such received from the recipient, as well as out-of-band information such
as private agreements, user preferences, legal restrictions, and so as private agreements, user preferences, legal restrictions, and so
on. on.
Section 2.5.2 defines a method by which a sending agent can Section 2.5.2 defines a method by which a sending agent can
optionally announce, among other things, its decrypting capabilities optionally announce, among other things, its decrypting capabilities
in its order of preference. The following method for processing and in its order of preference. The following method for processing and
remembering the encryption capabilities attribute in incoming signed remembering the encryption capabilities attribute in incoming signed
messages SHOULD be used. messages SHOULD be used.
- If the receiving agent has not yet created a list of capabilities - If the receiving agent has not yet created a list of
for the sender's public key, then, after verifying the signature capabilities for the sender's public key, then, after verifying
on the incoming message and checking the timestamp, the receiving the signature on the incoming message and checking the
agent SHOULD create a new list containing at least the signing timestamp, the receiving agent SHOULD create a new list
time and the symmetric capabilities. containing at least the signing time and the symmetric
capabilities.
- If such a list already exists, the receiving agent SHOULD verify - If such a list already exists, the receiving agent SHOULD verify
that the signing time in the incoming message is greater than the that the signing time in the incoming message is greater than
signing time stored in the list and that the signature is valid. the signing time stored in the list and that the signature is
If so, the receiving agent SHOULD update both the signing time valid. If so, the receiving agent SHOULD update both the
and capabilities in the list. Values of the signing time that signing time and capabilities in the list. Values of the
lie far in the future (that is, a greater discrepancy than any signing time that lie far in the future (that is, a greater
reasonable clock skew), or a capabilities list in messages whose discrepancy than any reasonable clock skew), or a capabilities
signature could not be verified, MUST NOT be accepted. list in messages whose signature could not be verified, MUST NOT
be accepted.
The list of capabilities SHOULD be stored for future use in creating The list of capabilities SHOULD be stored for future use in creating
messages. messages.
Before sending a message, the sending agent MUST decide whether it is Before sending a message, the sending agent MUST decide whether it is
willing to use weak encryption for the particular data in the willing to use weak encryption for the particular data in the
message. If the sending agent decides that weak encryption is message. If the sending agent decides that weak encryption is
unacceptable for this data, then the sending agent MUST NOT use a unacceptable for this data, then the sending agent MUST NOT use a
weak algorithm. The decision to use or not use weak encryption weak algorithm. The decision to use or not use weak encryption
overrides any other decision in this section about which encryption overrides any other decision in this section about which encryption
algorithm to use. algorithm to use.
Sections 2.7.1.1 through 2.7.1.2 describe the decisions a sending Sections 2.7.1.1 through 2.7.1.2 describe the decisions a sending
agent SHOULD use in deciding which type of encryption will be applied agent SHOULD use in deciding which type of encryption will be applied
to a message. These rules are ordered, so the sending agent SHOULD to a message. These rules are ordered, so the sending agent SHOULD
make its decision in the order given. make its decision in the order given.
2.7.1.1. Rule 1: Known Capabilities 2.7.1.1. Rule 1: Known Capabilities
If the sending agent has received a set of capabilities from the If the sending agent has received a set of capabilities from the
recipient for the message the agent is about to encrypt, then the recipient for the message the agent is about to encrypt, then the
sending agent SHOULD use that information by selecting the first sending agent SHOULD use that information by selecting the first
capability in the list (that is, the capability most preferred by the capability in the list (that is, the capability most preferred by the
intended recipient) that the sending agent knows how to encrypt. The intended recipient) that the sending agent knows how to encrypt. The
sending agent SHOULD use one of the capabilities in the list if the sending agent SHOULD use one of the capabilities in the list if the
agent reasonably expects the recipient to be able to decrypt the agent reasonably expects the recipient to be able to decrypt the
message. message.
2.7.1.2. Rule 2: Unknown Capabilities, Unknown Version of S/MIME 2.7.1.2. Rule 2: Unknown Capabilities, Unknown Version of S/MIME
If the following two conditions are met: If the following two conditions are met:
- the sending agent has no knowledge of the encryption capabilities - the sending agent has no knowledge of the encryption
of the recipient, and capabilities of the recipient, and
- the sending agent has no knowledge of the version of S/MIME of the - the sending agent has no knowledge of the version of S/MIME of
recipient, the recipient,
then the sending agent SHOULD use AES-128 because it is a stronger then the sending agent SHOULD use AES-128 because it is a stronger
algorithm and is required by S/MIME v3.2. If the sending agent algorithm and is required by S/MIME v3.2. If the sending agent
chooses not to use AES-128 in this step, it SHOULD use tripleDES. chooses not to use AES-128 in this step, it SHOULD use tripleDES.
2.7.2. Choosing Weak Encryption 2.7.2. Choosing Weak Encryption
All algorithms that use 40 bit keys are considered by many to be weak All algorithms that use 40-bit keys are considered by many to be weak
encryption. A sending agent that is controlled by a human SHOULD encryption. A sending agent that is controlled by a human SHOULD
allow a human sender to determine the risks of sending data using a allow a human sender to determine the risks of sending data using a
weak encryption algorithm before sending the data, and possibly allow weak encryption algorithm before sending the data, and possibly allow
the human to use a stronger encryption method such as tripleDES or the human to use a stronger encryption method such as tripleDES or
AES. AES.
2.7.3. Multiple Recipients 2.7.3. Multiple Recipients
If a sending agent is composing an encrypted message to a group of If a sending agent is composing an encrypted message to a group of
recipients where the encryption capabilities of some of the recipients where the encryption capabilities of some of the
recipients do not overlap, the sending agent is forced to send more recipients do not overlap, the sending agent is forced to send more
than one message. Please note that if the sending agent chooses to than one message. Please note that if the sending agent chooses to
send a message encrypted with a strong algorithm, and then send the send a message encrypted with a strong algorithm, and then send the
same message encrypted with a weak algorithm, someone watching the same message encrypted with a weak algorithm, someone watching the
communications channel could learn the contents of the strongly- communications channel could learn the contents of the strongly
encrypted message simply by decrypting the weakly-encrypted message. encrypted message simply by decrypting the weakly encrypted message.
3. Creating S/MIME Messages 3. Creating S/MIME Messages
This section describes the S/MIME message formats and how they are This section describes the S/MIME message formats and how they are
created. S/MIME messages are a combination of MIME bodies and CMS created. S/MIME messages are a combination of MIME bodies and CMS
content types. Several media types as well as several CMS content content types. Several media types as well as several CMS content
types are used. The data to be secured is always a canonical MIME types are used. The data to be secured is always a canonical MIME
entity. The MIME entity and other data, such as certificates and entity. The MIME entity and other data, such as certificates and
algorithm identifiers, are given to CMS processing facilities which algorithm identifiers, are given to CMS processing facilities that
produce a CMS object. Finally, the CMS object is wrapped in MIME. produce a CMS object. Finally, the CMS object is wrapped in MIME.
The Enhanced Security Services for S/MIME [ESS] document provides The Enhanced Security Services for S/MIME [ESS] document provides
descriptions of how nested, secured S/MIME messages are formatted. descriptions of how nested, secured S/MIME messages are formatted.
ESS provides a description of how a triple-wrapped S/MIME message is ESS provides a description of how a triple-wrapped S/MIME message is
formatted using multipart/signed and application/pkcs7-mime for the formatted using multipart/signed and application/pkcs7-mime for the
signatures. signatures.
S/MIME provides one format for enveloped-only data, several formats S/MIME provides one format for enveloped-only data, several formats
for signed-only data, and several formats for signed and enveloped for signed-only data, and several formats for signed and enveloped
data. Several formats are required to accommodate several data. Several formats are required to accommodate several
environments, in particular for signed messages. The criteria for environments, in particular for signed messages. The criteria for
choosing among these formats are also described. choosing among these formats are also described.
The reader of this section is expected to understand MIME as The reader of this section is expected to understand MIME as
described in [MIME-SPEC] and [MIME-SECURE]. described in [MIME-SPEC] and [MIME-SECURE].
3.1. Preparing the MIME Entity for Signing, Enveloping or Compressing 3.1. Preparing the MIME Entity for Signing, Enveloping, or Compressing
S/MIME is used to secure MIME entities. A MIME entity can be a sub- S/MIME is used to secure MIME entities. A MIME entity can be a sub-
part, sub-parts of a message, or the whole message with all its sub- part, sub-parts of a message, or the whole message with all its sub-
parts. A MIME entity that is the whole message includes only the parts. A MIME entity that is the whole message includes only the
MIME message headers and MIME body, and does not include the RFC-822 MIME message headers and MIME body, and does not include the RFC-822
header. Note that S/MIME can also be used to secure MIME entities header. Note that S/MIME can also be used to secure MIME entities
used in applications other than Internet mail. If protection of the used in applications other than Internet mail. If protection of the
RFC-822 header is required, the use of the message/rfc822 media type RFC-822 header is required, the use of the message/rfc822 media type
is explained later in this section. is explained later in this section.
The MIME entity that is secured and described in this section can be The MIME entity that is secured and described in this section can be
thought of as the "inside" MIME entity. That is, it is the thought of as the "inside" MIME entity. That is, it is the
"innermost" object in what is possibly a larger MIME message. "innermost" object in what is possibly a larger MIME message.
Processing "outside" MIME entities into CMS content types is Processing "outside" MIME entities into CMS content types is
described in Section 3.2, 3.4, and elsewhere. described in Sections 3.2, 3.4, and elsewhere.
The procedure for preparing a MIME entity is given in [MIME-SPEC]. The procedure for preparing a MIME entity is given in [MIME-SPEC].
The same procedure is used here with some additional restrictions The same procedure is used here with some additional restrictions
when signing. Description of the procedures from [MIME-SPEC] are when signing. The description of the procedures from [MIME-SPEC] is
repeated here, but it is suggested that the reader refer to that repeated here, but it is suggested that the reader refer to that
document for the exact procedure. This section also describes document for the exact procedure. This section also describes
additional requirements. additional requirements.
A single procedure is used for creating MIME entities that are to A single procedure is used for creating MIME entities that are to
have any combination of signing, enveloping, and compressing applied. have any combination of signing, enveloping, and compressing applied.
Some additional steps are recommended to defend against known Some additional steps are recommended to defend against known
corruptions that can occur during mail transport that are of corruptions that can occur during mail transport that are of
particular importance for clear-signing using the multipart/signed particular importance for clear-signing using the multipart/signed
format. It is recommended that these additional steps be performed format. It is recommended that these additional steps be performed
on enveloped messages, or signed and enveloped messages, so that the on enveloped messages, or signed and enveloped messages, so that the
message can be forwarded to any environment without modification. message can be forwarded to any environment without modification.
These steps are descriptive rather than prescriptive. The These steps are descriptive rather than prescriptive. The
implementer is free to use any procedure as long as the result is the implementer is free to use any procedure as long as the result is the
same. same.
Step 1. The MIME entity is prepared according to the local Step 1. The MIME entity is prepared according to the local
conventions. conventions.
Step 2. The leaf parts of the MIME entity are converted to Step 2. The leaf parts of the MIME entity are converted to canonical
canonical form. form.
Step 3. Appropriate transfer encoding is applied to the leaves Step 3. Appropriate transfer encoding is applied to the leaves of
of the MIME entity. the MIME entity.
When an S/MIME message is received, the security services on the When an S/MIME message is received, the security services on the
message are processed, and the result is the MIME entity. That MIME message are processed, and the result is the MIME entity. That MIME
entity is typically passed to a MIME-capable user agent where it is entity is typically passed to a MIME-capable user agent where it is
further decoded and presented to the user or receiving application. further decoded and presented to the user or receiving application.
In order to protect outer, non-content related message header fields In order to protect outer, non-content-related message header fields
(for instance, the "Subject", "To", "From" and "Cc" fields), the (for instance, the "Subject", "To", "From", and "Cc" fields), the
sending client MAY wrap a full MIME message in a message/rfc822 sending client MAY wrap a full MIME message in a message/rfc822
wrapper in order to apply S/MIME security services to these header wrapper in order to apply S/MIME security services to these header
fields. It is up to the receiving client to decide how to present fields. It is up to the receiving client to decide how to present
this "inner" header along with the unprotected "outer" header. this "inner" header along with the unprotected "outer" header.
When an S/MIME message is received, if the top-level protected MIME When an S/MIME message is received, if the top-level protected MIME
entity has a Content-Type of message/rfc822, it can be assumed that entity has a Content-Type of message/rfc822, it can be assumed that
the intent was to provide header protection. This entity SHOULD be the intent was to provide header protection. This entity SHOULD be
presented as the top-level message, taking into account header presented as the top-level message, taking into account header
merging issues as previously discussed. merging issues as previously discussed.
3.1.1. Canonicalization 3.1.1. Canonicalization
Each MIME entity MUST be converted to a canonical form that is Each MIME entity MUST be converted to a canonical form that is
uniquely and unambiguously representable in the environment where the uniquely and unambiguously representable in the environment where the
signature is created and the environment where the signature will be signature is created and the environment where the signature will be
verified. MIME entities MUST be canonicalized for enveloping and verified. MIME entities MUST be canonicalized for enveloping and
compressing as well as signing. compressing as well as signing.
The exact details of canonicalization depend on the actual media type The exact details of canonicalization depend on the actual media type
and subtype of an entity, and are not described here. Instead, the and subtype of an entity, and are not described here. Instead, the
standard for the particular media type SHOULD be consulted. For standard for the particular media type SHOULD be consulted. For
example, canonicalization of type text/plain is different from example, canonicalization of type text/plain is different from
canonicalization of audio/basic. Other than text types, most types canonicalization of audio/basic. Other than text types, most types
have only one representation regardless of computing platform or have only one representation regardless of computing platform or
environment which can be considered their canonical representation. environment that can be considered their canonical representation.
In general, canonicalization will be performed by the non-security In general, canonicalization will be performed by the non-security
part of the sending agent rather than the S/MIME implementation. part of the sending agent rather than the S/MIME implementation.
The most common and important canonicalization is for text, which is The most common and important canonicalization is for text, which is
often represented differently in different environments. MIME often represented differently in different environments. MIME
entities of major type "text" MUST have both their line endings and entities of major type "text" MUST have both their line endings and
character set canonicalized. The line ending MUST be the pair of character set canonicalized. The line ending MUST be the pair of
characters <CR><LF>, and the charset SHOULD be a registered charset characters <CR><LF>, and the charset SHOULD be a registered charset
[CHARSETS]. The details of the canonicalization are specified in [CHARSETS]. The details of the canonicalization are specified in
[MIME-SPEC]. [MIME-SPEC].
Note that some charsets such as ISO-2022 have multiple Note that some charsets such as ISO-2022 have multiple
representations for the same characters. When preparing such text representations for the same characters. When preparing such text
for signing, the canonical representation specified for the charset for signing, the canonical representation specified for the charset
MUST be used. MUST be used.
3.1.2. Transfer Encoding 3.1.2. Transfer Encoding
When generating any of the secured MIME entities below, except the When generating any of the secured MIME entities below, except the
signing using the multipart/signed format, no transfer encoding is signing using the multipart/signed format, no transfer encoding is
required at all. S/MIME implementations MUST be able to deal with required at all. S/MIME implementations MUST be able to deal with
binary MIME objects. If no Content-Transfer-Encoding header field is binary MIME objects. If no Content-Transfer-Encoding header field is
present, the transfer encoding is presumed to be 7BIT. present, the transfer encoding is presumed to be 7BIT.
S/MIME implementations SHOULD however use transfer encoding described S/MIME implementations SHOULD however use transfer encoding described
in section 3.1.3 for all MIME entities they secure. The reason for in Section 3.1.3 for all MIME entities they secure. The reason for
securing only 7-bit MIME entities, even for enveloped data that are securing only 7-bit MIME entities, even for enveloped data that are
not exposed to the transport, is that it allows the MIME entity to be not exposed to the transport, is that it allows the MIME entity to be
handled in any environment without changing it. For example, a handled in any environment without changing it. For example, a
trusted gateway might remove the envelope, but not the signature, of trusted gateway might remove the envelope, but not the signature, of
a message, and then forward the signed message on to the end a message, and then forward the signed message on to the end
recipient so that they can verify the signatures directly. If the recipient so that they can verify the signatures directly. If the
transport internal to the site is not 8-bit clean, such as on a wide- transport internal to the site is not 8-bit clean, such as on a wide-
area network with a single mail gateway, verifying the signature will area network with a single mail gateway, verifying the signature will
not be possible unless the original MIME entity was only 7-bit data. not be possible unless the original MIME entity was only 7-bit data.
S/MIME implementations which "know" that all intended recipient(s) S/MIME implementations that "know" that all intended recipients are
are capable of handling inner (all but the outermost) binary MIME capable of handling inner (all but the outermost) binary MIME objects
objects SHOULD use binary encoding as opposed to a 7-bit-safe SHOULD use binary encoding as opposed to a 7-bit-safe transfer
transfer encoding for the inner entities. The use of a 7-bit-safe encoding for the inner entities. The use of a 7-bit-safe encoding
encoding (such as base64) would unnecessarily expand the message (such as base64) would unnecessarily expand the message size.
size. Implementations MAY "know" that recipient implementations are Implementations MAY "know" that recipient implementations are capable
capable of handling inner binary MIME entities either by interpreting of handling inner binary MIME entities either by interpreting the id-
the id-cap-preferBinaryInside sMIMECapabilities attribute, by prior cap-preferBinaryInside SMIMECapabilities attribute, by prior
agreement, or by other means. agreement, or by other means.
If one or more intended recipients are unable to handle inner binary If one or more intended recipients are unable to handle inner binary
MIME objects, or if this capability is unknown for any of the MIME objects, or if this capability is unknown for any of the
intended recipients, S/MIME implementations SHOULD use transfer intended recipients, S/MIME implementations SHOULD use transfer
encoding described in section 3.1.3 for all MIME entities they encoding described in Section 3.1.3 for all MIME entities they
secure. secure.
3.1.3. Transfer Encoding for Signing Using multipart/signed 3.1.3. Transfer Encoding for Signing Using multipart/signed
If a multipart/signed entity is ever to be transmitted over the If a multipart/signed entity is ever to be transmitted over the
standard Internet SMTP infrastructure or other transport that is standard Internet SMTP infrastructure or other transport that is
constrained to 7-bit text, it MUST have transfer encoding applied so constrained to 7-bit text, it MUST have transfer encoding applied so
that it is represented as 7-bit text. MIME entities that are 7-bit that it is represented as 7-bit text. MIME entities that are 7-bit
data already need no transfer encoding. Entities such as 8-bit text data already need no transfer encoding. Entities such as 8-bit text
and binary data can be encoded with quoted-printable or base-64 and binary data can be encoded with quoted-printable or base-64
transfer encoding. transfer encoding.
The primary reason for the 7-bit requirement is that the Internet The primary reason for the 7-bit requirement is that the Internet
mail transport infrastructure cannot guarantee transport of 8-bit or mail transport infrastructure cannot guarantee transport of 8-bit or
binary data. Even though many segments of the transport binary data. Even though many segments of the transport
infrastructure now handle 8-bit and even binary data, it is sometimes infrastructure now handle 8-bit and even binary data, it is sometimes
not possible to know whether the transport path is 8-bit clean. If a not possible to know whether the transport path is 8-bit clean. If a
mail message with 8-bit data were to encounter a message transfer mail message with 8-bit data were to encounter a message transfer
agent that can not transmit 8-bit or binary data, the agent has three agent that cannot transmit 8-bit or binary data, the agent has three
options, none of which are acceptable for a clear-signed message: options, none of which are acceptable for a clear-signed message:
- The agent could change the transfer encoding; this would - The agent could change the transfer encoding; this would
invalidate the signature. invalidate the signature.
- The agent could transmit the data anyway, which would most likely - The agent could transmit the data anyway, which would most likely
result in the 8th bit being corrupted; this too would invalidate result in the 8th bit being corrupted; this too would invalidate
the signature. the signature.
- The agent could return the message to the sender. - The agent could return the message to the sender.
[MIME-SECURE] prohibits an agent from changing the transfer encoding [MIME-SECURE] prohibits an agent from changing the transfer encoding
of the first part of a multipart/signed message. If a compliant of the first part of a multipart/signed message. If a compliant
agent that can not transmit 8-bit or binary data encounters a agent that cannot transmit 8-bit or binary data encounters a
multipart/signed message with 8-bit or binary data in the first part, multipart/signed message with 8-bit or binary data in the first part,
it would have to return the message to the sender as undeliverable. it would have to return the message to the sender as undeliverable.
3.1.4. Sample Canonical MIME Entity 3.1.4. Sample Canonical MIME Entity
This example shows a multipart/mixed message with full transfer This example shows a multipart/mixed message with full transfer
encoding. This message contains a text part and an attachment. The encoding. This message contains a text part and an attachment. The
sample message text includes characters that are not US-ASCII and sample message text includes characters that are not US-ASCII and
thus need to be transfer encoded. Though not shown here, the end of thus need to be transfer encoded. Though not shown here, the end of
each line is <CR><LF>. The line ending of the MIME headers, the each line is <CR><LF>. The line ending of the MIME headers, the
text, and transfer encoded parts, all MUST be <CR><LF>. text, and the transfer encoded parts, all MUST be <CR><LF>.
Note that this example is not of an S/MIME message. Note that this example is not of an S/MIME message.
Content-Type: multipart/mixed; boundary=bar Content-Type: multipart/mixed; boundary=bar
--bar --bar
Content-Type: text/plain; charset=iso-8859-1 Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable Content-Transfer-Encoding: quoted-printable
=A1Hola Michael! =A1Hola Michael!
skipping to change at page 22, line 46 skipping to change at page 23, line 21
Content-Type: image/jpeg Content-Type: image/jpeg
Content-Transfer-Encoding: base64 Content-Transfer-Encoding: base64
iQCVAwUBMJrRF2N9oWBghPDJAQE9UQQAtl7LuRVndBjrk4EqYBIb3h5QXIX/LC// iQCVAwUBMJrRF2N9oWBghPDJAQE9UQQAtl7LuRVndBjrk4EqYBIb3h5QXIX/LC//
jJV5bNvkZIGPIcEmI5iFd9boEgvpirHtIREEqLQRkYNoBActFBZmh9GC3C041WGq jJV5bNvkZIGPIcEmI5iFd9boEgvpirHtIREEqLQRkYNoBActFBZmh9GC3C041WGq
uMbrbxc+nIs1TIKlA08rVi9ig/2Yh7LFrK5Ein57U/W72vgSxLhe/zhdfolT9Brn uMbrbxc+nIs1TIKlA08rVi9ig/2Yh7LFrK5Ein57U/W72vgSxLhe/zhdfolT9Brn
HOxEa44b+EI= HOxEa44b+EI=
--bar-- --bar--
3.2. The application/pkcs7-mime Media Type 3.2. The application/pkcs7-mime Media Type
The application/pkcs7-mime media type is used to carry CMS content The application/pkcs7-mime media type is used to carry CMS content
types including EnvelopedData, SignedData, and CompressedData. The types including EnvelopedData, SignedData, and CompressedData. The
details of constructing these entities are described in subsequent details of constructing these entities are described in subsequent
sections. This section describes the general characteristics of the sections. This section describes the general characteristics of the
application/pkcs7-mime media type. application/pkcs7-mime media type.
The carried CMS object always contains a MIME entity that is prepared The carried CMS object always contains a MIME entity that is prepared
as described in section 3.1 if the eContentType is id-data. Other as described in Section 3.1 if the eContentType is id-data. Other
contents MAY be carried when the eContentType contains different contents MAY be carried when the eContentType contains different
values. See [ESS] for an example of this with signed receipts. values. See [ESS] for an example of this with signed receipts.
Since CMS content types are binary data, in most cases base-64 Since CMS content types are binary data, in most cases base-64
transfer encoding is appropriate, in particular, when used with SMTP transfer encoding is appropriate, in particular, when used with SMTP
transport. The transfer encoding used depends on the transport transport. The transfer encoding used depends on the transport
through which the object is to be sent, and is not a characteristic through which the object is to be sent, and is not a characteristic
of the media type. of the media type.
Note that this discussion refers to the transfer encoding of the CMS Note that this discussion refers to the transfer encoding of the CMS
object or "outside" MIME entity. It is completely distinct from, and object or "outside" MIME entity. It is completely distinct from, and
unrelated to, the transfer encoding of the MIME entity secured by the unrelated to, the transfer encoding of the MIME entity secured by the
CMS object, the "inside" object, which is described in section 3.1. CMS object, the "inside" object, which is described in Section 3.1.
Because there are several types of application/pkcs7-mime objects, a Because there are several types of application/pkcs7-mime objects, a
sending agent SHOULD do as much as possible to help a receiving agent sending agent SHOULD do as much as possible to help a receiving agent
know about the contents of the object without forcing the receiving know about the contents of the object without forcing the receiving
agent to decode the ASN.1 for the object. The Content-Type header agent to decode the ASN.1 for the object. The Content-Type header
field of all application/pkcs7-mime objects SHOULD include the field of all application/pkcs7-mime objects SHOULD include the
optional "smime-type" parameter, as described in the following optional "smime-type" parameter, as described in the following
sections. sections.
3.2.1. The name and filename Parameters 3.2.1. The name and filename Parameters
For the application/pkcs7-mime, sending agents SHOULD emit the For the application/pkcs7-mime, sending agents SHOULD emit the
optional "name" parameter to the Content-Type field for compatibility optional "name" parameter to the Content-Type field for compatibility
with older systems. Sending agents SHOULD also emit the optional with older systems. Sending agents SHOULD also emit the optional
Content-Disposition field [CONTDISP] with the "filename" parameter. Content-Disposition field [CONTDISP] with the "filename" parameter.
If a sending agent emits the above parameters, the value of the If a sending agent emits the above parameters, the value of the
parameters SHOULD be a file name with the appropriate extension: parameters SHOULD be a file name with the appropriate extension:
Media Type File Extension Media Type File Extension
application/pkcs7-mime (SignedData, EnvelopedData) .p7m application/pkcs7-mime (SignedData, EnvelopedData) .p7m
application/pkcs7-mime (degenerate SignedData .p7c application/pkcs7-mime (degenerate SignedData .p7c
certificate management message) certificate management message)
application/pkcs7-mime (CompressedData) .p7z application/pkcs7-mime (CompressedData) .p7z
application/pkcs7-signature (SignedData) .p7s application/pkcs7-signature (SignedData) .p7s
In addition, the file name SHOULD be limited to eight characters In addition, the file name SHOULD be limited to eight characters
followed by a three letter extension. The eight character filename followed by a three-letter extension. The eight-character filename
base can be any distinct name; the use of the filename base "smime" base can be any distinct name; the use of the filename base "smime"
SHOULD be used to indicate that the MIME entity is associated with SHOULD be used to indicate that the MIME entity is associated with
S/MIME. S/MIME.
Including a file name serves two purposes. It facilitates easier use Including a file name serves two purposes. It facilitates easier use
of S/MIME objects as files on disk. It also can convey type of S/MIME objects as files on disk. It also can convey type
information across gateways. When a MIME entity of type information across gateways. When a MIME entity of type
application/pkcs7-mime (for example) arrives at a gateway that has no application/pkcs7-mime (for example) arrives at a gateway that has no
special knowledge of S/MIME, it will default the entity's media type special knowledge of S/MIME, it will default the entity's media type
to application/octet-stream and treat it as a generic attachment, to application/octet-stream and treat it as a generic attachment,
thus losing the type information. However, the suggested filename thus losing the type information. However, the suggested filename
for an attachment is often carried across a gateway. This often for an attachment is often carried across a gateway. This often
allows the receiving systems to determine the appropriate application allows the receiving systems to determine the appropriate application
to hand the attachment off to, in this case, a stand-alone S/MIME to hand the attachment off to, in this case, a stand-alone S/MIME
processing application. Note that this mechanism is provided as a processing application. Note that this mechanism is provided as a
convenience for implementations in certain environments. A proper convenience for implementations in certain environments. A proper
S/MIME implementation MUST use the media types and MUST NOT rely on S/MIME implementation MUST use the media types and MUST NOT rely on
the file extensions. the file extensions.
3.2.2. The smime-type parameter 3.2.2. The smime-type Parameter
The application/pkcs7-mime content type defines the optional "smime- The application/pkcs7-mime content type defines the optional "smime-
type" parameter. The intent of this parameter is to convey details type" parameter. The intent of this parameter is to convey details
about the security applied (signed or enveloped) along with about the security applied (signed or enveloped) along with
information about the contained content. This specification defines information about the contained content. This specification defines
the following smime-types. the following smime-types.
Name CMS type Inner Content Name CMS Type Inner Content
enveloped-data EnvelopedData id-data enveloped-data EnvelopedData id-data
signed-data SignedData id-data signed-data SignedData id-data
certs-only SignedData none certs-only SignedData none
compressed-data CompressedData id-data compressed-data CompressedData id-data
In order for consistency to be obtained with future specifications, In order for consistency to be obtained with future specifications,
the following guidelines SHOULD be followed when assigning a new the following guidelines SHOULD be followed when assigning a new
smime-type parameter. smime-type parameter.
1. If both signing and encryption can be applied to the content, 1. If both signing and encryption can be applied to the content,
then two values for smime-type SHOULD be assigned "signed-*" and then two values for smime-type SHOULD be assigned "signed-*"
"enveloped-*". If one operation can be assigned then this can be and "enveloped-*". If one operation can be assigned, then this
omitted. Thus since "certs-only" can only be signed, "signed-" can be omitted. Thus, since "certs-only" can only be signed,
is omitted. "signed-" is omitted.
2. A common string for a content OID SHOULD be assigned. We use 2. A common string for a content OID SHOULD be assigned. We use
"data" for the id-data content OID when MIME is the inner "data" for the id-data content OID when MIME is the inner
content. content.
3. If no common string is assigned, then the common string of 3. If no common string is assigned, then the common string of
"OID.<oid>" is recommended (for example, "OID.<oid>" is recommended (for example,
"OID.2.16.840.1.101.3.4.1.2" would be AES-128 CBC). "OID.2.16.840.1.101.3.4.1.2" would be AES-128 CBC).
It is explicitly intended that this field be a suitable hint for mail It is explicitly intended that this field be a suitable hint for mail
client applications to indicate whether a message is "signed" or client applications to indicate whether a message is "signed" or
"enveloped" without having to tunnel into the CMS payload. "enveloped" without having to tunnel into the CMS payload.
3.3. Creating an Enveloped-only Message 3.3. Creating an Enveloped-Only Message
This section describes the format for enveloping a MIME entity This section describes the format for enveloping a MIME entity
without signing it. It is important to note that sending enveloped without signing it. It is important to note that sending enveloped
but not signed messages does not provide for data integrity. It is but not signed messages does not provide for data integrity. It is
possible to replace ciphertext in such a way that the processed possible to replace ciphertext in such a way that the processed
message will still be valid, but the meaning can be altered. message will still be valid, but the meaning can be altered.
Step 1. The MIME entity to be enveloped is prepared according to Step 1. The MIME entity to be enveloped is prepared according to
section 3.1. Section 3.1.
Step 2. The MIME entity and other required data is processed Step 2. The MIME entity and other required data is processed into a
into a CMS object of type EnvelopedData. In addition to CMS object of type EnvelopedData. In addition to encrypting
encrypting a copy of the content-encryption key for each a copy of the content-encryption key for each recipient, a
recipient, a copy of the content-encryption key SHOULD be copy of the content-encryption key SHOULD be encrypted for
encrypted for the originator and included in the EnvelopedData the originator and included in the EnvelopedData (see [CMS],
(see [CMS] Section 6). Section 6).
Step 3. The EnvelopedData object is wrapped in a CMS ContentInfo Step 3. The EnvelopedData object is wrapped in a CMS ContentInfo
object. object.
Step 4. The ContentInfo object is inserted into an Step 4. The ContentInfo object is inserted into an
application/pkcs7-mime MIME entity. application/pkcs7-mime MIME entity.
The smime-type parameter for enveloped-only messages is "enveloped- The smime-type parameter for enveloped-only messages is "enveloped-
data". The file extension for this type of message is ".p7m". data". The file extension for this type of message is ".p7m".
A sample message would be: A sample message would be:
Content-Type: application/pkcs7-mime; smime-type=enveloped-data; Content-Type: application/pkcs7-mime; smime-type=enveloped-data;
name=smime.p7m name=smime.p7m
Content-Transfer-Encoding: base64 Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7m Content-Disposition: attachment; filename=smime.p7m
rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6 rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6
7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H 7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H
f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4
0GhIGfHfQbnj756YT64V 0GhIGfHfQbnj756YT64V
3.4. Creating a Signed-only Message 3.4. Creating a Signed-Only Message
There are two formats for signed messages defined for S/MIME: There are two formats for signed messages defined for S/MIME:
- application/pkcs7-mime with SignedData; and, - application/pkcs7-mime with SignedData.
- multipart/signed. - multipart/signed.
In general, the multipart/signed form is preferred for sending, and In general, the multipart/signed form is preferred for sending, and
receiving agents MUST be able to handle both. receiving agents MUST be able to handle both.
3.4.1. Choosing a Format for Signed-only Messages 3.4.1. Choosing a Format for Signed-Only Messages
There are no hard-and-fast rules when a particular signed-only format There are no hard-and-fast rules as to when a particular signed-only
is chosen because it depends on the capabilities of all the receivers format is chosen. It depends on the capabilities of all the
and the relative importance of receivers with S/MIME facilities being receivers and the relative importance of receivers with S/MIME
able to verify the signature versus the importance of receivers facilities being able to verify the signature versus the importance
without S/MIME software being able to view the message. of receivers without S/MIME software being able to view the message.
Messages signed using the multipart/signed format can always be Messages signed using the multipart/signed format can always be
viewed by the receiver whether they have S/MIME software or not. They viewed by the receiver whether or not they have S/MIME software.
can also be viewed whether they are using a MIME-native user agent or They can also be viewed whether they are using a MIME-native user
they have messages translated by a gateway. In this context, "be agent or they have messages translated by a gateway. In this
viewed" means the ability to process the message essentially as if it context, "be viewed" means the ability to process the message
were not a signed message, including any other MIME structure the essentially as if it were not a signed message, including any other
message might have. MIME structure the message might have.
Messages signed using the SignedData format cannot be viewed by a Messages signed using the SignedData format cannot be viewed by a
recipient unless they have S/MIME facilities. However, the recipient unless they have S/MIME facilities. However, the
SignedData format protects the message content from being changed by SignedData format protects the message content from being changed by
benign intermediate agents. Such agents might do line wrapping or benign intermediate agents. Such agents might do line wrapping or
content-transfer encoding changes which would break the signature. content-transfer encoding changes that would break the signature.
3.4.2. Signing Using application/pkcs7-mime with SignedData 3.4.2. Signing Using application/pkcs7-mime with SignedData
This signing format uses the application/pkcs7-mime media type. The This signing format uses the application/pkcs7-mime media type. The
steps to create this format are: steps to create this format are:
Step 1. The MIME entity is prepared according to section 3.1. Step 1. The MIME entity is prepared according to Section 3.1.
Step 2. The MIME entity and other required data is processed Step 2. The MIME entity and other required data are processed into a
into a CMS object of type SignedData. CMS object of type SignedData.
Step 3. The SignedData object is wrapped in a CMS ContentInfo Step 3. The SignedData object is wrapped in a CMS ContentInfo
object. object.
Step 4. The ContentInfo object is inserted into an Step 4. The ContentInfo object is inserted into an
application/pkcs7-mime MIME entity. application/pkcs7-mime MIME entity.
The smime-type parameter for messages using application/pkcs7-mime The smime-type parameter for messages using application/pkcs7-mime
with SignedData is "signed-data". The file extension for this type with SignedData is "signed-data". The file extension for this type
of message is ".p7m". of message is ".p7m".
A sample message would be: A sample message would be:
Content-Type: application/pkcs7-mime; smime-type=signed-data; Content-Type: application/pkcs7-mime; smime-type=signed-data;
name=smime.p7m name=smime.p7m
Content-Transfer-Encoding: base64 Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7m Content-Disposition: attachment; filename=smime.p7m
567GhIGfHfYT6ghyHhHUujpfyF4f8HHGTrfvhJhjH776tbB9HG4VQbnj7 567GhIGfHfYT6ghyHhHUujpfyF4f8HHGTrfvhJhjH776tbB9HG4VQbnj7
77n8HHGT9HG4VQpfyF467GhIGfHfYT6rfvbnj756tbBghyHhHUujhJhjH 77n8HHGT9HG4VQpfyF467GhIGfHfYT6rfvbnj756tbBghyHhHUujhJhjH
HUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H7n8HHGghyHh HUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H7n8HHGghyHh
6YT64V0GhIGfHfQbnj75 6YT64V0GhIGfHfQbnj75
3.4.3. Signing Using the multipart/signed Format 3.4.3. Signing Using the multipart/signed Format
This format is a clear-signing format. Recipients without any S/MIME This format is a clear-signing format. Recipients without any S/MIME
or CMS processing facilities are able to view the message. It makes or CMS processing facilities are able to view the message. It makes
use of the multipart/signed media type described in [MIME-SECURE]. use of the multipart/signed media type described in [MIME-SECURE].
The multipart/signed media type has two parts. The first part The multipart/signed media type has two parts. The first part
contains the MIME entity that is signed; the second part contains the contains the MIME entity that is signed; the second part contains the
"detached signature" CMS SignedData object in which the "detached signature" CMS SignedData object in which the
encapContentInfo eContent field is absent. encapContentInfo eContent field is absent.
3.4.3.1. The application/pkcs7-signature Media Type 3.4.3.1. The application/pkcs7-signature Media Type
This media type always contains a CMS ContentInfo containing a single This media type always contains a CMS ContentInfo containing a single
CMS object of type SignedData. The SignedData encapContentInfo CMS object of type SignedData. The SignedData encapContentInfo
eContent field MUST be absent. The signerInfos field contains the eContent field MUST be absent. The signerInfos field contains the
signatures for the MIME entity. signatures for the MIME entity.
The file extension for signed-only messages using application/pkcs7- The file extension for signed-only messages using application/pkcs7-
signature is ".p7s". signature is ".p7s".
3.4.3.2. Creating a multipart/signed Message 3.4.3.2. Creating a multipart/signed Message
Step 1. The MIME entity to be signed is prepared according to Step 1. The MIME entity to be signed is prepared according to
section 3.1, taking special care for clear-signing. Section 3.1, taking special care for clear-signing.
Step 2. The MIME entity is presented to CMS processing in order Step 2. The MIME entity is presented to CMS processing in order to
to obtain an object of type SignedData in which the obtain an object of type SignedData in which the
encapContentInfo eContent field is absent. encapContentInfo eContent field is absent.
Step 3. The MIME entity is inserted into the first part of a Step 3. The MIME entity is inserted into the first part of a
multipart/signed message with no processing other than that multipart/signed message with no processing other than that
described in section 3.1. described in Section 3.1.
Step 4. Transfer encoding is applied to the "detached signature" Step 4. Transfer encoding is applied to the "detached signature" CMS
CMS SignedData object and it is inserted into a MIME entity of SignedData object, and it is inserted into a MIME entity of
type application/pkcs7-signature. type application/pkcs7-signature.
Step 5. The MIME entity of the application/pkcs7-signature is Step 5. The MIME entity of the application/pkcs7-signature is
inserted into the second part of the multipart/signed entity. inserted into the second part of the multipart/signed
entity.
The multipart/signed Content-Type has two required parameters: the The multipart/signed Content-Type has two required parameters: the
protocol parameter and the micalg parameter. protocol parameter and the micalg parameter.
The protocol parameter MUST be "application/pkcs7-signature". Note The protocol parameter MUST be "application/pkcs7-signature". Note
that quotation marks are required around the protocol parameter that quotation marks are required around the protocol parameter
because MIME requires that the "/" character in the parameter value because MIME requires that the "/" character in the parameter value
MUST be quoted. MUST be quoted.
The micalg parameter allows for one-pass processing when the The micalg parameter allows for one-pass processing when the
signature is being verified. The value of the micalg parameter is signature is being verified. The value of the micalg parameter is
dependent on the message digest algorithm(s) used in the calculation dependent on the message digest algorithm(s) used in the calculation
of the Message Integrity Check. If multiple message digest of the Message Integrity Check. If multiple message digest
algorithms are used they MUST be separated by commas per [MIME- algorithms are used, they MUST be separated by commas per [MIME-
SECURE]. The values to be placed in the micalg parameter SHOULD be SECURE]. The values to be placed in the micalg parameter SHOULD be
from the following: from the following:
Algorithm Value used Algorithm Value Used
MD5 md5 MD5 md5
SHA-1 sha-1 SHA-1 sha-1
SHA-224 sha-224 SHA-224 sha-224
SHA-256 sha-256 SHA-256 sha-256
SHA-384 sha-384 SHA-384 sha-384
SHA-512 sha-512 SHA-512 sha-512
Any other (defined separately in algorithm profile or "unknown" Any other (defined separately in algorithm profile or "unknown"
if not defined) if not defined)
(Historical note: some early implementations of S/MIME emitted and (Historical note: some early implementations of S/MIME emitted and
expected "rsa-md5", "rsa-sha1", and "sha1" for the micalg parameter.) expected "rsa-md5", "rsa-sha1", and "sha1" for the micalg parameter.)
Receiving agents SHOULD be able to recover gracefully from a micalg Receiving agents SHOULD be able to recover gracefully from a micalg
parameter value that they do not recognize. Future names for this parameter value that they do not recognize. Future names for this
parameter will be consistent with the IANA "Hash Function Textual parameter will be consistent with the IANA "Hash Function Textual
Names" registry. Names" registry.
3.4.3.3. Sample multipart/signed Message 3.4.3.3. Sample multipart/signed Message
Content-Type: multipart/signed; Content-Type: multipart/signed;
protocol="application/pkcs7-signature"; protocol="application/pkcs7-signature";
micalg=sha1; boundary=boundary42 micalg=sha1; boundary=boundary42
--boundary42 --boundary42
Content-Type: text/plain Content-Type: text/plain
This is a clear-signed message. This is a clear-signed message.
--boundary42 --boundary42
Content-Type: application/pkcs7-signature; name=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s
Content-Transfer-Encoding: base64 Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7s Content-Disposition: attachment; filename=smime.p7s
ghyHhHUujhJhjH77n8HHGTrfvbnj756tbB9HG4VQpfyF467GhIGfHfYT6 ghyHhHUujhJhjH77n8HHGTrfvbnj756tbB9HG4VQpfyF467GhIGfHfYT6
4VQpfyF467GhIGfHfYT6jH77n8HHGghyHhHUujhJh756tbB9HGTrfvbnj 4VQpfyF467GhIGfHfYT6jH77n8HHGghyHhHUujhJh756tbB9HGTrfvbnj
n8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 n8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4
7GhIGfHfYT64VQbnj756 7GhIGfHfYT64VQbnj756
--boundary42-- --boundary42--
The content that is digested (the first part of the multipart/signed) The content that is digested (the first part of the multipart/signed)
are the bytes: consists of the bytes:
43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f 70 6c 61 69 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f 70 6c 61 69
6e 0d 0a 0d 0a 54 68 69 73 20 69 73 20 61 20 63 6c 65 61 72 2d 73 69 6e 0d 0a 0d 0a 54 68 69 73 20 69 73 20 61 20 63 6c 65 61 72 2d 73 69
67 6e 65 64 20 6d 65 73 73 61 67 65 2e 0d 0a 67 6e 65 64 20 6d 65 73 73 61 67 65 2e 0d 0a
3.5. Creating a Compressed-only Message 3.5. Creating a Compressed-Only Message
This section describes the format for compressing a MIME entity. This section describes the format for compressing a MIME entity.
Please note that versions of S/MIME prior to version 3.1 did not Please note that versions of S/MIME prior to version 3.1 did not
specify any use of CompressedData, and will not recognize it. The specify any use of CompressedData, and will not recognize it. The
use of a capability to indicate the ability to receive CompressedData use of a capability to indicate the ability to receive CompressedData
is described in [CMSCOMPR] and is the preferred method for is described in [CMSCOMPR] and is the preferred method for
compatibility. compatibility.
Step 1. The MIME entity to be compressed is prepared according Step 1. The MIME entity to be compressed is prepared according to
to section 3.1. Section 3.1.
Step 2. The MIME entity and other required data is processed Step 2. The MIME entity and other required data are processed into a
into a CMS object of type CompressedData. CMS object of type CompressedData.
Step 3. The CompressedData object is wrapped in a CMS Step 3. The CompressedData object is wrapped in a CMS ContentInfo
ContentInfo object. object.
Step 4. The ContentInfo object is inserted into an Step 4. The ContentInfo object is inserted into an
application/pkcs7-mime MIME entity. application/pkcs7-mime MIME entity.
The smime-type parameter for compressed-only messages is "compressed- The smime-type parameter for compressed-only messages is "compressed-
data". The file extension for this type of message is ".p7z". data". The file extension for this type of message is ".p7z".
A sample message would be: A sample message would be:
Content-Type: application/pkcs7-mime; smime-type=compressed-data; Content-Type: application/pkcs7-mime; smime-type=compressed-data;
name=smime.p7z name=smime.p7z
Content-Transfer-Encoding: base64 Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7z Content-Disposition: attachment; filename=smime.p7z
rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6 rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6
7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H 7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H
f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4
0GhIGfHfQbnj756YT64V 0GhIGfHfQbnj756YT64V
3.6. Multiple Operations 3.6. Multiple Operations
The signed-only, enveloped-only, and compressed-only MIME formats can The signed-only, enveloped-only, and compressed-only MIME formats can
be nested. This works because these formats are all MIME entities be nested. This works because these formats are all MIME entities
that encapsulate other MIME entities. that encapsulate other MIME entities.
An S/MIME implementation MUST be able to receive and process An S/MIME implementation MUST be able to receive and process
arbitrarily nested S/MIME within reasonable resource limits of the arbitrarily nested S/MIME within reasonable resource limits of the
recipient computer. recipient computer.
It is possible to apply any of the signing, encrypting, and It is possible to apply any of the signing, encrypting, and
compressing operations in any order. It is up to the implementer and compressing operations in any order. It is up to the implementer and
the user to choose. When signing first, the signatories are then the user to choose. When signing first, the signatories are then
securely obscured by the enveloping. When enveloping first the securely obscured by the enveloping. When enveloping first the
signatories are exposed, but it is possible to verify signatures signatories are exposed, but it is possible to verify signatures
without removing the enveloping. This can be useful in an without removing the enveloping. This can be useful in an
environment were automatic signature verification is desired, as no environment where automatic signature verification is desired, as no
private key material is required to verify a signature. private key material is required to verify a signature.
There are security ramifications to choosing whether to sign first or There are security ramifications to choosing whether to sign first or
encrypt first. A recipient of a message that is encrypted and then encrypt first. A recipient of a message that is encrypted and then
signed can validate that the encrypted block was unaltered, but signed can validate that the encrypted block was unaltered, but
cannot determine any relationship between the signer and the cannot determine any relationship between the signer and the
unencrypted contents of the message. A recipient of a message that unencrypted contents of the message. A recipient of a message that
is signed-then-encrypted can assume that the signed message itself is signed then encrypted can assume that the signed message itself
has not been altered, but that a careful attacker could have changed has not been altered, but that a careful attacker could have changed
the unauthenticated portions of the encrypted message. the unauthenticated portions of the encrypted message.
When using compression, keep the following guidelines in mind: When using compression, keep the following guidelines in mind:
- Compression of binary encoded encrypted data is discouraged, since - Compression of binary encoded encrypted data is discouraged,
it will not yield significant compression. Base64 encrypted data since it will not yield significant compression. Base64
could very well benefit, however. encrypted data could very well benefit, however.
- If a lossy compression algorithm is used with signing, you will - If a lossy compression algorithm is used with signing, you will
need to compress first, then sign. need to compress first, then sign.
3.7. Creating a Certificate Management Message 3.7. Creating a Certificate Management Message
The certificate management message or MIME entity is used to The certificate management message or MIME entity is used to
transport certificates and/or certificate revocation lists, such as transport certificates and/or Certificate Revocation Lists, such as
in response to a registration request. in response to a registration request.
Step 1. The certificates and/or certificate revocation lists are Step 1. The certificates and/or Certificate Revocation Lists are
made available to the CMS generating process which creates a CMS made available to the CMS generating process that creates a
object of type SignedData. The SignedData encapContentInfo CMS object of type SignedData. The SignedData
eContent field MUST be absent and signerInfos field MUST be encapContentInfo eContent field MUST be absent and
empty. signerInfos field MUST be empty.
Step 2. The SignedData object is wrapped in a CMS ContentInfo Step 2. The SignedData object is wrapped in a CMS ContentInfo
object. object.
Step 3. The ContentInfo object is enclosed in an Step 3. The ContentInfo object is enclosed in an
application/pkcs7-mime MIME entity. application/pkcs7-mime MIME entity.
The smime-type parameter for a certificate management message is The smime-type parameter for a certificate management message is
"certs-only". The file extension for this type of message is ".p7c". "certs-only". The file extension for this type of message is ".p7c".
3.8. Registration Requests 3.8. Registration Requests
A sending agent that signs messages MUST have a certificate for the A sending agent that signs messages MUST have a certificate for the
signature so that a receiving agent can verify the signature. There signature so that a receiving agent can verify the signature. There
are many ways of getting certificates, such as through an exchange are many ways of getting certificates, such as through an exchange
with a certificate authority, through a hardware token or diskette, with a certification authority, through a hardware token or diskette,
and so on. and so on.
S/MIME v2 [SMIMEv2] specified a method for "registering" public keys S/MIME v2 [SMIMEv2] specified a method for "registering" public keys
with certificate authorities using an application/pkcs10 body part. with certificate authorities using an application/pkcs10 body part.
Since that time, the IETF PKIX Working Group has developed other Since that time, the IETF PKIX Working Group has developed other
methods for requesting certificates. However, S/MIME v3.2 does not methods for requesting certificates. However, S/MIME v3.2 does not
require a particular certificate request mechanism. require a particular certificate request mechanism.
3.9. Identifying an S/MIME Message 3.9. Identifying an S/MIME Message
Because S/MIME takes into account interoperation in non-MIME Because S/MIME takes into account interoperation in non-MIME
environments, several different mechanisms are employed to carry the environments, several different mechanisms are employed to carry the
type information, and it becomes a bit difficult to identify S/MIME type information, and it becomes a bit difficult to identify S/MIME
messages. The following table lists criteria for determining whether messages. The following table lists criteria for determining whether
or not a message is an S/MIME message. A message is considered an or not a message is an S/MIME message. A message is considered an
S/MIME message if it matches any of the criteria listed below. S/MIME message if it matches any of the criteria listed below.
The file suffix in the table below comes from the "name" parameter in The file suffix in the table below comes from the "name" parameter in
the Content-Type header field, or the "filename" parameter on the the Content-Type header field, or the "filename" parameter on the
skipping to change at page 32, line 31 skipping to change at page 32, line 45
file suffix: any file suffix: any
Media type: multipart/signed Media type: multipart/signed
parameters: protocol="application/pkcs7-signature" parameters: protocol="application/pkcs7-signature"
file suffix: any file suffix: any
Media type: application/octet-stream Media type: application/octet-stream
parameters: any parameters: any
file suffix: p7m, p7s, p7c, p7z file suffix: p7m, p7s, p7c, p7z
4. Certificate Processing 4. Certificate Processing
A receiving agent MUST provide some certificate retrieval mechanism A receiving agent MUST provide some certificate retrieval mechanism
in order to gain access to certificates for recipients of digital in order to gain access to certificates for recipients of digital
envelopes. This specification does not cover how S/MIME agents envelopes. This specification does not cover how S/MIME agents
handle certificates, only what they do after a certificate has been handle certificates, only what they do after a certificate has been
validated or rejected. S/MIME certificate issues are covered in validated or rejected. S/MIME certificate issues are covered in
[CERT32]. [CERT32].
At a minimum, for initial S/MIME deployment, a user agent could At a minimum, for initial S/MIME deployment, a user agent could
automatically generate a message to an intended recipient requesting automatically generate a message to an intended recipient requesting
that recipient's certificate in a signed return message. Receiving that recipient's certificate in a signed return message. Receiving
and sending agents SHOULD also provide a mechanism to allow a user to and sending agents SHOULD also provide a mechanism to allow a user to
"store and protect" certificates for correspondents in such a way so "store and protect" certificates for correspondents in such a way so
as to guarantee their later retrieval. as to guarantee their later retrieval.
4.1. Key Pair Generation 4.1. Key Pair Generation
All generated key pairs MUST be generated from a good source of non- All generated key pairs MUST be generated from a good source of non-
deterministic random input [RANDOM] and the private key MUST be deterministic random input [RANDOM] and the private key MUST be
protected in a secure fashion. protected in a secure fashion.
An S/MIME user agent MUST NOT generate asymmetric keys less than 512 An S/MIME user agent MUST NOT generate asymmetric keys less than 512
bits for use with the RSA or DSA signature algorithms. bits for use with the RSA or DSA signature algorithms.
For 512-bit RSA with SHA-1 see [CMSALG] and [FIPS186-2] without For 512-bit RSA with SHA-1 see [CMSALG] and [FIPS186-2] without
Change Notice 1, for 512-bit RSA with SHA-256 see [CMS-SHA2] and Change Notice 1, for 512-bit RSA with SHA-256 see [CMS-SHA2] and
[FIPS186-2] without Change Notice 1, for 1024-bit through 2048-bit [FIPS186-2] without Change Notice 1, and for 1024-bit through
RSA with SHA-256 see [CMS-SHA2] and [FIPS186-2] with Change Notice 1. 2048-bit RSA with SHA-256 see [CMS-SHA2] and [FIPS186-2] with Change
The first reference provides the signature algorithm's object Notice 1. The first reference provides the signature algorithm's
identifier and the second provides the signature algorithm's object identifier, and the second provides the signature algorithm's
definition. definition.
For 512-bit DSA with SHA-1 see [CMSALG] and [FIPS186-2] without For 512-bit DSA with SHA-1 see [CMSALG] and [FIPS186-2] without
Change Notice 1, for 512-bit DSA with SHA-256 see [CMS-SHA2] and Change Notice 1, for 512-bit DSA with SHA-256 see [CMS-SHA2] and
[FIPS186-2] without Change Notice 1, for 1024-bit DSA with SHA-1 see [FIPS186-2] without Change Notice 1, for 1024-bit DSA with SHA-1 see
[CMSALG] and [FIPS186-2] with Change Notice 1, for 1024-bit and above [CMSALG] and [FIPS186-2] with Change Notice 1, for 1024-bit and above
DSA with SHA-256 see [CMS-SHA2] and [FIPS186-3]. The first reference DSA with SHA-256 see [CMS-SHA2] and [FIPS186-3]. The first reference
provides the signature algorithm's object identifier and the second provides the signature algorithm's object identifier and the second
provides the signature algorithm's definition. provides the signature algorithm's definition.
For RSASSA-PSS with SHA-256 see [RSAPSS]. For DH see [CMSALG]. For For RSASSA-PSS with SHA-256, see [RSAPSS]. For 1024-bit DH, see
RSAES-OAEP see [RSAOAEP]. [CMSALG]. For 1024-bit and larger DH, see [SP800-56A]; regardless,
use the KDF, which is from X9.42, specified in [CMSALG]. For RSAES-
OAEP, see [RSAOAEP].
4.2. Signature Generation 4.2. Signature Generation
The following are the requirements for an S/MIME agent generated RSA, The following are the requirements for an S/MIME agent generated RSA,
RSASSA-PSS, and DSA signatures: RSASSA-PSS, and DSA signatures:
key size <= 1023 : SHOULD NOT (see Security Considerations) key size <= 1023 : SHOULD NOT (see Security Considerations)
1024 <= key size <= 2048 : SHOULD (see Security Considerations) 1024 <= key size <= 2048 : SHOULD (see Security Considerations)
2048 < key size : MAY (see Security Considerations) 2048 < key size : MAY (see Security Considerations)
4.3. Signature Verification 4.3. Signature Verification
The following are the requirements for S/MIME receiving agents during The following are the requirements for S/MIME receiving agents during
signature verification of RSA, RSASSA-PSS, and DSA signatures: signature verification of RSA, RSASSA-PSS, and DSA signatures:
key size <= 1023 : MAY (see Security Considerations) key size <= 1023 : MAY (see Security Considerations)
1024 <= key size <= 2048 : MUST (see Security Considerations) 1024 <= key size <= 2048 : MUST (see Security Considerations)
2048 < key size : MAY (see Security Considerations) 2048 < key size : MAY (see Security Considerations)
4.4. Encryption 4.4. Encryption
The following are the requirements for an S/MIME agent when The following are the requirements for an S/MIME agent when
establishing keys for content encryption using the RSA, RSA-OAEP, and establishing keys for content encryption using the RSA, RSA-OAEP, and
DH algorithms: DH algorithms:
key size <= 1023 : SHOULD NOT (see Security Considerations) key size <= 1023 : SHOULD NOT (see Security Considerations)
1024 <= key size <= 2048 : SHOULD (see Security Considerations) 1024 <= key size <= 2048 : SHOULD (see Security Considerations)
2048 < key size : MAY (see Security Considerations) 2048 < key size : MAY (see Security Considerations)
4.5. Decryption 4.5. Decryption
The following are the requirements for an S/MIME agent when The following are the requirements for an S/MIME agent when
establishing keys for content decryption using the RSA, RSAES-OAEP, establishing keys for content decryption using the RSA, RSAES-OAEP,
and DH algorithms: and DH algorithms:
key size <= 1023 : MAY (see Security Considerations) key size <= 1023 : MAY (see Security Considerations)
1024 <= key size <= 2048 : MUST (see Security Considerations) 1024 <= key size <= 2048 : MUST (see Security Considerations)
2048 < key size : MAY (see Security Considerations) 2048 < key size : MAY (see Security Considerations)
5. IANA Considerations 5. IANA Considerations
The following is intended to provide sufficient information to update The following information updates the media type registration for
the media type registration for application/pkcs7-mime and application/pkcs7-mime and application/pkcs7-signature to refer to
application/pkcs7-signature to refer to this document as opposed to this document as opposed to RFC 2311.
RFC 2311.
Note that other documents can define additional MIME media types for Note that other documents can define additional MIME media types for
S/MIME. S/MIME.
5.1. Media Type for application/pkcs7-mime 5.1. Media Type for application/pkcs7-mime
Type name: application Type name: application
Subtype Name: pkcs7-mime Subtype Name: pkcs7-mime
Required Parameters: NONE Required Parameters: NONE
Optional Parameters: smime-type/signed-data Optional Parameters: smime-type/signed-data
smime-type/enveloped-data smime-type/enveloped-data
smime-type/compressed-data smime-type/compressed-data
smime-type/certs-only smime-type/certs-only
name name
Encoding Considerations: See Section 3 of this document Encoding Considerations: See Section 3 of this document
Security Considerations: See Section 6 of this document Security Considerations: See Section 6 of this document
Interoperability Considerations: See Sections 1-6 of this document Interoperability Considerations: See Sections 1-6 of this document
Published Specification: RFC 2311, RFC 2633, and this document Published Specification: RFC 2311, RFC 2633, and this document
Applications that use this media type: Security applications Applications that use this media type: Security applications
Additional information: NONE Additional information: NONE
skipping to change at page 35, line 14 skipping to change at page 35, line 22
Security Considerations: See Section 6 of this document Security Considerations: See Section 6 of this document
Interoperability Considerations: See Sections 1-6 of this document Interoperability Considerations: See Sections 1-6 of this document
Published Specification: RFC 2311, RFC 2633, and this document Published Specification: RFC 2311, RFC 2633, and this document
Applications that use this media type: Security applications Applications that use this media type: Security applications
Additional information: NONE Additional information: NONE
Person & email to contact for further information: S/MIME working Person & email to contact for further information:
group chairs smime-chairs@tools.ietf.org S/MIME working group chairs smime-chairs@tools.ietf.org
Intended usage: COMMON Intended usage: COMMON
Restrictions on usage: NONE Restrictions on usage: NONE
Author: Sean Turner Author: Sean Turner
Change Controller: S/MIME working group delegated from the IESG Change Controller: S/MIME working group delegated from the IESG
5.2. Media Type for application/pkcs7-signature 5.2. Media Type for application/pkcs7-signature
Type name: application Type name: application
Subtype Name: pkcs7-signature Subtype Name: pkcs7-signature
Required Parameters: NONE Required Parameters: NONE
Optional Parameters: NONE Optional Parameters: NONE
Encoding Considerations: See Section 3 of this document Encoding Considerations: See Section 3 of this document
skipping to change at page 35, line 44 skipping to change at page 36, line 4
Encoding Considerations: See Section 3 of this document Encoding Considerations: See Section 3 of this document
Security Considerations: See Section 6 of this document Security Considerations: See Section 6 of this document
Interoperability Considerations: See Sections 1-6 of this document Interoperability Considerations: See Sections 1-6 of this document
Published Specification: RFC 2311, RFC 2633, and this document Published Specification: RFC 2311, RFC 2633, and this document
Applications that use this media type: Security applications Applications that use this media type: Security applications
Additional information: NONE Additional information: NONE
Person & email to contact for further information: S/MIME working Person & email to contact for further information:
group chairs smime-chairs@tools.ietf.org S/MIME working group chairs smime-chairs@tools.ietf.org
Intended usage: COMMON Intended usage: COMMON
Restrictions on usage: NONE Restrictions on usage: NONE
Author: Sean Turner Author: Sean Turner
Change Controller: S/MIME working group delegated from the IESG Change Controller: S/MIME working group delegated from the IESG
6. Security Considerations 6. Security Considerations
Cryptographic algorithms will be broken or weakened over time. Cryptographic algorithms will be broken or weakened over time.
Implementers and users need to check that the cryptographic Implementers and users need to check that the cryptographic
algorithms listed in this document continue to provide the expected algorithms listed in this document continue to provide the expected
level of security. The IETF from time to time may issue documents level of security. The IETF from time to time may issue documents
dealing with the current state of the art. For example: dealing with the current state of the art. For example:
- The Million Message Attack described in RFC 3218 [MMA]. - The Million Message Attack described in RFC 3218 [MMA].
- The Diffie-Hellman "small-subgroup" attacks described in - The Diffie-Hellman "small-subgroup" attacks described in RFC
RFC 2785 [DHSUB]. 2785 [DHSUB].
- The attacks against hash algorithms described in - The attacks against hash algorithms described in RFC 4270 [HASH-
RFC 4270 [HASH-ATTACK]. ATTACK].
This specification uses Public-Key Cryptography technologies. It is This specification uses Public-Key Cryptography technologies. It is
assumed that the private key is protected to ensure that it is not assumed that the private key is protected to ensure that it is not
accessed or altered by unauthorized parties. accessed or altered by unauthorized parties.
It is impossible for most people or software to estimate the value of It is impossible for most people or software to estimate the value of
a message's content. Further, it is impossible for most people or a message's content. Further, it is impossible for most people or
software to estimate the actual cost of recovering an encrypted software to estimate the actual cost of recovering an encrypted
message content that is encrypted with a key of a particular size. message content that is encrypted with a key of a particular size.
Further, it is quite difficult to determine the cost of a failed Further, it is quite difficult to determine the cost of a failed
decryption if a recipient cannot process a message's content. Thus, decryption if a recipient cannot process a message's content. Thus,
choosing between different key sizes (or choosing whether to just use choosing between different key sizes (or choosing whether to just use
plaintext) is also impossible for most people or software. However, plaintext) is also impossible for most people or software. However,
decisions based on these criteria are made all the time, and decisions based on these criteria are made all the time, and
therefore this specification gives a framework for using those therefore this specification gives a framework for using those
estimates in choosing algorithms. estimates in choosing algorithms.
The choice of 2048 bits as the RSA asymmetric key size in this The choice of 2048 bits as the RSA asymmetric key size in this
specification is based on the desire to provide at least 100 bits of specification is based on the desire to provide at least 100 bits of
security. The key sizes that must be supported to conform to this security. The key sizes that must be supported to conform to this
specification seem appropriate for the Internet based on [STRENGTH]. specification seem appropriate for the Internet based on [STRENGTH].
Of course, there are environments, such as financial and medical Of course, there are environments, such as financial and medical
system, that may select different key sizes. For this reason, an systems, that may select different key sizes. For this reason, an
implementation MAY support key sizes beyond those recommended in this implementation MAY support key sizes beyond those recommended in this
specification. specification.
Receiving agents that validate signatures and sending agents that Receiving agents that validate signatures and sending agents that
encrypt messages, need to be cautious of cryptographic processing encrypt messages need to be cautious of cryptographic processing
usage when validating signatures and encrypting messages using keys usage when validating signatures and encrypting messages using keys
larger than those mandated in this specification. An attacker could larger than those mandated in this specification. An attacker could
send certificates with keys which would result in excessive send certificates with keys that would result in excessive
cryptographic processing, for example keys larger than those mandated cryptographic processing, for example, keys larger than those
in this specification, which could swamp the processing element. mandated in this specification, which could swamp the processing
Agents which use such keys without first validating the certificate element. Agents that use such keys without first validating the
to a trust anchor are advised to have some sort of cryptographic certificate to a trust anchor are advised to have some sort of
resource management system to prevent such attacks. cryptographic resource management system to prevent such attacks.
Using weak cryptography in S/MIME offers little actual security over Using weak cryptography in S/MIME offers little actual security over
sending plaintext. However, other features of S/MIME, such as the sending plaintext. However, other features of S/MIME, such as the
specification of AES and the ability to announce stronger specification of AES and the ability to announce stronger
cryptographic capabilities to parties with whom you communicate, cryptographic capabilities to parties with whom you communicate,
allow senders to create messages that use strong encryption. Using allow senders to create messages that use strong encryption. Using
weak cryptography is never recommended unless the only alternative is weak cryptography is never recommended unless the only alternative is
no cryptography. no cryptography.
RSA and DSA keys of less than 1024 bits are now considered by many RSA and DSA keys of less than 1024 bits are now considered by many
experts to be cryptographically insecure (due to advances in experts to be cryptographically insecure (due to advances in
computing power), and should no longer be used to protect messages. computing power), and should no longer be used to protect messages.
Such keys were previously considered secure, so processing previously Such keys were previously considered secure, so processing previously
received signed and encrypted mail will often result in the use of received signed and encrypted mail will often result in the use of
weak keys. Implementations that wish to support previous versions of weak keys. Implementations that wish to support previous versions of
S/MIME or process old messages need to consider the security risks S/MIME or process old messages need to consider the security risks
that result from smaller key sizes (e.g., spoofed messages) versus that result from smaller key sizes (e.g., spoofed messages) versus
the costs of denial of service. If an implementation supports the costs of denial of service. If an implementation supports
verification of digital signatures generated with RSA and DSA keys of verification of digital signatures generated with RSA and DSA keys of
less than 1024 bits, it MUST warn the user. Implementers should less than 1024 bits, it MUST warn the user. Implementers should
consider providing different warnings for newly received messages and consider providing different warnings for newly received messages and
previously stored messages. Server implementations (e.g., secure previously stored messages. Server implementations (e.g., secure
mail list servers) where user warnings are not appropriate SHOULD mail list servers) where user warnings are not appropriate SHOULD
reject messages with weak signatures. reject messages with weak signatures.
Implementers SHOULD be aware that multiple active key pairs can be Implementers SHOULD be aware that multiple active key pairs can be
associated with a single individual. For example, one key pair can associated with a single individual. For example, one key pair can
be used to support confidentiality, while a different key pair can be be used to support confidentiality, while a different key pair can be
used for digital signatures. used for digital signatures.
If a sending agent is sending the same message using different If a sending agent is sending the same message using different
strengths of cryptography, an attacker watching the communications strengths of cryptography, an attacker watching the communications
channel might be able to determine the contents of the strongly- channel might be able to determine the contents of the strongly
encrypted message by decrypting the weakly-encrypted version. In encrypted message by decrypting the weakly encrypted version. In
other words, a sender SHOULD NOT send a copy of a message using other words, a sender SHOULD NOT send a copy of a message using
weaker cryptography than they would use for the original of the weaker cryptography than they would use for the original of the
message. message.
Modification of the ciphertext can go undetected if authentication is Modification of the ciphertext can go undetected if authentication is
not also used, which is the case when sending EnvelopedData without not also used, which is the case when sending EnvelopedData without
wrapping it in SignedData or enclosing SignedData within it. wrapping it in SignedData or enclosing SignedData within it.
If an implementation is concerned about compliance with NIST key size If an implementation is concerned about compliance with National
Institute of Standards and Technology (NIST) key size
recommendations, then see [SP800-57]. recommendations, then see [SP800-57].
If messaging environments make use of the fact that a message is If messaging environments make use of the fact that a message is
signed to change the behavior of message processing (examples would signed to change the behavior of message processing (examples would
be running rules or UI display hints), without first verifying that be running rules or UI display hints), without first verifying that
the message is actually signed and knowing the state of the the message is actually signed and knowing the state of the
signature, can lead to incorrect handling of the message. Visual signature, this can lead to incorrect handling of the message.
indicators on messages may need to have the signature validation code Visual indicators on messages may need to have the signature
check periodically if the indicator is supposed to give information validation code checked periodically if the indicator is supposed to
on the current status of a message. give information on the current status of a message.
7. References 7. References
7.1. Normative References 7.1. Reference Conventions
[CERT32] Ramsdell, B., and S. Turner, "S/MIME Version 3.2 [CMS] refers to [RFC5652].
Certificate Handling", draft-ietf-smime-3850bis-
10.txt, work-in-progress.
[CHARSETS] Character sets assigned by IANA. See [ESS] refers to [RFC2634] and [RFC5035].
http://www.iana.org/assignments/character-sets.
[CMS] Housley, R., "Cryptographic Message Syntax (CMS)", RFC [MIME] refers to [RFC2045], [RFC2046], [RFC2047], [RFC2049],
3852, July 2004. [RFC4288], and [RFC4289].
Housley, R., "Cryptographic Message Syntax (CMS) [SMIMEv2] refers to [RFC2311], [RFC2312], [RFC2313], [RFC2314], and
Multiple Signer Clarification", RFC 4853, April 2007. [RFC2315].
[SMIMEv3] refers to [RFC2630], [RFC2631], [RFC2632], [RFC2633],
[RFC2634], and [RFC5035].
[SMIMv3.1] refers to [RFC2634], [RFC3850], [RFC3851], [RFC3852], and
[RFC5035].
7.2. Normative References
[CERT32] Ramsdell, B. and S. Turner, "Secure/Multipurpose
Internet Mail Extensions (S/MIME) Version 3.2
Certificate Handling", RFC 5750, January 2010.
[CHARSETS] Character sets assigned by IANA. See
http://www.iana.org/assignments/character-sets.
[CMSAES] Schaad, J., "Use of the Advanced Encryption Standard [CMSAES] Schaad, J., "Use of the Advanced Encryption Standard
(AES) Encryption Algorithm in Cryptographic Message (AES) Encryption Algorithm in Cryptographic Message
Syntax (CMS)", RFC 3565, July 2003. Syntax (CMS)", RFC 3565, July 2003.
[CMSALG] Housley, R., "Cryptographic Message Syntax (CMS) [CMSALG] Housley, R., "Cryptographic Message Syntax (CMS)
Algorithms", RFC 3370, August 2002. Algorithms", RFC 3370, August 2002.
[CMSCOMPR] Gutmann, P., "Compressed Data Content Type for [CMSCOMPR] Gutmann, P., "Compressed Data Content Type for
Cryptographic Message Syntax (CMS)", RFC 3274, June Cryptographic Message Syntax (CMS)", RFC 3274, June
2002. 2002.
[CMS-SHA2] Turner. S., "Using SHA2 Algorithms with Cryptographic [CMS-SHA2] Turner, S., "Using SHA2 Algorithms with Cryptographic
Message Syntax", draft-ietf-smime-sha2-11.txt, work in Message Syntax", RFC 5754, January 2010.
progress.
[CONTDISP] Troost, R., Dorner, S., and K. Moore, "Communicating
Presentation Information in Internet Messages: The
Content-Disposition Header Field", RFC 2183, August
1997.
[ESS] Hoffman, P., "Enhanced Security Services for S/MIME",
RFC 2634, June 1999.
Schaad, J., "ESS Update: Adding CertID Algorithm [CONTDISP] Troost, R., Dorner, S., and K. Moore, Ed.,
Agility", RFC 5035, August 2007. "Communicating Presentation Information in Internet
Messages: The Content-Disposition Header Field", RFC
2183, August 1997.
[FIPS186-2] National Institute of Standards and Technology (NIST), [FIPS186-2] National Institute of Standards and Technology (NIST),
"Digital Signature Standard (DSS)", FIPS Publication "Digital Signature Standard (DSS)", FIPS Publication
186-2, January 2000. [With Change Notice 1]. 186-2, January 2000. [With Change Notice 1].
[FIPS186-3] National Institute of Standards and Technology (NIST), [FIPS186-3] National Institute of Standards and Technology (NIST),
FIPS Publication 186-3: Digital Signature Standard, FIPS Publication 186-3: Digital Signature Standard,
(draft) March 2006. June 2009.
[MIME-SPEC] Freed, N. and N. Borenstein, "Multipurpose Internet [MIME-SECURE] Galvin, J., Murphy, S., Crocker, S., and N. Freed,
"Security Multiparts for MIME: Multipart/Signed and
Multipart/Encrypted", RFC 1847, October 1995.
[MUSTSHOULD] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RANDOM] Eastlake, D., 3rd, Schiller, J., and S. Crocker,
"Randomness Requirements for Security", BCP 106, RFC
4086, June 2005.
[RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet
Mail Extensions (MIME) Part One: Format of Internet Mail Extensions (MIME) Part One: Format of Internet
Message Bodies", RFC 2045, November 1996. Message Bodies", RFC 2045, November 1996.
Freed, N. and N. Borenstein, "Multipurpose Internet [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet
Mail Extensions (MIME) Part Two: Media Types", RFC Mail Extensions (MIME) Part Two: Media Types", RFC
2046, November 1996. 2046, November 1996.
Moore, K., "MIME (Multipurpose Internet Mail [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail
Extensions) Part Three: Message Header Extensions for Extensions) Part Three: Message Header Extensions for
Non-ASCII Text", RFC 2047, November 1996. Non-ASCII Text", RFC 2047, November 1996.
Freed, N., and J. Klensin, "Multipurpose Internet Mail [RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet
Extensions (MIME) Part Four: Registration Procedures",
BCP 13, RFC 4289, December 2005.
Freed, N., and J. Klensin, "Media Type Specifications
and Registration Procedures", BCP 13, RFC 4288,
December 2005.
Freed, N. and N. Borenstein, "Multipurpose Internet
Mail Extensions (MIME) Part Five: Conformance Criteria Mail Extensions (MIME) Part Five: Conformance Criteria
and Examples", RFC 2049, November 1996. and Examples", RFC 2049, November 1996.
[MIME-SECURE] Galvin, J., Murphy, S., Crocker, S., and N. Freed, [RFC2634] Hoffman, P. Ed., "Enhanced Security Services for
"Security Multiparts for MIME: Multipart/Signed and S/MIME", RFC 2634, June 1999.
Multipart/Encrypted", RFC 1847, October 1995.
[MUSTSHOULD] Bradner, S., "Key words for use in RFCs to Indicate [RFC4288] Freed, N. and J. Klensin, "Media Type Specifications
Requirement Levels", BCP 14, RFC 2119, March 1997. and Registration Procedures", BCP 13, RFC 4288,
December 2005.
[RANDOM] Eastlake 3rd, D., Crocker, S., and J. Schiller, [RFC4289] Freed, N. and J. Klensin, "Multipurpose Internet Mail
"Randomness Requirements for Security", BCP 106, RFC Extensions (MIME) Part Four: Registration Procedures",
4086, June 2005. BCP 13, RFC 4289, December 2005.
[RSAPSS] Schaad, J., "Use of RSASSA-PSS Signature Algorithm in [RFC5035] Schaad, J., "Enhanced Security Services (ESS) Update:
Cryptographic Message Syntax (CMS)", RFC 4056, June Adding CertID Algorithm Agility", RFC 5035, August
2005. 2007.
[RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", RFC
5652, September 2009.
[RSAOAEP] Housley, R. "Use of the RSAES-OAEP Key Transport [RSAOAEP] Housley, R. "Use of the RSAES-OAEP Key Transport
Algorithm in the Cryptographic Message Syntax (CMS)", Algorithm in the Cryptographic Message Syntax (CMS)",
RFC 3560, July 2003. RFC 3560, July 2003.
[X.680] ITU-T Recommendation X.680 (2002) | ISO/IEC 8824- [RSAPSS] Schaad, J., "Use of the RSASSA-PSS Signature Algorithm
1:2002. Information Technology - Abstract Syntax in Cryptographic Message Syntax (CMS)", RFC 4056, June
Notation One (ASN.1): Specification of basic 2005.
notation.
[X.690] ITU-T Recommendation X.690 (2002) | ISO/IEC 8825- [SP800-56A] National Institute of Standards and Technology (NIST),
1:2002. Information Technology - ASN.1 encoding Special Publication 800-56A: Recommendation Pair-Wise
Key Establishment Schemes Using Discrete Logarithm
Cryptography (Revised), March 2007.
[X.680] ITU-T Recommendation X.680 (2002) | ISO/IEC
8824-1:2002. Information Technology - Abstract Syntax
Notation One (ASN.1): Specification of basic notation.
[X.690] ITU-T Recommendation X.690 (2002) | ISO/IEC
8825-1:2002. Information Technology - ASN.1 encoding
rules: Specification of Basic Encoding Rules (BER), rules: Specification of Basic Encoding Rules (BER),
Canonical Encoding Rules (CER) and Distinguished Canonical Encoding Rules (CER) and Distinguished
Encoding Rules (DER). Encoding Rules (DER).
7.2. Informative References 7.3. Informative References
[DHSUB] Zuccherato, R., "Methods for Avoiding the "Small- [DHSUB] Zuccherato, R., "Methods for Avoiding the "Small-
Subgroup" Attacks on the Diffie-Hellman Key Agreement Subgroup" Attacks on the Diffie-Hellman Key Agreement
Method for S/MIME", RFC 2785, March 2000. Method for S/MIME", RFC 2785, March 2000.
[HASH-ATTACK] Hoffman, P., Schneier, B., "Attacks on Cryptographic [HASH-ATTACK] Hoffman, P. and B. Schneier, "Attacks on Cryptographic
Hashes in Internet Protocols", RFC 4270, November Hashes in Internet Protocols", RFC 4270, November 2005.
2005.
[MMA] Rescorla, E., "Preventing the Million Message Attack [MMA] Rescorla, E., "Preventing the Million Message Attack on
on Cryptographic Message Syntax", RFC 3218, January Cryptographic Message Syntax", RFC 3218, January 2002.
2002.
[PKCS-7] Kaliski, B., "PKCS #7: Cryptographic Message Syntax [PKCS-7] Kaliski, B., "PKCS #7: Cryptographic Message Syntax
Version 1.5", RFC 2315, March 1998. Version 1.5", RFC 2315, March 1998.
[SMIMEv2] Dusse, S., Hoffman, P., Ramsdell, B., Lundblade, L., [RFC2311] Dusse, S., Hoffman, P., Ramsdell, B., Lundblade, L.,
and L. Repka, "S/MIME Version 2 Message and L. Repka, "S/MIME Version 2 Message Specification",
Specification", RFC 2311, March 1998. RFC 2311, March 1998.
Dusse, S., Hoffman, P., Ramsdell, B., and J. [RFC2312] Dusse, S., Hoffman, P., Ramsdell, B., and J.
Weinstein, "S/MIME Version 2 Certificate Handling", Weinstein, "S/MIME Version 2 Certificate Handling", RFC
RFC 2312, March 1998. 2312, March 1998.
Kaliski, B., "PKCS #1: RSA Encryption Version 1.5", [RFC2313] Kaliski, B., "PKCS #1: RSA Encryption Version 1.5", RFC
RFC 2313, March 1998. 2313, March 1998.
Kaliski, B., "PKCS #10: Certificate Request Syntax [RFC2314] Kaliski, B., "PKCS #10: Certification Request Syntax
Version 1.5", RFC 2314, March 1998. Version 1.5", RFC 2314, March 1998.
Kaliski, B., "PKCS #7: Certificate Message Syntax [RFC2315] Kaliski, B., "PKCS #7: Certification Message Syntax
Version 1.5", RFC 2315, March 1998. Version 1.5", RFC 2315, March 1998.
[SMIMEv3] Housley, R., "Cryptographic Message Syntax", RFC 2630, [RFC2630] Housley, R., "Cryptographic Message Syntax", RFC 2630,
June 1999. June 1999.
Rescorla, E., "Diffie-Hellman Key Agreement Method", [RFC2631] Rescorla, E., "Diffie-Hellman Key Agreement Method",
RFC 2631, June 1999. RFC 2631, June 1999.
Ramsdell, B., "S/MIME Version 3 Certificate Handling", [RFC2632] Ramsdell, B., Ed., "S/MIME Version 3 Certificate
RFC 2632, June 1999. Handling", RFC 2632, June 1999.
Ramsdell, B., "S/MIME Version 3 Message [RFC2633] Ramsdell, B., Ed., "S/MIME Version 3 Message
Specification", RFC 2633, June 1999. Specification", RFC 2633, June 1999.
Hoffman, P., "Enhanced Security Services for S/MIME", [RFC3850] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail
RFC 2634, June 1999. Extensions (S/MIME) Version 3.1 Certificate Handling",
RFC 3850, July 2004.
Schaad, J., "ESS Update: Adding CertID Algorithm
Agility", RFC 5035, August 2007.
[SMIMEv3.1] Housley, R., "Cryptographic Message Syntax", RFC 3852,
July 2004.
Housley, R., "Cryptographic Message Syntax (CMS)
Multiple Signer Clarification", RFC 4853, April 2007.
Ramsdell, B., "S/MIME Version 3.1 Certificate
Handling", RFC 3850, July 2004.
Ramsdell, B., "S/MIME Version 3.1 Message
Specification", RFC 3851, July 2004.
Hoffman, P., "Enhanced Security Services for S/MIME", [RFC3851] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail
RFC 2634, June 1999. Extensions (S/MIME) Version 3.1 Message Specification",
RFC 3851, July 2004.
Schaad, J., "ESS Update: Adding CertID Algorithm [RFC3852] Housley, R., "Cryptographic Message Syntax (CMS)", RFC
Agility", RFC 5035, August 2007. 3852, July 2004.
[SP800-57] National Institute of Standards and Technology (NIST), [SP800-57] National Institute of Standards and Technology (NIST),
Special Publication 800-57: Recommendation for Key Special Publication 800-57: Recommendation for Key
Management, August 2005. Management, August 2005.
[STRENGTH] Orman, H., and P. Hoffman, "Determining Strengths For [STRENGTH] Orman, H., and P. Hoffman, "Determining Strengths For
Public Keys Used For Exchanging Symmetric Keys", BCP Public Keys Used For Exchanging Symmetric Keys", BCP
86, RFC 3766, April 2004. 86, RFC 3766, April 2004.
Appendix A. ASN.1 Module Appendix A. ASN.1 Module
NOTE: The ASN.1 module contained herein is unchanged from RFC 3851 Note: The ASN.1 module contained herein is unchanged from RFC 3851
[SMIMEv3.1] with the exception of a change to the prefersBinaryInside [SMIMEv3.1] with the exception of a change to the prefersBinaryInside
ASN.1 comment. This module uses the 1988 version of ASN.1. ASN.1 comment. This module uses the 1988 version of ASN.1.
SecureMimeMessageV3dot1 SecureMimeMessageV3dot1
{ iso(1) member-body(2) us(840) rsadsi(113549) { iso(1) member-body(2) us(840) rsadsi(113549)
pkcs(1) pkcs-9(9) smime(16) modules(0) msg-v3dot1(21) } pkcs(1) pkcs-9(9) smime(16) modules(0) msg-v3dot1(21) }
DEFINITIONS IMPLICIT TAGS ::= DEFINITIONS IMPLICIT TAGS ::=
BEGIN BEGIN
IMPORTS IMPORTS
--
-- Copyright (c) 2009 IETF Trust and the persons identified as
-- authors of the code. All rights reserved.
--
-- Redistribution and use in source and binary forms, with or
-- without modification, are permitted provided that the following
-- conditions are met:
--
-- - Redistributions of source code must retain the above copyright
-- notice, this list of conditions and the following disclaimer.
--
-- - Redistributions in binary form must reproduce the above
-- copyright notice, this list of conditions and the following
-- disclaimer in the documentation and/or other materials provided
-- with the distribution.
--
-- - Neither the name of Internet Society, IETF or IETF Trust, nor
-- the names of specific contributors, may be used to endorse or
-- promote products derived from this software without specific
-- prior written permission.
--
--
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-- CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--
-- This version of the ASN.1 module is part of RFC XXXX;
-- see the RFC itself for full legal notices.
--
//RFC EDITOR NOTE: Replace XXXX with this RFC's #.
-- Cryptographic Message Syntax [CMS] -- Cryptographic Message Syntax [CMS]
SubjectKeyIdentifier, IssuerAndSerialNumber, SubjectKeyIdentifier, IssuerAndSerialNumber,
RecipientKeyIdentifier RecipientKeyIdentifier
FROM CryptographicMessageSyntax FROM CryptographicMessageSyntax
{ iso(1) member-body(2) us(840) rsadsi(113549) { iso(1) member-body(2) us(840) rsadsi(113549)
pkcs(1) pkcs-9(9) smime(16) modules(0) cms-2001(14) }; pkcs(1) pkcs-9(9) smime(16) modules(0) cms-2001(14) };
-- id-aa is the arc with all new authenticated and unauthenticated -- id-aa is the arc with all new authenticated and unauthenticated
-- attributes produced by the S/MIME Working Group -- attributes produced by the S/MIME Working Group
skipping to change at page 46, line 5 skipping to change at page 45, line 5
-- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) -- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
-- 5} -- 5}
-- See [CMS] for a description of how to encode the attribute -- See [CMS] for a description of how to encode the attribute
-- value. -- value.
SMIMECapabilitiesParametersForRC2CBC ::= INTEGER SMIMECapabilitiesParametersForRC2CBC ::= INTEGER
-- (RC2 Key Length (number of bits)) -- (RC2 Key Length (number of bits))
END END
Appendix B. Moving S/MIME v2 Message Specification to Historic Status Appendix B. Moving S/MIME v2 Message Specification to Historic Status
The S/MIME v3 [SMIMEv3], v3.1 [SMIMEv3.1], and v3.2 (this document) The S/MIME v3 [SMIMEv3], v3.1 [SMIMEv3.1], and v3.2 (this document)
are backwards compatible with the S/MIME v2 Message Specification are backwards compatible with the S/MIME v2 Message Specification
[SMIMEv2], with the exception of the algorithms (dropped RC2/40 [SMIMEv2], with the exception of the algorithms (dropped RC2/40
requirement and added DSA and RSASSA-PSS requirements). Therefore, it requirement and added DSA and RSASSA-PSS requirements). Therefore,
is recommended that RFC 2311 [SMIMEv2] be moved to Historic status. it is recommended that RFC 2311 [SMIMEv2] be moved to Historic
status.
Appendix C. Acknowledgments Appendix C. Acknowledgments
Many thanks go out to the other authors of the S/MIME Version 2 Many thanks go out to the other authors of the S/MIME version 2
Message Specification RFC: Steve Dusse, Paul Hoffman, Laurence Message Specification RFC: Steve Dusse, Paul Hoffman, Laurence
Lundblade and Lisa Repka. Without v2, there wouldn't be a v3, v3.1 or Lundblade, and Lisa Repka. Without v2, there wouldn't be a v3, v3.1,
v3.2. or v3.2.
A number of the members of the S/MIME Working Group have also worked A number of the members of the S/MIME Working Group have also worked
very hard and contributed to this document. Any list of people is very hard and contributed to this document. Any list of people is
doomed to omission, and for that I apologize. In alphabetical order, doomed to omission, and for that I apologize. In alphabetical order,
the following people stand out in my mind due to the fact that they the following people stand out in my mind because they made direct
made direct contributions to this document. contributions to this document:
Tony Capel, Piers Chivers, Dave Crocker, Bill Flanigan, Peter Tony Capel, Piers Chivers, Dave Crocker, Bill Flanigan, Peter
Gutmann, Alfred Hoenes, Paul Hoffman, Russ Housley, William Ottaway, Gutmann, Alfred Hoenes, Paul Hoffman, Russ Housley, William Ottaway,
John Pawling, and Jim Schaad. John Pawling, and Jim Schaad.
Authors' Addresses Authors' Addresses
Blake Ramsdell Blake Ramsdell
Brute Squad Labs, Inc. Brute Squad Labs, Inc.
EMail: blaker@gmail.com EMail: blaker@gmail.com
Sean Turner Sean Turner
IECA, Inc. IECA, Inc.
3057 Nutley Street, Suite 106 3057 Nutley Street, Suite 106
Fairfax, VA 22031 Fairfax, VA 22031
USA USA
EMail: turners@ieca.com EMail: turners@ieca.com
 End of changes. 290 change blocks. 
660 lines changed or deleted 621 lines changed or added

This html diff was produced by rfcdiff 1.37c. The latest version is available from http://tools.ietf.org/tools/rfcdiff/