Internet Engineering Task Force (IETF) B. Ramsdell Request for Comments: 5751 Brute Squad Labs Obsoletes: 3851 S. Turner Category: Standards Track IECA ISSN: 2070-1721 January 2010
Internet Engineering Task Force (IETF) B. Ramsdell Request for Comments: 5751 Brute Squad Labs Obsoletes: 3851 S. Turner Category: Standards Track IECA ISSN: 2070-1721 January 2010
Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 Message Specification
安全/多用途Internet邮件扩展(S/MIME)3.2版邮件规范
Abstract
摘要
This document defines Secure/Multipurpose Internet Mail Extensions (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.
本文档定义了安全/多用途Internet邮件扩展(S/MIME)版本3.2。S/MIME提供了发送和接收安全MIME数据的一致方式。数字签名提供身份验证、消息完整性和不可否认性以及来源证明。加密提供了数据保密性。压缩可用于减少数据大小。本文件废除了RFC 3851。
Status of This Memo
关于下段备忘
This is an Internet Standards Track document.
这是一份互联网标准跟踪文件。
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.
本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 5741第2节。
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.
有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc5751.
Copyright Notice
版权公告
Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved.
版权所有(c)2010 IETF信托基金和确定为文件作者的人员。版权所有。
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。
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.
本文件可能包含2008年11月10日之前发布或公开的IETF文件或IETF贡献中的材料。控制某些材料版权的人员可能未授予IETF信托允许在IETF标准流程之外修改此类材料的权利。在未从控制此类材料版权的人员处获得充分许可的情况下,不得在IETF标准流程之外修改本文件,也不得在IETF标准流程之外创建其衍生作品,除了将其格式化以RFC形式发布或将其翻译成英语以外的其他语言。
Table of Contents
目录
1. Introduction ....................................................4 1.1. Specification Overview .....................................4 1.2. Definitions ................................................5 1.3. Conventions Used in This Document ..........................6 1.4. Compatibility with Prior Practice of S/MIME ................7 1.5. Changes from S/MIME v3 to S/MIME v3.1 ......................7 1.6. Changes since S/MIME v3.1 ..................................7 2. CMS Options .....................................................9 2.1. DigestAlgorithmIdentifier ..................................9 2.2. SignatureAlgorithmIdentifier ...............................9 2.3. KeyEncryptionAlgorithmIdentifier ..........................10 2.4. General Syntax ............................................11 2.5. Attributes and the SignerInfo Type ........................12 2.6. SignerIdentifier SignerInfo Type ..........................16 2.7. ContentEncryptionAlgorithmIdentifier ......................16 3. Creating S/MIME Messages .......................................18 3.1. Preparing the MIME Entity for Signing, Enveloping, or Compressing ............................................19 3.2. The application/pkcs7-mime Media Type .....................23 3.3. Creating an Enveloped-Only Message ........................25 3.4. Creating a Signed-Only Message ............................26 3.5. Creating a Compressed-Only Message ........................30 3.6. Multiple Operations .......................................30 3.7. Creating a Certificate Management Message .................31 3.8. Registration Requests .....................................32 3.9. Identifying an S/MIME Message .............................32 4. Certificate Processing .........................................32 4.1. Key Pair Generation .......................................33 4.2. Signature Generation ......................................33 4.3. Signature Verification ....................................34 4.4. Encryption ................................................34 4.5. Decryption ................................................34 5. IANA Considerations ............................................34 5.1. Media Type for application/pkcs7-mime .....................34 5.2. Media Type for application/pkcs7-signature ................35 6. Security Considerations ........................................36 7. References .....................................................38 7.1. Reference Conventions .....................................38 7.2. Normative References ......................................39 7.3. Informative References ....................................41 Appendix A. ASN.1 Module ..........................................43 Appendix B. Moving S/MIME v2 Message Specification to Historic Status ................................................45 Appendix C. Acknowledgments .......................................45
1. Introduction ....................................................4 1.1. Specification Overview .....................................4 1.2. Definitions ................................................5 1.3. Conventions Used in This Document ..........................6 1.4. Compatibility with Prior Practice of S/MIME ................7 1.5. Changes from S/MIME v3 to S/MIME v3.1 ......................7 1.6. Changes since S/MIME v3.1 ..................................7 2. CMS Options .....................................................9 2.1. DigestAlgorithmIdentifier ..................................9 2.2. SignatureAlgorithmIdentifier ...............................9 2.3. KeyEncryptionAlgorithmIdentifier ..........................10 2.4. General Syntax ............................................11 2.5. Attributes and the SignerInfo Type ........................12 2.6. SignerIdentifier SignerInfo Type ..........................16 2.7. ContentEncryptionAlgorithmIdentifier ......................16 3. Creating S/MIME Messages .......................................18 3.1. Preparing the MIME Entity for Signing, Enveloping, or Compressing ............................................19 3.2. The application/pkcs7-mime Media Type .....................23 3.3. Creating an Enveloped-Only Message ........................25 3.4. Creating a Signed-Only Message ............................26 3.5. Creating a Compressed-Only Message ........................30 3.6. Multiple Operations .......................................30 3.7. Creating a Certificate Management Message .................31 3.8. Registration Requests .....................................32 3.9. Identifying an S/MIME Message .............................32 4. Certificate Processing .........................................32 4.1. Key Pair Generation .......................................33 4.2. Signature Generation ......................................33 4.3. Signature Verification ....................................34 4.4. Encryption ................................................34 4.5. Decryption ................................................34 5. IANA Considerations ............................................34 5.1. Media Type for application/pkcs7-mime .....................34 5.2. Media Type for application/pkcs7-signature ................35 6. Security Considerations ........................................36 7. References .....................................................38 7.1. Reference Conventions .....................................38 7.2. Normative References ......................................39 7.3. Informative References ....................................41 Appendix A. ASN.1 Module ..........................................43 Appendix B. Moving S/MIME v2 Message Specification to Historic Status ................................................45 Appendix C. Acknowledgments .......................................45
S/MIME (Secure/Multipurpose Internet Mail Extensions) provides a consistent way to send and receive secure MIME data. Based on the popular Internet MIME standard, S/MIME provides the following cryptographic security services for electronic messaging applications: authentication, message integrity and non-repudiation of origin (using digital signatures), and data confidentiality (using encryption). As a supplementary service, S/MIME provides for message compression.
S/MIME(安全/多用途Internet邮件扩展)提供了发送和接收安全MIME数据的一致方式。基于流行的Internet MIME标准,S/MIME为电子消息应用程序提供以下加密安全服务:身份验证、消息完整性和来源不可否认性(使用数字签名)以及数据机密性(使用加密)。作为一种补充服务,S/MIME提供了消息压缩。
S/MIME can be used by traditional mail user agents (MUAs) to add cryptographic security services to mail that is sent, and to interpret cryptographic security services in mail that is received. However, S/MIME is not restricted to mail; it can be used with any transport mechanism that transports MIME data, such as HTTP or SIP. As such, S/MIME takes advantage of the object-based features of MIME and allows secure messages to be exchanged in mixed-transport systems.
传统的邮件用户代理(MUA)可以使用S/MIME向发送的邮件添加加密安全服务,并解释接收的邮件中的加密安全服务。但是,S/MIME不限于邮件;它可以用于传输MIME数据的任何传输机制,如HTTP或SIP。因此,S/MIME利用了MIME基于对象的特性,并允许在混合传输系统中交换安全消息。
Further, S/MIME can be used in automated message transfer agents that use cryptographic security services that do not require any human intervention, such as the signing of software-generated documents and the encryption of FAX messages sent over the Internet.
此外,S/MIME可用于自动消息传输代理,该代理使用不需要任何人工干预的加密安全服务,例如软件生成文档的签名和通过Internet发送的传真消息的加密。
This document describes a protocol for adding cryptographic signature and encryption services to MIME data. The MIME standard [MIME-SPEC] provides a general structure for the content of Internet messages and allows extensions for new content-type-based applications.
本文档描述了向MIME数据添加加密签名和加密服务的协议。MIME标准[MIME-SPEC]为Internet消息的内容提供了一个通用结构,并允许扩展新的基于内容类型的应用程序。
This specification defines how to create a MIME body part that has been cryptographically enhanced according to the Cryptographic Message Syntax (CMS) RFC 5652 [CMS], which is derived from PKCS #7 [PKCS-7]. This specification also defines the application/pkcs7-mime media type that can be used to transport those body parts.
本规范定义了如何创建MIME主体部分,该主体部分已根据加密消息语法(CMS)RFC 5652[CMS]进行加密增强,该语法源自PKCS#7[PKCS-7]。本规范还定义了可用于传输这些身体部位的application/pkcs7 mime媒体类型。
This document also discusses how to use the multipart/signed media type defined in [MIME-SECURE] to transport S/MIME signed messages. multipart/signed is used in conjunction with the application/pkcs7- signature media type, which is used to transport a detached S/MIME signature.
本文档还讨论了如何使用[MIME-SECURE]中定义的多部分/签名媒体类型来传输S/MIME签名消息。multipart/signed与application/pkcs7-signature媒体类型结合使用,后者用于传输分离的S/MIME签名。
In order to create S/MIME messages, an S/MIME agent MUST follow the specifications in this document, as well as the specifications listed in the Cryptographic Message Syntax document [CMS], [CMSALG], [RSAPSS], [RSAOAEP], and [CMS-SHA2].
为了创建S/MIME消息,S/MIME代理必须遵循本文档中的规范,以及加密消息语法文档[CMS]、[CMSALG]、[RSAPSS]、[RSAOAEP]和[CMS-SHA2]中列出的规范。
Throughout this specification, there are requirements and recommendations made for how receiving agents handle incoming messages. There are separate requirements and recommendations for how sending agents create outgoing messages. In general, the best strategy is to "be liberal in what you receive and conservative in what you send". Most of the requirements are placed on the handling of incoming messages, while the recommendations are mostly on the creation of outgoing messages.
在本规范中,有关于接收代理如何处理传入消息的要求和建议。对于发送代理如何创建传出消息,有单独的要求和建议。总的来说,最好的策略是“在你收到的东西上自由,在你发送的东西上保守”。大多数需求放在传入消息的处理上,而建议主要放在传出消息的创建上。
The separation for requirements on receiving agents and sending agents also derives from the likelihood that there will be S/MIME systems that involve software other than traditional Internet mail clients. S/MIME can be used with any system that transports MIME data. An automated process that sends an encrypted message might not be able to receive an encrypted message at all, for example. Thus, the requirements and recommendations for the two types of agents are listed separately when appropriate.
对接收代理和发送代理的要求的分离还源于可能存在S/MIME系统,这些系统涉及传统Internet邮件客户端以外的软件。S/MIME可用于传输MIME数据的任何系统。例如,发送加密消息的自动化进程可能根本无法接收加密消息。因此,在适当的情况下,将分别列出这两类代理的要求和建议。
For the purposes of this specification, the following definitions apply.
在本规范中,以下定义适用。
ASN.1: Abstract Syntax Notation One, as defined in ITU-T Recommendation X.680 [X.680].
ASN.1:ITU-T建议X.680[X.680]中定义的抽象语法符号1。
BER: Basic Encoding Rules for ASN.1, as defined in ITU-T Recommendation X.690 [X.690].
BER:ITU-T建议X.690[X.690]中定义的ASN.1的基本编码规则。
Certificate: A type that binds an entity's name to a public key with a digital signature.
证书:用数字签名将实体名称绑定到公钥的类型。
DER: Distinguished Encoding Rules for ASN.1, as defined in ITU-T Recommendation X.690 [X.690].
DER:ITU-T建议X.690[X.690]中定义的ASN.1的特殊编码规则。
7-bit data: Text data with lines less than 998 characters long, where none of the characters have the 8th bit set, and there are no NULL characters. <CR> and <LF> occur only as part of a <CR><LF> end-of-line delimiter.
7位数据:行长度小于998个字符的文本数据,其中没有字符设置为第8位,也没有空字符<CR>和<LF>仅作为<CR><LF>行尾分隔符的一部分出现。
8-bit data: Text data with lines less than 998 characters, and where none of the characters are NULL characters. <CR> and <LF> occur only as part of a <CR><LF> end-of-line delimiter.
8位数据:行数小于998个字符的文本数据,其中所有字符都不是空字符<CR>和<LF>仅作为<CR><LF>行尾分隔符的一部分出现。
Binary data: Arbitrary data.
二进制数据:任意数据。
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 data.
传输编码:对数据进行可逆转换,以便8位或二进制数据可以通过仅传输7位数据的通道发送。
Receiving agent: Software that interprets and processes S/MIME CMS objects, MIME body parts that contain CMS content types, or both.
接收代理:解释和处理S/MIME CMS对象、包含CMS内容类型的MIME正文部分或两者的软件。
Sending agent: Software that creates S/MIME CMS content types, MIME body parts that contain CMS content types, or both.
发送代理:创建S/MIME CMS内容类型、包含CMS内容类型的MIME正文部分或两者的软件。
S/MIME agent: User software that is a receiving agent, a sending agent, or both.
S/MIME代理:作为接收代理、发送代理或两者兼有的用户软件。
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [MUSTSHOULD].
本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照[必须”中的说明进行解释。
We define some additional terms here:
我们在此定义了一些附加术语:
SHOULD+ This term means the same as SHOULD. However, the authors expect that a requirement marked as SHOULD+ will be promoted at some future time to be a MUST.
SHOULD+这个词的意思与SHOULD相同。然而,作者希望标记为SHOULD+的需求将在将来的某个时候被提升为必须的。
SHOULD- This term means the same as SHOULD. However, the authors expect that a requirement marked as SHOULD- will be demoted to a MAY in a future version of this document.
应-该术语的含义与应相同。然而,作者预计,在本文档的未来版本中,标记为“应该”的需求将降级为“可能”。
MUST- This term means the same as MUST. However, the authors expect that this requirement will no longer be a MUST in a future document. Although its status will be determined at a later time, it is reasonable to expect that if a future revision of a document alters the status of a MUST-requirement, it will remain at least a SHOULD or a SHOULD-.
必须-该术语的含义与必须相同。然而,作者希望这一要求在未来的文件中不再是必须的。尽管其状态将在稍后确定,但可以合理预期,如果未来的文件修订改变了必须要求的状态,则至少应保持为应该或应该。
S/MIME version 3.2 agents ought to attempt to have the greatest interoperability possible with agents for prior versions of S/MIME. S/MIME version 2 is described in RFC 2311 through RFC 2315 inclusive [SMIMEv2], S/MIME version 3 is described in RFC 2630 through RFC 2634 inclusive and RFC 5035 [SMIMEv3], and S/MIME version 3.1 is described in RFC 3850, RFC 3851, RFC 3852, RFC 2634, and RFC 5035 [SMIMEv3.1]. RFC 2311 also has historical information about the development of S/MIME.
S/MIME版本3.2代理应该尝试与S/MIME早期版本的代理具有尽可能大的互操作性。S/MIME版本2在RFC 2311至RFC 2315(含)中描述[SMIMEv2],S/MIME版本3在RFC 2630至RFC 2634(含)和RFC 5035[SMIMEv3]中描述,S/MIME版本3.1在RFC 3850、RFC 3851、RFC 3852、RFC 2634和RFC 5035[SMIMEv3.1]中描述。RFC2311也有关于S/MIME发展的历史信息。
The RSA public key algorithm was changed to a MUST implement key wrapping algorithm, and the Diffie-Hellman (DH) algorithm changed to a SHOULD implement.
RSA公钥算法更改为必须实现的密钥包装算法,Diffie-Hellman(DH)算法更改为应该实现的密钥包装算法。
The AES symmetric encryption algorithm has been included as a SHOULD implement.
AES对称加密算法已作为一个应实现的工具包括在内。
The RSA public key algorithm was changed to a MUST implement signature algorithm.
RSA公钥算法已更改为必须实现的签名算法。
Ambiguous language about the use of "empty" SignedData messages to transmit certificates was clarified to reflect that transmission of Certificate Revocation Lists is also allowed.
澄清了关于使用“空”签名数据消息传输证书的含糊不清的语言,以反映也允许传输证书撤销列表。
The use of binary encoding for some MIME entities is now explicitly discussed.
现在明确讨论了对某些MIME实体使用二进制编码。
Header protection through the use of the message/rfc822 media type has been added.
添加了通过使用message/rfc822媒体类型的头保护。
Use of the CompressedData CMS type is allowed, along with required media type and file extension additions.
允许使用CompressedData CMS类型,以及所需的媒体类型和文件扩展名添加。
Editorial changes, e.g., replaced "MIME type" with "media type", content-type with Content-Type.
编辑更改,例如,将“MIME类型”替换为“媒体类型”,将内容类型替换为内容类型。
Moved "Conventions Used in This Document" to Section 1.3. Added definitions for SHOULD+, SHOULD-, and MUST-.
将“本文件中使用的约定”移至第1.3节。增加了SHOULD+、SHOULD-和MUST-的定义。
Section 1.1 and Appendix A: Added references to RFCs for RSASSA-PSS, RSAES-OAEP, and SHA2 CMS algorithms. Added CMS Multiple Signers Clarification to CMS reference.
第1.1节和附录A:增加了关于RSASSA-PSS、RSAES-OAEP和SHA2 CMS算法的RFC参考。在CMS参考中添加了CMS多签名者说明。
Section 1.2: Updated references to ASN.1 to X.680 and BER and DER to X.690.
第1.2节:更新了ASN.1至X.680以及BER和DER至X.690的参考资料。
Section 1.4: Added references to S/MIME MSG 3.1 RFCs.
第1.4节:增加了对S/MIME MSG 3.1 RFCs的参考。
Section 2.1 (digest algorithm): SHA-256 added as MUST, SHA-1 and MD5 made SHOULD-.
第2.1节(摘要算法):必须添加SHA-256,应制作SHA-1和MD5-。
Section 2.2 (signature algorithms): RSA with SHA-256 added as MUST, and DSA with SHA-256 added as SHOULD+, RSA with SHA-1, DSA with SHA-1, and RSA with MD5 changed to SHOULD-, and RSASSA-PSS with SHA-256 added as SHOULD+. Also added note about what S/MIME v3.1 clients support.
第2.2节(签名算法):必须添加SHA-256的RSA,必须添加SHA-256的DSA,必须添加SHA-1的RSA,必须添加SHA-1的DSA,必须添加MD5的RSA,必须添加SHA-256的RSASSA-PSS。还添加了关于S/MIME v3.1客户端支持什么的说明。
Section 2.3 (key encryption): DH changed to SHOULD-, and RSAES-OAEP added as SHOULD+. Elaborated requirements for key wrap algorithm.
第2.3节(密钥加密):DH更改为应-,RSAES-OAEP添加为应+。详细说明了密钥包裹算法的要求。
Section 2.5.1: Added requirement that receiving agents MUST support both GeneralizedTime and UTCTime.
第2.5.1节:增加了接收代理必须同时支持GeneralizedTime和UTCTime的要求。
Section 2.5.2: Replaced reference "sha1WithRSAEncryption" with "sha256WithRSAEncryption", "DES-3EDE-CBC" with "AES-128 CBC", and deleted the RC5 example.
第2.5.2节:用“SHA256带RSA加密”替换参考“SHA1带RSA加密”,用“AES-128 CBC”替换DES-3EDE-CBC”,并删除RC5示例。
Section 2.5.2.1: Deleted entire section (discussed deprecated RC2).
第2.5.2.1节:删除了整个章节(讨论了弃用的RC2)。
Section 2.7, 2.7.1, Appendix A: references to RC2/40 removed.
第2.7节、第2.7.1节、附录A:删除对RC2/40的引用。
Section 2.7 (content encryption): AES-128 CBC added as MUST, AES-192 and AES-256 CBC SHOULD+, tripleDES now SHOULD-.
第2.7节(内容加密):必须添加AES-128 CBC,AES-192和AES-256 CBC应为+,现在应为-。
Section 2.7.1: Updated pointers from 2.7.2.1 through 2.7.2.4 to 2.7.1.1 to 2.7.1.2.
第2.7.1节:从2.7.2.1到2.7.2.4到2.7.1.1到2.7.1.2的更新指针。
Section 3.1.1: Removed text about MIME character sets.
第3.1.1节:删除了有关MIME字符集的文本。
Section 3.2.2 and 3.6: Replaced "encrypted" with "enveloped". Update OID example to use AES-128 CBC oid.
第3.2.2和3.6节:将“加密”替换为“信封”。更新OID示例以使用AES-128 CBC OID。
Section 3.4.3.2: Replace micalg parameter for SHA-1 with sha-1.
第3.4.3.2节:将SHA-1的micalg参数替换为SHA-1。
Section 4: Updated reference to CERT v3.2.
第4节:更新了对CERT v3.2的参考。
Section 4.1: Updated RSA and DSA key size discussion. Moved last four sentences to security considerations. Updated reference to randomness requirements for security.
第4.1节:更新RSA和DSA密钥大小讨论。将最后四句移至安全考虑。更新了对安全性随机性要求的参考。
Section 5: Added IANA registration templates to update media type registry to point to this document as opposed to RFC 2311.
第5节:添加IANA注册模板以更新媒体类型注册表,以指向本文档,而不是RFC 2311。
Section 6: Updated security considerations.
第6节:更新的安全注意事项。
Section 7: Moved references from Appendix B to this section. Updated references. Added informational references to SMIMEv2, SMIMEv3, and SMIMEv3.1.
第7节:将附录B中的参考文件移至本节。更新参考资料。添加了对SMIMEv2、SMIMEv3和SMIMEv3.1的参考信息。
Appendix B: Added Appendix B to move S/MIME v2 to Historic status.
附录B:添加附录B,将S/MIME v2移至历史状态。
CMS allows for a wide variety of options in content, attributes, and algorithm support. This section puts forth a number of support requirements and recommendations in order to achieve a base level of interoperability among all S/MIME implementations. [CMSALG] and [CMS-SHA2] provides additional details regarding the use of the cryptographic algorithms. [ESS] provides additional details regarding the use of additional attributes.
CMS允许在内容、属性和算法支持方面有多种选择。本节提出了一些支持需求和建议,以实现所有S/MIME实现之间的基本互操作性。[CMSALG]和[CMS-SHA2]提供了有关加密算法使用的其他详细信息。[ESS]提供了有关使用其他属性的其他详细信息。
Sending and receiving agents MUST support SHA-256 [CMS-SHA2] and SHOULD- support SHA-1 [CMSALG]. Receiving agents SHOULD- support MD5 [CMSALG] for the purpose of providing backward compatibility with MD5-digested S/MIME v2 SignedData objects.
发送和接收代理必须支持SHA-256[CMS-SHA2],并应支持SHA-1[CMSALG]。接收代理应支持MD5[CMSALG],以便提供与MD5摘要S/MIME v2 SignedData对象的向后兼容性。
Receiving agents:
接收代理:
- MUST support RSA with SHA-256.
- 必须支持带有SHA-256的RSA。
- SHOULD+ support DSA with SHA-256.
- 应+支持带有SHA-256的DSA。
- SHOULD+ support RSASSA-PSS with SHA-256.
- 应+支持带有SHA-256的RSASSA-PSS。
- SHOULD- support RSA with SHA-1.
- 应该-支持带有SHA-1的RSA。
- SHOULD- support DSA with SHA-1.
- 应-支持带有SHA-1的DSA。
- SHOULD- support RSA with MD5.
- 应该-支持带有MD5的RSA。
Sending agents:
发送代理:
- MUST support RSA with SHA-256.
- 必须支持带有SHA-256的RSA。
- SHOULD+ support DSA with SHA-256.
- 应+支持带有SHA-256的DSA。
- SHOULD+ support RSASSA-PSS with SHA-256.
- 应+支持带有SHA-256的RSASSA-PSS。
- SHOULD- support RSA with SHA-1 or DSA with SHA-1.
- 应该-支持带有SHA-1的RSA或带有SHA-1的DSA。
- SHOULD- support RSA with MD5.
- 应该-支持带有MD5的RSA。
See Section 4.1 for information on key size and algorithm references.
有关密钥大小和算法参考的信息,请参见第4.1节。
Note that S/MIME v3.1 clients support verifying id-dsa-with-sha1 and rsaEncryption and might not implement sha256withRSAEncryption. Note 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 AlgorithmIdentifier in this field. Receiving clients SHOULD 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 that S/MIME v2 clients are only required to verify digital signatures using the rsaEncryption algorithm with SHA-1 or MD5, and might not implement id-dsa-with-sha1 or id-dsa at all.
请注意,S/MIME v3.1客户端支持使用-sha1和RSA加密验证id-dsa,并且可能不使用RSA加密实现SHA2566。请注意,S/MIME v3客户端可能仅使用id-dsa-with-sha1实现签名或签名验证,还可能使用id-dsa作为此字段中的算法标识符。接收客户端应将id dsa识别为等同于id-dsa-with-sha1,如果使用该算法,则发送客户端必须使用id-dsa-with-sha1。还要注意的是,S/MIME v2客户端只需要使用带有SHA-1或MD5的RSA加密算法来验证数字签名,可能根本无法实现id-dsa-with-sha1或id-dsa。
Receiving and sending agents:
接收和发送代理:
- MUST support RSA Encryption, as specified in [CMSALG].
- 必须支持[CMSALG]中指定的RSA加密。
- SHOULD+ support RSAES-OAEP, as specified in [RSAOAEP].
- 应+支持[RSAOAEP]中规定的RSAES-OAEP。
- SHOULD- support DH ephemeral-static mode, as specified in [CMSALG] and [SP800-57].
- 应-支持[CMSALG]和[SP800-57]中规定的DH临时静态模式。
When DH ephemeral-static is used, a key wrap algorithm is also specified in the KeyEncryptionAlgorithmIdentifier [CMS]. The underlying encryption functions for the key wrap and content encryption algorithm ([CMSALG] and [CMSAES]) and the key sizes for 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 mandatory-to-implement content encryption algorithm, the AES-128 key wrap algorithm MUST also be supported when DH ephemeral-static is used.
当使用DH ephemeral static时,KeyEncryptionAlgorithmIdentifier[CMS]中还指定了密钥包裹算法。密钥封装和内容加密算法([CMSALG]和[CMSAES])的基础加密功能以及两种算法的密钥大小必须相同(例如,AES-128密钥封装算法和AES-128内容加密算法)。由于AES-128 CBC是实现内容加密算法的必备工具,因此在使用DH ephemeral static时,还必须支持AES-128密钥封装算法。
Note that S/MIME v3.1 clients might only implement key encryption and decryption using the rsaEncryption algorithm. Note that S/MIME v3 clients might only implement key encryption and decryption using the Diffie-Hellman algorithm. Also note that S/MIME v2 clients are only capable of decrypting content-encryption keys using the rsaEncryption algorithm.
请注意,S/MIME v3.1客户端可能仅使用RSA加密算法实现密钥加密和解密。请注意,S/MIME v3客户端可能仅使用Diffie-Hellman算法实现密钥加密和解密。还请注意,S/MIME v2客户端只能使用RSA加密算法解密内容加密密钥。
There are several CMS content types. Of these, only the Data, SignedData, EnvelopedData, and CompressedData content types are currently used for S/MIME.
有几种CMS内容类型。其中,只有Data、SignedData、EnvelopedData和CompressedData内容类型当前用于S/MIME。
Sending agents MUST use the id-data content type identifier to identify the "inner" MIME message content. For example, when applying a digital signature to MIME data, the CMS SignedData encapContentInfo eContentType MUST include the id-data object identifier and the media type MUST be stored in the SignedData encapContentInfo eContent OCTET STRING (unless the sending agent is using multipart/signed, in which case the eContent is absent, per Section 3.4.3 of this document). As another example, when applying encryption to MIME data, the CMS EnvelopedData encryptedContentInfo contentType MUST include the id-data object identifier and the encrypted MIME content MUST be stored in the EnvelopedData encryptedContentInfo encryptedContent OCTET STRING.
发送代理必须使用id数据内容类型标识符来标识“内部”MIME消息内容。例如,当对MIME数据应用数字签名时,CMS SignedData encapContentInfo eContentType必须包含id数据对象标识符,并且媒体类型必须存储在SignedData encapContentInfo eContent八进制字符串中(根据本文件第3.4.3节,除非发送代理使用多部分/签名,在这种情况下,没有eContent)。另一个示例是,当对MIME数据应用加密时,CMS EnvelopedData encryptedContentInfo contentType必须包含id数据对象标识符,并且加密的MIME内容必须存储在EnvelopedData encryptedContentInfo encryptedContent八进制字符串中。
Sending agents MUST use the SignedData content type to apply a digital signature to a message or, in a degenerate case where there is no signature information, to convey certificates. Applying a signature to a message provides authentication, message integrity, and non-repudiation of origin.
发送代理必须使用SignedData内容类型对消息应用数字签名,或者在没有签名信息的退化情况下传递证书。将签名应用于消息可提供身份验证、消息完整性和来源的不可否认性。
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 message recipient to use this service.
此内容类型用于对消息应用数据机密性。要使用此服务,发件人需要访问每个预期邮件收件人的公钥。
This content type is used to apply data compression to a message. This content type does not provide authentication, message integrity, non-repudiation, or data confidentiality, and is only used to reduce the message's size.
此内容类型用于对消息应用数据压缩。此内容类型不提供身份验证、消息完整性、不可否认性或数据机密性,仅用于减小消息的大小。
See Section 3.6 for further guidance on the use of this type in conjunction with other CMS types.
参见第3.6节,了解该类型与其他CMS类型结合使用的更多指南。
The SignerInfo type allows the inclusion of unsigned and signed attributes along with a signature.
SignerInfo类型允许将未签名和已签名属性与签名一起包含。
Receiving agents MUST be able to handle zero or one instance of each of the signed attributes listed here. Sending agents SHOULD generate one instance of each of the following signed attributes in each S/MIME message:
接收代理必须能够处理此处列出的每个已签名属性的零个或一个实例。发送代理应在每个S/MIME消息中生成以下每个签名属性的一个实例:
- Signing Time (section (Section 2.5.1 in this document)
- 签署时间(第节(本文件第2.5.1节)
- SMIME Capabilities (section (Section 2.5.2 in this document)
- SMIME功能(第节(本文档第2.5.2节)
- Encryption Key Preference (section (Section 2.5.3 in this document)
- 加密密钥首选项(第节(本文件第2.5.3节)
- Message Digest (section (Section 11.2 in [CMS])
- 信息摘要(第11.2节[CMS])
- Content Type (section (Section 11.1 in [CMS])
- 内容类型(第节[CMS]第11.1节)
Further, receiving agents SHOULD be able to handle zero or one instance of the signingCertificate and signingCertificatev2 signed attributes, as defined in Section 5 of RFC 2634 [ESS] and Section 3 of RFC 5035 [ESS].
此外,接收代理应该能够处理零个或一个signingCertificate和signingCertificatev2签名属性的实例,如RFC 2634[ESS]第5节和RFC 5035[ESS]第3节所定义。
Sending agents SHOULD generate one instance of the signingCertificate or signingCertificatev2 signed attribute in each SignerInfo structure.
发送代理应在每个SignerinInfo结构中生成signingCertificate或signingCertificatev2 signed属性的一个实例。
Additional attributes and values for these attributes might be defined in the future. Receiving agents SHOULD handle attributes or values that they do not recognize in a graceful manner.
将来可能会定义这些属性的其他属性和值。接收代理应该以优雅的方式处理它们无法识别的属性或值。
Interactive sending agents that include signed attributes that are not listed here SHOULD display those attributes to the user, so that the user is aware of all of the data being signed.
包含此处未列出的已签名属性的交互式发送代理应向用户显示这些属性,以便用户知道正在签名的所有数据。
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 message originator and therefore is only as trustworthy as the originator.
签名时间属性用于传递消息签名的时间。签名时间最有可能由消息发起者创建,因此只与发起者一样可信。
Sending agents MUST encode signing time through the year 2049 as UTCTime; signing times in 2050 or later MUST be encoded as GeneralizedTime. When the UTCTime CHOICE is used, S/MIME agents MUST interpret the year field (YY) as follows:
发送代理必须将2049年的签名时间编码为UTCTime;2050年或以后的签名时间必须编码为GeneralizedTime。使用UTCTime选项时,S/MIME代理必须按如下方式解释年份字段(YY):
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.
如果YY大于或等于50,则该年被解释为19YY;如果YY小于50,则年份被解释为20YY。
Receiving agents MUST be able to process signing-time attributes that are encoded in either UTCTime or GeneralizedTime.
接收代理必须能够处理以UTCTime或GeneralizedTime编码的签名时间属性。
The SMIMECapabilities attribute includes signature algorithms (such as "sha256WithRSAEncryption"), symmetric algorithms (such as "AES-128 CBC"), and key encipherment algorithms (such as "rsaEncryption"). There are also several identifiers that indicate support for other optional features such as binary encoding and compression. The SMIMECapabilities were designed to be flexible and extensible so that, in the future, a means of identifying other capabilities and preferences such as certificates can be added in a way that will not cause current clients to break.
SMIMECapabilities属性包括签名算法(如“SHA256WithRSA加密”)、对称算法(如“AES-128 CBC”)和密钥加密算法(如“RSA加密”)。还有几个标识符表示对其他可选功能(如二进制编码和压缩)的支持。SMIMECapabilities被设计为灵活和可扩展的,以便将来可以以不会导致当前客户端中断的方式添加一种识别其他功能和首选项(如证书)的方法。
If present, the SMIMECapabilities attribute MUST be a SignedAttribute; it MUST NOT be an UnsignedAttribute. CMS defines SignedAttributes as a SET OF Attribute. The SignedAttributes in a signerInfo MUST NOT include multiple instances of the SMIMECapabilities attribute. CMS defines the ASN.1 syntax for Attribute to include attrValues SET OF AttributeValue. A SMIMECapabilities attribute MUST only include a single instance of AttributeValue. There MUST NOT be zero or multiple instances of AttributeValue present in the attrValues SET OF AttributeValue.
如果存在,SMIMECapabilities属性必须是SignedAttribute;它不能是未签名的属性。CMS将SignedAttribute定义为一组属性。signerInfo中的SignedAttribute不能包含多个SMIMECapabilities属性实例。CMS为属性定义ASN.1语法,以包括AttributeValue的attrValues集。SMIMECapabilities属性只能包含AttributeValue的单个实例。AttributeValue的attrValues集合中不能存在AttributeValue的零个或多个实例。
The semantics of the SMIMECapabilities attribute specify a partial list as to what the client announcing the SMIMECapabilities can support. A client does not have to list every capability it supports, and need not list all its capabilities so that the capabilities list doesn't get too long. In an SMIMECapabilities attribute, the object identifiers (OIDs) are listed in order of their preference, but SHOULD be separated logically along the lines of their categories (signature algorithms, symmetric algorithms, key encipherment algorithms, etc.).
SMIMECapabilities属性的语义指定了一个部分列表,其中列出了宣布SMIMECapabilities的客户端可以支持的内容。客户机不必列出它支持的所有功能,也不必列出它的所有功能,这样功能列表就不会太长。在smimecapability属性中,对象标识符(OID)按其偏好顺序列出,但应按照其类别(签名算法、对称算法、密钥加密算法等)进行逻辑分离。
The structure of the SMIMECapabilities attribute is to facilitate simple table lookups and binary comparisons in order to determine matches. For instance, the DER-encoding for the SMIMECapability for AES-128 CBC MUST be identically encoded regardless of the implementation. Because of the requirement for identical encoding,
SMIMECapabilities属性的结构是为了方便简单的表查找和二进制比较,以便确定匹配项。例如,AES-128 CBC的SMIMECapability的DER编码必须是相同的编码,而不管实现如何。由于对相同编码的要求,
individuals documenting algorithms to be used in the SMIMECapabilities attribute SHOULD explicitly document the correct byte sequence for the common cases.
记录SMIMECapabilities属性中使用的算法的个人应明确记录常见情况下的正确字节序列。
For any capability, the associated parameters for the OID MUST specify all of the parameters necessary to differentiate between two instances of the same algorithm.
对于任何功能,OID的关联参数必须指定区分同一算法的两个实例所需的所有参数。
The OIDs that correspond to algorithms SHOULD use the same OID as the actual algorithm, except in the case where the algorithm usage is ambiguous from the OID. For instance, in an earlier specification, rsaEncryption was ambiguous because it could refer to either a signature algorithm or a key encipherment algorithm. In the event that an OID is ambiguous, it needs to be arbitrated by the maintainer of the registered SMIMECapabilities list as to which type of algorithm will use the OID, and a new OID MUST be allocated under the smimeCapabilities OID to satisfy the other use of the OID.
与算法对应的OID应使用与实际算法相同的OID,除非算法用法与OID不明确。例如,在早期的规范中,RSA加密是不明确的,因为它可以引用签名算法或密钥加密算法。如果OID不明确,则需要由注册的SMIMECapabilities列表的维护者仲裁哪种类型的算法将使用OID,并且必须在SMIMECapabilities OID下分配新的OID以满足OID的其他用途。
The registered SMIMECapabilities list specifies the parameters for OIDs that need them, most notably key lengths in the case of variable-length symmetric ciphers. In the event that there are no differentiating parameters for a particular OID, the parameters MUST be omitted, and MUST NOT be encoded as NULL. Additional values for the SMIMECapabilities attribute might be defined in the future. Receiving agents MUST handle a SMIMECapabilities object that has values that it does not recognize in a graceful manner.
registered SMIMECapabilities列表指定了需要它们的OID的参数,尤其是可变长度对称密码的密钥长度。如果特定OID没有区分参数,则必须忽略这些参数,并且不得将其编码为NULL。将来可能会定义SMIMECapabilities属性的其他值。接收代理必须处理SMIMECapabilities对象,该对象的值不能被优雅地识别。
Section 2.7.1 explains a strategy for caching capabilities.
第2.7.1节解释了缓存功能的策略。
The encryption key preference attribute allows the signer to unambiguously describe which of the signer's certificates has the signer's preferred encryption key. This attribute is designed to enhance behavior for interoperating with those clients that use separate keys for encryption and signing. This attribute is used to convey to anyone viewing the attribute which of the listed certificates is appropriate for encrypting a session key for future encrypted messages.
“加密密钥首选项”属性允许签名者明确描述签名者的哪些证书具有签名者的首选加密密钥。此属性旨在增强与使用单独密钥进行加密和签名的客户端进行互操作的行为。此属性用于向查看该属性的任何人传达列出的证书中的哪一个适合加密会话密钥以用于将来加密的消息。
If present, the SMIMEEncryptionKeyPreference attribute MUST be a SignedAttribute; it MUST NOT be an UnsignedAttribute. CMS defines SignedAttributes as a SET OF Attribute. The SignedAttributes in a signerInfo MUST NOT include multiple instances of the SMIMEEncryptionKeyPreference attribute. CMS defines the ASN.1 syntax for Attribute to include attrValues SET OF AttributeValue. A SMIMEEncryptionKeyPreference attribute MUST only include a single
如果存在,SMIMEEncryptionKeyPreference属性必须是SignedAttribute;它不能是未签名的属性。CMS将SignedAttribute定义为一组属性。signerInfo中的SignedAttribute不能包含多个SMIMEEncryptionKeyPreference属性实例。CMS为属性定义ASN.1语法,以包括AttributeValue的attrValues集。SMIMEEncryptionKeyPreference属性只能包含一个
instance of AttributeValue. There MUST NOT be zero or multiple instances of AttributeValue present in the attrValues SET OF AttributeValue.
AttributeValue的实例。AttributeValue的attrValues集合中不能存在AttributeValue的零个或多个实例。
The sending agent SHOULD include the referenced certificate in the set of certificates included in the signed message if this attribute is used. The certificate MAY be omitted if it has been previously made available to the receiving agent. Sending agents SHOULD use this attribute if the commonly used or preferred encryption certificate is not the same as the certificate used to sign the message.
如果使用此属性,则发送代理应将引用的证书包括在已签名消息中包含的证书集中。如果先前已向接收代理提供证书,则可省略该证书。如果常用或首选加密证书与用于签名邮件的证书不同,则发送代理应使用此属性。
Receiving agents SHOULD store the preference data if the signature on the message is valid and the signing time is greater than the currently stored value. (As with the SMIMECapabilities, the clock skew SHOULD be checked and the data not used if the skew is too great.) Receiving agents SHOULD respect the sender's encryption key preference attribute if possible. This, however, represents only a preference and the receiving agent can use any certificate in replying to the sender that is valid.
如果消息上的签名有效且签名时间大于当前存储的值,则接收代理应存储首选项数据。(与SMIMECapabilities一样,应检查时钟偏差,如果偏差太大,则不使用数据。)如果可能,接收代理应尊重发送方的加密密钥首选项属性。但是,这只表示首选项,并且接收方代理可以使用任何有效的证书回复发送方。
Section 2.7.1 explains a strategy for caching preference data.
第2.7.1节解释了缓存首选项数据的策略。
In order to determine the key management certificate to be used when sending a future CMS EnvelopedData message for a particular recipient, the following steps SHOULD be followed:
为了确定在为特定收件人发送未来CMS信封数据消息时要使用的密钥管理证书,应遵循以下步骤:
- If an SMIMEEncryptionKeyPreference attribute is found in a SignedData object received from the desired recipient, this identifies the X.509 certificate that SHOULD be used as the X.509 key management certificate for the recipient.
- 如果在从所需收件人接收的SignedData对象中找到SMIMEEncryptionKeyPreference属性,则会标识应用作收件人的X.509密钥管理证书的X.509证书。
- If an SMIMEEncryptionKeyPreference attribute is not found in a SignedData object received from the desired recipient, the set of X.509 certificates SHOULD be searched for a X.509 certificate with the same subject name as the signer of a X.509 certificate that can be used for key management.
- 如果在从所需收件人接收的SignedData对象中未找到SMIMEEncryptionKeyPreference属性,则应在X.509证书集中搜索与可用于密钥管理的X.509证书的签名者具有相同使用者名称的X.509证书。
- Or use some other method of determining the user's key management key. If a X.509 key management certificate is not found, then encryption cannot be done with the signer of the message. If multiple X.509 key management certificates are found, the S/MIME agent can make an arbitrary choice between them.
- 或者使用一些其他方法来确定用户的密钥管理密钥。如果未找到X.509密钥管理证书,则无法对消息的签名者进行加密。如果找到多个X.509密钥管理证书,S/MIME代理可以在它们之间进行任意选择。
S/MIME v3.2 implementations MUST support both issuerAndSerialNumber and subjectKeyIdentifier. Messages that use the subjectKeyIdentifier choice cannot be read by S/MIME v2 clients.
S/MIME v3.2实现必须同时支持issuerAndSerialNumber和subjectKeyIdentifier。S/MIME v2客户端无法读取使用subjectKeyIdentifier选项的消息。
It is important to understand that some certificates use a value for subjectKeyIdentifier that is not suitable for uniquely identifying a certificate. Implementations MUST be prepared for multiple certificates for potentially different entities to have the same value for subjectKeyIdentifier, and MUST be prepared to try each matching certificate during signature verification before indicating an error condition.
必须了解,某些证书使用的subjectKeyIdentifier值不适合唯一标识证书。实现必须为可能不同实体的多个证书做好准备,以使subjectKeyIdentifier具有相同的值,并且必须准备在指示错误条件之前,在签名验证期间尝试每个匹配的证书。
Sending and receiving agents:
发送和接收代理:
- MUST support encryption and decryption with AES-128 CBC [CMSAES].
- 必须支持AES-128 CBC[CMSAES]的加密和解密。
- SHOULD+ support encryption and decryption with AES-192 CBC and AES-256 CBC [CMSAES].
- 应+支持AES-192 CBC和AES-256 CBC[CMSAES]的加密和解密。
- SHOULD- support encryption and decryption with DES EDE3 CBC, hereinafter called "tripleDES" [CMSALG].
- 应-支持DES EDE3 CBC的加密和解密,以下称为“tripleDES”[CMSALG]。
When a sending agent creates an encrypted message, it has to decide which type of encryption to use. The decision process involves using information garnered from the capabilities lists included in messages received from the recipient, as well as out-of-band information such as private agreements, user preferences, legal restrictions, and so on.
当发送代理创建加密消息时,它必须决定使用哪种加密类型。决策过程涉及使用从收件人收到的消息中包含的功能列表中收集的信息,以及带外信息,如私人协议、用户首选项、法律限制等。
Section 2.5.2 defines a method by which a sending agent can optionally announce, among other things, its decrypting capabilities in its order of preference. The following method for processing and remembering the encryption capabilities attribute in incoming signed messages SHOULD be used.
第2.5.2节定义了一种方法,通过该方法,发送代理可以选择按其优先顺序宣布其解密能力。应使用以下方法来处理和记住传入签名消息中的加密功能属性。
- If the receiving agent has not yet created a list of capabilities for the sender's public key, then, after verifying the signature on the incoming message and checking the timestamp, the receiving agent SHOULD create a new list containing at least the signing time and the symmetric capabilities.
- 如果接收代理尚未为发送方的公钥创建功能列表,则在验证传入消息上的签名并检查时间戳后,接收代理应创建一个至少包含签名时间和对称功能的新列表。
- If such a list already exists, the receiving agent SHOULD verify that the signing time in the incoming message is greater than the signing time stored in the list and that the signature is valid. If so, the receiving agent SHOULD update both the signing time and capabilities in the list. Values of the signing time that lie far in the future (that is, a greater discrepancy than any reasonable clock skew), or a capabilities 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 messages.
应存储功能列表,以便将来在创建消息时使用。
Before sending a message, the sending agent MUST decide whether it is willing to use weak encryption for the particular data in the message. If the sending agent decides that weak encryption is unacceptable for this data, then the sending agent MUST NOT use a weak algorithm. The decision to use or not use weak encryption overrides any other decision in this section about which encryption algorithm to use.
在发送消息之前,发送代理必须决定是否愿意对消息中的特定数据使用弱加密。如果发送代理决定此数据不能接受弱加密,则发送代理不得使用弱算法。使用或不使用弱加密的决定将覆盖本节中有关使用哪种加密算法的任何其他决定。
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 to a message. These rules are ordered, so the sending agent SHOULD make its decision in the order given.
第2.7.1.1节至第2.7.1.2节描述了发送代理在决定将对消息应用哪种类型的加密时应使用的决定。这些规则是有序的,因此发送代理应该按照给定的顺序做出决定。
If the sending agent has received a set of capabilities from the recipient for the message the agent is about to encrypt, then the sending agent SHOULD use that information by selecting the first capability in the list (that is, the capability most preferred by 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 agent reasonably expects the recipient to be able to decrypt the message.
如果发送代理已从收件人处收到一组代理将要加密的消息的功能,则发送代理应通过选择列表中发送代理知道如何加密的第一个功能(即预期收件人最喜欢的功能)来使用该信息。如果发送代理合理地期望收件人能够解密邮件,则发送代理应使用列表中的功能之一。
If the following two conditions are met:
如果满足以下两个条件:
- the sending agent has no knowledge of the encryption capabilities of the recipient, and
- 发送代理不知道收件人的加密功能,以及
- the sending agent has no knowledge of the version of S/MIME of the recipient,
- 发送代理不知道收件人的S/MIME版本,
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 chooses not to use AES-128 in this step, it SHOULD use tripleDES.
然后发送代理应该使用AES-128,因为它是一种更强的算法,并且是S/MIME v3.2所要求的。如果发送代理在此步骤中选择不使用AES-128,则应使用三元组。
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 allow a human sender to determine the risks of sending data using a weak encryption algorithm before sending the data, and possibly allow the human to use a stronger encryption method such as tripleDES or AES.
许多人认为所有使用40位密钥的算法都是弱加密。由人工控制的发送代理应允许人工发送者在发送数据之前确定使用弱加密算法发送数据的风险,并可能允许人工使用更强的加密方法,如tripleDES或AES。
If a sending agent is composing an encrypted message to a group of recipients where the encryption capabilities of some of the recipients do not overlap, the sending agent is forced to send more than one message. Please note that if the sending agent chooses to send a message encrypted with a strong algorithm, and then send the same message encrypted with a weak algorithm, someone watching the communications channel could learn the contents of the strongly encrypted message simply by decrypting the weakly encrypted message.
如果发送代理正在向一组收件人发送加密邮件,其中某些收件人的加密功能不重叠,则发送代理将被迫发送多条邮件。请注意,如果发送代理选择发送使用强算法加密的消息,然后发送使用弱算法加密的相同消息,则观察通信通道的人只需解密弱加密消息,即可了解强加密消息的内容。
This section describes the S/MIME message formats and how they are created. S/MIME messages are a combination of MIME bodies and CMS content types. Several media types as well as several CMS content types are used. The data to be secured is always a canonical MIME entity. The MIME entity and other data, such as certificates and algorithm identifiers, are given to CMS processing facilities that produce a CMS object. Finally, the CMS object is wrapped in MIME. The Enhanced Security Services for S/MIME [ESS] document provides descriptions of how nested, secured S/MIME messages are formatted. ESS provides a description of how a triple-wrapped S/MIME message is formatted using multipart/signed and application/pkcs7-mime for the signatures.
本节介绍S/MIME消息格式及其创建方式。S/MIME消息是MIME正文和CMS内容类型的组合。使用了几种媒体类型以及几种CMS内容类型。要保护的数据始终是规范的MIME实体。MIME实体和其他数据(如证书和算法标识符)被提供给产生CMS对象的CMS处理设施。最后,CMS对象被包装在MIME中。增强的S/MIME安全服务[ESS]文档描述了嵌套的安全S/MIME消息的格式。ESS描述了如何使用签名的multipart/signed和application/pkcs7 MIME对三层包装的S/MIME消息进行格式化。
S/MIME provides one format for enveloped-only data, several formats for signed-only data, and several formats for signed and enveloped data. Several formats are required to accommodate several environments, in particular for signed messages. The criteria for choosing among these formats are also described.
S/MIME为仅封装数据提供了一种格式,为仅签名数据提供了几种格式,为签名和封装数据提供了几种格式。需要多种格式来适应多种环境,特别是对于签名消息。还描述了在这些格式中选择的标准。
The reader of this section is expected to understand MIME as described in [MIME-SPEC] and [MIME-SECURE].
本节的读者应理解[MIME-SPEC]和[MIME-SECURE]中所述的MIME。
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-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 header. Note that S/MIME can also be used to secure MIME entities used in applications other than Internet mail. If protection of the RFC-822 header is required, the use of the message/rfc822 media type is explained later in this section.
S/MIME用于保护MIME实体。MIME实体可以是消息的子部分或子部分,也可以是整个消息及其所有子部分。作为整个消息的MIME实体只包括MIME消息头和MIME正文,不包括RFC-822头。请注意,S/MIME还可用于保护除Internet邮件以外的应用程序中使用的MIME实体。如果需要保护RFC-822报头,本节后面将解释消息/rfc822媒体类型的使用。
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 "innermost" object in what is possibly a larger MIME message. Processing "outside" MIME entities into CMS content types is described in Sections 3.2, 3.4, and elsewhere.
本节中描述的受保护MIME实体可以被视为“内部”MIME实体。也就是说,它可能是更大的MIME消息中的“最内层”对象。将“外部”MIME实体处理为CMS内容类型在第3.2节、第3.4节和其他地方进行了描述。
The procedure for preparing a MIME entity is given in [MIME-SPEC]. The same procedure is used here with some additional restrictions when signing. The description of the procedures from [MIME-SPEC] is repeated here, but it is suggested that the reader refer to that document for the exact procedure. This section also describes additional requirements.
[MIME-SPEC]中给出了准备MIME实体的过程。这里使用相同的过程,但在签名时有一些附加限制。此处重复[MIME-SPEC]中的过程描述,但建议读者参考该文档了解确切的过程。本节还描述了其他要求。
A single procedure is used for creating MIME entities that are to have any combination of signing, enveloping, and compressing applied. Some additional steps are recommended to defend against known corruptions that can occur during mail transport that are of particular importance for clear-signing using the multipart/signed format. It is recommended that these additional steps be performed on enveloped messages, or signed and enveloped messages, so that the message can be forwarded to any environment without modification.
一个过程用于创建MIME实体,这些实体将应用签名、封装和压缩的任意组合。建议采取一些额外的步骤来防止邮件传输过程中可能发生的已知损坏,这些损坏对于使用多部分/签名格式的清除签名特别重要。建议对封装的消息或签名和封装的消息执行这些附加步骤,以便在不进行修改的情况下将消息转发到任何环境。
These steps are descriptive rather than prescriptive. The implementer is free to use any procedure as long as the result is the same.
这些步骤是描述性的,而不是规定性的。只要结果相同,实现者就可以自由使用任何过程。
Step 1. The MIME entity is prepared according to the local conventions.
第一步。MIME实体是根据本地约定准备的。
Step 2. The leaf parts of the MIME entity are converted to canonical form.
第二步。MIME实体的叶部分将转换为规范形式。
Step 3. Appropriate transfer encoding is applied to the leaves of the MIME entity.
第三步。对MIME实体的叶子应用适当的传输编码。
When an S/MIME message is received, the security services on the 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 further decoded and presented to the user or receiving application.
当接收到S/MIME消息时,将处理消息上的安全服务,结果是MIME实体。该MIME实体通常被传递给支持MIME的用户代理,在那里它被进一步解码并呈现给用户或接收应用程序。
In order to protect outer, non-content-related message header fields (for instance, the "Subject", "To", "From", and "Cc" fields), the sending client MAY wrap a full MIME message in a message/rfc822 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 this "inner" header along with the unprotected "outer" header.
为了保护外部的、与内容无关的消息头字段(例如,“主题”、“收件人”、“发件人”和“抄送”字段),发送客户端可以将完整的MIME消息包装在消息/rfc822包装器中,以便将S/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 the intent was to provide header protection. This entity SHOULD be presented as the top-level message, taking into account header merging issues as previously discussed.
当接收到S/MIME消息时,如果顶级受保护MIME实体的内容类型为message/rfc822,则可以假定其目的是提供头保护。考虑到前面讨论的头合并问题,此实体应作为顶级消息显示。
Each MIME entity MUST be converted to a canonical form that is uniquely and unambiguously representable in the environment where the signature is created and the environment where the signature will be verified. MIME entities MUST be canonicalized for enveloping and compressing as well as signing.
必须将每个MIME实体转换为规范形式,该规范形式在创建签名的环境和验证签名的环境中唯一且明确地表示。MIME实体必须规范化,以便封装、压缩和签名。
The exact details of canonicalization depend on the actual media type and subtype of an entity, and are not described here. Instead, the standard for the particular media type SHOULD be consulted. For example, canonicalization of type text/plain is different from canonicalization of audio/basic. Other than text types, most types have only one representation regardless of computing platform or environment that can be considered their canonical representation. In general, canonicalization will be performed by the non-security part of the sending agent rather than the S/MIME implementation.
规范化的确切细节取决于实体的实际媒体类型和子类型,此处不作描述。相反,应参考特定媒体类型的标准。例如,text/plain类型的规范化不同于audio/basic类型的规范化。除了文本类型之外,大多数类型只有一种表示形式,而不管计算平台或环境如何,它们都可以被视为它们的规范表示形式。通常,规范化将由发送代理的非安全部分执行,而不是由S/MIME实现执行。
The most common and important canonicalization is for text, which is often represented differently in different environments. MIME entities of major type "text" MUST have both their line endings and character set canonicalized. The line ending MUST be the pair of characters <CR><LF>, and the charset SHOULD be a registered charset [CHARSETS]. The details of the canonicalization are specified in [MIME-SPEC].
最常见和最重要的规范化是针对文本的规范化,在不同的环境中,文本通常有不同的表示。主要类型为“text”的MIME实体的行尾和字符集都必须规范化。行尾必须是一对字符<CR><LF>,并且字符集应该是注册的字符集[charset]。规范化的详细信息在[MIME-SPEC]中指定。
Note that some charsets such as ISO-2022 have multiple representations for the same characters. When preparing such text for signing, the canonical representation specified for the charset MUST be used.
请注意,某些字符集(如ISO-2022)具有相同字符的多个表示形式。准备此类文本进行签名时,必须使用为字符集指定的规范表示。
When generating any of the secured MIME entities below, except the signing using the multipart/signed format, no transfer encoding is required at all. S/MIME implementations MUST be able to deal with binary MIME objects. If no Content-Transfer-Encoding header field is present, the transfer encoding is presumed to be 7BIT.
生成以下任何受保护的MIME实体时,除了使用多部分/签名格式的签名外,根本不需要传输编码。S/MIME实现必须能够处理二进制MIME对象。如果不存在内容传输编码头字段,则传输编码假定为7BIT。
S/MIME implementations SHOULD however use transfer encoding described 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 not exposed to the transport, is that it allows the MIME entity to be handled in any environment without changing it. For example, a trusted gateway might remove the envelope, but not the signature, of a message, and then forward the signed message on to the end 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-area network with a single mail gateway, verifying the signature will not be possible unless the original MIME entity was only 7-bit data.
但是,S/MIME实现应使用第3.1.3节中所述的传输编码来保护所有MIME实体。仅保护7位MIME实体的原因是,它允许在任何环境中处理MIME实体,而无需对其进行更改,即使对于未暴露于传输的封装数据也是如此。例如,可信网关可能会删除邮件的信封,但不会删除签名,然后将签名邮件转发给最终收件人,以便他们可以直接验证签名。如果站点内部的传输不是8位干净的,例如在具有单个邮件网关的广域网上,则无法验证签名,除非原始MIME实体仅为7位数据。
S/MIME implementations that "know" that all intended recipients are capable of handling inner (all but the outermost) binary MIME objects SHOULD use binary encoding as opposed to a 7-bit-safe transfer encoding for the inner entities. The use of a 7-bit-safe encoding (such as base64) would unnecessarily expand the message size. Implementations MAY "know" that recipient implementations are capable of handling inner binary MIME entities either by interpreting the id-cap-preferBinaryInside SMIMECapabilities attribute, by prior agreement, or by other means.
如果S/MIME实现“知道”所有预期收件人都能够处理内部(除最外层外的所有)二进制MIME对象,则应使用二进制编码,而不是内部实体的7位安全传输编码。使用7位安全编码(如base64)会不必要地扩大消息大小。实现可能“知道”接收方实现能够通过解释id cap preferBinaryInside SMIMECapabilities属性、事先约定或其他方式来处理内部二进制MIME实体。
If one or more intended recipients are unable to handle inner binary MIME objects, or if this capability is unknown for any of the intended recipients, S/MIME implementations SHOULD use transfer encoding described in Section 3.1.3 for all MIME entities they secure.
如果一个或多个预期收件人无法处理内部二进制MIME对象,或者如果任何预期收件人都不知道此功能,则S/MIME实现应使用第3.1.3节中所述的传输编码来保护所有MIME实体。
If a multipart/signed entity is ever to be transmitted over the standard Internet SMTP infrastructure or other transport that is 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 data already need no transfer encoding. Entities such as 8-bit text and binary data can be encoded with quoted-printable or base-64 transfer encoding.
如果要通过标准Internet SMTP基础设施或其他限制为7位文本的传输传输多部分/签名实体,则必须应用传输编码,以便将其表示为7位文本。7位数据的MIME实体已经不需要传输编码。实体(如8位文本和二进制数据)可以使用带引号的可打印或base-64传输编码进行编码。
The primary reason for the 7-bit requirement is that the Internet mail transport infrastructure cannot guarantee transport of 8-bit or binary data. Even though many segments of the transport 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 mail message with 8-bit data were to encounter a message transfer agent that cannot transmit 8-bit or binary data, the agent has three options, none of which are acceptable for a clear-signed message:
7位要求的主要原因是Internet邮件传输基础设施无法保证8位或二进制数据的传输。尽管传输基础设施的许多部分现在处理8位甚至二进制数据,但有时不可能知道传输路径是否是8位干净的。如果具有8位数据的邮件遇到无法传输8位或二进制数据的邮件传输代理,则该代理有三个选项,其中任何一个选项都不适用于无签名邮件:
- The agent could change the transfer encoding; this would invalidate the signature.
- 代理可以更改传输编码;这将使签名无效。
- The agent could transmit the data anyway, which would most likely result in the 8th bit being corrupted; this too would invalidate the signature.
- 代理无论如何都可以传输数据,这很可能导致第8位被破坏;这也会使签名无效。
- The agent could return the message to the sender.
- 代理可以将邮件返回给发件人。
[MIME-SECURE] prohibits an agent from changing the transfer encoding of the first part of a multipart/signed message. If a compliant agent that cannot transmit 8-bit or binary data encounters a 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.
[MIME-SECURE]禁止代理更改多部分/签名消息第一部分的传输编码。如果无法传输8位或二进制数据的兼容代理在第一部分遇到包含8位或二进制数据的多部分/签名消息,则必须将消息作为无法送达返回给发送方。
This example shows a multipart/mixed message with full transfer encoding. This message contains a text part and an attachment. The sample message text includes characters that are not US-ASCII and 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 text, and the transfer encoded parts, all MUST be <CR><LF>.
此示例显示了具有完全传输编码的多部分/混合消息。此邮件包含文本部分和附件。示例消息文本包含非US-ASCII字符,因此需要进行传输编码。虽然此处未显示,但每行的末尾都是<CR><LF>。MIME头、文本和传输编码部分的行尾都必须是<CR><LF>。
Note that this example is not of an S/MIME message.
请注意,此示例不是S/MIME消息的示例。
Content-Type: multipart/mixed; boundary=bar
Content-Type: multipart/mixed; boundary=bar
--bar Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
--bar Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
=A1Hola Michael!
嗨,迈克尔!
How do you like the new S/MIME specification?
您觉得新的S/MIME规范怎么样?
It's generally a good idea to encode lines that begin with From=20because some mail transport agents will insert a greater-than (>) sign, thus invalidating the signature.
通常最好对以From=20开头的行进行编码,因为某些邮件传输代理会插入大于(>)的符号,从而使签名无效。
Also, in some cases it might be desirable to encode any =20 trailing whitespace that occurs on lines in order to ensure =20 that the message signature is not invalidated when passing =20 a gateway that modifies such whitespace (like BITNET). =20
此外,在某些情况下,可能需要对行上出现的任何=20尾随空格进行编码,以确保在传递=20修改此类空格的网关(如BITNET)时,消息签名不会失效=20
--bar Content-Type: image/jpeg Content-Transfer-Encoding: base64
--bar Content-Type: image/jpeg Content-Transfer-Encoding: base64
iQCVAwUBMJrRF2N9oWBghPDJAQE9UQQAtl7LuRVndBjrk4EqYBIb3h5QXIX/LC// jJV5bNvkZIGPIcEmI5iFd9boEgvpirHtIREEqLQRkYNoBActFBZmh9GC3C041WGq uMbrbxc+nIs1TIKlA08rVi9ig/2Yh7LFrK5Ein57U/W72vgSxLhe/zhdfolT9Brn HOxEa44b+EI=
iQCVAwUBMJrRF2N9oWBghPDJAQE9UQQAtl7LuRVndBjrk4EqYBIb3h5QXIX/LC// jJV5bNvkZIGPIcEmI5iFd9boEgvpirHtIREEqLQRkYNoBActFBZmh9GC3C041WGq uMbrbxc+nIs1TIKlA08rVi9ig/2Yh7LFrK5Ein57U/W72vgSxLhe/zhdfolT9Brn HOxEa44b+EI=
--bar--
--酒吧--
The application/pkcs7-mime media type is used to carry CMS content types including EnvelopedData, SignedData, and CompressedData. The details of constructing these entities are described in subsequent sections. This section describes the general characteristics of the application/pkcs7-mime media type.
application/pkcs7 mime媒体类型用于承载CMS内容类型,包括EnvelopedData、SignedData和CompressedData。构建这些实体的详细信息将在后续章节中介绍。本节介绍应用程序/pkcs7 mime媒体类型的一般特征。
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 contents MAY be carried when the eContentType contains different values. See [ESS] for an example of this with signed receipts.
如果eContentType是id数据,则所携带的CMS对象始终包含按照第3.1节中所述准备的MIME实体。当eContentType包含不同的值时,可以携带其他内容。请参见[ESS]以了解带有签名收据的示例。
Since CMS content types are binary data, in most cases base-64 transfer encoding is appropriate, in particular, when used with SMTP transport. The transfer encoding used depends on the transport through which the object is to be sent, and is not a characteristic of the media type.
由于CMS内容类型是二进制数据,在大多数情况下,base-64传输编码是合适的,尤其是在与SMTP传输一起使用时。使用的传输编码取决于要发送对象的传输,而不是媒体类型的特征。
Note that this discussion refers to the transfer encoding of the CMS object or "outside" MIME entity. It is completely distinct from, and 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对象或“外部”MIME实体的传输编码。它与CMS对象(第3.1节中描述的“内部”对象)保护的MIME实体的传输编码完全不同,也不相关。
Because there are several types of application/pkcs7-mime objects, a sending agent SHOULD do as much as possible to help a receiving agent know about the contents of the object without forcing the receiving agent to decode the ASN.1 for the object. The Content-Type header field of all application/pkcs7-mime objects SHOULD include the optional "smime-type" parameter, as described in the following sections.
由于存在多种类型的application/pkcs7 mime对象,因此发送代理应尽可能帮助接收代理了解对象的内容,而无需强制接收代理解码对象的ASN.1。所有application/pkcs7 mime对象的Content-Type头字段都应该包括可选的“smime-Type”参数,如下节所述。
For the application/pkcs7-mime, sending agents SHOULD emit the optional "name" parameter to the Content-Type field for compatibility with older systems. Sending agents SHOULD also emit the optional Content-Disposition field [CONTDISP] with the "filename" parameter. If a sending agent emits the above parameters, the value of the parameters SHOULD be a file name with the appropriate extension:
对于application/pkcs7 mime,发送代理应该向Content-Type字段发出可选的“name”参数,以便与旧系统兼容。发送代理还应发出带有“filename”参数的可选内容处置字段[CONTDISP]。如果发送代理发出上述参数,则参数值应为具有适当扩展名的文件名:
Media Type File Extension application/pkcs7-mime (SignedData, EnvelopedData) .p7m application/pkcs7-mime (degenerate SignedData .p7c certificate management message) application/pkcs7-mime (CompressedData) .p7z application/pkcs7-signature (SignedData) .p7s
媒体类型文件扩展名应用程序/pkcs7 mime(SignedData,EnvelopedData).p7m应用程序/pkcs7 mime(退化SignedData.p7c证书管理消息)应用程序/pkcs7 mime(CompressedData).p7z应用程序/pkcs7签名(SignedData).p7s
In addition, the file name SHOULD be limited to eight characters followed by a three-letter extension. The eight-character filename 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 S/MIME.
此外,文件名应限制为八个字符,后跟三个字母的扩展名。八个字符的文件名基可以是任何不同的名称;应使用文件名基“smime”来指示MIME实体与S/MIME关联。
Including a file name serves two purposes. It facilitates easier use of S/MIME objects as files on disk. It also can convey type information across gateways. When a MIME entity of type 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 to application/octet-stream and treat it as a generic attachment, thus losing the type information. However, the suggested filename for an attachment is often carried across a gateway. This often allows the receiving systems to determine the appropriate application to hand the attachment off to, in this case, a stand-alone S/MIME processing application. Note that this mechanism is provided as a convenience for implementations in certain environments. A proper S/MIME implementation MUST use the media types and MUST NOT rely on the file extensions.
包含文件名有两个目的。它便于将S/MIME对象作为磁盘上的文件使用。它还可以跨网关传递类型信息。当类型为application/pkcs7 MIME(例如)的MIME实体到达对S/MIME没有特殊知识的网关时,它会将实体的媒体类型默认为application/octet stream,并将其视为通用附件,从而丢失类型信息。但是,附件的建议文件名通常通过网关传送。这通常允许接收系统确定适当的应用程序,以便将附件移交给独立的S/MIME处理应用程序。请注意,提供此机制是为了方便在某些环境中实现。正确的S/MIME实现必须使用媒体类型,并且不能依赖于文件扩展名。
The application/pkcs7-mime content type defines the optional "smime-type" parameter. The intent of this parameter is to convey details about the security applied (signed or enveloped) along with information about the contained content. This specification defines the following smime-types.
application/pkcs7 mime内容类型定义可选的“smime类型”参数。此参数的目的是传递有关应用(签名或封装)的安全性的详细信息以及有关包含内容的信息。本规范定义了以下smime类型。
Name CMS Type Inner Content enveloped-data EnvelopedData id-data signed-data SignedData id-data certs-only SignedData none compressed-data CompressedData id-data
名称CMS类型内部内容信封数据信封数据id数据签名数据id数据证书仅签名数据无压缩数据压缩数据id数据
In order for consistency to be obtained with future specifications, the following guidelines SHOULD be followed when assigning a new smime-type parameter.
为了与将来的规范保持一致,在指定新的smime类型参数时,应遵循以下准则。
1. If both signing and encryption can be applied to the content, then two values for smime-type SHOULD be assigned "signed-*" and "enveloped-*". If one operation can be assigned, then this can be omitted. Thus, since "certs-only" can only be signed, "signed-" is omitted.
1. 如果签名和加密都可以应用于内容,则smime类型的两个值应指定为“signed-*”和“enveloped-*”。如果可以分配一个操作,则可以省略该操作。因此,由于只能对“仅证书”进行签名,因此省略了“已签名-”。
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 content.
2. 应该为内容OID分配一个公共字符串。当MIME是内部内容时,我们使用“数据”作为id数据内容OID。
3. If no common string is assigned, then the common string of "OID.<oid>" is recommended (for example, "OID.2.16.840.1.101.3.4.1.2" would be AES-128 CBC).
3. 如果未分配公共字符串,则建议使用“OID.<OID>”公共字符串(例如,“OID.2.16.840.1.101.3.4.1.2”应为AES-128 CBC)。
It is explicitly intended that this field be a suitable hint for mail client applications to indicate whether a message is "signed" or "enveloped" without having to tunnel into the CMS payload.
明确地说,该字段是邮件客户端应用程序的适当提示,用于指示消息是“已签名”还是“已封装”,而无需通过隧道进入CMS有效负载。
This section describes the format for enveloping a MIME entity without signing it. It is important to note that sending enveloped but not signed messages does not provide for data integrity. It is possible to replace ciphertext in such a way that the processed message will still be valid, but the meaning can be altered.
本节描述了封装MIME实体而不进行签名的格式。需要注意的是,发送封装但未签名的消息不会提供数据完整性。可以通过这样的方式替换密文,即处理后的消息仍然有效,但其含义可以更改。
Step 1. The MIME entity to be enveloped is prepared according to Section 3.1.
第一步。要封装的MIME实体根据第3.1节准备。
Step 2. The MIME entity and other required data is processed into a CMS object of type EnvelopedData. In addition to encrypting a copy of the content-encryption key for each recipient, a copy of the content-encryption key SHOULD be encrypted for the originator and included in the EnvelopedData (see [CMS], Section 6).
第二步。MIME实体和其他所需数据被处理为EnvelopedData类型的CMS对象。除了为每个收件人加密一份内容加密密钥副本外,还应为发起人加密一份内容加密密钥副本,并将其包含在信封数据中(见[CMS],第6节)。
Step 3. The EnvelopedData object is wrapped in a CMS ContentInfo object.
第三步。EnvelopedData对象包装在CMS ContentInfo对象中。
Step 4. The ContentInfo object is inserted into an application/pkcs7-mime MIME entity.
第四步。ContentInfo对象被插入到application/pkcs7 mime实体中。
The smime-type parameter for enveloped-only messages is "enveloped-data". The file extension for this type of message is ".p7m".
仅信封消息的smime类型参数为“信封数据”。此类消息的文件扩展名为“.p7m”。
A sample message would be:
示例消息如下:
Content-Type: application/pkcs7-mime; smime-type=enveloped-data; name=smime.p7m Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7m
Content-Type: application/pkcs7-mime; smime-type=enveloped-data; name=smime.p7m Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7m
rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6 7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 0GhIGfHfQbnj756YT64V
RFVBNJ756BBGHYHHHHHUJHJH77N8HGT9HG4VQPFYF467N8HGHGHHHHHHHHHHHHHJH4VQPFF467GHIGFHFYGTRFFBNJT6JH7756TBB9H F8HGHGTRFVHJHHJH776BB9HG4VQBNJ7567GHIGFYT6GHYHHHHHHHHJFFFF4 0GhIGfHfQbnj756YT64V
There are two formats for signed messages defined for S/MIME:
为S/MIME定义的签名消息有两种格式:
- application/pkcs7-mime with SignedData.
- 带有SignedData的应用程序/pkcs7 mime。
- multipart/signed.
- 多部分/签名。
In general, the multipart/signed form is preferred for sending, and receiving agents MUST be able to handle both.
通常,发送时首选多部分/签名表单,而接收代理必须能够同时处理这两种表单。
There are no hard-and-fast rules as to when a particular signed-only format is chosen. It depends on the capabilities of all the receivers and the relative importance of receivers with S/MIME facilities being able to verify the signature versus the importance of receivers without S/MIME software being able to view the message.
对于何时选择特定的仅签名格式,没有硬性规定。这取决于所有接收者的能力,以及S/MIME设施能够验证签名的接收者相对于S/MIME软件无法查看消息的接收者的相对重要性。
Messages signed using the multipart/signed format can always be viewed by the receiver whether or not they have S/MIME software. They can also be viewed whether they are using a MIME-native user agent or they have messages translated by a gateway. In this context, "be viewed" means the ability to process the message essentially as if it were not a signed message, including any other MIME structure the message might have.
无论接收方是否使用S/MIME软件,都可以查看使用多部分/签名格式签名的消息。也可以查看它们是使用MIME本机用户代理,还是通过网关翻译消息。在这种情况下,“被查看”意味着处理消息的能力,本质上就好像它不是一个签名消息一样,包括消息可能具有的任何其他MIME结构。
Messages signed using the SignedData format cannot be viewed by a recipient unless they have S/MIME facilities. However, the SignedData format protects the message content from being changed by benign intermediate agents. Such agents might do line wrapping or content-transfer encoding changes that would break the signature.
收件人无法查看使用SignedData格式签名的邮件,除非这些邮件具有S/MIME功能。但是,SignedData格式保护消息内容不被良性中间代理更改。这些代理可能会进行换行或内容传输编码更改,从而破坏签名。
This signing format uses the application/pkcs7-mime media type. The steps to create this format are:
此签名格式使用application/pkcs7 mime媒体类型。创建此格式的步骤包括:
Step 1. The MIME entity is prepared according to Section 3.1.
第一步。MIME实体是根据第3.1节准备的。
Step 2. The MIME entity and other required data are processed into a CMS object of type SignedData.
第二步。MIME实体和其他所需数据被处理为SignedData类型的CMS对象。
Step 3. The SignedData object is wrapped in a CMS ContentInfo object.
第三步。SignedData对象包装在CMS ContentInfo对象中。
Step 4. The ContentInfo object is inserted into an application/pkcs7-mime MIME entity.
第四步。ContentInfo对象被插入到application/pkcs7 mime实体中。
The smime-type parameter for messages using application/pkcs7-mime with SignedData is "signed-data". The file extension for this type of message is ".p7m".
使用带SignedData的application/pkcs7 mime的消息的smime类型参数为“signed data”。此类消息的文件扩展名为“.p7m”。
A sample message would be:
示例消息如下:
Content-Type: application/pkcs7-mime; smime-type=signed-data; name=smime.p7m Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7m
Content-Type: application/pkcs7-mime; smime-type=signed-data; name=smime.p7m Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7m
567GhIGfHfYT6ghyHhHUujpfyF4f8HHGTrfvhJhjH776tbB9HG4VQbnj7 77n8HHGT9HG4VQpfyF467GhIGfHfYT6rfvbnj756tbBghyHhHUujhJhjH HUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H7n8HHGghyHh 6YT64V0GhIGfHfQbnj75
567GHIGHFYT6GHYHHHHHUJPFYFF4F8HGFFYT6GHYHHHHHJHFFFFFFJH776BB9Hg4VQBNJ7 77N8HgT9Hg4VQPFFYF467GHIGHFYT6RFVBNJ756BBGHHHHHHHHHHHHHJHFFFFFFJJH6JH7756TBB9H7N8HGHGHGHGHGHGHGHGHGHGHFYH6YH6YH64V0GHIGHFQBNJ75
This format is a clear-signing format. Recipients without any S/MIME or CMS processing facilities are able to view the message. It makes use of the multipart/signed media type described in [MIME-SECURE]. The multipart/signed media type has two parts. The first part contains the MIME entity that is signed; the second part contains the "detached signature" CMS SignedData object in which the encapContentInfo eContent field is absent.
此格式是一种清晰的签名格式。没有任何S/MIME或CMS处理设施的收件人可以查看邮件。它使用[MIME-SECURE]中描述的多部分/签名媒体类型。多部分/签名媒体类型有两部分。第一部分包含已签名的MIME实体;第二部分包含“分离签名”CMS SignedData对象,其中不存在encapContentInfo eContent字段。
This media type always contains a CMS ContentInfo containing a single CMS object of type SignedData. The SignedData encapContentInfo eContent field MUST be absent. The signerInfos field contains the signatures for the MIME entity.
此媒体类型始终包含一个CMS ContentInfo,其中包含一个类型为SignedData的CMS对象。SignedData encapContentInfo eContent字段必须不存在。signerInfos字段包含MIME实体的签名。
The file extension for signed-only messages using application/pkcs7- signature is ".p7s".
使用application/pkcs7-signature的仅签名消息的文件扩展名为“.p7s”。
Step 1. The MIME entity to be signed is prepared according to Section 3.1, taking special care for clear-signing.
第一步。要签名的MIME实体是根据第3.1节准备的,特别注意清晰签名。
Step 2. The MIME entity is presented to CMS processing in order to obtain an object of type SignedData in which the encapContentInfo eContent field is absent.
第二步。MIME实体提供给CMS处理,以获得SignedData类型的对象,其中不存在encapContentInfo eContent字段。
Step 3. The MIME entity is inserted into the first part of a multipart/signed message with no processing other than that described in Section 3.1.
第三步。MIME实体插入到多部分/签名消息的第一部分,除第3.1节所述的处理外,不进行任何处理。
Step 4. Transfer encoding is applied to the "detached signature" CMS SignedData object, and it is inserted into a MIME entity of type application/pkcs7-signature.
第四步。传输编码应用于“分离签名”CMS SignedData对象,并插入到类型为application/pkcs7 signature的MIME实体中。
Step 5. The MIME entity of the application/pkcs7-signature is inserted into the second part of the multipart/signed entity.
第五步。应用程序/pkcs7签名的MIME实体插入到多部分/签名实体的第二部分。
The multipart/signed Content-Type has two required parameters: the protocol parameter and the micalg parameter.
多部分/签名内容类型有两个必需的参数:协议参数和micalg参数。
The protocol parameter MUST be "application/pkcs7-signature". Note that quotation marks are required around the protocol parameter because MIME requires that the "/" character in the parameter value MUST be quoted.
协议参数必须是“应用程序/pkcs7签名”。请注意,协议参数周围需要引号,因为MIME要求必须引用参数值中的“/”字符。
The micalg parameter allows for one-pass processing when the signature is being verified. The value of the micalg parameter is dependent on the message digest algorithm(s) used in the calculation of the Message Integrity Check. If multiple message digest algorithms are used, they MUST be separated by commas per [MIME-SECURE]. The values to be placed in the micalg parameter SHOULD be from the following:
验证签名时,micalg参数允许一次通过处理。micalg参数的值取决于计算消息完整性检查时使用的消息摘要算法。如果使用多个消息摘要算法,则它们必须按照[MIME-SECURE]用逗号分隔。要放置在micalg参数中的值应为以下值:
Algorithm Value Used
使用的算法值
MD5 md5 SHA-1 sha-1 SHA-224 sha-224 SHA-256 sha-256 SHA-384 sha-384 SHA-512 sha-512 Any other (defined separately in algorithm profile or "unknown" if not defined)
MD5 MD5 SHA-1 SHA-1 SHA-224 SHA-224 SHA-256 SHA-256 SHA-384 SHA-384 SHA-512 SHA-512任何其他(在算法配置文件中单独定义或“未知”如果未定义)
(Historical note: some early implementations of S/MIME emitted and expected "rsa-md5", "rsa-sha1", and "sha1" for the micalg parameter.) Receiving agents SHOULD be able to recover gracefully from a micalg parameter value that they do not recognize. Future names for this parameter will be consistent with the IANA "Hash Function Textual Names" registry.
(历史记录:S/MIME的一些早期实现发出并预期micalg参数为“rsa-md5”、“rsa-sha1”和“sha1”)。接收代理应该能够从它们无法识别的micalg参数值中正常恢复。此参数的未来名称将与IANA“哈希函数文本名称”注册表一致。
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary=boundary42
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary=boundary42
--boundary42 Content-Type: text/plain
--boundary42 Content-Type: text/plain
This is a clear-signed message.
这是一条清晰的签名信息。
--boundary42 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7s
--boundary42 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7s
ghyHhHUujhJhjH77n8HHGTrfvbnj756tbB9HG4VQpfyF467GhIGfHfYT6 4VQpfyF467GhIGfHfYT6jH77n8HHGghyHhHUujhJh756tbB9HGTrfvbnj n8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 7GhIGfHfYT64VQbnj756
Ghyhhhhhhhhhhhhhhhhhhjhjh77n8hghtrfvbnj756tb9hg4vqpfyf467ghighfyt6 4vqpfyf467ghighfyt6jhhhhhhhhhhhhhhhhhhhhhjhjh756tb9hgtrffbnj n8hghtrfvhhhhhhhhhhhhhj776bb9hg4vqbnj7567ghigfyfyfyfyfyf4 7ghigff
--boundary42--
--边界42--
The content that is digested (the first part of the multipart/signed) 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 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
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 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 61 67 2 E 0d 0a
This section describes the format for compressing a MIME entity. 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 use of a capability to indicate the ability to receive CompressedData is described in [CMSCOMPR] and is the preferred method for compatibility.
本节介绍压缩MIME实体的格式。请注意,版本3.1之前的S/MIME版本没有指定任何CompressedData的使用,并且不会识别它。[CMSCOMPR]中描述了使用能力来指示接收压缩数据的能力,这是兼容性的首选方法。
Step 1. The MIME entity to be compressed is prepared according to Section 3.1.
第一步。要压缩的MIME实体是根据第3.1节准备的。
Step 2. The MIME entity and other required data are processed into a CMS object of type CompressedData.
第二步。MIME实体和其他所需数据被处理为CompressedData类型的CMS对象。
Step 3. The CompressedData object is wrapped in a CMS ContentInfo object.
第三步。CompressedData对象包装在CMS ContentInfo对象中。
Step 4. The ContentInfo object is inserted into an application/pkcs7-mime MIME entity.
第四步。ContentInfo对象被插入到application/pkcs7 mime实体中。
The smime-type parameter for compressed-only messages is "compressed-data". The file extension for this type of message is ".p7z".
仅压缩消息的smime类型参数为“compressed data”。此类消息的文件扩展名为“.p7z”。
A sample message would be:
示例消息如下:
Content-Type: application/pkcs7-mime; smime-type=compressed-data; name=smime.p7z Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7z
Content-Type: application/pkcs7-mime; smime-type=compressed-data; name=smime.p7z Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7z
rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6 7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 0GhIGfHfQbnj756YT64V
RFVBNJ756BBGHYHHHHHUJHJH77N8HGT9HG4VQPFYF467N8HGHGHHHHHHHHHHHHHJH4VQPFF467GHIGFHFYGTRFFBNJT6JH7756TBB9H F8HGHGTRFVHJHHJH776BB9HG4VQBNJ7567GHIGFYT6GHYHHHHHHHHJFFFF4 0GhIGfHfQbnj756YT64V
The signed-only, enveloped-only, and compressed-only MIME formats can be nested. This works because these formats are all MIME entities that encapsulate other MIME entities.
可以嵌套仅签名、仅信封和仅压缩的MIME格式。这是因为这些格式都是封装其他MIME实体的MIME实体。
An S/MIME implementation MUST be able to receive and process arbitrarily nested S/MIME within reasonable resource limits of the recipient computer.
S/MIME实现必须能够在接收方计算机的合理资源限制内接收和处理任意嵌套的S/MIME。
It is possible to apply any of the signing, encrypting, and compressing operations in any order. It is up to the implementer and the user to choose. When signing first, the signatories are then securely obscured by the enveloping. When enveloping first the signatories are exposed, but it is possible to verify signatures without removing the enveloping. This can be useful in an environment where automatic signature verification is desired, as no private key material is required to verify a signature.
可以按任何顺序应用任何签名、加密和压缩操作。这取决于实现者和用户的选择。首先签字时,签字人会被信封牢牢遮挡。当第一次封装时,签名人会暴露出来,但可以在不移除封装的情况下验证签名。这在需要自动签名验证的环境中非常有用,因为验证签名不需要私钥材料。
There are security ramifications to choosing whether to sign first or encrypt first. A recipient of a message that is encrypted and then signed can validate that the encrypted block was unaltered, but cannot determine any relationship between the signer and the unencrypted contents of the message. A recipient of a message that is signed then encrypted can assume that the signed message itself has not been altered, but that a careful attacker could have changed the unauthenticated portions of the encrypted message.
选择先签名还是先加密会带来安全问题。经过加密然后签名的邮件的收件人可以验证加密块是否未更改,但无法确定签名者与邮件未加密内容之间的任何关系。已签名然后加密的邮件的收件人可以假定已签名邮件本身未被更改,但细心的攻击者可能已更改加密邮件的未经验证部分。
When using compression, keep the following guidelines in mind:
使用压缩时,请记住以下准则:
- Compression of binary encoded encrypted data is discouraged, since it will not yield significant compression. Base64 encrypted data could very well benefit, however.
- 不鼓励压缩二进制编码的加密数据,因为它不会产生显著的压缩。不过,Base64加密数据可能会受益匪浅。
- If a lossy compression algorithm is used with signing, you will need to compress first, then sign.
- 如果签名使用有损压缩算法,则需要先压缩,然后签名。
The certificate management message or MIME entity is used to transport certificates and/or Certificate Revocation Lists, such as in response to a registration request.
证书管理消息或MIME实体用于传输证书和/或证书吊销列表,例如响应注册请求。
Step 1. The certificates and/or Certificate Revocation Lists are made available to the CMS generating process that creates a CMS object of type SignedData. The SignedData encapContentInfo eContent field MUST be absent and signerInfos field MUST be empty.
第一步。证书和/或证书吊销列表可用于创建SignedData类型CMS对象的CMS生成过程。SignedData encapContentInfo eContent字段必须不存在,signerInfos字段必须为空。
Step 2. The SignedData object is wrapped in a CMS ContentInfo object.
第二步。SignedData对象包装在CMS ContentInfo对象中。
Step 3. The ContentInfo object is enclosed in an application/pkcs7-mime MIME entity.
第三步。ContentInfo对象包含在application/pkcs7 mime实体中。
The smime-type parameter for a certificate management message is "certs-only". The file extension for this type of message is ".p7c".
证书管理消息的smime类型参数为“仅证书”。此类消息的文件扩展名为“.p7c”。
A sending agent that signs messages MUST have a certificate for the signature so that a receiving agent can verify the signature. There are many ways of getting certificates, such as through an exchange with a certification authority, through a hardware token or diskette, and so on.
对消息进行签名的发送代理必须具有签名证书,以便接收代理可以验证签名。获取证书的方法有很多,例如通过与证书颁发机构的交换、通过硬件令牌或软盘等。
S/MIME v2 [SMIMEv2] specified a method for "registering" public keys with certificate authorities using an application/pkcs10 body part. Since that time, the IETF PKIX Working Group has developed other methods for requesting certificates. However, S/MIME v3.2 does not require a particular certificate request mechanism.
S/MIME v2[SMIMEv2]指定了使用应用程序/pkcs10主体部分向证书颁发机构“注册”公钥的方法。从那时起,IETF PKIX工作组开发了其他请求证书的方法。但是,S/MIME v3.2不需要特定的证书请求机制。
Because S/MIME takes into account interoperation in non-MIME environments, several different mechanisms are employed to carry the type information, and it becomes a bit difficult to identify S/MIME messages. The following table lists criteria for determining whether 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考虑了非MIME环境中的互操作,因此采用了几种不同的机制来承载类型信息,因此识别S/MIME消息变得有点困难。下表列出了确定消息是否为S/MIME消息的标准。如果消息符合下面列出的任何条件,则将其视为S/MIME消息。
The file suffix in the table below comes from the "name" parameter in the Content-Type header field, or the "filename" parameter on the Content-Disposition header field. These parameters that give the file suffix are not listed below as part of the parameter section.
下表中的文件后缀来自“内容类型标题”字段中的“名称”参数或“内容处置标题”字段中的“文件名”参数。下面未将这些提供文件后缀的参数作为参数部分列出。
Media type: application/pkcs7-mime parameters: any file suffix: any
媒体类型:应用程序/pkcs7 mime参数:任意文件后缀:任意
Media type: multipart/signed parameters: protocol="application/pkcs7-signature" file suffix: any
Media type: multipart/signed parameters: protocol="application/pkcs7-signature" file suffix: any
Media type: application/octet-stream parameters: any file suffix: p7m, p7s, p7c, p7z
媒体类型:应用程序/八位字节流参数:任何文件后缀:p7m、p7s、p7c、p7z
A receiving agent MUST provide some certificate retrieval mechanism in order to gain access to certificates for recipients of digital envelopes. This specification does not cover how S/MIME agents handle certificates, only what they do after a certificate has been validated or rejected. S/MIME certificate issues are covered in [CERT32].
接收代理必须提供某种证书检索机制,以便为数字信封的收件人访问证书。本规范不涉及S/MIME代理如何处理证书,只涉及它们在证书被验证或拒绝后的操作。[CERT32]中介绍了S/MIME证书问题。
At a minimum, for initial S/MIME deployment, a user agent could automatically generate a message to an intended recipient requesting that recipient's certificate in a signed return message. Receiving and sending agents SHOULD also provide a mechanism to allow a user to "store and protect" certificates for correspondents in such a way so as to guarantee their later retrieval.
对于初始S/MIME部署,用户代理至少可以自动生成一条消息,发送给指定的收件人,在签名的返回消息中请求该收件人的证书。接收和发送代理还应提供一种机制,允许用户以这种方式“存储和保护”通信员的证书,以保证其以后的检索。
All generated key pairs MUST be generated from a good source of non-deterministic random input [RANDOM] and the private key MUST be protected in a secure fashion.
所有生成的密钥对必须从非确定性随机输入[random]的良好来源生成,并且必须以安全方式保护私钥。
An S/MIME user agent MUST NOT generate asymmetric keys less than 512 bits for use with the RSA or DSA signature algorithms.
S/MIME用户代理不得生成小于512位的非对称密钥,以用于RSA或DSA签名算法。
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 [FIPS186-2] without Change Notice 1, and for 1024-bit through 2048-bit RSA with SHA-256 see [CMS-SHA2] and [FIPS186-2] with Change Notice 1. The first reference provides the signature algorithm's object identifier, and the second provides the signature algorithm's definition.
对于带SHA-1的512位RSA,见[CMSALG]和[FIPS186-2],无变更通知1;对于带SHA-256的512位RSA,见[CMS-SHA2]和[FIPS186-2],无变更通知1;对于带SHA-256的1024位到2048位RSA,见[CMS-SHA2]和[FIPS186-2],有变更通知1。第一个参考提供了签名算法的对象标识符,第二个参考提供了签名算法的定义。
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 [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 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 definition.
对于带有SHA-1的512位DSA,见[CMSALG]和[FIPS186-2],无变更通知1;对于带有SHA-256的512位DSA,见[CMS-SHA2]和[FIPS186-2],无变更通知1;对于带有SHA-1的1024位DSA,见[CMSALG]和[FIPS186-2],有变更通知1;对于带有SHA-256的1024位及以上DSA,见[CMS-SHA2]和[FIPS186-3]。第一个参考提供了签名算法的对象标识符,第二个参考提供了签名算法的定义。
For RSASSA-PSS with SHA-256, see [RSAPSS]. For 1024-bit DH, see [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].
有关带有SHA-256的RSASSA-PSS,请参阅[RSASSS]。对于1024位DH,请参见[CMSALG]。对于1024位及以上的DH,请参见[SP800-56A];无论如何,请使用[CMSALG]中指定的来自X9.42的KDF。有关RSAES-OAEP,请参阅[RSOAEP]。
The following are the requirements for an S/MIME agent generated RSA, RSASSA-PSS, and DSA signatures:
以下是S/MIME代理生成的RSA、RSASSA-PSS和DSA签名的要求:
key size <= 1023 : SHOULD NOT (see Security Considerations) 1024 <= key size <= 2048 : SHOULD (see Security Considerations) 2048 < key size : MAY (see Security Considerations)
key size <= 1023 : SHOULD NOT (see Security Considerations) 1024 <= key size <= 2048 : SHOULD (see Security Considerations) 2048 < key size : MAY (see Security Considerations)
The following are the requirements for S/MIME receiving agents during signature verification of RSA, RSASSA-PSS, and DSA signatures:
以下是RSA、RSASSA-PSS和DSA签名验证期间S/MIME接收代理的要求:
key size <= 1023 : MAY (see Security Considerations) 1024 <= key size <= 2048 : MUST (see Security Considerations) 2048 < key size : MAY (see Security Considerations)
key size <= 1023 : MAY (see Security Considerations) 1024 <= key size <= 2048 : MUST (see Security Considerations) 2048 < key size : MAY (see Security Considerations)
The following are the requirements for an S/MIME agent when establishing keys for content encryption using the RSA, RSA-OAEP, and DH algorithms:
以下是使用RSA、RSA-OAEP和DH算法建立内容加密密钥时对S/MIME代理的要求:
key size <= 1023 : SHOULD NOT (see Security Considerations) 1024 <= key size <= 2048 : SHOULD (see Security Considerations) 2048 < key size : MAY (see Security Considerations)
key size <= 1023 : SHOULD NOT (see Security Considerations) 1024 <= key size <= 2048 : SHOULD (see Security Considerations) 2048 < key size : MAY (see Security Considerations)
The following are the requirements for an S/MIME agent when establishing keys for content decryption using the RSA, RSAES-OAEP, and DH algorithms:
以下是使用RSA、RSAES-OAEP和DH算法建立内容解密密钥时对S/MIME代理的要求:
key size <= 1023 : MAY (see Security Considerations) 1024 <= key size <= 2048 : MUST (see Security Considerations) 2048 < key size : MAY (see Security Considerations)
key size <= 1023 : MAY (see Security Considerations) 1024 <= key size <= 2048 : MUST (see Security Considerations) 2048 < key size : MAY (see Security Considerations)
The following information updates the media type registration for application/pkcs7-mime and application/pkcs7-signature to refer to this document as opposed to RFC 2311.
以下信息更新了application/pkcs7 mime和application/pkcs7签名的媒体类型注册,以参考本文档,而不是RFC 2311。
Note that other documents can define additional MIME media types for S/MIME.
请注意,其他文档可以为S/MIME定义其他MIME媒体类型。
Type name: application
类型名称:应用程序
Subtype Name: pkcs7-mime
子类型名称:pkcs7 mime
Required Parameters: NONE
所需参数:无
Optional Parameters: smime-type/signed-data smime-type/enveloped-data smime-type/compressed-data smime-type/certs-only name
可选参数:smime类型/签名数据smime类型/信封数据smime类型/压缩数据smime类型/仅证书名称
Encoding Considerations: See Section 3 of this document
编码注意事项:参见本文档第3节
Security Considerations: See Section 6 of this document
安全注意事项:见本文件第6节
Interoperability Considerations: See Sections 1-6 of this document
互操作性注意事项:见本文件第1-6节
Published Specification: RFC 2311, RFC 2633, and this document
已发布规范:RFC 2311、RFC 2633和本文件
Applications that use this media type: Security applications
使用此媒体类型的应用程序:安全应用程序
Additional information: NONE
其他信息:无
Person & email to contact for further information: S/MIME working group chairs smime-chairs@tools.ietf.org
联系人和电子邮件,以获取更多信息:S/MIME工作组主席smime-chairs@tools.ietf.org
Intended usage: COMMON
预期用途:普通
Restrictions on usage: NONE
使用限制:无
Author: Sean Turner
作者:肖恩·特纳
Change Controller: S/MIME working group delegated from the IESG
变更控制者:IESG授权的S/MIME工作组
Type name: application
类型名称:应用程序
Subtype Name: pkcs7-signature
子类型名称:pkcs7签名
Required Parameters: NONE
所需参数:无
Optional Parameters: NONE
可选参数:无
Encoding Considerations: See Section 3 of this document
编码注意事项:参见本文档第3节
Security Considerations: See Section 6 of this document
安全注意事项:见本文件第6节
Interoperability Considerations: See Sections 1-6 of this document
互操作性注意事项:见本文件第1-6节
Published Specification: RFC 2311, RFC 2633, and this document
已发布规范:RFC 2311、RFC 2633和本文件
Applications that use this media type: Security applications
使用此媒体类型的应用程序:安全应用程序
Additional information: NONE
其他信息:无
Person & email to contact for further information: S/MIME working group chairs smime-chairs@tools.ietf.org
联系人和电子邮件,以获取更多信息:S/MIME工作组主席smime-chairs@tools.ietf.org
Intended usage: COMMON
预期用途:普通
Restrictions on usage: NONE
使用限制:无
Author: Sean Turner
作者:肖恩·特纳
Change Controller: S/MIME working group delegated from the IESG
变更控制者:IESG授权的S/MIME工作组
Cryptographic algorithms will be broken or weakened over time. Implementers and users need to check that the cryptographic algorithms listed in this document continue to provide the expected level of security. The IETF from time to time may issue documents dealing with the current state of the art. For example:
随着时间的推移,加密算法将被破坏或削弱。实施者和用户需要检查本文档中列出的加密算法是否继续提供预期的安全级别。IETF可不时发布涉及当前技术状态的文件。例如:
- The Million Message Attack described in RFC 3218 [MMA].
- RFC 3218[MMA]中描述的百万消息攻击。
- The Diffie-Hellman "small-subgroup" attacks described in RFC 2785 [DHSUB].
- RFC2785[DHSUB]中描述的Diffie-Hellman“小子组”攻击。
- The attacks against hash algorithms described in RFC 4270 [HASH-ATTACK].
- RFC 4270[哈希攻击]中描述的针对哈希算法的攻击。
This specification uses Public-Key Cryptography technologies. It is assumed that the private key is protected to ensure that it is not accessed or altered by unauthorized parties.
本规范使用公钥加密技术。假定私钥受到保护,以确保未经授权的方不会访问或更改私钥。
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 software to estimate the actual cost of recovering an encrypted message content that is encrypted with a key of a particular size. Further, it is quite difficult to determine the cost of a failed decryption if a recipient cannot process a message's content. Thus, choosing between different key sizes (or choosing whether to just use plaintext) is also impossible for most people or software. However, decisions based on these criteria are made all the time, and therefore this specification gives a framework for using those estimates in choosing algorithms.
对于大多数人或软件来说,估计消息内容的价值是不可能的。此外,对于大多数人或软件来说,不可能估计恢复使用特定大小的密钥加密的加密消息内容的实际成本。此外,如果收件人无法处理邮件内容,则很难确定解密失败的成本。因此,对于大多数人或软件来说,在不同的密钥大小之间进行选择(或者选择是否只使用明文)也是不可能的。然而,基于这些标准的决策一直在做出,因此本规范给出了在选择算法时使用这些估计值的框架。
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 security. The key sizes that must be supported to conform to this
本规范中选择2048位作为RSA非对称密钥大小是基于提供至少100位安全性的愿望。必须支持的密钥大小符合此要求
specification seem appropriate for the Internet based on [STRENGTH]. Of course, there are environments, such as financial and medical systems, that may select different key sizes. For this reason, an implementation MAY support key sizes beyond those recommended in this specification.
基于[强度]的规范似乎适用于互联网。当然,有些环境,如金融和医疗系统,可能会选择不同的密钥大小。因此,实现可能支持超出本规范建议的密钥大小。
Receiving agents that validate signatures and sending agents that encrypt messages need to be cautious of cryptographic processing usage when validating signatures and encrypting messages using keys larger than those mandated in this specification. An attacker could send certificates with keys that would result in excessive cryptographic processing, for example, keys larger than those mandated in this specification, which could swamp the processing element. Agents that use such keys without first validating the certificate to a trust anchor are advised to have some sort of cryptographic resource management system to prevent such attacks.
验证签名的接收代理和加密消息的发送代理在使用大于本规范规定的密钥验证签名和加密消息时,需要谨慎使用加密处理。攻击者可以发送带有可能导致过度加密处理的密钥的证书,例如,密钥大于本规范中规定的密钥,这可能会淹没处理元素。建议使用此类密钥而不首先向信任锚验证证书的代理使用某种加密资源管理系统来防止此类攻击。
Using weak cryptography in S/MIME offers little actual security over sending plaintext. However, other features of S/MIME, such as the specification of AES and the ability to announce stronger cryptographic capabilities to parties with whom you communicate, allow senders to create messages that use strong encryption. Using weak cryptography is never recommended unless the only alternative is no cryptography.
在S/MIME中使用弱加密技术在发送明文时几乎没有实际的安全性。但是,S/MIME的其他功能,如AES规范和向通信方宣布更强加密功能的能力,允许发送方创建使用强加密的消息。除非唯一的选择是不加密,否则永远不建议使用弱加密。
RSA and DSA keys of less than 1024 bits are now considered by many experts to be cryptographically insecure (due to advances in computing power), and should no longer be used to protect messages. Such keys were previously considered secure, so processing previously received signed and encrypted mail will often result in the use of weak keys. Implementations that wish to support previous versions of S/MIME or process old messages need to consider the security risks that result from smaller key sizes (e.g., spoofed messages) versus the costs of denial of service. If an implementation supports verification of digital signatures generated with RSA and DSA keys of less than 1024 bits, it MUST warn the user. Implementers should consider providing different warnings for newly received messages and previously stored messages. Server implementations (e.g., secure mail list servers) where user warnings are not appropriate SHOULD reject messages with weak signatures.
许多专家现在认为,小于1024位的RSA和DSA密钥在加密方面是不安全的(由于计算能力的提高),不应再用于保护消息。这些密钥以前被认为是安全的,因此处理以前收到的签名和加密邮件通常会导致使用弱密钥。希望支持以前版本的S/MIME或处理旧消息的实现需要考虑由较小的密钥大小(例如,欺骗消息)导致的安全风险与拒绝服务的代价。如果实现支持验证使用小于1024位的RSA和DSA密钥生成的数字签名,则必须警告用户。实现者应该考虑为新接收的消息和先前存储的消息提供不同的警告。用户警告不适用的服务器实现(如secure mail list服务器)应拒绝具有弱签名的邮件。
Implementers SHOULD be aware that multiple active key pairs can be associated with a single individual. For example, one key pair can be used to support confidentiality, while a different key pair can be used for digital signatures.
实现者应该知道,多个活动密钥对可以与单个个体相关联。例如,一个密钥对可用于支持机密性,而另一个密钥对可用于数字签名。
If a sending agent is sending the same message using different strengths of cryptography, an attacker watching the communications channel might be able to determine the contents of the strongly encrypted message by decrypting the weakly encrypted version. In other words, a sender SHOULD NOT send a copy of a message using weaker cryptography than they would use for the original of the message.
如果发送代理使用不同的加密强度发送相同的消息,则监视通信通道的攻击者可能能够通过解密弱加密版本来确定强加密消息的内容。换句话说,发件人不应使用比原始邮件更弱的加密技术发送邮件副本。
Modification of the ciphertext can go undetected if authentication is not also used, which is the case when sending EnvelopedData without wrapping it in SignedData or enclosing SignedData within it.
如果不使用身份验证,密文的修改可能不会被检测到,这是在发送信封数据时没有将其包装在SignedData中或将SignedData封装在其中的情况。
If an implementation is concerned about compliance with National Institute of Standards and Technology (NIST) key size recommendations, then see [SP800-57].
如果实施涉及符合国家标准与技术研究所(NIST)关键尺寸建议,请参见[SP800-57]。
If messaging environments make use of the fact that a message is signed to change the behavior of message processing (examples would be running rules or UI display hints), without first verifying that the message is actually signed and knowing the state of the signature, this can lead to incorrect handling of the message. Visual indicators on messages may need to have the signature validation code checked periodically if the indicator is supposed to give information on the current status of a message.
如果消息传递环境利用消息已签名这一事实来更改消息处理的行为(例如运行规则或UI显示提示),而没有首先验证消息是否已实际签名并了解签名的状态,则可能会导致错误处理消息。如果消息上的可视指示器应提供消息当前状态的信息,则可能需要定期检查签名验证代码。
[CMS] refers to [RFC5652].
[CMS]指[RFC5652]。
[ESS] refers to [RFC2634] and [RFC5035].
[ESS]指[RFC2634]和[RFC5035]。
[MIME] refers to [RFC2045], [RFC2046], [RFC2047], [RFC2049], [RFC4288], and [RFC4289].
[MIME]指的是[RFC2045]、[RFC2046]、[RFC2047]、[RFC2049]、[RFC4288]和[RFC4289]。
[SMIMEv2] refers to [RFC2311], [RFC2312], [RFC2313], [RFC2314], and [RFC2315].
[SMIMEv2]指[RFC2311]、[RFC2312]、[RFC2313]、[RFC2314]和[RFC2315]。
[SMIMEv3] refers to [RFC2630], [RFC2631], [RFC2632], [RFC2633], [RFC2634], and [RFC5035].
[SMIMEv3]指[RFC2630]、[RFC2631]、[RFC2632]、[RFC2633]、[RFC2634]和[RFC5035]。
[SMIMv3.1] refers to [RFC2634], [RFC3850], [RFC3851], [RFC3852], and [RFC5035].
[SMIMv3.1]指[RFC2634]、[RFC3850]、[RFC3851]、[RFC3852]和[RFC5035]。
[CERT32] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 Certificate Handling", RFC 5750, January 2010.
[CERT32]Ramsdell,B.和S.Turner,“安全/多用途Internet邮件扩展(S/MIME)版本3.2证书处理”,RFC 57502010年1月。
[CHARSETS] Character sets assigned by IANA. See http://www.iana.org/assignments/character-sets.
[字符集]IANA分配的字符集。看见http://www.iana.org/assignments/character-sets.
[CMSAES] Schaad, J., "Use of the Advanced Encryption Standard (AES) Encryption Algorithm in Cryptographic Message Syntax (CMS)", RFC 3565, July 2003.
[CMSAES]Schaad,J.“在加密消息语法(CMS)中使用高级加密标准(AES)加密算法”,RFC 3565,2003年7月。
[CMSALG] Housley, R., "Cryptographic Message Syntax (CMS) Algorithms", RFC 3370, August 2002.
[CMSALG]Housley,R.,“加密消息语法(CMS)算法”,RFC3370,2002年8月。
[CMSCOMPR] Gutmann, P., "Compressed Data Content Type for Cryptographic Message Syntax (CMS)", RFC 3274, June 2002.
[CMSCOMPR]Gutmann,P.,“加密消息语法(CMS)的压缩数据内容类型”,RFC 3274,2002年6月。
[CMS-SHA2] Turner, S., "Using SHA2 Algorithms with Cryptographic Message Syntax", RFC 5754, January 2010.
[CMS-SHA2]Turner,S.,“将SHA2算法与加密消息语法结合使用”,RFC 5754,2010年1月。
[CONTDISP] Troost, R., Dorner, S., and K. Moore, Ed., "Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field", RFC 2183, August 1997.
[CONTDISP]Troost,R.,Dorner,S.,和K.Moore,Ed.,“在互联网消息中传达呈现信息:内容处置标题字段”,RFC 2183,1997年8月。
[FIPS186-2] National Institute of Standards and Technology (NIST), "Digital Signature Standard (DSS)", FIPS Publication 186-2, January 2000. [With Change Notice 1].
[FIPS186-2]国家标准与技术研究所(NIST),“数字签名标准(DSS)”,FIPS出版物186-2,2000年1月。[附更改通知1]。
[FIPS186-3] National Institute of Standards and Technology (NIST), FIPS Publication 186-3: Digital Signature Standard, June 2009.
[FIPS186-3]国家标准与技术研究所(NIST),FIPS出版物186-3:数字签名标准,2009年6月。
[MIME-SECURE] Galvin, J., Murphy, S., Crocker, S., and N. Freed, "Security Multiparts for MIME: Multipart/Signed and Multipart/Encrypted", RFC 1847, October 1995.
[MIME-SECURE]Galvin,J.,Murphy,S.,Crocker,S.,和N.Freed,“MIME的安全多部分:多部分/签名和多部分/加密”,RFC 1847,1995年10月。
[MUSTSHOULD] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[MUSTSHOULD]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。
[RANDOM] Eastlake, D., 3rd, Schiller, J., and S. Crocker, "Randomness Requirements for Security", BCP 106, RFC 4086, June 2005.
[RANDOM]Eastlake,D.,3rd,Schiller,J.和S.Crocker,“安全的随机性要求”,BCP 106,RFC 40862005年6月。
[RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, November 1996.
[RFC2045]Freed,N.和N.Borenstein,“多用途Internet邮件扩展(MIME)第一部分:Internet邮件正文格式”,RFC 20451996年11月。
[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, November 1996.
[RFC2046]Freed,N.和N.Borenstein,“多用途Internet邮件扩展(MIME)第二部分:媒体类型”,RFC 20461996年11月。
[RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text", RFC 2047, November 1996.
[RFC2047]Moore,K.,“MIME(多用途互联网邮件扩展)第三部分:非ASCII文本的消息头扩展”,RFC 2047,1996年11月。
[RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples", RFC 2049, November 1996.
[RFC2049]Freed,N.和N.Borenstein,“多用途Internet邮件扩展(MIME)第五部分:一致性标准和示例”,RFC 2049,1996年11月。
[RFC2634] Hoffman, P. Ed., "Enhanced Security Services for S/MIME", RFC 2634, June 1999.
[RFC2634]Hoffman,P.Ed.,“S/MIME的增强安全服务”,RFC 2634,1999年6月。
[RFC4288] Freed, N. and J. Klensin, "Media Type Specifications and Registration Procedures", BCP 13, RFC 4288, December 2005.
[RFC4288]Freed,N.和J.Klensin,“介质类型规范和注册程序”,BCP 13,RFC 4288,2005年12月。
[RFC4289] Freed, N. and J. Klensin, "Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures", BCP 13, RFC 4289, December 2005.
[RFC4289]Freed,N.和J.Klensin,“多用途互联网邮件扩展(MIME)第四部分:注册程序”,BCP 13,RFC 4289,2005年12月。
[RFC5035] Schaad, J., "Enhanced Security Services (ESS) Update: Adding CertID Algorithm Agility", RFC 5035, August 2007.
[RFC5035]Schaad,J.,“增强安全服务(ESS)更新:添加CertID算法敏捷性”,RFC 5035,2007年8月。
[RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", RFC 5652, September 2009.
[RFC5652]Housley,R.,“加密消息语法(CMS)”,RFC 56522009年9月。
[RSAOAEP] Housley, R. "Use of the RSAES-OAEP Key Transport Algorithm in the Cryptographic Message Syntax (CMS)", RFC 3560, July 2003.
[RSOAEP]Housley,R.“在加密消息语法(CMS)中使用RSAES-OAEP密钥传输算法”,RFC 3560,2003年7月。
[RSAPSS] Schaad, J., "Use of the RSASSA-PSS Signature Algorithm in Cryptographic Message Syntax (CMS)", RFC 4056, June 2005.
[RSASPS]Schaad,J.,“在加密消息语法(CMS)中使用RSASSA-PSS签名算法”,RFC 4056,2005年6月。
[SP800-56A] National Institute of Standards and Technology (NIST), Special Publication 800-56A: Recommendation Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography (Revised), March 2007.
[SP800-56A]美国国家标准与技术研究所(NIST),特别出版物800-56A:使用离散对数加密的建议成对密钥建立方案(修订版),2007年3月。
[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.680]ITU-T建议X.680(2002)| ISO/IEC 8824-1:2002。信息技术.抽象语法符号1(ASN.1):基本符号规范。
[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), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER).
[X.690]ITU-T建议X.690(2002)| ISO/IEC 8825-1:2002。信息技术.ASN.1编码规则:基本编码规则(BER)、规范编码规则(CER)和区分编码规则(DER)的规范。
[DHSUB] Zuccherato, R., "Methods for Avoiding the "Small-Subgroup" Attacks on the Diffie-Hellman Key Agreement Method for S/MIME", RFC 2785, March 2000.
[DHSUB]Zuccherato,R.,“避免针对S/MIME的Diffie-Hellman密钥协商方法的“小子组”攻击的方法”,RFC 27852000年3月。
[HASH-ATTACK] Hoffman, P. and B. Schneier, "Attacks on Cryptographic Hashes in Internet Protocols", RFC 4270, November 2005.
[HASH-ATTACK]Hoffman,P.和B.Schneier,“对互联网协议中加密哈希的攻击”,RFC 42702005年11月。
[MMA] Rescorla, E., "Preventing the Million Message Attack on Cryptographic Message Syntax", RFC 3218, January 2002.
[MMA]Rescorla,E.“防止对加密消息语法的百万消息攻击”,RFC 3218,2002年1月。
[PKCS-7] Kaliski, B., "PKCS #7: Cryptographic Message Syntax Version 1.5", RFC 2315, March 1998.
[PKCS-7]Kaliski,B.,“PKCS#7:加密消息语法版本1.5”,RFC 2315,1998年3月。
[RFC2311] Dusse, S., Hoffman, P., Ramsdell, B., Lundblade, L., and L. Repka, "S/MIME Version 2 Message Specification", RFC 2311, March 1998.
[RFC2311]Dusse,S.,Hoffman,P.,Ramsdell,B.,Lundblade,L.,和L.Repka,“S/MIME版本2消息规范”,RFC 23111998年3月。
[RFC2312] Dusse, S., Hoffman, P., Ramsdell, B., and J. Weinstein, "S/MIME Version 2 Certificate Handling", RFC 2312, March 1998.
[RFC2312]Dusse,S.,Hoffman,P.,Ramsdell,B.,和J.Weinstein,“S/MIME版本2证书处理”,RFC 2312,1998年3月。
[RFC2313] Kaliski, B., "PKCS #1: RSA Encryption Version 1.5", RFC 2313, March 1998.
[RFC2313]Kaliski,B.,“PKCS#1:RSA加密版本1.5”,RFC 2313,1998年3月。
[RFC2314] Kaliski, B., "PKCS #10: Certification Request Syntax Version 1.5", RFC 2314, March 1998.
[RFC2314]Kaliski,B.,“PKCS#10:认证请求语法版本1.5”,RFC 2314,1998年3月。
[RFC2315] Kaliski, B., "PKCS #7: Certification Message Syntax Version 1.5", RFC 2315, March 1998.
[RFC2315]Kaliski,B.,“PKCS#7:认证消息语法版本1.5”,RFC 23151998年3月。
[RFC2630] Housley, R., "Cryptographic Message Syntax", RFC 2630, June 1999.
[RFC2630]Housley,R.,“加密消息语法”,RFC2630,1999年6月。
[RFC2631] Rescorla, E., "Diffie-Hellman Key Agreement Method", RFC 2631, June 1999.
[RFC2631]Rescorla,E.,“Diffie-Hellman密钥协商方法”,RFC 26311999年6月。
[RFC2632] Ramsdell, B., Ed., "S/MIME Version 3 Certificate Handling", RFC 2632, June 1999.
[RFC2632]Ramsdell,B.,Ed.,“S/MIME版本3证书处理”,RFC 2632,1999年6月。
[RFC2633] Ramsdell, B., Ed., "S/MIME Version 3 Message Specification", RFC 2633, June 1999.
[RFC2633]Ramsdell,B.,Ed.,“S/MIME版本3消息规范”,RFC 2633,1999年6月。
[RFC3850] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.1 Certificate Handling", RFC 3850, July 2004.
[RFC3850]Ramsdell,B.,Ed.,“安全/多用途Internet邮件扩展(S/MIME)版本3.1证书处理”,RFC 38502004年7月。
[RFC3851] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.1 Message Specification", RFC 3851, July 2004.
[RFC3851]Ramsdell,B.,编辑,“安全/多用途Internet邮件扩展(S/MIME)版本3.1消息规范”,RFC 38512004年7月。
[RFC3852] Housley, R., "Cryptographic Message Syntax (CMS)", RFC 3852, July 2004.
[RFC3852]Housley,R.,“加密消息语法(CMS)”,RFC3852,2004年7月。
[SP800-57] National Institute of Standards and Technology (NIST), Special Publication 800-57: Recommendation for Key Management, August 2005.
[SP800-57]国家标准与技术研究所(NIST),专门出版物800-57:关键管理建议,2005年8月。
[STRENGTH] Orman, H., and P. Hoffman, "Determining Strengths For Public Keys Used For Exchanging Symmetric Keys", BCP 86, RFC 3766, April 2004.
[STRENGTH]Orman,H.和P.Hoffman,“确定用于交换对称密钥的公钥的强度”,BCP 86,RFC 3766,2004年4月。
Note: The ASN.1 module contained herein is unchanged from RFC 3851 [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模块与RFC 3851[SMIMEv3.1]保持不变,但prefersBinaryInside ASN.1注释的更改除外。本模块使用1988年版的ASN.1。
SecureMimeMessageV3dot1
SecureMimeMessageV3dot1
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) modules(0) msg-v3dot1(21) }
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) modules(0) msg-v3dot1(21) }
DEFINITIONS IMPLICIT TAGS ::=
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
开始
IMPORTS
进口
-- Cryptographic Message Syntax [CMS] SubjectKeyIdentifier, IssuerAndSerialNumber, RecipientKeyIdentifier FROM CryptographicMessageSyntax { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) modules(0) cms-2001(14) };
-- Cryptographic Message Syntax [CMS] SubjectKeyIdentifier, IssuerAndSerialNumber, RecipientKeyIdentifier FROM CryptographicMessageSyntax { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) modules(0) cms-2001(14) };
-- id-aa is the arc with all new authenticated and unauthenticated -- attributes produced by the S/MIME Working Group
-- id-aa is the arc with all new authenticated and unauthenticated -- attributes produced by the S/MIME Working Group
id-aa OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) attributes(2)}
id-aa OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) attributes(2)}
-- S/MIME Capabilities provides a method of broadcasting the -- symmetric capabilities understood. Algorithms SHOULD be ordered -- by preference and grouped by type
-- S/MIME Capabilities provides a method of broadcasting the -- symmetric capabilities understood. Algorithms SHOULD be ordered -- by preference and grouped by type
smimeCapabilities OBJECT IDENTIFIER ::= {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) 15}
smimeCapabilities OBJECT IDENTIFIER ::= {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) 15}
SMIMECapability ::= SEQUENCE { capabilityID OBJECT IDENTIFIER, parameters ANY DEFINED BY capabilityID OPTIONAL }
SMIMECapability ::= SEQUENCE { capabilityID OBJECT IDENTIFIER, parameters ANY DEFINED BY capabilityID OPTIONAL }
SMIMECapabilities ::= SEQUENCE OF SMIMECapability
SMIMECapabilities ::= SEQUENCE OF SMIMECapability
-- Encryption Key Preference provides a method of broadcasting the -- preferred encryption certificate.
-- Encryption Key Preference provides a method of broadcasting the -- preferred encryption certificate.
id-aa-encrypKeyPref OBJECT IDENTIFIER ::= {id-aa 11}
id-aa-encrypKeyPref OBJECT IDENTIFIER ::= {id-aa 11}
SMIMEEncryptionKeyPreference ::= CHOICE { issuerAndSerialNumber [0] IssuerAndSerialNumber, receipentKeyId [1] RecipientKeyIdentifier, subjectAltKeyIdentifier [2] SubjectKeyIdentifier }
SMIMEEncryptionKeyPreference ::= CHOICE { issuerAndSerialNumber [0] IssuerAndSerialNumber, receipentKeyId [1] RecipientKeyIdentifier, subjectAltKeyIdentifier [2] SubjectKeyIdentifier }
-- receipentKeyId is spelt incorrectly, but kept for historical -- reasons.
-- receipentKeyId is spelt incorrectly, but kept for historical -- reasons.
id-smime OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) 16 }
id-smime OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) 16 }
id-cap OBJECT IDENTIFIER ::= { id-smime 11 }
id-cap OBJECT IDENTIFIER ::= { id-smime 11 }
-- The preferBinaryInside OID indicates an ability to receive -- messages with binary encoding inside the CMS wrapper. -- The preferBinaryInside attribute's value field is ABSENT.
-- The preferBinaryInside OID indicates an ability to receive -- messages with binary encoding inside the CMS wrapper. -- The preferBinaryInside attribute's value field is ABSENT.
id-cap-preferBinaryInside OBJECT IDENTIFIER ::= { id-cap 1 }
id-cap-preferBinaryInside OBJECT IDENTIFIER ::= { id-cap 1 }
-- The following list OIDs to be used with S/MIME V3
--下面列出了与S/MIME V3一起使用的OID
-- Signature Algorithms Not Found in [CMSALG], [CMS-SHA2], [RSAPSS], -- and [RSAOAEP]
-- Signature Algorithms Not Found in [CMSALG], [CMS-SHA2], [RSAPSS], -- and [RSAOAEP]
-- -- md2WithRSAEncryption OBJECT IDENTIFIER ::= -- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-1(1) -- 2}
-- -- md2WithRSAEncryption OBJECT IDENTIFIER ::= -- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-1(1) -- 2}
-- -- Other Signed Attributes -- -- signingTime OBJECT IDENTIFIER ::= -- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) -- 5} -- See [CMS] for a description of how to encode the attribute -- value.
-- -- Other Signed Attributes -- -- signingTime OBJECT IDENTIFIER ::= -- {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) -- 5} -- See [CMS] for a description of how to encode the attribute -- value.
SMIMECapabilitiesParametersForRC2CBC ::= INTEGER -- (RC2 Key Length (number of bits))
SMIMECapabilitiesParametersForRC2CBC ::= INTEGER -- (RC2 Key Length (number of bits))
END
终止
Appendix B. Moving S/MIME v2 Message Specification to Historic Status
附录B.将S/MIME v2消息规范移动到历史状态
The S/MIME v3 [SMIMEv3], v3.1 [SMIMEv3.1], and v3.2 (this document) are backwards compatible with the S/MIME v2 Message Specification [SMIMEv2], with the exception of the algorithms (dropped RC2/40 requirement and added DSA and RSASSA-PSS requirements). Therefore, it is recommended that RFC 2311 [SMIMEv2] be moved to Historic status.
S/MIME v3[SMIMEv3]、v3.1[SMIMEv3.1]和v3.2(本文档)与S/MIME v2消息规范[SMIMEv2]向后兼容,但算法除外(删除了RC2/40要求,增加了DSA和RSASSA-PSS要求)。因此,建议将RFC 2311[SMIMEv2]移至历史状态。
Many thanks go out to the other authors of the S/MIME version 2 Message Specification RFC: Steve Dusse, Paul Hoffman, Laurence Lundblade, and Lisa Repka. Without v2, there wouldn't be a v3, v3.1, or v3.2.
非常感谢S/MIME版本2消息规范RFC的其他作者:Steve Dusse、Paul Hoffman、Laurence Lundblade和Lisa Repka。没有v2,就不会有v3、v3.1或v3.2。
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 doomed to omission, and for that I apologize. In alphabetical order, the following people stand out in my mind because they made direct contributions to this document:
S/MIME工作组的一些成员也非常努力地工作,为本文件作出了贡献。任何人的名单都注定会被遗漏,对此我深表歉意。按字母顺序排列,以下人员在我心目中脱颖而出,因为他们对本文件作出了直接贡献:
Tony Capel, Piers Chivers, Dave Crocker, Bill Flanigan, Peter Gutmann, Alfred Hoenes, Paul Hoffman, Russ Housley, William Ottaway, John Pawling, and Jim Schaad.
托尼·卡佩尔、皮尔斯·奇弗斯、戴夫·克罗克、比尔·弗拉尼根、彼得·古特曼、阿尔弗雷德·霍恩斯、保罗·霍夫曼、罗斯·霍斯利、威廉·奥塔维、约翰·帕林和吉姆·沙德。
Authors' Addresses
作者地址
Blake Ramsdell Brute Squad Labs, Inc.
布莱克·拉姆斯代尔野蛮小队实验室有限公司。
EMail: blaker@gmail.com
EMail: blaker@gmail.com
Sean Turner IECA, Inc. 3057 Nutley Street, Suite 106 Fairfax, VA 22031 USA
Sean Turner IECA,Inc.美国弗吉尼亚州费尔法克斯市努特利街3057号106室,邮编22031
EMail: turners@ieca.com
EMail: turners@ieca.com