Internet Engineering Task Force (IETF)                         J. Schaad
Request for Comments: 8551                                August Cellars
Obsoletes: 5751                                              B. Ramsdell
Category: Standards Track                         Brute Squad Labs, Inc.
ISSN: 2070-1721                                                S. Turner
                                                                   sn3rd
                                                              April 2019
        
Internet Engineering Task Force (IETF)                         J. Schaad
Request for Comments: 8551                                August Cellars
Obsoletes: 5751                                              B. Ramsdell
Category: Standards Track                         Brute Squad Labs, Inc.
ISSN: 2070-1721                                                S. Turner
                                                                   sn3rd
                                                              April 2019
        

Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 4.0 Message Specification

安全/多用途Internet邮件扩展(S/MIME)版本4.0邮件规范

Abstract

摘要

This document defines Secure/Multipurpose Internet Mail Extensions (S/MIME) version 4.0. 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 5751.

本文档定义了安全/多用途Internet邮件扩展(S/MIME)版本4.0。S/MIME提供了发送和接收安全MIME数据的一致方式。数字签名提供身份验证、消息完整性和不可否认性以及来源证明。加密提供了数据保密性。压缩可用于减少数据大小。本文件淘汰了RFC 5751。

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 7841.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 7841第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc8551.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问https://www.rfc-editor.org/info/rfc8551.

Copyright Notice

版权公告

Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved.

版权(c)2019 IETF信托基金和被确定为文件作者的人员。版权所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://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文件的法律规定的约束(https://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  . . . . . . . . . . . . . . . . . . . . . . . .   5
     1.1.  Specification Overview  . . . . . . . . . . . . . . . . .   5
     1.2.  Definitions . . . . . . . . . . . . . . . . . . . . . . .   6
     1.3.  Conventions Used in This Document . . . . . . . . . . . .   7
     1.4.  Compatibility with Prior Practice of S/MIME . . . . . . .   8
     1.5.  Changes from S/MIME v3 to S/MIME v3.1 . . . . . . . . . .   9
     1.6.  Changes from S/MIME v3.1 to S/MIME v3.2 . . . . . . . . .   9
     1.7.  Changes for S/MIME v4.0 . . . . . . . . . . . . . . . . .  11
   2.  CMS Options . . . . . . . . . . . . . . . . . . . . . . . . .  12
     2.1.  DigestAlgorithmIdentifier . . . . . . . . . . . . . . . .  12
     2.2.  SignatureAlgorithmIdentifier  . . . . . . . . . . . . . .  12
     2.3.  KeyEncryptionAlgorithmIdentifier  . . . . . . . . . . . .  13
     2.4.  General Syntax  . . . . . . . . . . . . . . . . . . . . .  13
       2.4.1.  Data Content Type . . . . . . . . . . . . . . . . . .  14
       2.4.2.  SignedData Content Type . . . . . . . . . . . . . . .  14
       2.4.3.  EnvelopedData Content Type  . . . . . . . . . . . . .  14
       2.4.4.  AuthEnvelopedData Content Type  . . . . . . . . . . .  14
       2.4.5.  CompressedData Content Type . . . . . . . . . . . . .  14
     2.5.  Attributes and the SignerInfo Type  . . . . . . . . . . .  15
       2.5.1.  Signing Time Attribute  . . . . . . . . . . . . . . .  15
       2.5.2.  SMIMECapabilities Attribute . . . . . . . . . . . . .  16
       2.5.3.  Encryption Key Preference Attribute . . . . . . . . .  17
     2.6.  SignerIdentifier SignerInfo Type  . . . . . . . . . . . .  19
     2.7.  ContentEncryptionAlgorithmIdentifier  . . . . . . . . . .  19
       2.7.1.  Deciding Which Encryption Method to Use . . . . . . .  19
       2.7.2.  Choosing Weak Encryption  . . . . . . . . . . . . . .  21
       2.7.3.  Multiple Recipients . . . . . . . . . . . . . . . . .  21
   3.  Creating S/MIME Messages  . . . . . . . . . . . . . . . . . .  21
     3.1.  Preparing the MIME Entity for Signing, Enveloping, or
           Compressing . . . . . . . . . . . . . . . . . . . . . . .  22
       3.1.1.  Canonicalization  . . . . . . . . . . . . . . . . . .  23
       3.1.2.  Transfer Encoding . . . . . . . . . . . . . . . . . .  24
       3.1.3.  Transfer Encoding for Signing Using multipart/signed   25
       3.1.4.  Sample Canonical MIME Entity  . . . . . . . . . . . .  25
     3.2.  The application/pkcs7-mime Media Type . . . . . . . . . .  26
       3.2.1.  The name and filename Parameters  . . . . . . . . . .  27
       3.2.2.  The smime-type Parameter  . . . . . . . . . . . . . .  28
     3.3.  Creating an Enveloped-Only Message  . . . . . . . . . . .  29
     3.4.  Creating an Authenticated Enveloped-Only Message  . . . .  30
     3.5.  Creating a Signed-Only Message  . . . . . . . . . . . . .  31
       3.5.1.  Choosing a Format for Signed-Only Messages  . . . . .  32
       3.5.2.  Signing Using application/pkcs7-mime with SignedData   32
       3.5.3.  Signing Using the multipart/signed Format . . . . . .  33
     3.6.  Creating a Compressed-Only Message  . . . . . . . . . . .  36
     3.7.  Multiple Operations . . . . . . . . . . . . . . . . . . .  37
     3.8.  Creating a Certificate Management Message . . . . . . . .  38
        
   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   5
     1.1.  Specification Overview  . . . . . . . . . . . . . . . . .   5
     1.2.  Definitions . . . . . . . . . . . . . . . . . . . . . . .   6
     1.3.  Conventions Used in This Document . . . . . . . . . . . .   7
     1.4.  Compatibility with Prior Practice of S/MIME . . . . . . .   8
     1.5.  Changes from S/MIME v3 to S/MIME v3.1 . . . . . . . . . .   9
     1.6.  Changes from S/MIME v3.1 to S/MIME v3.2 . . . . . . . . .   9
     1.7.  Changes for S/MIME v4.0 . . . . . . . . . . . . . . . . .  11
   2.  CMS Options . . . . . . . . . . . . . . . . . . . . . . . . .  12
     2.1.  DigestAlgorithmIdentifier . . . . . . . . . . . . . . . .  12
     2.2.  SignatureAlgorithmIdentifier  . . . . . . . . . . . . . .  12
     2.3.  KeyEncryptionAlgorithmIdentifier  . . . . . . . . . . . .  13
     2.4.  General Syntax  . . . . . . . . . . . . . . . . . . . . .  13
       2.4.1.  Data Content Type . . . . . . . . . . . . . . . . . .  14
       2.4.2.  SignedData Content Type . . . . . . . . . . . . . . .  14
       2.4.3.  EnvelopedData Content Type  . . . . . . . . . . . . .  14
       2.4.4.  AuthEnvelopedData Content Type  . . . . . . . . . . .  14
       2.4.5.  CompressedData Content Type . . . . . . . . . . . . .  14
     2.5.  Attributes and the SignerInfo Type  . . . . . . . . . . .  15
       2.5.1.  Signing Time Attribute  . . . . . . . . . . . . . . .  15
       2.5.2.  SMIMECapabilities Attribute . . . . . . . . . . . . .  16
       2.5.3.  Encryption Key Preference Attribute . . . . . . . . .  17
     2.6.  SignerIdentifier SignerInfo Type  . . . . . . . . . . . .  19
     2.7.  ContentEncryptionAlgorithmIdentifier  . . . . . . . . . .  19
       2.7.1.  Deciding Which Encryption Method to Use . . . . . . .  19
       2.7.2.  Choosing Weak Encryption  . . . . . . . . . . . . . .  21
       2.7.3.  Multiple Recipients . . . . . . . . . . . . . . . . .  21
   3.  Creating S/MIME Messages  . . . . . . . . . . . . . . . . . .  21
     3.1.  Preparing the MIME Entity for Signing, Enveloping, or
           Compressing . . . . . . . . . . . . . . . . . . . . . . .  22
       3.1.1.  Canonicalization  . . . . . . . . . . . . . . . . . .  23
       3.1.2.  Transfer Encoding . . . . . . . . . . . . . . . . . .  24
       3.1.3.  Transfer Encoding for Signing Using multipart/signed   25
       3.1.4.  Sample Canonical MIME Entity  . . . . . . . . . . . .  25
     3.2.  The application/pkcs7-mime Media Type . . . . . . . . . .  26
       3.2.1.  The name and filename Parameters  . . . . . . . . . .  27
       3.2.2.  The smime-type Parameter  . . . . . . . . . . . . . .  28
     3.3.  Creating an Enveloped-Only Message  . . . . . . . . . . .  29
     3.4.  Creating an Authenticated Enveloped-Only Message  . . . .  30
     3.5.  Creating a Signed-Only Message  . . . . . . . . . . . . .  31
       3.5.1.  Choosing a Format for Signed-Only Messages  . . . . .  32
       3.5.2.  Signing Using application/pkcs7-mime with SignedData   32
       3.5.3.  Signing Using the multipart/signed Format . . . . . .  33
     3.6.  Creating a Compressed-Only Message  . . . . . . . . . . .  36
     3.7.  Multiple Operations . . . . . . . . . . . . . . . . . . .  37
     3.8.  Creating a Certificate Management Message . . . . . . . .  38
        
     3.9.  Registration Requests . . . . . . . . . . . . . . . . . .  38
     3.10. Identifying an S/MIME Message . . . . . . . . . . . . . .  39
   4.  Certificate Processing  . . . . . . . . . . . . . . . . . . .  39
     4.1.  Key Pair Generation . . . . . . . . . . . . . . . . . . .  40
     4.2.  Signature Generation  . . . . . . . . . . . . . . . . . .  40
     4.3.  Signature Verification  . . . . . . . . . . . . . . . . .  40
     4.4.  Encryption  . . . . . . . . . . . . . . . . . . . . . . .  41
     4.5.  Decryption  . . . . . . . . . . . . . . . . . . . . . . .  41
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  41
     5.1.  Media Type for application/pkcs7-mime . . . . . . . . . .  42
     5.2.  Media Type for application/pkcs7-signature  . . . . . . .  43
     5.3.  authEnveloped-data smime-type . . . . . . . . . . . . . .  44
     5.4.  Reference Updates . . . . . . . . . . . . . . . . . . . .  44
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  44
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  48
     7.1.  Reference Conventions . . . . . . . . . . . . . . . . . .  48
     7.2.  Normative References  . . . . . . . . . . . . . . . . . .  49
     7.3.  Informative References  . . . . . . . . . . . . . . . . .  52
   Appendix A.  ASN.1 Module . . . . . . . . . . . . . . . . . . . .  57
   Appendix B.  Historic Mail Considerations . . . . . . . . . . . .  59
     B.1.  DigestAlgorithmIdentifier . . . . . . . . . . . . . . . .  59
     B.2.  Signature Algorithms  . . . . . . . . . . . . . . . . . .  59
     B.3.  ContentEncryptionAlgorithmIdentifier  . . . . . . . . . .  61
     B.4.  KeyEncryptionAlgorithmIdentifier  . . . . . . . . . . . .  62
   Appendix C.  Moving S/MIME v2 Message Specification to Historic
                Status . . . . . . . . . . . . . . . . . . . . . . .  62
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  62
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  63
        
     3.9.  Registration Requests . . . . . . . . . . . . . . . . . .  38
     3.10. Identifying an S/MIME Message . . . . . . . . . . . . . .  39
   4.  Certificate Processing  . . . . . . . . . . . . . . . . . . .  39
     4.1.  Key Pair Generation . . . . . . . . . . . . . . . . . . .  40
     4.2.  Signature Generation  . . . . . . . . . . . . . . . . . .  40
     4.3.  Signature Verification  . . . . . . . . . . . . . . . . .  40
     4.4.  Encryption  . . . . . . . . . . . . . . . . . . . . . . .  41
     4.5.  Decryption  . . . . . . . . . . . . . . . . . . . . . . .  41
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  41
     5.1.  Media Type for application/pkcs7-mime . . . . . . . . . .  42
     5.2.  Media Type for application/pkcs7-signature  . . . . . . .  43
     5.3.  authEnveloped-data smime-type . . . . . . . . . . . . . .  44
     5.4.  Reference Updates . . . . . . . . . . . . . . . . . . . .  44
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  44
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  48
     7.1.  Reference Conventions . . . . . . . . . . . . . . . . . .  48
     7.2.  Normative References  . . . . . . . . . . . . . . . . . .  49
     7.3.  Informative References  . . . . . . . . . . . . . . . . .  52
   Appendix A.  ASN.1 Module . . . . . . . . . . . . . . . . . . . .  57
   Appendix B.  Historic Mail Considerations . . . . . . . . . . . .  59
     B.1.  DigestAlgorithmIdentifier . . . . . . . . . . . . . . . .  59
     B.2.  Signature Algorithms  . . . . . . . . . . . . . . . . . .  59
     B.3.  ContentEncryptionAlgorithmIdentifier  . . . . . . . . . .  61
     B.4.  KeyEncryptionAlgorithmIdentifier  . . . . . . . . . . . .  62
   Appendix C.  Moving S/MIME v2 Message Specification to Historic
                Status . . . . . . . . . . . . . . . . . . . . . . .  62
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  62
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  63
        
1. Introduction
1. 介绍

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 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 defines version 4.0 of the S/MIME Message Specification. As such, this document obsoletes version 3.2 of the S/MIME Message Specification [RFC5751].

本文档定义了S/MIME消息规范的版本4.0。因此,本文件淘汰了S/MIME消息规范[RFC5751]的3.2版。

This specification contains a number of references to documents that have been obsoleted or replaced. This is intentional, as the updated documents often do not have the same information or protocol requirements in them.

本规范包含大量已废弃或替换文件的参考资料。这是有意的,因为更新的文档中通常没有相同的信息或协议要求。

1.1. Specification Overview
1.1. 规范概述

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 applications based on content-type.

本文档描述了向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) [CMS], which is derived from PKCS #7 [RFC2315]. This specification also defines the application/pkcs7-mime media type, which can be used to transport those body parts.

本规范定义了如何创建MIME主体部分,该主体部分已根据加密消息语法(CMS)[CMS]进行加密增强,该语法源自PKCS#7[RFC2315]。本规范还定义了application/pkcs7 mime媒体类型,可用于传输这些身体部位。

This document also discusses how to use the multipart/signed media type defined in [RFC1847] 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.

本文档还讨论了如何使用[RFC1847]中定义的多部分/签名媒体类型来传输S/MIME签名消息。multipart/signed与application/pkcs7签名媒体类型结合使用,该类型用于传输分离的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 [CMS], [RFC3370], [RFC4056], [RFC3560], and [RFC5754].

为了创建S/MIME消息,S/MIME代理必须遵循本文档中的规范以及[CMS]、[RFC3370]、[RFC4056]、[RFC3560]和[RFC5754]中列出的规范。

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 follow the Robustness Principle (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数据的任何系统。例如,发送加密消息的自动化进程可能根本无法接收加密消息。因此,在适当的情况下,将分别列出这两类代理的要求和建议。

1.2. Definitions
1.2. 定义

For the purposes of this specification, the following definitions apply.

在本规范中,以下定义适用。

ASN.1: Abstract Syntax Notation One, as defined in ITU-T Recommendations X.680, X.681, X.682, and X.683 [ASN.1].

ASN.1:抽象语法符号1,如ITU-T建议X.680、X.681、X.682和X.683[ASN.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代理:作为接收代理、发送代理或两者兼有的用户软件。

Data integrity service: A security service that protects against unauthorized changes to data by ensuring that changes to the data are detectable [RFC4949].

数据完整性服务:一种安全服务,通过确保数据的更改是可检测的,从而防止未经授权的数据更改[RFC4949]。

Data confidentiality: The property that data is not disclosed to system entities unless they have been authorized to know the data [RFC4949].

数据保密性:除非系统实体被授权了解数据,否则数据不会披露给系统实体的属性[RFC4949]。

1.3. Conventions Used in This Document
1.3. 本文件中使用的公约

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”在所有大写字母出现时(如图所示)应按照BCP 14[RFC2119][RFC8174]所述进行解释。

We define the additional requirement levels:

我们定义了额外的需求级别:

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-.

必须-该术语的含义与必须相同。然而,作者希望这一要求在未来的文件中不再是必须的。尽管其状态将在稍后确定,但可以合理预期,如果未来的文件修订改变了必须要求的状态,则至少应保持为应该或应该。

The term "RSA" in this document almost always refers to the PKCS #1 v1.5 RSA [RFC2313] signature or encryption algorithms even when not qualified as such. There are a couple of places where it refers to the general RSA cryptographic operation; these can be determined from the context where it is used.

本文档中的术语“RSA”几乎总是指PKCS#1 v1.5 RSA[RFC2313]签名或加密算法,即使不具备此类资格。有几个地方提到了一般的RSA加密操作;这些可以从使用它的上下文中确定。

1.4. Compatibility with Prior Practice of S/MIME
1.4. 与先前S/MIME实践的兼容性

S/MIME version 4.0 agents ought to attempt to have the greatest interoperability possible with agents for prior versions of S/MIME.

S/MIME版本4.0代理应该尝试与S/MIME早期版本的代理具有尽可能大的互操作性。

- S/MIME version 2 is described in RFC 2311 through RFC 2315 inclusive [SMIMEv2].

- RFC 2311至RFC 2315(含)中描述了S/MIME版本2[SMIMEv2]。

- S/MIME version 3 is described in RFC 2630 through RFC 2634 inclusive and RFC 5035 [SMIMEv3].

- S/MIME版本3在RFC 2630至RFC 2634(含)和RFC 5035[SMIMEv3]中进行了描述。

- S/MIME version 3.1 is described in RFC 2634, RFC 3850, RFC 3851, RFC 3852, and RFC 5035 [SMIMEv3.1].

- RFC 2634、RFC 3850、RFC 3851、RFC 3852和RFC 5035[SMIMEv3.1]中描述了S/MIME版本3.1。

- S/MIME version 3.2 is described in RFC 2634, RFC 5035, RFC 5652, RFC 5750, and RFC 5751 [SMIMEv3.2].

- RFC 2634、RFC 5035、RFC 5652、RFC 5750和RFC 5751[SMIMEv3.2]中描述了S/MIME版本3.2。

- [RFC2311] also has historical information about the development of S/MIME.

- [RFC2311]还有关于S/MIME发展的历史信息。

1.5. Changes from S/MIME v3 to S/MIME v3.1
1.5. 从S/MIME v3到S/MIME v3.1的更改

This section describes the changes made between S/MIME v3 and S/MIME v3.1. Note that the requirement levels indicated by the capitalized key words ("MUST", "SHOULD", etc.) may have changed in later versions of S/MIME.

本节介绍在S/MIME v3和S/MIME v3.1之间所做的更改。请注意,大写关键字(“必须”、“应该”等)表示的需求级别在S/MIME的更高版本中可能已发生变化。

- The RSA public key algorithm was changed to a MUST implement. The key wrap algorithm and the Diffie-Hellman (DH) algorithm [RFC2631] were changed to a SHOULD implement.

- RSA公钥算法已更改为必须实现。密钥包裹算法和Diffie-Hellman(DH)算法[RFC2631]已更改为应实现。

- 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类型,以及所需的媒体类型和文件扩展名添加。

1.6. Changes from S/MIME v3.1 to S/MIME v3.2
1.6. 从S/MIME v3.1到S/MIME v3.2的更改

This section describes the changes made between S/MIME v3.1 and S/MIME v3.2. Note that the requirement levels indicated by the capitalized key words ("MUST", "SHOULD", etc.) may have changed in later versions of S/MIME. Note that the section numbers listed here (e.g., 3.4.3.2) are from [RFC5751].

本节介绍在S/MIME v3.1和S/MIME v3.2之间所做的更改。请注意,大写关键字(“必须”、“应该”等)表示的需求级别在S/MIME的更高版本中可能已发生变化。请注意,此处列出的章节编号(如3.4.3.2)来自[RFC5751]。

- Made 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 v3.1 RFCs.

- 第1.4节:添加了对S/MIME v3.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; 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更改为“应”;和RSASSA-PSS,应添加SHA-256+。还添加了关于S/MIME v3.1客户端支持什么的说明。

- Section 2.3 (key encryption): DH changed to SHOULD-, and RSAES-OAEP added as SHOULD+. Elaborated on 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", replaced "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, Section 2.7.1, and 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+, and 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 and 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字符集的文本。

- Sections 3.2.2 and 3.6: Replaced "encrypted" with "enveloped". Updated OID example to use AES-128 CBC OID.

- 第3.2.2和3.6节:将“加密”替换为“信封”。更新OID示例以使用AES-128 CBC OID。

- Section 3.4.3.2: Replaced "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 informative 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移至历史状态。

1.7. Changes for S/MIME v4.0
1.7. S/MIME v4.0的更改

This section describes the changes made between S/MIME v3.2 and S/MIME v4.0.

本节介绍在S/MIME v3.2和S/MIME v4.0之间所做的更改。

- Added the use of AuthEnvelopedData, including defining and registering an smime-type value (Sections 2.4.4 and 3.4).

- 添加了AuthEnvelopedData的使用,包括定义和注册smime类型值(第2.4.4节和第3.4节)。

- Updated the content-encryption algorithms (Sections 2.7 and 2.7.1.2): added AES-256 Galois/Counter Mode (GCM), added ChaCha20-Poly1305, removed mention of AES-192 Cipher Block Chaining (CBC), and marked tripleDES as historic.

- 更新内容加密算法(第2.7节和第2.7.1.2节):添加AES-256伽罗瓦/计数器模式(GCM),添加ChaCha20-Poly1305,删除AES-192密码块链接(CBC)的提及,并将三元组标记为历史。

- Updated the set of signature algorithms (Section 2.2): added the Edwards-curve Digital Signature Algorithm (EdDSA), added the Elliptic Curve Digital Signature Algorithm (ECDSA), and marked DSA as historic.

- 更新了签名算法集(第2.2节):添加了爱德华兹曲线数字签名算法(EdDSA),添加了椭圆曲线数字签名算法(ECDSA),并将DSA标记为历史。

- Updated the set of digest algorithms (Section 2.1): added SHA-512, and marked SHA-1 as historic.

- 更新了摘要算法集(第2.1节):添加了SHA-512,并将SHA-1标记为历史。

- Updated the size of keys to be used for RSA encryption and RSA signing (Section 4).

- 更新了用于RSA加密和RSA签名的密钥大小(第4节)。

- Created Appendix B, which discusses considerations for dealing with historic email messages.

- 创建了附录B,其中讨论了处理历史电子邮件的注意事项。

2. CMS Options
2. CMS选项

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. [RFC3370] and [RFC5754] provide additional details regarding the use of the cryptographic algorithms. [ESS] provides additional details regarding the use of additional attributes.

CMS允许在内容、属性和算法支持方面有多种选择。本节提出了一些支持需求和建议,以实现所有S/MIME实现之间的基本互操作性。[RFC3370]和[RFC5754]提供了有关加密算法使用的其他详细信息。[ESS]提供了有关使用其他属性的其他详细信息。

2.1. DigestAlgorithmIdentifier
2.1. 算法识别器

The algorithms here are used for digesting the body of the message and are not the same as the digest algorithms used as part of the signature algorithms. The result of this is placed in the message-digest attribute of the signed attributes. It is RECOMMENDED that the algorithm used for digesting the body of the message be of similar strength to, or greater strength than, the signature algorithm.

这里的算法用于对消息体进行摘要,与作为签名算法一部分使用的摘要算法不同。此操作的结果将放置在已签名属性的消息摘要属性中。建议用于消化消息正文的算法的强度与签名算法类似,或大于签名算法。

Sending and receiving agents:

发送和接收代理:

- MUST support SHA-256.

- 必须支持SHA-256。

- MUST support SHA-512.

- 必须支持SHA-512。

[RFC5754] provides the details for using these algorithms with S/MIME.

[RFC5754]提供了在S/MIME中使用这些算法的详细信息。

2.2. SignatureAlgorithmIdentifier
2.2. 签名算法标识符

There are different sets of requirements placed on receiving and sending agents. By having the different requirements, the maximum amount of interoperability is achieved, as it allows for specialized protection of private key material but maximum signature validation.

对接收和发送代理有不同的要求。通过具有不同的需求,实现了最大程度的互操作性,因为它允许对私钥材料进行专门保护,但允许最大程度的签名验证。

Receiving agents:

接收代理:

- MUST support ECDSA with curve P-256 and SHA-256.

- 必须支持曲线P-256和SHA-256的ECDSA。

- MUST support EdDSA with curve25519 using PureEdDSA mode [RFC8419].

- 必须使用PureEdDSA模式[RFC8419]支持曲线25519的EdDSA。

- MUST- support RSA PKCS #1 v1.5 with SHA-256.

- 必须-支持带有SHA-256的RSA PKCS#1 v1.5。

- SHOULD support the RSA Probabilistic Signature Scheme (RSASSA-PSS) with SHA-256.

- 应支持带有SHA-256的RSA概率签名方案(RSASSA-PSS)。

Sending agents:

发送代理:

- MUST support at least one of the following algorithms: ECDSA with curve P-256 and SHA-256, or EdDSA with curve25519 using PureEdDSA mode.

- 必须至少支持以下一种算法:使用曲线P-256和SHA-256的ECDSA,或使用PureEdDSA模式使用曲线25519的EdDSA。

- MUST- support RSA PKCS #1 v1.5 with SHA-256.

- 必须-支持带有SHA-256的RSA PKCS#1 v1.5。

- SHOULD support RSASSA-PSS with SHA-256.

- 应支持带有SHA-256的RSASSA-PSS。

See Section 4.1 for information on key size and algorithm references.

有关密钥大小和算法参考的信息,请参见第4.1节。

2.3. KeyEncryptionAlgorithmIdentifier
2.3. 密钥加密算法标识符

Receiving and sending agents:

接收和发送代理:

- MUST support Elliptic Curve Diffie-Hellman (ECDH) ephemeral-static mode for P-256, as specified in [RFC5753].

- 必须支持[RFC5753]中规定的P-256椭圆曲线Diffie-Hellman(ECDH)瞬时静态模式。

- MUST support ECDH ephemeral-static mode for X25519 using HKDF-256 ("HKDF" stands for "HMAC-based Key Derivation Function") for the KDF, as specified in [RFC8418].

- 按照[RFC8418]中的规定,必须使用KDF的HKDF-256(“HKDF”代表“基于HMAC的密钥派生函数”)支持X25519的ECDH临时静态模式。

- MUST- support RSA encryption, as specified in [RFC3370].

- 必须-支持[RFC3370]中规定的RSA加密。

- SHOULD+ support RSA Encryption Scheme - Optimal Asymmetric Encryption Padding (RSAES-OAEP), as specified in [RFC3560].

- 应+支持RSA加密方案-最佳非对称加密填充(RSAES-OAEP),如[RFC3560]中所述。

When ECDH ephemeral-static is used, a key wrap algorithm is also specified in the KeyEncryptionAlgorithmIdentifier [RFC5652]. The underlying encryption functions for the key wrap and content-encryption algorithms [RFC3370] [RFC3565] 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 both 128-bit and 256-bit AES modes are mandatory to implement as content-encryption algorithms (Section 2.7), both the AES-128 and AES-256 key wrap algorithms MUST be supported when ECDH ephemeral-static is used. Recipients MAY enforce this but MUST use the weaker of the two as part of any cryptographic strength computations they might do.

当使用ECDH ephemeral static时,KeyEncryptionAlgorithmIdentifier[RFC5652]中还指定了密钥包裹算法。密钥封装和内容加密算法[RFC3370][RFC3565]的基础加密功能以及两种算法的密钥大小必须相同(例如,AES-128密钥封装算法和AES-128内容加密算法)。由于128位和256位AES模式都必须作为内容加密算法实施(第2.7节),因此在使用ECDH临时静态时,必须支持AES-128和AES-256密钥包裹算法。接收者可以强制执行此操作,但必须使用两者中较弱的一个作为他们可能执行的任何加密强度计算的一部分。

Appendix B provides information on algorithm support in older versions of S/MIME.

附录B提供了有关旧版本S/MIME中算法支持的信息。

2.4. General Syntax
2.4. 一般语法

There are several CMS content types. Of these, only the Data, SignedData, EnvelopedData, AuthEnvelopedData, and CompressedData content types are currently used for S/MIME.

有几种CMS内容类型。其中,只有Data、SignedData、EnvelopedData、AuthEnvelopedData和CompressedData内容类型当前用于S/MIME。

2.4.1. Data Content Type
2.4.1. 数据内容类型

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 (OID), 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.5.3 of this document). As another example, when applying encryption to MIME data, the CMS EnvelopedData encryptedContentInfo contentType MUST include the id-data OID and the encrypted MIME content MUST be stored in the EnvelopedData encryptedContentInfo encryptedContent OCTET STRING.

发送代理必须使用id数据内容类型标识符来标识“内部”MIME消息内容。例如,当对MIME数据应用数字签名时,CMS SignedData encapContentInfo eContentType必须包含id数据对象标识符(OID),并且媒体类型必须存储在SignedData encapContentInfo eContent八进制字符串中(根据本文件第3.5.3节,除非发送代理使用多部分/签名,在这种情况下,没有eContent)。另一个示例是,当对MIME数据应用加密时,CMS EnvelopedData encryptedContentInfo contentType必须包含id数据OID,并且加密的MIME内容必须存储在EnvelopedData encryptedContentInfo encryptedContent八进制字符串中。

2.4.2. SignedData Content Type
2.4.2. SignedData内容类型

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内容类型对消息应用数字签名,或者在没有签名信息的退化情况下传递证书。将签名应用于消息可提供身份验证、消息完整性和来源的不可否认性。

2.4.3. EnvelopedData Content Type
2.4.3. 信封数据内容类型

This content type is used to apply data confidentiality to a message. In order to distribute the symmetric key, a sender needs to have access to a public key for each intended message recipient to use this service.

此内容类型用于对消息应用数据机密性。为了分发对称密钥,发送方需要有权访问每个预期邮件收件人使用此服务的公钥。

2.4.4. AuthEnvelopedData Content Type
2.4.4. AuthEnvelopedData内容类型

This content type is used to apply data confidentiality and message integrity to a message. This content type does not provide authentication or non-repudiation. In order to distribute the symmetric key, a sender needs to have access to a public key for each intended message recipient to use this service.

此内容类型用于将数据机密性和消息完整性应用于消息。此内容类型不提供身份验证或不可否认性。为了分发对称密钥,发送方需要有权访问每个预期邮件收件人使用此服务的公钥。

2.4.5. CompressedData Content Type
2.4.5. 压缩数据内容类型

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; it is only used to reduce the message's size.

此内容类型用于对消息应用数据压缩。此内容类型不提供身份验证、消息完整性、不可否认性或数据机密性;它仅用于减小消息的大小。

See Section 3.7 for further guidance on the use of this type in conjunction with other CMS types.

参见第3.7节,了解该类型与其他CMS类型结合使用的更多指南。

2.5. Attributes and the SignerInfo Type
2.5. 属性和SignerInfo类型

The SignerInfo type allows the inclusion of unsigned and signed attributes along with a signature. These attributes can be required for the processing of messages (e.g., message digest), information the signer supplied (e.g., SMIME capabilities) that should be processed, or attributes that are not relevant to the current situation (e.g., mlExpansionHistory [RFC2634] for mail viewers).

SignerInfo类型允许将未签名和已签名属性与签名一起包含。处理消息(例如,消息摘要)、签名者提供的应处理的信息(例如,SMIME功能)或与当前情况无关的属性(例如,邮件查看器的mlExpansionHistory[RFC2634])可能需要这些属性。

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 2.5.1 in this document)

- 签署时间(本文件第2.5.1节)

- SMIME capabilities (Section 2.5.2 in this document)

- SMIME功能(本文档第2.5.2节)

- Encryption key Preference (Section 2.5.3 in this document)

- 加密密钥首选项(本文件第2.5.3节)

- Message digest (Section 11.2 in [RFC5652])

- 信息摘要(RFC5652中的第11.2节)

- Content type (Section 11.1 in [RFC5652])

- 内容类型(RFC5652中的第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], respectively.

此外,接收代理应该能够分别处理RFC 2634[ESS]第5节和RFC 5035[ESS]第3节中定义的signingCertificate和signingCertificateV2签名属性的零个或一个实例。

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.

包含此处未列出的已签名属性的交互式发送代理应向用户显示这些属性,以便用户知道正在签名的所有数据。

2.5.1. Signing Time Attribute
2.5.1. 签名时间属性

The signingTime attribute is used to convey the time that a message was signed. The time of signing will most likely be created by a signer and therefore is only as trustworthy as that signer.

signingTime属性用于传递消息签名的时间。签名时间很可能是由签名者创建的,因此只有与该签名者一样可信。

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 signingTime attributes that are encoded in either UTCTime or GeneralizedTime.

接收代理必须能够处理以UTCTime或GeneralizedTime编码的signingTime属性。

2.5.2. SMIMECapabilities Attribute
2.5.2. SMIMECapabilities属性

The SMIMECapabilities attribute includes signature algorithms (such as "sha256WithRSAEncryption"), symmetric algorithms (such as "AES-128 CBC"), authenticated symmetric algorithms (such as "AES-128 GCM"), and key encipherment algorithms (such as "rsaEncryption"). The presence of an SMIMECapability attribute containing an algorithm implies that the sender can deal with the algorithm as well as understand the ASN.1 structures associated with that algorithm. There are also several identifiers that indicate support for other optional features such as binary encoding and compression. The SMIMECapabilities attribute was 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”)、经过身份验证的对称算法(如“AES-128 GCM”)和密钥加密算法(如“RSA加密”)。包含算法的SMIMECapability属性的存在意味着发送方可以处理该算法并理解与该算法相关的ASN.1结构。还有几个标识符表示对其他可选功能(如二进制编码和压缩)的支持。SMIMECapabilities属性被设计为灵活和可扩展的,以便将来可以以不会导致当前客户端中断的方式添加一种识别其他功能和首选项(如证书)的方法。

If present, the SMIMECapabilities attribute MUST be a SignedAttribute. CMS defines SignedAttributes as a SET OF Attribute. The SignedAttributes in a signerInfo MUST include a single instance of the SMIMECapabilities attribute. CMS defines the ASN.1 syntax for Attribute to include attrValues SET OF AttributeValue. An SMIMECapabilities attribute MUST only include a single instance of AttributeValue. If a signature is detected as violating these requirements, the signature SHOULD be treated as failing.

如果存在,SMIMECapabilities属性必须是SignedAttribute。CMS将SignedAttribute定义为一组属性。signerInfo中的SignedAttribute必须包含SMIMECapabilities属性的单个实例。CMS为属性定义ASN.1语法,以包括AttributeValue的attrValues集。SMIMECapabilities属性只能包含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 it need not list all its capabilities so that the capabilities list doesn't get too long. In an SMIMECapabilities attribute, the 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 encoding for the SMIMECapability for sha256WithRSAEncryption includes rather than omits the NULL parameter. Because of the requirement for identical encoding, individuals documenting algorithms to be used in the SMIMECapabilities attribute SHOULD explicitly document the correct byte sequence for the common cases.

SMIMECapabilities属性的结构是为了方便简单的表查找和二进制比较,以便确定匹配项。例如,sha256WithRSAEncryption的SMIMECapability编码包括而不是忽略NULL参数。由于对相同编码的要求,记录要在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 same OID that is used to identify an algorithm SHOULD also be used in the SMIMECapability for that algorithm. There are cases where a single OID can correspond to multiple algorithms. In these cases, a single algorithm MUST be assigned to the SMIMECapability using that OID. Additional OIDs from the smimeCapabilities OID tree are then allocated for the other algorithms usages. 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也应用于该算法的SMIMECapability中。在某些情况下,单个OID可以对应于多个算法。在这些情况下,必须使用该OID为SMIMECapability分配一个算法。然后,从smimeCapabilities 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 an 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节解释了缓存功能的策略。

2.5.3. Encryption Key Preference Attribute
2.5.3. 加密密钥首选项属性

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. CMS defines SignedAttributes as a SET OF Attribute. The SignedAttributes in a signerInfo MUST include a single instance of the SMIMEEncryptionKeyPreference attribute. CMS defines the ASN.1 syntax for Attribute to include attrValues SET OF AttributeValue. An SMIMEEncryptionKeyPreference attribute MUST only include a single instance of AttributeValue. If a signature is detected as violating these requirements, the signature SHOULD be treated as failing.

如果存在,SMIMEEncryptionKeyPreference属性必须是SignedAttribute。CMS将SignedAttribute定义为一组属性。signerInfo中的SignedAttribute必须包含SMIMEEncryptionKeyPreference属性的单个实例。CMS为属性定义ASN.1语法,以包括AttributeValue的attrValues集。SMIMEEncryptionKeyPreference属性只能包含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节解释了缓存首选项数据的策略。

2.5.3.1. Selection of Recipient Key Management Certificate
2.5.3.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 an X.509 certificate with the same subject name as the signer of an 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 an 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代理可以在它们之间进行任意选择。

2.6. SignerIdentifier SignerInfo Type
2.6. SignerIdentifier SignerInfo类型

S/MIME v4.0 implementations MUST support both issuerAndSerialNumber and subjectKeyIdentifier. Messages that use the subjectKeyIdentifier choice cannot be read by S/MIME v2 clients.

S/MIME v4.0实现必须同时支持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具有相同的值,并且必须准备在指示错误条件之前,在签名验证期间尝试每个匹配的证书。

2.7. ContentEncryptionAlgorithmIdentifier
2.7. ContentEncryptionAlgorithmIdentifier

Sending and receiving agents:

发送和接收代理:

- MUST support encryption and decryption with AES-128 GCM and AES-256 GCM [RFC5084].

- 必须支持AES-128 GCM和AES-256 GCM的加密和解密[RFC5084]。

- MUST- support encryption and decryption with AES-128 CBC [RFC3565].

- 必须-支持AES-128 CBC[RFC3565]的加密和解密。

- SHOULD+ support encryption and decryption with ChaCha20-Poly1305 [RFC7905].

- 应+支持ChaCha20-Poly1305[RFC7905]的加密和解密。

2.7.1. Deciding Which Encryption Method to Use
2.7.1. 决定使用哪种加密方法

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 and 2.7.1.2 describe the decisions a sending agent SHOULD use when choosing 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节描述了发送代理在选择将应用于消息的加密类型时应使用的决策。这些规则是有序的,因此发送代理应该按照给定的顺序做出决定。

2.7.1.1. Rule 1: Known Capabilities
2.7.1.1. 规则1:已知能力

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.

如果发送代理已从收件人处收到一组代理将要加密的消息的功能,则发送代理应通过选择列表中发送代理知道如何加密的第一个功能(即预期收件人最喜欢的功能)来使用该信息。如果发送代理合理地期望收件人能够解密邮件,则发送代理应使用列表中的功能之一。

2.7.1.2. Rule 2: Unknown Capabilities, Unknown Version of S/MIME
2.7.1.2. 规则2:未知功能,未知版本的S/MIME

If the following two conditions are met, the sending agent SHOULD use AES-256 GCM, as AES-256 GCM is a stronger algorithm and is required by S/MIME v4.0:

如果满足以下两个条件,发送代理应使用AES-256 GCM,因为AES-256 GCM是一种更强的算法,并且是S/MIME v4.0所要求的:

- The sending agent has no knowledge of the encryption capabilities of the recipient.

- 发送代理不知道收件人的加密功能。

- The sending agent has no knowledge of the version of S/MIME used or supported by the recipient.

- 发送代理不知道收件人使用或支持的S/MIME版本。

If the sending agent chooses not to use AES-256 GCM in this step, given the presumption is that a client implementing AES-GCM would do both AES-256 and AES-128, it SHOULD use AES-128 CBC.

如果发送代理在此步骤中选择不使用AES-256 GCM,假定实现AES-GCM的客户端将同时执行AES-256和AES-128,则应使用AES-128 CBC。

2.7.2. Choosing Weak Encryption
2.7.2. 选择弱加密

Algorithms such as RC2 are considered to be weak encryption algorithms. Algorithms such as TripleDES are not state of the art and are considered to be weaker algorithms than AES. A sending agent that is controlled by a human SHOULD allow a human sender to determine the risks of sending data using a weaker encryption algorithm before sending the data, and possibly allow the human to use a stronger encryption algorithm such as AES GCM or AES CBC even if there is a possibility that the recipient will not be able to process that algorithm.

像RC2这样的算法被认为是弱加密算法。像TripleDES这样的算法不是最先进的,被认为是比AES更弱的算法。由人工控制的发送代理应允许人工发送者在发送数据之前确定使用较弱加密算法发送数据的风险,并可能允许人类使用更强大的加密算法,如AES GCM或AES CBC,即使收件人可能无法处理该算法。

2.7.3. Multiple Recipients
2.7.3. 多个收件人

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.

如果发送代理正在向一组收件人发送加密邮件,其中某些收件人的加密功能不重叠,则发送代理将被迫发送多条邮件。请注意,如果发送代理选择发送使用强算法加密的消息,然后发送使用弱算法加密的相同消息,则观察通信通道的人可以通过解密弱加密消息来了解强加密消息的内容。

3. Creating S/MIME Messages
3. 创建S/MIME消息

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" documents [ESS] provide 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为仅封装数据提供了一种格式,为仅签名数据提供了几种格式,为签名和封装数据提供了几种格式。需要多种格式来适应多种环境,特别是对于签名消息。还描述了在这些格式中选择的标准。

Anyone reading this section is expected to understand MIME as described in [MIME-SPEC] and [RFC1847].

阅读本节的任何人都应理解[MIME-SPEC]和[RFC1847]中所述的MIME。

3.1. Preparing the MIME Entity for Signing, Enveloping, or Compressing
3.1. 准备MIME实体以进行签名、封装或压缩

S/MIME is used to secure MIME entities. A MIME message is composed of a MIME header and a MIME body. A body can consist of a single MIME entity or a tree of MIME entities (rooted with a multipart). S/MIME can be used to secure either a single MIME entity or a tree of MIME entities. These entities can be in locations other than the root. S/MIME can be applied multiple times to different entities in a single message. A MIME entity that is the whole message includes only the MIME message headers and MIME body and does not include the rfc822 header. Note that S/MIME can also be used to secure MIME entities used in applications other than Internet mail. For cases where protection of the rfc822 header is required, the use of the message/rfc822 media type is explained later in this section.

S/MIME用于保护MIME实体。MIME消息由MIME头和MIME体组成。主体可以由单个MIME实体或MIME实体树(以多部分为根)组成。S/MIME可用于保护单个MIME实体或MIME实体树。这些实体可以位于根以外的位置。S/MIME可以多次应用于单个消息中的不同实体。作为整个消息的MIME实体只包括MIME消息头和MIME正文,不包括rfc822头。请注意,S/MIME还可用于保护除Internet邮件以外的应用程序中使用的MIME实体。对于需要保护rfc822报头的情况,本节后面将解释消息/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 EnvelopedData, CompressedData, and AuthEnvelopedData content types is described in Sections 3.2 and 3.5. Other documents define additional CMS content types; those documents should be consulted for processing those CMS content types.

本节中描述的受保护MIME实体可以被视为“内部”MIME实体。也就是说,它可能是更大的MIME消息中的“最内层”对象。将“外部”MIME实体处理为CMS EnvelopedData、CompressedData和AuthEnvelopedData内容类型在第3.2节和第3.5节中进行了描述。其他文件定义了额外的CMS内容类型;处理这些CMS内容类型时,应查阅这些文件。

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 those documents for the exact procedures. 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 messages 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 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. Given the security difference between headers, it is RECOMMENDED that the receiving client provide a distinction between header fields, depending on where they are located.

为了保护外部的、与内容无关的消息头字段(例如,“主题”、“收件人”、“发件人”和“抄送”字段),发送客户端可以将完整的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,则可以假定其目的是提供头保护。考虑到前面讨论的头合并问题,此实体应作为顶级消息显示。

3.1.1. Canonicalization
3.1.1. 规范化

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.

规范化的确切细节取决于实体的实际媒体类型和子类型,此处不作描述。相反,应参考特定媒体类型的标准。例如,text/plain类型的规范化不同于audio/basic类型的规范化。除了文本类型之外,大多数类型只有一种表示,不管计算平台或环境如何,都可以将其视为规范表示。

In general, canonicalization will be performed by the non-security part of the sending agent rather than the S/MIME implementation.

通常,规范化将由发送代理的非安全部分执行,而不是由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)具有相同字符的多个表示形式。准备此类文本进行签名时,必须使用为字符集指定的规范表示。

3.1.2. Transfer Encoding
3.1.2. 传输编码

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。

As a rule, S/MIME implementations SHOULD use transfer encoding as 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 is 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位数据。

In the case where S/MIME implementations can determine that all intended recipients are capable of handling inner (all but the outermost) binary MIME objects, implementations 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) unnecessarily expands the message size. Implementations MAY determine that recipient implementations are capable of handling inner binary MIME entities by (1) interpreting the id-cap-preferBinaryInside SMIMECapabilities attribute, (2) prior agreement, or (3) other means.

在S/MIME实现可以确定所有预期接收者都能够处理内部(除了最外层)二进制MIME对象的情况下,实现应该使用二进制编码,而不是内部实体的7位安全传输编码。使用7位安全编码(如base64)会不必要地扩大消息大小。实现可以通过(1)解释id cap preferBinaryInside SMIMECapabilities属性,(2)事先约定,或(3)其他方式来确定接收方实现能够处理内部二进制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 as described in Section 3.1.3 for all MIME entities they secure.

如果一个或多个预期接收者无法处理内部二进制MIME对象,或者任何预期接收者都不知道此功能,则S/MIME实现应使用第3.1.3节中所述的传输编码来保护所有MIME实体。

3.1.3. Transfer Encoding for Signing Using multipart/signed
3.1.3. 使用多部分/签名的签名传输编码

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 already 7-bit data need no transfer encoding. Entities such as 8-bit text and binary data can be encoded with quoted-printable or base64 transfer encoding.

如果要通过标准Internet SMTP基础设施或其他限制为7位文本的传输传输多部分/签名实体,则必须应用传输编码,以便将其表示为7位文本。已经是7位数据的MIME实体不需要传输编码。实体(如8位文本和二进制数据)可以使用带引号的可打印或base64传输编码进行编码。

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.

- 代理可以将邮件返回给发件人。

[RFC1847] 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 encountered 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.

[RFC1847]禁止代理更改多部分/签名消息第一部分的传输编码。如果无法传输8位或二进制数据的兼容代理在第一部分遇到包含8位或二进制数据的多部分/签名消息,则必须将消息作为无法送达返回给发送方。

3.1.4. Sample Canonical MIME Entity
3.1.4. 示例规范MIME实体

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 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>.

此示例显示了具有完全传输编码的多部分/混合消息。此邮件包含文本部分和附件。示例消息文本包含非ASCII字符,因此需要进行传输编码。虽然此处未显示,但每行的末尾都是<CR><LF>。MIME头、文本和传输编码部分的行尾都必须是<CR><LF>。

Note that this example is not an example 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--

--酒吧--

3.2. The application/pkcs7-mime Media Type
3.2. 应用程序/pkcs7 mime媒体类型

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 base64 transfer encoding is appropriate -- in particular, when used with SMTP transport. The transfer encoding used depends on the transport

因为CMS内容类型是二进制数据,所以在大多数情况下,base64传输编码是合适的——特别是在与SMTP传输一起使用时。使用的传输编码取决于传输

through which the object is to be sent and is not a characteristic of the media type.

通过它发送对象,并且不是媒体类型的特征。

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对象保护的MIME实体的传输编码完全不同,也不相关,CMS对象是“内部”对象,如第3.1节所述。

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”参数,如下节所述。

3.2.1. The name and filename Parameters
3.2.1. 名称和文件名参数

For 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 [RFC2183] with the "filename" parameter. If a sending agent emits the above parameters, the value of the parameters SHOULD be a filename with the appropriate extension:

对于application/pkcs7 mime,发送代理应该向Content-Type字段发出可选的“name”参数,以便与旧系统兼容。发送代理还应发出带有“filename”参数的可选内容处置字段[RFC2183]。如果发送代理发出上述参数,则参数值应为具有适当扩展名的文件名:

                                                                File
   Media Type                                                Extension
   -------------------------------------------------------------------
   application/pkcs7-mime (SignedData, EnvelopedData,           .p7m
      AuthEnvelopedData)
   application/pkcs7-mime (degenerate SignedData certificate    .p7c
      management message)
   application/pkcs7-mime (CompressedData)                      .p7z
   application/pkcs7-signature (SignedData)                     .p7s
        
                                                                File
   Media Type                                                Extension
   -------------------------------------------------------------------
   application/pkcs7-mime (SignedData, EnvelopedData,           .p7m
      AuthEnvelopedData)
   application/pkcs7-mime (degenerate SignedData certificate    .p7c
      management message)
   application/pkcs7-mime (CompressedData)                      .p7z
   application/pkcs7-signature (SignedData)                     .p7s
        

In addition, the filename 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 filename 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

包含文件名有两个目的。它便于将S/MIME对象作为磁盘上的文件使用。它还可以跨网关传递类型信息。当类型为application/pkcs7 MIME(例如)的MIME实体到达对S/MIME没有特殊知识的网关时,它会将实体的媒体类型默认为application/octet stream,并将其视为通用附件,从而丢失类型信息。但是,建议的文件名

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 standalone 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处理应用程序。请注意,提供此机制是为了方便在某些环境中实现。正确的S/MIME实现必须使用媒体类型,并且不能依赖于文件扩展名。

3.2.2. The smime-type Parameter
3.2.2. smime类型参数

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            id-data
       compressed-data        CompressedData        id-data
       authEnveloped-data     AuthEnvelopedData     id-data
        
       Name                   CMS Type              Inner Content
       ----------------------------------------------------------
       enveloped-data         EnvelopedData         id-data
       signed-data            SignedData            id-data
       certs-only             SignedData            id-data
       compressed-data        CompressedData        id-data
       authEnveloped-data     AuthEnvelopedData     id-data
        

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 three values for smime-type SHOULD be assigned: "signed-*", "authEnv-*", 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-*”、“authEnv-*”和“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", "authEnveloped", or "enveloped" without having to tunnel into the CMS payload.

明确地说,该字段是邮件客户端应用程序的适当提示,用于指示消息是“已签名”、“已认证信封”还是“已信封”,而无需通过隧道进入CMS有效负载。

A registry for additional smime-type parameter values has been defined in [RFC7114].

[RFC7114]中定义了其他smime类型参数值的注册表。

3.3. Creating an Enveloped-Only Message
3.3. 创建仅封装的消息

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. The "enveloped-only" structure does not support authenticated symmetric algorithms. Use the "authenticated enveloped" structure for these algorithms. Thus, 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 are processed into a CMS object of type EnvelopedData. In addition to encrypting a copy of the content-encryption key (CEK) for each recipient, a copy of the CEK SHOULD be encrypted for the originator and included in the EnvelopedData (see [RFC5652], Section 6).

第二步。MIME实体和其他所需数据被处理为EnvelopedData类型的CMS对象。除了为每个收件人加密一份内容加密密钥(CEK)副本外,还应为发起人加密一份CEK副本,并将其包含在信封数据中(见[RFC5652],第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; name=smime.p7m;
      smime-type=enveloped-data
   Content-Transfer-Encoding: base64
   Content-Disposition: attachment; filename=smime.p7m
        
   Content-Type: application/pkcs7-mime; name=smime.p7m;
      smime-type=enveloped-data
   Content-Transfer-Encoding: base64
   Content-Disposition: attachment; filename=smime.p7m
        

MIIBHgYJKoZIhvcNAQcDoIIBDzCCAQsCAQAxgcAwgb0CAQAwJjASMRAwDgYDVQQDEw dDYXJsUlNBAhBGNGvHgABWvBHTbi7NXXHQMA0GCSqGSIb3DQEBAQUABIGAC3EN5nGI iJi2lsGPcP2iJ97a4e8kbKQz36zg6Z2i0yx6zYC4mZ7mX7FBs3IWg+f6KgCLx3M1eC bWx8+MDFbbpXadCDgO8/nUkUNYeNxJtuzubGgzoyEd8Ch4H/dd9gdzTd+taTEgS0ip dSJuNnkVY4/M652jKKHRLFf02hosdR8wQwYJKoZIhvcNAQcBMBQGCCqGSIb3DQMHBA gtaMXpRwZRNYAgDsiSf8Z9P43LrY4OxUk660cu1lXeCSFOSOpOJ7FuVyU=

MiibhgyjkozihvcnaqcAqcAqCawgB0CaqawjjasmrawdgydqdEW DdyxHbGbGbWbHbGb7NxHqmA0gCqgSqgSibQebaqcQcA4E8KbkQz36Zg6Z2Yx7FbIwG+f6KgCLx3M1eC bWx8+MDBbBbPxXAdGdGdG8/NukunYUzUzUbGbGdZYYYYZZYYYD8CH8CH4H/dd9gdzTd+WyGdGdGdGdGdGdGdGbQbQbQbQbK4K4K4K4KzZZZZZZZZZZ4K4K4K4K4KdGdGdGdGdGbJgtaMXpRwZRNYAgDsiSf8Z9P43LrY4OxUk660cu1lXeCSFOSOpOJ7FuVyU=

3.4. Creating an Authenticated Enveloped-Only Message
3.4. 创建经过身份验证的仅包含信封的消息

This section describes the format for enveloping a MIME entity without signing it. Authenticated enveloped messages provide confidentiality and data integrity. It is important to note that sending authenticated enveloped messages does not provide for proof of origination when using S/MIME. It is possible for a third party to replace ciphertext in such a way that the processed message will still be valid, but the meaning can be altered. However, this is substantially more difficult than it is for an enveloped-only message, as the algorithm does provide a level of authentication. Any recipient for whom the message is encrypted can replace it without detection.

本节描述了封装MIME实体而不进行签名的格式。经过身份验证的信封消息提供了机密性和数据完整性。需要注意的是,在使用S/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 are processed into a CMS object of type AuthEnvelopedData. In addition to encrypting a copy of the CEK for each recipient, a copy of the CEK SHOULD be encrypted for the originator and included in the AuthEnvelopedData (see [RFC5083]).

第二步。MIME实体和其他所需数据被处理为AuthEnvelopedData类型的CMS对象。除了为每个收件人加密一份CEK副本外,还应为发起人加密一份CEK副本,并将其包含在AuthEnvelopedData中(请参见[RFC5083])。

Step 3. The AuthEnvelopedData object is wrapped in a CMS ContentInfo object.

第三步。AuthEnvelopedData对象包装在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 authenticated enveloped-only messages is "authEnveloped-data". The file extension for this type of message is ".p7m".

仅经过身份验证的信封消息的smime类型参数为“authEnveloped data”。此类消息的文件扩展名为“.p7m”。

A sample message would be:

示例消息如下:

   Content-Type: application/pkcs7-mime; smime-type=authEnveloped-data;
      name=smime.p7m
   Content-Transfer-Encoding: base64
   Content-Disposition: attachment; filename=smime.p7m
        
   Content-Type: application/pkcs7-mime; smime-type=authEnveloped-data;
      name=smime.p7m
   Content-Transfer-Encoding: base64
   Content-Disposition: attachment; filename=smime.p7m
        
   MIIDWQYLKoZIhvcNAQkQARegggNIMIIDRAIBADGBvjCBuwIBADAmMBIxEDAO
   BgNVBAMTB0NhcmxSU0ECEEY0a8eAAFa8EdNuLs1dcdAwCwYJKoZIhvcNAQEB
   BIGAgyZJo0ERTxA4xdTri5P5tVMyh0RARepTUCORZvlUbcUlaI8IpJZH3/J1
   Fv6MxTRS4O/K+ZcTlQmYeWLQvwdltQdOIP3mhpqXzTnOYhTK1IDtF2zx75Lg
   vE+ilpcLIzXfJB4RCBPtBWaHAof4Wb+VMQvLkk9OolX4mRSH1LPktgAwggJq
   BgkqhkiG9w0BBwEwGwYJYIZIAWUDBAEGMA4EDGPizioC9OHSsnNx4oCCAj7Y
   Cb8rOy8+55106newEJohC/aDgWbJhrMKzSOwa7JraXOV3HXD3NvKbl665dRx
   vmDwSCNaLCRU5q8/AxQx2SvnAbM+JKcEfC/VFdd4SiHNiUECAApLku2rMi5B
   WrhW/FXmx9d+cjum2BRwB3wj0q1wajdB0/kVRbQwg697dnlYyUog4vpJERjr
   7KAkawZx1RMHaM18wgZjUNpCBXFS3chQi9mTBp2i2Hf5iZ8OOtTx+rCQUmI6
   Jhy03vdcPCCARBjn3v0d3upZYDZddMA41CB9fKnnWFjadV1KpYwv80tqsEfx
   Vo0lJQ5VtJ8MHJiBpLVKadRIZ4iH2ULC0JtN5mXE1SrFKh7cqbJ4+7nqSRL3
   oBTud3rX41DGshOjpqcYHT4sqYlgZkc6dp0g1+hF1p3cGmjHdpysV2NVSUev
   ghHbvSqhIsXFzRSWKiZOigmlkv3R5LnjpYyP4brM62Jl7y0qborvV4dNMz7m
   D+5YxSlH0KAe8z6TT3LHuQdN7QCkFoiUSCaNhpAFaakkGIpqcqLhpOK4lXxt
   kptCG93eUwNCcTxtx6bXufPR5TUHohvZvfeqMp42kL37FJC/A8ZHoOxXy8+X
   X5QYxCQNuofWlvnIWv0Nr8w65x6lgVjPYmd/cHwzQKBTBMXN6pBud/PZL5zF
   tw3QHlQkBR+UflMWZKeN9L0KdQ27mQlCo5gQS85aifxoiiA2v9+0hxZw91rP
   IW4D+GS7oMMoKj8ZNyCJJsyf5smRZ+WxeBoolb3+TiGcBBCsRnfe6noLZiFO
   6Zeu2ZwE
        
   MIIDWQYLKoZIhvcNAQkQARegggNIMIIDRAIBADGBvjCBuwIBADAmMBIxEDAO
   BgNVBAMTB0NhcmxSU0ECEEY0a8eAAFa8EdNuLs1dcdAwCwYJKoZIhvcNAQEB
   BIGAgyZJo0ERTxA4xdTri5P5tVMyh0RARepTUCORZvlUbcUlaI8IpJZH3/J1
   Fv6MxTRS4O/K+ZcTlQmYeWLQvwdltQdOIP3mhpqXzTnOYhTK1IDtF2zx75Lg
   vE+ilpcLIzXfJB4RCBPtBWaHAof4Wb+VMQvLkk9OolX4mRSH1LPktgAwggJq
   BgkqhkiG9w0BBwEwGwYJYIZIAWUDBAEGMA4EDGPizioC9OHSsnNx4oCCAj7Y
   Cb8rOy8+55106newEJohC/aDgWbJhrMKzSOwa7JraXOV3HXD3NvKbl665dRx
   vmDwSCNaLCRU5q8/AxQx2SvnAbM+JKcEfC/VFdd4SiHNiUECAApLku2rMi5B
   WrhW/FXmx9d+cjum2BRwB3wj0q1wajdB0/kVRbQwg697dnlYyUog4vpJERjr
   7KAkawZx1RMHaM18wgZjUNpCBXFS3chQi9mTBp2i2Hf5iZ8OOtTx+rCQUmI6
   Jhy03vdcPCCARBjn3v0d3upZYDZddMA41CB9fKnnWFjadV1KpYwv80tqsEfx
   Vo0lJQ5VtJ8MHJiBpLVKadRIZ4iH2ULC0JtN5mXE1SrFKh7cqbJ4+7nqSRL3
   oBTud3rX41DGshOjpqcYHT4sqYlgZkc6dp0g1+hF1p3cGmjHdpysV2NVSUev
   ghHbvSqhIsXFzRSWKiZOigmlkv3R5LnjpYyP4brM62Jl7y0qborvV4dNMz7m
   D+5YxSlH0KAe8z6TT3LHuQdN7QCkFoiUSCaNhpAFaakkGIpqcqLhpOK4lXxt
   kptCG93eUwNCcTxtx6bXufPR5TUHohvZvfeqMp42kL37FJC/A8ZHoOxXy8+X
   X5QYxCQNuofWlvnIWv0Nr8w65x6lgVjPYmd/cHwzQKBTBMXN6pBud/PZL5zF
   tw3QHlQkBR+UflMWZKeN9L0KdQ27mQlCo5gQS85aifxoiiA2v9+0hxZw91rP
   IW4D+GS7oMMoKj8ZNyCJJsyf5smRZ+WxeBoolb3+TiGcBBCsRnfe6noLZiFO
   6Zeu2ZwE
        
3.5. Creating a Signed-Only Message
3.5. 创建仅签名的邮件

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.

通常,发送时首选多部分/签名表单,而接收代理必须能够同时处理这两种表单。

3.5.1. Choosing a Format for Signed-Only Messages
3.5.1. 为仅签名邮件选择格式

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格式保护消息内容不被良性中间代理更改。这些代理可能会进行换行或内容传输编码更改,从而破坏签名。

3.5.2. Signing Using application/pkcs7-mime with SignedData
3.5.2. 使用带有SignedData的application/pkcs7 mime进行签名

This signing format uses the application/pkcs7-mime media type. The steps to create this format are as follows:

此签名格式使用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
        
   MIIDmQYJKoZIhvcNAQcCoIIDijCCA4YCAQExCTAHBgUrDgMCGjAtBgkqhkiG9w0BBw
   GgIAQeDQpUaGlzIGlzIHNvbWUgc2FtcGxlIGNvbnRlbnQuoIIC4DCCAtwwggKboAMC
   AQICAgDIMAkGByqGSM44BAMwEjEQMA4GA1UEAxMHQ2FybERTUzAeFw05OTA4MTcwMT
   EwNDlaFw0zOTEyMzEyMzU5NTlaMBMxETAPBgNVBAMTCEFsaWNlRFNTMIIBtjCCASsG
   ByqGSM44BAEwggEeAoGBAIGNze2D6gqeOT7CSCij5EeT3Q7XqA7sU8WrhAhP/5Thc0
   h+DNbzREjR/p+vpKGJL+HZMMg23j+bv7dM3F9piuR10DcMkQiVm96nXvn89J8v3UOo
   i1TxP7AHCEdNXYjDw7Wz41UIddU5dhDEeL3/nbCElzfy5FEbteQJllzzflvbAhUA4k
   emGkVmuBPG2o+4NyErYov3k80CgYAmONAUiTKqOfs+bdlLWWpMdiM5BAI1XPLLGjDD
   HlBd3ZtZ4s2qBT1YwHuiNrhuB699ikIlp/R1z0oIXks+kPht6pzJIYo7dhTpzi5dow
   fNI4W4LzABfG1JiRGJNkS9+MiVSlNWteL5c+waYTYfEX/Cve3RUP+YdMLRgUpgObo2
   OQOBhAACgYBc47ladRSWC6l63eM/qeysXty9txMRNKYWiSgRI9k0hmd1dRMSPUNbb+
   VRv/qJ8qIbPiR9PQeNW2PIu0WloErjhdbOBoA/6CN+GvIkq1MauCcNHu8Iv2YUgFxi
   rGX6FYvxuzTU0pY39mFHssQyhPB+QUD9RqdjTjPypeL08oPluKOBgTB/MAwGA1UdEw
   EB/wQCMAAwDgYDVR0PAQH/BAQDAgbAMB8GA1UdIwQYMBaAFHBEPoIub4feStN14z0g
   vEMrk/EfMB0GA1UdDgQWBBS+bKGz48H37UNwpM4TAeL945f+zTAfBgNVHREEGDAWgR
   RBbGljZURTU0BleGFtcGxlLmNvbTAJBgcqhkjOOAQDAzAAMC0CFFUMpBkfQiuJcSIz
   jYNqtT1na79FAhUAn2FTUlQLXLLd2ud2HeIQUltDXr0xYzBhAgEBMBgwEjEQMA4GA1
   UEAxMHQ2FybERTUwICAMgwBwYFKw4DAhowCQYHKoZIzjgEAwQuMCwCFD1cSW6LIUFz
   eXle3YI5SKSBer/sAhQmCq7s/CTFHOEjgASeUjbMpx5g6A==
        
   MIIDmQYJKoZIhvcNAQcCoIIDijCCA4YCAQExCTAHBgUrDgMCGjAtBgkqhkiG9w0BBw
   GgIAQeDQpUaGlzIGlzIHNvbWUgc2FtcGxlIGNvbnRlbnQuoIIC4DCCAtwwggKboAMC
   AQICAgDIMAkGByqGSM44BAMwEjEQMA4GA1UEAxMHQ2FybERTUzAeFw05OTA4MTcwMT
   EwNDlaFw0zOTEyMzEyMzU5NTlaMBMxETAPBgNVBAMTCEFsaWNlRFNTMIIBtjCCASsG
   ByqGSM44BAEwggEeAoGBAIGNze2D6gqeOT7CSCij5EeT3Q7XqA7sU8WrhAhP/5Thc0
   h+DNbzREjR/p+vpKGJL+HZMMg23j+bv7dM3F9piuR10DcMkQiVm96nXvn89J8v3UOo
   i1TxP7AHCEdNXYjDw7Wz41UIddU5dhDEeL3/nbCElzfy5FEbteQJllzzflvbAhUA4k
   emGkVmuBPG2o+4NyErYov3k80CgYAmONAUiTKqOfs+bdlLWWpMdiM5BAI1XPLLGjDD
   HlBd3ZtZ4s2qBT1YwHuiNrhuB699ikIlp/R1z0oIXks+kPht6pzJIYo7dhTpzi5dow
   fNI4W4LzABfG1JiRGJNkS9+MiVSlNWteL5c+waYTYfEX/Cve3RUP+YdMLRgUpgObo2
   OQOBhAACgYBc47ladRSWC6l63eM/qeysXty9txMRNKYWiSgRI9k0hmd1dRMSPUNbb+
   VRv/qJ8qIbPiR9PQeNW2PIu0WloErjhdbOBoA/6CN+GvIkq1MauCcNHu8Iv2YUgFxi
   rGX6FYvxuzTU0pY39mFHssQyhPB+QUD9RqdjTjPypeL08oPluKOBgTB/MAwGA1UdEw
   EB/wQCMAAwDgYDVR0PAQH/BAQDAgbAMB8GA1UdIwQYMBaAFHBEPoIub4feStN14z0g
   vEMrk/EfMB0GA1UdDgQWBBS+bKGz48H37UNwpM4TAeL945f+zTAfBgNVHREEGDAWgR
   RBbGljZURTU0BleGFtcGxlLmNvbTAJBgcqhkjOOAQDAzAAMC0CFFUMpBkfQiuJcSIz
   jYNqtT1na79FAhUAn2FTUlQLXLLd2ud2HeIQUltDXr0xYzBhAgEBMBgwEjEQMA4GA1
   UEAxMHQ2FybERTUwICAMgwBwYFKw4DAhowCQYHKoZIzjgEAwQuMCwCFD1cSW6LIUFz
   eXle3YI5SKSBer/sAhQmCq7s/CTFHOEjgASeUjbMpx5g6A==
        
3.5.3. Signing Using the multipart/signed Format
3.5.3. 使用多部分/签名格式签名

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 [RFC1847]. 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处理设施的收件人可以查看邮件。它使用[RFC1847]中描述的多部分/签名媒体类型。多部分/签名媒体类型有两部分。第一部分包含已签名的MIME实体;第二部分包含“分离签名”CMS SignedData对象,其中不存在encapContentInfo eContent字段。

3.5.3.1. The application/pkcs7-signature Media Type
3.5.3.1. 应用程序/pkcs7签名媒体类型

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签名的仅签名邮件的文件扩展名为“.p7s”。

3.5.3.2. Creating a multipart/signed Message
3.5.3.2. 创建多部分/签名消息

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 [RFC1847]. The values to be placed in the micalg parameter SHOULD be from the following:

验证签名时,micalg参数允许一次通过处理。micalg参数的值取决于计算消息完整性检查时使用的消息摘要算法。如果使用多个消息摘要算法,则必须按照[RFC1847]用逗号分隔。要放置在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 the algorithm profile
                        or "unknown" if not defined)
        
        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 the algorithm profile
                        or "unknown" if not defined)
        

*Note: MD5 and SHA-1 are historical and no longer considered secure. See Appendix B for details.

*注:MD5和SHA-1是历史记录,不再被认为是安全的。详情见附录B。

(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 values for this parameter will be taken from the IANA "Hash Function Textual Names" registry.

(历史记录:S/MIME的一些早期实现发出并预期micalg参数为“rsa-md5”、“rsa-sha1”和“sha1”)。接收代理应该能够从它们无法识别的micalg参数值中正常恢复。此参数的未来值将取自IANA“哈希函数文本名称”注册表。

3.5.3.3. Sample multipart/signed Message
3.5.3.3. 多部分/签名消息示例
   Content-Type: multipart/signed;
       micalg=sha-256;
       boundary="----=_NextBoundary____Fri,_06_Sep_2002_00:25:21";
       protocol="application/pkcs7-signature"
        
   Content-Type: multipart/signed;
       micalg=sha-256;
       boundary="----=_NextBoundary____Fri,_06_Sep_2002_00:25:21";
       protocol="application/pkcs7-signature"
        

This is a multipart message in MIME format.

这是MIME格式的多部分消息。

   ------=_NextBoundary____Fri,_06_Sep_2002_00:25:21
        
   ------=_NextBoundary____Fri,_06_Sep_2002_00:25:21
        
   This is some sample content.
   ------=_NextBoundary____Fri,_06_Sep_2002_00:25:21
   Content-Type: application/pkcs7-signature; name=smime.p7s
   Content-Transfer-Encoding: base64
   Content-Disposition: attachment; filename=smime.p7s
        
   This is some sample content.
   ------=_NextBoundary____Fri,_06_Sep_2002_00:25:21
   Content-Type: application/pkcs7-signature; name=smime.p7s
   Content-Transfer-Encoding: base64
   Content-Disposition: attachment; filename=smime.p7s
        

MIIBJgYJKoZIhvcNAQcCoIIBFzCCARMCAQExADALBgkqhkiG9w0BBwExgf4w gfsCAQIwJjASMRAwDgYDVQQDEwdDYXJsUlNBAhBGNGvHgABWvBHTbi7EELOw MAsGCWCGSAFlAwQCAaAxMC8GCSqGSIb3DQEJBDEiBCCxwpZGNZzTSsugsn+f lEidzQK4mf/ozKqfmbxhcIkKqjALBgkqhkiG9w0BAQsEgYB0XJV7fjPa5Nuh oth5msDfP8A5urYUMjhNpWgXG8ae3XpppqVrPi2nVO41onHnkByjkeD/wc31 A9WH8MzFQgSTsrJ65JvffTTXkOpRPxsSHn3wJFwP/atWHkh8YK/jR9bULhUl Mv5jQEDiwVX5DRasxu6Ld8zv9u5/TsdBNiufGw==

MiibjyjkozihvcnaqccoIbfzcCarmcaqexadalbgkqhkig9w0bbwexgf4w gfscaqiwjjasmrawdgydqdqdyxxwzwqdyxjbg7eEe低的masgcwcgsaflawqcaaxmc8gcsqgsib3dqejbdeibcxzgznztssugsn+f lEidzQK4mf/ozkqfqfxhqfxhqhqhqcqhkjkkkkjjjjkkkjalbg9w0baqwqybxxxjbg0baqybxjbxjbxjbjbg8wxjbg8wxxjbg8wqwqwqwqwqwA9WH8MzFQgSTsrJ65JvffTTXkOpRPxsSHn3wJFwP/atWHkh8YK/jR9bULhUl Mv5jQEDiwVX5DRasxu6Ld8zv9u5/TSDBNUIFGW==

   ------=_NextBoundary____Fri,_06_Sep_2002_00:25:21--
        
   ------=_NextBoundary____Fri,_06_Sep_2002_00:25:21--
        

The content that is digested (the first part of the multipart/signed) consists of the bytes:

摘要内容(多部分/签名的第一部分)由字节组成:

54 68 69 73 20 69 73 20 73 6f 6d 65 20 73 61 6d 70 6c 65 20 63 6f 6e 74 65 6e 74 2e 0d 0a

54 68 69 73 20 69 73 20 73 20 73 6f 6d 65 20 73 61 6d 70 6c 65 20 63 6f 6e 74 65 6e 74 2e 0d 0a

3.6. Creating a Compressed-Only Message
3.6. 创建仅压缩的消息

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 [RFC3274] and is the preferred method for compatibility.

本节介绍压缩MIME实体的格式。请注意,版本3.1之前的S/MIME版本没有指定任何CompressedData的使用,并且不会识别它。[RFC3274]中描述了使用能力来指示接收压缩数据的能力,这是兼容性的首选方法。

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
        

eNoLycgsVgCi4vzcVIXixNyCnFSF5Py8ktS8Ej0AlCkKVA==

EnolycGSVGCI4VZCVIXNYCNFSF5PY8KTS8EJ0ALCKKVA==

3.7. Multiple Operations
3.7. 多重操作

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 related 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 and 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 encrypted data that is transferred as binary data is discouraged, since it will not yield significant compression. Encrypted data that is transferred as base64-encoded data could benefit as well.

- 不鼓励压缩作为二进制数据传输的加密数据,因为它不会产生显著的压缩。作为base64编码数据传输的加密数据也会受益。

- If a lossy compression algorithm is used with signing, you will need to compress first, then sign.

- 如果签名使用有损压缩算法,则需要先压缩,然后签名。

3.8. Creating a Certificate Management Message
3.8. 创建证书管理消息

The certificate management message or MIME entity is used to transport certificates and/or Certificate Revocation Lists (CRLs), such as in response to a registration request.

证书管理消息或MIME实体用于传输证书和/或证书吊销列表(CRL),例如响应注册请求。

Step 1. The certificates and/or CRLs 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 the signerInfos field MUST be empty.

第一步。证书和/或CRL可用于创建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”。

3.9. Registration Requests
3.9. 注册申请

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 v4.0 does not require a particular certificate request mechanism.

S/MIME v2[SMIMEv2]指定了使用应用程序/pkcs10主体部分向证书颁发机构“注册”公钥的方法。从那时起,IETF PKIX工作组开发了其他请求证书的方法。但是,S/MIME v4.0不需要特定的证书请求机制。

3.10. Identifying an S/MIME Message
3.10. 识别S/MIME消息

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 in the Content-Disposition header field. The MIME parameters that carry the file suffix are not listed below.

下表中的文件后缀来自“内容类型标题”字段中的“名称”参数或“内容处置标题”字段中的“文件名”参数。下面未列出带有文件后缀的MIME参数。

   Media Type                 Parameters                     File Suffix
   ---------------------------------------------------------------------
   application/pkcs7-mime     N/A                            N/A
        
   Media Type                 Parameters                     File Suffix
   ---------------------------------------------------------------------
   application/pkcs7-mime     N/A                            N/A
        
   multipart/signed           protocol=                      N/A
                              "application/pkcs7-signature"
        
   multipart/signed           protocol=                      N/A
                              "application/pkcs7-signature"
        

application/octet-stream N/A p7m, p7s, p7c, p7z

应用程序/八位字节流N/A p7m、p7s、p7c、p7z

4. Certificate Processing
4. 证书处理

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 [RFC5750].

接收代理必须提供某种证书检索机制,以便为数字信封的收件人访问证书。本规范不涉及S/MIME代理如何处理证书——只涉及在证书被验证或拒绝后它们所做的事情。[RFC5750]中介绍了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 as to guarantee their later retrieval.

对于初始S/MIME部署,用户代理至少可以自动生成一条消息,发送给指定的收件人,在签名的返回消息中请求该收件人的证书。接收和发送代理还应提供一种机制,允许用户为通讯员“存储和保护”证书,以保证其以后的检索。

4.1. Key Pair Generation
4.1. 密钥对生成

All key pairs MUST be generated from a good source of non-deterministic random input [RFC4086], and the private key MUST be protected in a secure fashion.

所有密钥对必须从非确定性随机输入的良好来源生成[RFC4086],并且必须以安全方式保护私钥。

An S/MIME user agent MUST NOT generate asymmetric keys less than 2048 bits for use with an RSA signature algorithm.

S/MIME用户代理不得生成小于2048位的非对称密钥,以用于RSA签名算法。

For 2048-bit through 4096-bit RSA with SHA-256, see [RFC5754] and [FIPS186-4]. The first reference provides the signature algorithm's OID, and the second provides the signature algorithm's definition.

对于带SHA-256的2048位到4096位RSA,请参见[RFC5754]和[FIPS186-4]。第一个参考提供了签名算法的OID,第二个参考提供了签名算法的定义。

For RSASSA-PSS with SHA-256, see [RFC4056]. For RSAES-OAEP, see [RFC3560].

对于带有SHA-256的RSASSA-PSS,请参见[RFC4056]。有关RSAES-OAEP,请参阅[RFC3560]。

4.2. Signature Generation
4.2. 签名生成

The following are the requirements for an S/MIME agent when generating RSA and RSASSA-PSS signatures:

以下是生成RSA和RSASSA-PSS签名时对S/MIME代理的要求:

           key size <= 2047 : SHOULD NOT (Note 2)
   2048 <= key size <= 4096 : SHOULD     (Note 1)
   4096 <  key size         : MAY        (Note 1)
        
           key size <= 2047 : SHOULD NOT (Note 2)
   2048 <= key size <= 4096 : SHOULD     (Note 1)
   4096 <  key size         : MAY        (Note 1)
        

Note 1: See Security Considerations in Section 6. Note 2: See Historical Mail Considerations in Appendix B.

注1:参见第6节中的安全注意事项。注2:参见附录B中的历史邮件注意事项。

Key sizes for ECDSA and EdDSA are fixed by the curve.

ECDSA和EdDSA的关键点大小由曲线固定。

4.3. Signature Verification
4.3. 签名验证

The following are the requirements for S/MIME receiving agents during verification of RSA and RSASSA-PSS signatures:

以下是验证RSA和RSASSA-PSS签名期间对S/MIME接收代理的要求:

           key size <= 2047 : SHOULD NOT (Note 2)
   2048 <= key size <= 4096 : MUST       (Note 1)
   4096 <  key size         : MAY        (Note 1)
        
           key size <= 2047 : SHOULD NOT (Note 2)
   2048 <= key size <= 4096 : MUST       (Note 1)
   4096 <  key size         : MAY        (Note 1)
        

Note 1: See Security Considerations in Section 6. Note 2: See Historical Mail Considerations in Appendix B.

注1:参见第6节中的安全注意事项。注2:参见附录B中的历史邮件注意事项。

Key sizes for ECDSA and EdDSA are fixed by the curve.

ECDSA和EdDSA的关键点大小由曲线固定。

4.4. Encryption
4.4. 加密

The following are the requirements for an S/MIME agent when establishing keys for content encryption using the RSA and RSA-OAEP algorithms:

以下是使用RSA和RSA-OAEP算法建立内容加密密钥时对S/MIME代理的要求:

           key size <= 2047 : SHOULD NOT (Note 2)
   2048 <= key size <= 4096 : SHOULD     (Note 1)
   4096 <  key size         : MAY        (Note 1)
        
           key size <= 2047 : SHOULD NOT (Note 2)
   2048 <= key size <= 4096 : SHOULD     (Note 1)
   4096 <  key size         : MAY        (Note 1)
        

Note 1: See Security Considerations in Section 6. Note 2: See Historical Mail Considerations in Appendix B.

注1:参见第6节中的安全注意事项。注2:参见附录B中的历史邮件注意事项。

Key sizes for ECDH are fixed by the curve.

ECDH的关键尺寸由曲线固定。

4.5. Decryption
4.5. 解密

The following are the requirements for an S/MIME agent when establishing keys for content decryption using the RSA and RSAES-OAEP algorithms:

以下是使用RSA和RSAES-OAEP算法建立内容解密密钥时对S/MIME代理的要求:

           key size <= 2047 : MAY        (Note 2)
   2048 <= key size <= 4096 : MUST       (Note 1)
   4096 <  key size         : MAY        (Note 1)
        
           key size <= 2047 : MAY        (Note 2)
   2048 <= key size <= 4096 : MUST       (Note 1)
   4096 <  key size         : MAY        (Note 1)
        

Note 1: See Security Considerations in Section 6. Note 2: See Historical Mail Considerations in Appendix B.

注1:参见第6节中的安全注意事项。注2:参见附录B中的历史邮件注意事项。

Key sizes for ECDH are fixed by the curve.

ECDH的关键尺寸由曲线固定。

5. IANA Considerations
5. IANA考虑

This section (1) updates the media type registrations for application/pkcs7-mime and application/pkcs7-signature to refer to this document as opposed to RFC 5751, (2) adds authEnveloped-data to the list of values for smime-type, and (3) updates references from RFC 5751 to this document in general.

本节(1)更新应用程序/pkcs7 mime和应用程序/pkcs7签名的媒体类型注册,以参考本文档而不是RFC 5751,(2)将authEnveloped数据添加到smime类型的值列表中,以及(3)将RFC 5751中的参考更新到本文档中。

Note that other documents can define additional media types for S/MIME.

请注意,其他文档可以为S/MIME定义其他媒体类型。

5.1. Media Type for application/pkcs7-mime
5.1. 应用程序/pkcs7 mime的媒体类型

Type name: application

类型名称:应用程序

Subtype Name: pkcs7-mime

子类型名称:pkcs7 mime

Required Parameters: NONE

所需参数:无

Optional Parameters: smime-type name

可选参数: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, RFC 5751, and this document

已发布规范:RFC 2311、RFC 2633、RFC 5751和本文件

Applications that use this media type: Security applications

使用此媒体类型的应用程序:安全应用程序

Fragment identifier considerations: N/A

片段标识符注意事项:不适用

   Additional information:
       Deprecated alias names for this type: N/A
       Magic number(s): N/A
       File extensions(s): See Section 3.2.1 of this document
       Macintosh file type code(s): N/A
        
   Additional information:
       Deprecated alias names for this type: N/A
       Magic number(s): N/A
       File extensions(s): See Section 3.2.1 of this document
       Macintosh file type code(s): N/A
        
   Person & email address to contact for further information:
      The IESG <iesg@ietf.org>
        
   Person & email address to contact for further information:
      The IESG <iesg@ietf.org>
        

Intended usage: COMMON

预期用途:普通

Restrictions on usage: NONE

使用限制:无

Author: Sean Turner

作者:肖恩·特纳

Change Controller: LAMPS working group delegated from the IESG

变更控制员:IESG授权的灯具工作组

5.2. Media Type for application/pkcs7-signature
5.2. 应用程序/pkcs7签名的媒体类型

Type name: application

类型名称:应用程序

Subtype Name: pkcs7-signature

子类型名称:pkcs7签名

Required Parameters: N/A

所需参数:不适用

Optional Parameters: N/A

可选参数:不适用

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, RFC 5751, and this document

已发布规范:RFC 2311、RFC 2633、RFC 5751和本文件

Applications that use this media type: Security applications

使用此媒体类型的应用程序:安全应用程序

Fragment identifier considerations: N/A

片段标识符注意事项:不适用

   Additional information:
       Deprecated alias names for this type: N/A
       Magic number(s): N/A
       File extensions(s): See Section 3.2.1 of this document
       Macintosh file type code(s): N/A
        
   Additional information:
       Deprecated alias names for this type: N/A
       Magic number(s): N/A
       File extensions(s): See Section 3.2.1 of this document
       Macintosh file type code(s): N/A
        
   Person & email address to contact for further information:
      The IESG <iesg@ietf.org>
        
   Person & email address to contact for further information:
      The IESG <iesg@ietf.org>
        

Intended usage: COMMON

预期用途:普通

Restrictions on usage: N/A

使用限制:不适用

Author: Sean Turner

作者:肖恩·特纳

Change Controller: LAMPS working group delegated from the IESG

变更控制员:IESG授权的灯具工作组

5.3. authEnveloped-data smime-type
5.3. authEnveloped数据smime类型

IANA has registered the following value in the "Parameter Values for the smime-type Parameter" registry.

IANA已在“smime类型参数的参数值”注册表中注册了以下值。

smime-type value: authEnveloped-data

smime类型值:authEnveloped数据

Reference: RFC 8551, Section 3.2.2

参考:RFC 8551,第3.2.2节

5.4. Reference Updates
5.4. 参考更新

IANA is to update all references to RFC 5751 to this document. Known registries to be updated are "CoAP Content-Formats" and "media-types".

IANA将更新本文件对RFC 5751的所有引用。要更新的已知注册表为“CoAP内容格式”和“媒体类型”。

6. Security Considerations
6. 安全考虑

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 [RFC3218].

- RFC 3218[RFC3218]中描述的百万消息攻击。

- The Diffie-Hellman "small-subgroup" attacks described in RFC 2785 [RFC2785].

- RFC 2785[RFC2785]中描述的Diffie-Hellman“小子组”攻击。

- The attacks against hash algorithms described in RFC 4270 [RFC4270].

- 针对RFC 4270[RFC4270]中描述的哈希算法的攻击。

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's 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 an 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 specification seem appropriate for the Internet, based on [RFC3766]. 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.

在本规范中,选择2048位作为RSA非对称密钥大小是基于提供至少100位安全性的愿望。根据[RFC3766],为符合本规范而必须支持的密钥大小似乎适用于互联网。当然,有些环境,如金融和医疗系统,可能会选择不同的密钥大小。因此,实现可能支持超出本规范建议的密钥大小。

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, as such keys 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.

验证签名的接收代理和加密消息的发送代理在使用大于本规范规定的密钥验证签名和加密消息时,需要谨慎使用加密处理。攻击者可以发送带有密钥的证书,这些密钥会导致过度的加密处理——例如,密钥大于本规范中规定的密钥,因为这些密钥可能会淹没处理元素。建议使用此类密钥而不首先向信任锚验证证书的代理使用某种加密资源管理系统来防止此类攻击。

Some cryptographic algorithms such as RC2 offer little actual security over sending plaintext. Other algorithms such as TripleDES provide security but are no longer considered to be state of the art. S/MIME requires the use of current state-of-the-art algorithms such as AES and provides the ability to announce cryptographic capabilities to parties with whom you communicate. This allows the sender to create messages that can use the strongest common encryption algorithm. Using algorithms such as RC2 is never recommended unless the only alternative is no cryptography.

一些密码算法,如RC2,在发送明文时提供的实际安全性很低。其他算法(如TripleDES)提供了安全性,但不再被认为是最先进的。S/MIME需要使用当前最先进的算法,如AES,并提供向与您通信的各方宣布加密功能的能力。这允许发送者创建可以使用最强大的通用加密算法的消息。除非唯一的替代方案是不使用加密技术,否则决不建议使用诸如RC2之类的算法。

RSA and DSA keys of less than 2048 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.

许多专家现在认为,小于2048位的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 in EnvelopedData 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. This is one of the reasons for moving from EnvelopedData to AuthEnvelopedData, as the authenticated encryption algorithms provide the authentication without needing the SignedData layer.

如果未使用身份验证,则信封数据中的密文修改可能无法被检测到,这是在发送信封数据时没有将其包装在SignedData中或将SignedData封装在其中的情况。这是从EnvelopedData移动到AuthEnvelopedData的原因之一,因为经过身份验证的加密算法提供身份验证而不需要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显示提示),而没有首先验证消息是否已实际签名并了解签名的状态,则可能会导致错误处理消息。如果消息上的可视指示器应提供消息当前状态的信息,则可能需要定期检查签名验证代码。

Many people assume that the use of an authenticated encryption algorithm is all that is needed for the sender of the message to be authenticated. In almost all cases, this is not a correct statement. There are a number of preconditions that need to hold for an authenticated encryption algorithm to provide this service:

许多人认为,要对消息的发送者进行身份验证,只需要使用经过身份验证的加密算法。在几乎所有情况下,这都不是一个正确的说法。对于提供此服务的经过身份验证的加密算法,需要满足许多先决条件:

- The starting key must be bound to a single entity. The use of a group key only would allow for the statement that a message was sent by one of the entities that held the key but will not identify a specific entity.

- 起始键必须绑定到单个实体。使用组密钥只允许声明消息是由持有密钥的实体之一发送的,但不会标识特定实体。

- The message must have exactly one sender and one recipient. Having more than one recipient would allow for the second recipient to create a message that the first recipient would believe is from the sender by stripping the second recipient from the message.

- 邮件必须只有一个发件人和一个收件人。拥有多个收件人将允许第二个收件人通过从邮件中剥离第二个收件人来创建第一个收件人认为来自发件人的邮件。

- A direct path needs to exist from the starting key to the key used as the CEK. That path needs to guarantee that no third party could have seen the resulting CEK. This means that one needs to be using an algorithm that is called a "Direct Encryption" or a "Direct Key Agreement" algorithm in other contexts. This means that the starting key is (1) used directly as the CEK or (2) used to create a secret that is then transformed into the CEK via a KDF step.

- 从起始密钥到用作CEK的密钥之间需要存在直接路径。这条道路需要保证没有第三方能够看到由此产生的CEK。这意味着在其他上下文中需要使用称为“直接加密”或“直接密钥协商”算法的算法。这意味着起始密钥(1)直接用作CEK,或(2)用于创建一个秘密,然后通过KDF步骤转换为CEK。

S/MIME implementations almost universally use ephemeral-static rather than static-static key agreement and do not use a shared secret for encryption. This means that the first precondition is not met. [RFC6278] defines how to use static-static key agreement with CMS, so the first precondition can be met. Currently, all S/MIME key agreement methods derive a key-encryption key (KEK) and wrap a CEK. This violates the third precondition above. New key agreement algorithms that directly created the CEK without creating an intervening KEK would need to be defined.

S/MIME实现几乎普遍使用临时静态密钥协议,而不是静态静态密钥协议,并且不使用共享密钥进行加密。这意味着不满足第一个先决条件。[RFC6278]定义了如何与CMS使用静态密钥协议,以便满足第一个先决条件。目前,所有S/MIME密钥协商方法都派生一个密钥加密密钥(KEK)并封装一个CEK。这违反了上述第三个先决条件。需要定义直接创建CEK而不创建中间KEK的新密钥协商算法。

Even when all of the preconditions are met and origination of a message is established by the use of an authenticated encryption algorithm, users need to be aware that there is no way to prove this to a third party. This is because either of the parties can successfully create the message (or just alter the content) based on the fact that the CEK is going to be known to both parties. Thus, the origination is always built on a presumption that "I did not send this message to myself."

即使满足所有先决条件,并且通过使用经过身份验证的加密算法来确定消息的来源,用户也需要知道,没有办法向第三方证明这一点。这是因为任何一方都可以基于双方都知道CEK这一事实成功地创建消息(或者仅仅更改内容)。因此,起源总是建立在“我没有给自己发送这个消息”的假设之上

All of the authenticated encryption algorithms in this document use counter mode for the encryption portion of the algorithm. This means that the length of the plaintext will always be known, as the ciphertext length and the plaintext length are always the same. This information can enable passive observers to infer information based solely on the length of the message. Applications for which this is a concern need to provide some type of padding so that the length of the message does not provide this information.

本文档中所有经过身份验证的加密算法都使用计数器模式作为算法的加密部分。这意味着明文的长度总是已知的,因为密文长度和明文长度总是相同的。该信息可使被动观察者仅根据消息的长度推断信息。对于关注此问题的应用程序,需要提供某种类型的填充,以便消息的长度不提供此信息。

When compression is used with encryption, it has the potential to provide an additional layer of security. However, care needs to be taken when designing a protocol that relies on using compression, so as not to create a compression oracle. Compression oracle attacks require an adaptive input to the process and attack the unknown

当压缩与加密一起使用时,它有可能提供额外的安全层。但是,在设计依赖于使用压缩的协议时需要小心,以免创建压缩oracle。压缩oracle攻击需要对进程进行自适应输入,并攻击未知对象

content of a message based on the length of the compressed output. This means that no attack on the encryption key is necessarily required.

基于压缩输出长度的消息内容。这意味着不需要对加密密钥进行攻击。

A recent paper on S/MIME and OpenPGP email security [Efail] has pointed out a number of problems with the current S/MIME specifications and how people have implemented mail clients. Due to the nature of how CBC mode operates, the modes allow for malleability of plaintexts. This malleability allows for attackers to make changes in the ciphertext and, if parts of the plaintext are known, create arbitrary blocks of plaintext. These changes can be made without the weak integrity check in CBC mode being triggered. This type of attack can be prevented by the use of an Authenticated Encryption with Associated Data (AEAD) algorithm with a more robust integrity check on the decryption process. It is therefore recommended that mail systems migrate to using AES-GCM as quickly as possible and that the decrypted content not be acted on prior to finishing the integrity check.

最近一篇关于S/MIME和OpenPGP电子邮件安全性[Efail]的论文指出了当前S/MIME规范以及人们如何实现邮件客户端的一些问题。由于CBC模式运作的性质,这些模式允许明文的延展性。这种可塑性允许攻击者更改密文,如果部分明文已知,则可以创建任意明文块。可以在不触发CBC模式下的弱完整性检查的情况下进行这些更改。通过使用带有关联数据的身份验证加密(AEAD)算法,并对解密过程进行更稳健的完整性检查,可以防止此类攻击。因此,建议邮件系统尽快迁移到使用AES-GCM,并且在完成完整性检查之前不要对解密的内容进行操作。

The other attack that is highlighted in [Efail] is due to an error in how mail clients deal with HTML and multipart/mixed messages. Clients MUST require that a text/html content type be a complete HTML document (per [RFC1866]). Clients SHOULD treat each of the different pieces of the multipart/mixed construct as being of different origins. Clients MUST treat each encrypted or signed piece of a MIME message as being of different origins both from unprotected content and from each other.

[Efail]中突出显示的另一种攻击是由于邮件客户端处理HTML和多部分/混合消息时出错。客户端必须要求文本/html内容类型为完整的html文档(根据[RFC1866])。客户端应将多部分/混合构造的每个不同部分视为具有不同的来源。客户端必须将MIME消息的每个加密或签名部分视为来自未受保护内容和彼此的不同来源。

7. References
7. 工具书类
7.1. Reference Conventions
7.1. 参考约定

[ASN.1] refers to [X.680], [X.681], [X.682], and [X.683].

[ASN.1]指[X.680]、[X.681]、[X.682]和[X.683]。

[CMS] refers to [RFC5083] and [RFC5652].

[CMS]指[RFC5083]和[RFC5652]。

[ESS] refers to [RFC2634] and [RFC5035].

[ESS]指[RFC2634]和[RFC5035]。

[MIME-SPEC] refers to [RFC2045], [RFC2046], [RFC2047], [RFC2049], [RFC6838], and [RFC4289].

[MIME-SPEC]指的是[RFC2045]、[RFC2046]、[RFC2047]、[RFC2049]、[RFC6838]和[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]。

[SMIMEv3.1] refers to [RFC2634], [RFC5035], [RFC5652], [RFC5750], and [RFC5751].

[SMIMEv3.1]指的是[RFC2634]、[RFC5035]、[RFC5652]、[RFC5750]和[RFC5751]。

[SMIMEv3.2] refers to [RFC2634], [RFC3850], [RFC3851], [RFC3852], and [RFC5035].

[SMIMEv3.2]指的是[RFC2634]、[RFC3850]、[RFC3851]、[RFC3852]和[RFC5035]。

[SMIMEv4] refers to [RFC2634], [RFC5035], [RFC5652], [RFC8550], and this document.

[SMIMEv4]参考[RFC2634]、[RFC5035]、[RFC5652]、[RFC8550]和本文档。

7.2. Normative References
7.2. 规范性引用文件

[CHARSETS] IANA, "Character sets assigned by IANA", <http://www.iana.org/assignments/character-sets>.

[CHARSETS]IANA,“IANA分配的字符集”<http://www.iana.org/assignments/character-sets>.

[FIPS186-4] National Institute of Standards and Technology (NIST), "Digital Signature Standard (DSS)", Federal Information Processing Standards Publication 186-4, DOI 10.6028/NIST.FIPS.186-4, July 2013, <https://nvlpubs.nist.gov/nistpubs/fips/ nist.fips.186-4.pdf>.

[FIPS186-4]国家标准与技术研究所(NIST),“数字签名标准(DSS)”,联邦信息处理标准出版物186-4,DOI 10.6028/NIST.FIPS.186-42013年7月<https://nvlpubs.nist.gov/nistpubs/fips/ nist.fips.186-4.pdf>。

[RFC1847] Galvin, J., Murphy, S., Crocker, S., and N. Freed, "Security Multiparts for MIME: Multipart/Signed and Multipart/Encrypted", RFC 1847, DOI 10.17487/RFC1847, October 1995, <https://www.rfc-editor.org/info/rfc1847>.

[RFC1847]Galvin,J.,Murphy,S.,Crocker,S.,和N.Freed,“MIME的安全多部分:多部分/签名和多部分/加密”,RFC 1847,DOI 10.17487/RFC1847,1995年10月<https://www.rfc-editor.org/info/rfc1847>.

[RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996, <https://www.rfc-editor.org/info/rfc2045>.

[RFC2045]Freed,N.和N.Borenstein,“多用途互联网邮件扩展(MIME)第一部分:互联网邮件正文格式”,RFC 2045,DOI 10.17487/RFC20451996年11月<https://www.rfc-editor.org/info/rfc2045>.

[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, DOI 10.17487/RFC2046, November 1996, <https://www.rfc-editor.org/info/rfc2046>.

[RFC2046]Freed,N.和N.Borenstein,“多用途互联网邮件扩展(MIME)第二部分:媒体类型”,RFC 2046,DOI 10.17487/RFC2046,1996年11月<https://www.rfc-editor.org/info/rfc2046>.

[RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text", RFC 2047, DOI 10.17487/RFC2047, November 1996, <https://www.rfc-editor.org/info/rfc2047>.

[RFC2047]Moore,K.,“MIME(多用途互联网邮件扩展)第三部分:非ASCII文本的消息头扩展”,RFC 2047,DOI 10.17487/RFC2047,1996年11月<https://www.rfc-editor.org/info/rfc2047>.

[RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples", RFC 2049, DOI 10.17487/RFC2049, November 1996, <https://www.rfc-editor.org/info/rfc2049>.

[RFC2049]Freed,N.和N.Borenstein,“多用途Internet邮件扩展(MIME)第五部分:一致性标准和示例”,RFC 2049,DOI 10.17487/RFC2049,1996年11月<https://www.rfc-editor.org/info/rfc2049>.

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,DOI 10.17487/RFC2119,1997年3月<https://www.rfc-editor.org/info/rfc2119>.

[RFC2183] Troost, R., Dorner, S., and K. Moore, Ed., "Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field", RFC 2183, DOI 10.17487/RFC2183, August 1997, <https://www.rfc-editor.org/info/rfc2183>.

[RFC2183]Troost,R.,Dorner,S.,和K.Moore,Ed.,“在互联网消息中传达呈现信息:内容处置标题字段”,RFC 2183,DOI 10.17487/RFC2183,1997年8月<https://www.rfc-editor.org/info/rfc2183>.

[RFC2634] Hoffman, P., Ed., "Enhanced Security Services for S/MIME", RFC 2634, DOI 10.17487/RFC2634, June 1999, <https://www.rfc-editor.org/info/rfc2634>.

[RFC2634]Hoffman,P.,Ed.“S/MIME的增强安全服务”,RFC 2634,DOI 10.17487/RFC2634,1999年6月<https://www.rfc-editor.org/info/rfc2634>.

[RFC3274] Gutmann, P., "Compressed Data Content Type for Cryptographic Message Syntax (CMS)", RFC 3274, DOI 10.17487/RFC3274, June 2002, <https://www.rfc-editor.org/info/rfc3274>.

[RFC3274]Gutmann,P.,“加密消息语法(CMS)的压缩数据内容类型”,RFC 3274,DOI 10.17487/RFC3274,2002年6月<https://www.rfc-editor.org/info/rfc3274>.

[RFC3370] Housley, R., "Cryptographic Message Syntax (CMS) Algorithms", RFC 3370, DOI 10.17487/RFC3370, August 2002, <https://www.rfc-editor.org/info/rfc3370>.

[RFC3370]Housley,R.,“加密消息语法(CMS)算法”,RFC 3370,DOI 10.17487/RFC3370,2002年8月<https://www.rfc-editor.org/info/rfc3370>.

[RFC3560] Housley, R., "Use of the RSAES-OAEP Key Transport Algorithm in Cryptographic Message Syntax (CMS)", RFC 3560, DOI 10.17487/RFC3560, July 2003, <https://www.rfc-editor.org/info/rfc3560>.

[RFC3560]Housley,R.,“在加密消息语法(CMS)中使用RSAES-OAEP密钥传输算法”,RFC 3560,DOI 10.17487/RFC3560,2003年7月<https://www.rfc-editor.org/info/rfc3560>.

[RFC3565] Schaad, J., "Use of the Advanced Encryption Standard (AES) Encryption Algorithm in Cryptographic Message Syntax (CMS)", RFC 3565, DOI 10.17487/RFC3565, July 2003, <https://www.rfc-editor.org/info/rfc3565>.

[RFC3565]Schaad,J.“在加密消息语法(CMS)中使用高级加密标准(AES)加密算法”,RFC 3565,DOI 10.17487/RFC3565,2003年7月<https://www.rfc-editor.org/info/rfc3565>.

[RFC4289] Freed, N. and J. Klensin, "Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures", BCP 13, RFC 4289, DOI 10.17487/RFC4289, December 2005, <https://www.rfc-editor.org/info/rfc4289>.

[RFC4289]Freed,N.和J.Klensin,“多用途互联网邮件扩展(MIME)第四部分:注册程序”,BCP 13,RFC 4289,DOI 10.17487/RFC4289,2005年12月<https://www.rfc-editor.org/info/rfc4289>.

[RFC4056] Schaad, J., "Use of the RSASSA-PSS Signature Algorithm in Cryptographic Message Syntax (CMS)", RFC 4056, DOI 10.17487/RFC4056, June 2005, <https://www.rfc-editor.org/info/rfc4056>.

[RFC4056]Schaad,J.“在加密消息语法(CMS)中使用RSASSA-PSS签名算法”,RFC 4056,DOI 10.17487/RFC4056,2005年6月<https://www.rfc-editor.org/info/rfc4056>.

[RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, "Randomness Requirements for Security", BCP 106, RFC 4086, DOI 10.17487/RFC4086, June 2005, <https://www.rfc-editor.org/info/rfc4086>.

[RFC4086]Eastlake 3rd,D.,Schiller,J.,和S.Crocker,“安全的随机性要求”,BCP 106,RFC 4086,DOI 10.17487/RFC4086,2005年6月<https://www.rfc-editor.org/info/rfc4086>.

[RFC5083] Housley, R., "Cryptographic Message Syntax (CMS) Authenticated-Enveloped-Data Content Type", RFC 5083, DOI 10.17487/RFC5083, November 2007, <https://www.rfc-editor.org/info/rfc5083>.

[RFC5083]Housley,R.“加密消息语法(CMS)认证的信封数据内容类型”,RFC 5083,DOI 10.17487/RFC5083,2007年11月<https://www.rfc-editor.org/info/rfc5083>.

[RFC5084] Housley, R., "Using AES-CCM and AES-GCM Authenticated Encryption in the Cryptographic Message Syntax (CMS)", RFC 5084, DOI 10.17487/RFC5084, November 2007, <https://www.rfc-editor.org/info/rfc5084>.

[RFC5084]Housley,R.,“在加密消息语法(CMS)中使用AES-CCM和AES-GCM认证加密”,RFC 5084,DOI 10.17487/RFC5084,2007年11月<https://www.rfc-editor.org/info/rfc5084>.

[RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, RFC 5652, DOI 10.17487/RFC5652, September 2009, <https://www.rfc-editor.org/info/rfc5652>.

[RFC5652]Housley,R.,“加密消息语法(CMS)”,STD 70,RFC 5652,DOI 10.17487/RFC5652,2009年9月<https://www.rfc-editor.org/info/rfc5652>.

[RFC5753] Turner, S. and D. Brown, "Use of Elliptic Curve Cryptography (ECC) Algorithms in Cryptographic Message Syntax (CMS)", RFC 5753, DOI 10.17487/RFC5753, January 2010, <https://www.rfc-editor.org/info/rfc5753>.

[RFC5753]Turner,S.和D.Brown,“加密消息语法(CMS)中椭圆曲线加密(ECC)算法的使用”,RFC 5753,DOI 10.17487/RFC5753,2010年1月<https://www.rfc-editor.org/info/rfc5753>.

[RFC5754] Turner, S., "Using SHA2 Algorithms with Cryptographic Message Syntax", RFC 5754, DOI 10.17487/RFC5754, January 2010, <https://www.rfc-editor.org/info/rfc5754>.

[RFC5754]Turner,S.,“使用具有加密消息语法的SHA2算法”,RFC 5754,DOI 10.17487/RFC5754,2010年1月<https://www.rfc-editor.org/info/rfc5754>.

[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type Specifications and Registration Procedures", BCP 13, RFC 6838, DOI 10.17487/RFC6838, January 2013, <https://www.rfc-editor.org/info/rfc6838>.

[RFC6838]Freed,N.,Klensin,J.和T.Hansen,“介质类型规范和注册程序”,BCP 13,RFC 6838,DOI 10.17487/RFC6838,2013年1月<https://www.rfc-editor.org/info/rfc6838>.

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.

[RFC8174]Leiba,B.,“RFC 2119关键词中大写与小写的歧义”,BCP 14,RFC 8174,DOI 10.17487/RFC8174,2017年5月<https://www.rfc-editor.org/info/rfc8174>.

[RFC8418] Housley, R., "Use of the Elliptic Curve Diffie-Hellman Key Agreement Algorithm with X25519 and X448 in the Cryptographic Message Syntax (CMS)", RFC 8418, DOI 10.17487/RFC8418, August 2018, <https://www.rfc-editor.org/info/rfc8418>.

[RFC8418]Housley,R.,“在加密消息语法(CMS)中使用带有X25519和X448的椭圆曲线Diffie-Hellman密钥协商算法”,RFC 8418,DOI 10.17487/RFC8418,2018年8月<https://www.rfc-editor.org/info/rfc8418>.

[RFC8419] Housley, R., "Use of Edwards-Curve Digital Signature Algorithm (EdDSA) Signatures in the Cryptographic Message Syntax (CMS)", RFC 8419, DOI 10.17487/RFC8419, August 2018, <https://www.rfc-editor.org/info/rfc8419>.

[RFC8419]Housley,R.,“在加密消息语法(CMS)中使用爱德华兹曲线数字签名算法(EdDSA)签名”,RFC 8419,DOI 10.17487/RFC8419,2018年8月<https://www.rfc-editor.org/info/rfc8419>.

[RFC8550] Schaad, J., Ramsdell, B., and S. Turner, "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 4.0 Certificate Handling", RFC 8550, DOI 10.17487/RFC8550, April 2019, <https://www.rfc-editor.org/info/rfc8550>.

[RFC8550]Schaad,J.,Ramsdell,B.,和S.Turner,“安全/多用途Internet邮件扩展(S/MIME)版本4.0证书处理”,RFC 8550,DOI 10.17487/RFC8550,2019年4月<https://www.rfc-editor.org/info/rfc8550>.

[X.680] "Information Technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation", ITU-T Recommendation X.680, ISO/IEC 8824-1:2015, August 2015, <https://www.itu.int/rec/T-REC-X.680>.

[X.680]“信息技术-抽象语法符号一(ASN.1):基本符号规范”,ITU-T建议X.680,ISO/IEC 8824-1:2015,2015年8月<https://www.itu.int/rec/T-REC-X.680>.

[X.681] "Information Technology - Abstract Syntax Notation One (ASN.1): Information object specification", ITU-T Recommendation X.681, ISO/IEC 8824-2:2015, August 2015, <https://www.itu.int/rec/T-REC-X.681>.

[X.681]“信息技术-抽象语法符号1(ASN.1):信息对象规范”,ITU-T建议X.681,ISO/IEC 8824-2:2015,2015年8月<https://www.itu.int/rec/T-REC-X.681>.

[X.682] "Information Technology - Abstract Syntax Notation One (ASN.1): Constraint specification", ITU-T Recommendation X.682, ISO/IEC 8824-3:2015, August 2015, <https://www.itu.int/rec/T-REC-X.682>.

[X.682]“信息技术-抽象语法符号1(ASN.1):约束规范”,ITU-T建议X.682,ISO/IEC 8824-3:2015,2015年8月<https://www.itu.int/rec/T-REC-X.682>.

[X.683] "Information Technology - Abstract Syntax Notation One (ASN.1): Parameterization of ASN.1 specifications", ITU-T Recommendation X.683, ISO/IEC 8824-4:2015, August 2015, <https://www.itu.int/rec/T-REC-X.683>.

[X.683]“信息技术-抽象语法符号1(ASN.1):ASN.1规范的参数化”,ITU-T建议X.683,ISO/IEC 8824-4:2015,2015年8月<https://www.itu.int/rec/T-REC-X.683>.

[X.690] "Information Technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)", ITU-T Recommendation X.690, ISO/IEC 8825-1:2015, August 2015, <https://www.itu.int/rec/T-REC-X.690>.

[X.690]“信息技术-ASN.1编码规则:基本编码规则(BER)、规范编码规则(CER)和区分编码规则(DER)规范”,ITU-T建议X.690,ISO/IEC 8825-1:2015,2015年8月<https://www.itu.int/rec/T-REC-X.690>.

7.3. Informative References
7.3. 资料性引用

[Efail] Poddebniak, D., Dresen, C., Muller, J., Ising, F., Schinzel, S., Friedberger, S., Somorovsky, J., and J. Schwenk, "Efail: Breaking S/MIME and OpenPGP Email Encryption using Exfiltration Channels", UsenixSecurity 2018, August 2018, <https://www.usenix.org/system/files/conference/ usenixsecurity18/sec18-poddebniak.pdf>.

[Efail]Poddebniak,D.,Dresen,C.,Muller,J.,Ising,F.,Schinzel,S.,Friedberger,S.,Somorovsky,J.,和J.Schwenk,“Efail:使用Exfilter通道破坏S/MIME和OpenPGP电子邮件加密”,Usenix Security 2018,2018年8月<https://www.usenix.org/system/files/conference/ 请使用nixsecurity18/sec18 poddebniak.pdf>。

[FIPS186-2] National Institute of Standards and Technology (NIST), "Digital Signature Standard (DSS) (also with Change Notice 1)", Federal Information Processing Standards Publication 186-2, January 2000, <https://csrc.nist.gov/publications/detail/fips/186/2/ archive/2000-01-27>.

[FIPS186-2]美国国家标准与技术研究所(NIST),“数字签名标准(DSS)(也包括变更通知1)”,联邦信息处理标准出版物186-2,2000年1月<https://csrc.nist.gov/publications/detail/fips/186/2/ 存档/2000-01-27>。

[RFC1866] Berners-Lee, T. and D. Connolly, "Hypertext Markup Language - 2.0", RFC 1866, DOI 10.17487/RFC1866, November 1995, <https://www.rfc-editor.org/info/rfc1866>.

[RFC1866]Berners Lee,T.和D.Connolly,“超文本标记语言-2.0”,RFC 1866,DOI 10.17487/RFC1866,1995年11月<https://www.rfc-editor.org/info/rfc1866>.

[RFC2268] Rivest, R., "A Description of the RC2(r) Encryption Algorithm", RFC 2268, DOI 10.17487/RFC2268, March 1998, <https://www.rfc-editor.org/info/rfc2268>.

[RFC2268]Rivest,R.,“RC2(R)加密算法的描述”,RFC 2268,DOI 10.17487/RFC2268,1998年3月<https://www.rfc-editor.org/info/rfc2268>.

[RFC2311] Dusse, S., Hoffman, P., Ramsdell, B., Lundblade, L., and L. Repka, "S/MIME Version 2 Message Specification", RFC 2311, DOI 10.17487/RFC2311, March 1998, <https://www.rfc-editor.org/info/rfc2311>.

[RFC2311]Dusse,S.,Hoffman,P.,Ramsdell,B.,Lundblade,L.,和L.Repka,“S/MIME版本2消息规范”,RFC 2311,DOI 10.17487/RFC2311,1998年3月<https://www.rfc-editor.org/info/rfc2311>.

[RFC2312] Dusse, S., Hoffman, P., Ramsdell, B., and J. Weinstein, "S/MIME Version 2 Certificate Handling", RFC 2312, DOI 10.17487/RFC2312, March 1998, <https://www.rfc-editor.org/info/rfc2312>.

[RFC2312]Dusse,S.,Hoffman,P.,Ramsdell,B.,和J.Weinstein,“S/MIME版本2证书处理”,RFC 2312,DOI 10.17487/RFC2312,1998年3月<https://www.rfc-editor.org/info/rfc2312>.

[RFC2313] Kaliski, B., "PKCS #1: RSA Encryption Version 1.5", RFC 2313, DOI 10.17487/RFC2313, March 1998, <https://www.rfc-editor.org/info/rfc2313>.

[RFC2313]Kaliski,B.,“PKCS#1:RSA加密版本1.5”,RFC 2313,DOI 10.17487/RFC2313,1998年3月<https://www.rfc-editor.org/info/rfc2313>.

[RFC2314] Kaliski, B., "PKCS #10: Certification Request Syntax Version 1.5", RFC 2314, DOI 10.17487/RFC2314, March 1998, <https://www.rfc-editor.org/info/rfc2314>.

[RFC2314]Kaliski,B.,“PKCS#10:认证请求语法版本1.5”,RFC 2314,DOI 10.17487/RFC2314,1998年3月<https://www.rfc-editor.org/info/rfc2314>.

[RFC2315] Kaliski, B., "PKCS #7: Cryptographic Message Syntax Version 1.5", RFC 2315, DOI 10.17487/RFC2315, March 1998, <https://www.rfc-editor.org/info/rfc2315>.

[RFC2315]Kaliski,B.,“PKCS#7:加密消息语法版本1.5”,RFC 2315,DOI 10.17487/RFC2315,1998年3月<https://www.rfc-editor.org/info/rfc2315>.

[RFC2630] Housley, R., "Cryptographic Message Syntax", RFC 2630, DOI 10.17487/RFC2630, June 1999, <https://www.rfc-editor.org/info/rfc2630>.

[RFC2630]Housley,R.,“加密消息语法”,RFC 2630,DOI 10.17487/RFC2630,1999年6月<https://www.rfc-editor.org/info/rfc2630>.

[RFC2631] Rescorla, E., "Diffie-Hellman Key Agreement Method", RFC 2631, DOI 10.17487/RFC2631, June 1999, <https://www.rfc-editor.org/info/rfc2631>.

[RFC2631]Rescorla,E.,“Diffie-Hellman密钥协商方法”,RFC 2631,DOI 10.17487/RFC26311999年6月<https://www.rfc-editor.org/info/rfc2631>.

[RFC2632] Ramsdell, B., Ed., "S/MIME Version 3 Certificate Handling", RFC 2632, DOI 10.17487/RFC2632, June 1999, <https://www.rfc-editor.org/info/rfc2632>.

[RFC2632]Ramsdell,B.,Ed.,“S/MIME版本3证书处理”,RFC 2632,DOI 10.17487/RFC2632,1999年6月<https://www.rfc-editor.org/info/rfc2632>.

[RFC2633] Ramsdell, B., Ed., "S/MIME Version 3 Message Specification", RFC 2633, DOI 10.17487/RFC2633, June 1999, <https://www.rfc-editor.org/info/rfc2633>.

[RFC2633]拉姆斯代尔,B.,编辑,“S/MIME版本3消息规范”,RFC 2633,DOI 10.17487/RFC2633,1999年6月<https://www.rfc-editor.org/info/rfc2633>.

[RFC2785] Zuccherato, R., "Methods for Avoiding the "Small-Subgroup" Attacks on the Diffie-Hellman Key Agreement Method for S/MIME", RFC 2785, DOI 10.17487/RFC2785, March 2000, <https://www.rfc-editor.org/info/rfc2785>.

[RFC2785]Zuccherato,R.,“避免针对S/MIME的Diffie-Hellman密钥协商方法的“小分组”攻击的方法”,RFC 2785,DOI 10.17487/RFC2785,2000年3月<https://www.rfc-editor.org/info/rfc2785>.

[RFC3218] Rescorla, E., "Preventing the Million Message Attack on Cryptographic Message Syntax", RFC 3218, DOI 10.17487/RFC3218, January 2002, <https://www.rfc-editor.org/info/rfc3218>.

[RFC3218]Rescorla,E.“防止对加密消息语法的百万消息攻击”,RFC 3218,DOI 10.17487/RFC3218,2002年1月<https://www.rfc-editor.org/info/rfc3218>.

[RFC3766] Orman, H. and P. Hoffman, "Determining Strengths For Public Keys Used For Exchanging Symmetric Keys", BCP 86, RFC 3766, DOI 10.17487/RFC3766, April 2004, <https://www.rfc-editor.org/info/rfc3766>.

[RFC3766]Orman,H.和P.Hoffman,“确定用于交换对称密钥的公钥的强度”,BCP 86,RFC 3766,DOI 10.17487/RFC3766,2004年4月<https://www.rfc-editor.org/info/rfc3766>.

[RFC3850] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.1 Certificate Handling", RFC 3850, DOI 10.17487/RFC3850, July 2004, <https://www.rfc-editor.org/info/rfc3850>.

[RFC3850]Ramsdell,B.,Ed.“安全/多用途Internet邮件扩展(S/MIME)版本3.1证书处理”,RFC 3850,DOI 10.17487/RFC3850,2004年7月<https://www.rfc-editor.org/info/rfc3850>.

[RFC3851] Ramsdell, B., Ed., "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.1 Message Specification", RFC 3851, DOI 10.17487/RFC3851, July 2004, <https://www.rfc-editor.org/info/rfc3851>.

[RFC3851]Ramsdell,B.,Ed.“安全/多用途Internet邮件扩展(S/MIME)版本3.1消息规范”,RFC 3851,DOI 10.17487/RFC3851,2004年7月<https://www.rfc-editor.org/info/rfc3851>.

[RFC3852] Housley, R., "Cryptographic Message Syntax (CMS)", RFC 3852, DOI 10.17487/RFC3852, July 2004, <https://www.rfc-editor.org/info/rfc3852>.

[RFC3852]Housley,R.,“加密消息语法(CMS)”,RFC 3852,DOI 10.17487/RFC3852,2004年7月<https://www.rfc-editor.org/info/rfc3852>.

[RFC4134] Hoffman, P., Ed., "Examples of S/MIME Messages", RFC 4134, DOI 10.17487/RFC4134, July 2005, <https://www.rfc-editor.org/info/rfc4134>.

[RFC4134]Hoffman,P.,Ed.“S/MIME消息的示例”,RFC 4134,DOI 10.17487/RFC4134,2005年7月<https://www.rfc-editor.org/info/rfc4134>.

[RFC4270] Hoffman, P. and B. Schneier, "Attacks on Cryptographic Hashes in Internet Protocols", RFC 4270, DOI 10.17487/RFC4270, November 2005, <https://www.rfc-editor.org/info/rfc4270>.

[RFC4270]Hoffman,P.和B.Schneier,“对互联网协议中加密哈希的攻击”,RFC 4270,DOI 10.17487/RFC4270,2005年11月<https://www.rfc-editor.org/info/rfc4270>.

[RFC4949] Shirey, R., "Internet Security Glossary, Version 2", FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, <https://www.rfc-editor.org/info/rfc4949>.

[RFC4949]Shirey,R.,“互联网安全词汇表,第2版”,FYI 36,RFC 4949,DOI 10.17487/RFC4949,2007年8月<https://www.rfc-editor.org/info/rfc4949>.

[RFC5035] Schaad, J., "Enhanced Security Services (ESS) Update: Adding CertID Algorithm Agility", RFC 5035, DOI 10.17487/RFC5035, August 2007, <https://www.rfc-editor.org/info/rfc5035>.

[RFC5035]Schaad,J.,“增强安全服务(ESS)更新:添加CertID算法敏捷性”,RFC 5035,DOI 10.17487/RFC5035,2007年8月<https://www.rfc-editor.org/info/rfc5035>.

[RFC5750] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 Certificate Handling", RFC 5750, DOI 10.17487/RFC5750, January 2010, <https://www.rfc-editor.org/info/rfc5750>.

[RFC5750]Ramsdell,B.和S.Turner,“安全/多用途Internet邮件扩展(S/MIME)版本3.2证书处理”,RFC 5750,DOI 10.17487/RFC5750,2010年1月<https://www.rfc-editor.org/info/rfc5750>.

[RFC5751] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 Message Specification", RFC 5751, DOI 10.17487/RFC5751, January 2010, <https://www.rfc-editor.org/info/rfc5751>.

[RFC5751]Ramsdell,B.和S.Turner,“安全/多用途Internet邮件扩展(S/MIME)版本3.2消息规范”,RFC 5751,DOI 10.17487/RFC5751,2010年1月<https://www.rfc-editor.org/info/rfc5751>.

[RFC6151] Turner, S. and L. Chen, "Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms", RFC 6151, DOI 10.17487/RFC6151, March 2011, <https://www.rfc-editor.org/info/rfc6151>.

[RFC6151]Turner,S.和L.Chen,“MD5消息摘要和HMAC-MD5算法的更新安全注意事项”,RFC 6151,DOI 10.17487/RFC6151,2011年3月<https://www.rfc-editor.org/info/rfc6151>.

[RFC6194] Polk, T., Chen, L., Turner, S., and P. Hoffman, "Security Considerations for the SHA-0 and SHA-1 Message-Digest Algorithms", RFC 6194, DOI 10.17487/RFC6194, March 2011, <https://www.rfc-editor.org/info/rfc6194>.

[RFC6194]Polk,T.,Chen,L.,Turner,S.,和P.Hoffman,“SHA-0和SHA-1消息摘要算法的安全考虑”,RFC 6194,DOI 10.17487/RFC6194,2011年3月<https://www.rfc-editor.org/info/rfc6194>.

[RFC6268] Schaad, J. and S. Turner, "Additional New ASN.1 Modules for the Cryptographic Message Syntax (CMS) and the Public Key Infrastructure Using X.509 (PKIX)", RFC 6268, DOI 10.17487/RFC6268, July 2011, <https://www.rfc-editor.org/info/rfc6268>.

[RFC6268]Schaad,J.和S.Turner,“加密消息语法(CMS)和使用X.509(PKIX)的公钥基础设施的额外新ASN.1模块”,RFC 6268,DOI 10.17487/RFC6268,2011年7月<https://www.rfc-editor.org/info/rfc6268>.

[RFC6278] Herzog, J. and R. Khazan, "Use of Static-Static Elliptic Curve Diffie-Hellman Key Agreement in Cryptographic Message Syntax", RFC 6278, DOI 10.17487/RFC6278, June 2011, <https://www.rfc-editor.org/info/rfc6278>.

[RFC6278]Herzog,J.和R.Khazan,“在加密消息语法中使用静态椭圆曲线Diffie-Hellman密钥协议”,RFC 6278,DOI 10.17487/RFC6278,2011年6月<https://www.rfc-editor.org/info/rfc6278>.

[RFC7114] Leiba, B., "Creation of a Registry for smime-type Parameter Values", RFC 7114, DOI 10.17487/RFC7114, January 2014, <https://www.rfc-editor.org/info/rfc7114>.

[RFC7114]Leiba,B.,“为smime类型参数值创建注册表”,RFC 7114,DOI 10.17487/RFC7114,2014年1月<https://www.rfc-editor.org/info/rfc7114>.

[RFC7905] Langley, A., Chang, W., Mavrogiannopoulos, N., Strombergson, J., and S. Josefsson, "ChaCha20-Poly1305 Cipher Suites for Transport Layer Security (TLS)", RFC 7905, DOI 10.17487/RFC7905, June 2016, <https://www.rfc-editor.org/info/rfc7905>.

[RFC7905]Langley,A.,Chang,W.,Mavrogiannopoulos,N.,Strombergson,J.,和S.Josefsson,“用于传输层安全(TLS)的ChaCha20-Poly1305密码套件”,RFC 7905,DOI 10.17487/RFC7905,2016年6月<https://www.rfc-editor.org/info/rfc7905>.

[SP800-56A] National Institute of Standards and Technology (NIST), "Recommendation for Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography", NIST Special Publication 800-56A Revision 2, DOI 10.6028/NIST.SP.800-56Ar2, May 2013, <https://nvlpubs.nist.gov/nistpubs/SpecialPublications/ NIST.SP.800-56Ar2.pdf>.

[SP800-56A]美国国家标准与技术研究所(NIST),“使用离散对数加密的成对密钥建立方案的建议”,NIST特别出版物800-56A第2版,DOI 10.6028/NIST.SP.800-56Ar2,2013年5月<https://nvlpubs.nist.gov/nistpubs/SpecialPublications/ NIST.SP.800-56Ar2.pdf>。

[SP800-57] National Institute of Standards and Technology (NIST), "Recommendation for Key Management - Part 1: General", NIST Special Publication 800-57 Revision 4, DOI 10.6028/NIST.SP.800-57pt1r4, January 2016, <https://nvlpubs.nist.gov/nistpubs/SpecialPublications/ NIST.SP.800-57pt1r4.pdf>.

[SP800-57]国家标准与技术研究所(NIST),“关键管理建议-第1部分:概述”,NIST特别出版物800-57第4版,DOI 10.6028/NIST.SP.800-57pt1r4,2016年1月<https://nvlpubs.nist.gov/nistpubs/SpecialPublications/ NIST.SP.800-57pt1r4.pdf>。

[TripleDES] Tuchman, W., "Hellman Presents No Shortcut Solutions to the DES", IEEE Spectrum v. 16, n. 7, pp. 40-41, DOI 10.1109/MSPEC.1979.6368160, July 1979.

[TripleDES]Tuchman,W.,“Hellman没有为DES提供捷径解决方案”,IEEE Spectrum v。16,n。7,第40-41页,内政部10.1109/MSPEC.1979.63681601979年7月。

Appendix A. ASN.1 Module
附录A.ASN.1模块

Note: The ASN.1 module contained herein is unchanged from RFC 5751 [SMIMEv2] and RFC 3851 [SMIMEv3.1], with the exception of a change to the preferBinaryInside ASN.1 comment in RFC 3851 [SMIMEv3.1]. If a module is needed that is compatible with current ASN.1 standards, one can be found in [RFC6268]. This module uses the 1988 version of ASN.1.

注:此处包含的ASN.1模块与RFC 5751[SMIMEv2]和RFC 3851[SMIMEv3.1]相比没有变化,但RFC 3851[SMIMEv3.1]中的preferBinaryInside ASN.1注释有所变化。如果需要与当前ASN.1标准兼容的模块,可以在[RFC6268]中找到。本模块使用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 spelled incorrectly but is kept for
   -- historical reasons.
        
   -- "receipentKeyId" is spelled incorrectly but is kept for
   -- historical reasons.
        
   id-smime OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
           rsadsi(113549) pkcs(1) pkcs-9(9) 16 }
        
   id-smime OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840)
           rsadsi(113549) pkcs(1) pkcs-9(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 is a list of OIDs to be used with S/MIME v3.

--以下是要与S/MIME v3一起使用的OID列表。

   -- Signature Algorithms Not Found in [RFC3370], [RFC5754], [RFC4056],
   -- and [RFC3560]
        
   -- Signature Algorithms Not Found in [RFC3370], [RFC5754], [RFC4056],
   -- and [RFC3560]
        
   --
   -- 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. Historic Mail Considerations
附录B.历史邮件注意事项

Over the course of updating the S/MIME specifications, the set of recommended algorithms has been modified each time the documents have been updated. This means that if a user has historic emails and their user agent has been updated to only support the current set of recommended algorithms, some of those old emails will no longer be accessible. It is strongly suggested that user agents implement some of the following algorithms for dealing with historic emails.

在更新S/MIME规范的过程中,每次更新文档时都会修改推荐的算法集。这意味着,如果用户有历史电子邮件,并且他们的用户代理已更新为仅支持当前的一组推荐算法,则某些旧电子邮件将不再可访问。强烈建议用户代理实现以下一些算法来处理历史电子邮件。

This appendix contains a number of references to documents that have been obsoleted or replaced. This is intentional, as the updated documents often do not have the same information in them.

本附录包含大量已废弃或替换文件的参考资料。这是有意的,因为更新的文档中通常没有相同的信息。

B.1. DigestAlgorithmIdentifier
B.1. 算法识别器

The following algorithms have been called out for some level of support by previous S/MIME specifications:

以前的S/MIME规范要求以下算法提供一定程度的支持:

- SHA-1 was dropped in [SMIMEv4]. SHA-1 is no longer considered to be secure, as it is no longer collision resistant. The IETF statement on SHA-1 can be found in [RFC6194], but it is out of date relative to the most recent advances.

- SHA-1被放入[SMIMEv4]。SHA-1不再被认为是安全的,因为它不再抗碰撞。关于SHA-1的IETF声明可在[RFC6194]中找到,但与最新进展相比已过时。

- MD5 was dropped in [SMIMEv4]. MD5 is no longer considered to be secure, as it is no longer collision resistant. Details can be found in [RFC6151].

- MD5被丢弃在[SMIMEv4]中。MD5不再被认为是安全的,因为它不再抗碰撞。有关详细信息,请参见[RFC6151]。

B.2. Signature Algorithms
B.2. 签名算法

There are a number of problems with validating signatures on sufficiently historic messages. For this reason, it is strongly suggested that user agents treat these signatures differently from those on current messages. These problems include the following:

验证具有足够历史记录的消息上的签名时存在许多问题。因此,强烈建议用户代理将这些签名与当前消息上的签名区别对待。这些问题包括:

- Certification authorities are not required to keep certificates on a CRL beyond one update after a certificate has expired. This means that unless CRLs are cached as part of the message it is not always possible to check to see if a certificate has been revoked. The same problems exist with Online Certificate Status Protocol (OCSP) responses, as they may be based on a CRL rather than on the certificate database.

- 证书过期后,证书颁发机构无需在CRL上保存超过一次更新的证书。这意味着,除非CRL作为消息的一部分被缓存,否则并不总是能够检查证书是否已被吊销。在线证书状态协议(OCSP)响应也存在同样的问题,因为它们可能基于CRL而不是证书数据库。

- RSA and DSA keys of less than 2048 bits are now considered by many experts to be cryptographically insecure (due to advances in computing power). Such keys were previously considered secure, so the processing of historic signed messages 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.

- 许多专家现在认为,小于2048位的RSA和DSA密钥在加密方面是不安全的(由于计算能力的提高)。此类密钥以前被认为是安全的,因此处理历史签名消息通常会导致使用弱密钥。希望支持以前版本的S/MIME或处理旧消息的实现需要考虑由较小的密钥大小(例如,欺骗消息)导致的安全风险与拒绝服务的代价。

[SMIMEv3.1] set the lower limit on suggested key sizes for creating and validation at 1024 bits. Prior to that, the lower bound on key sizes was 512 bits.

[SMIMEv3.1]将用于创建和验证的建议密钥大小的下限设置为1024位。在此之前,密钥大小的下限是512位。

- Hash functions used to validate signatures on historic messages may no longer be considered to be secure (see below). While there are not currently any known practical pre-image or second pre-image attacks against MD5 or SHA-1, the fact that they are no longer considered to be collision resistant implies that the security levels of the signatures are generally considered suspect. If a message is known to be historic and it has been in the possession of the client for some time, then it might still be considered to be secure.

- 用于验证历史消息签名的哈希函数可能不再被认为是安全的(见下文)。虽然目前还没有针对MD5或SHA-1的任何已知实际预映像或第二预映像攻击,但它们不再被视为抗冲突的事实意味着签名的安全级别通常被认为是可疑的。如果已知一条消息是历史性的,并且客户端已经拥有该消息一段时间,那么它可能仍然被认为是安全的。

- The previous two issues apply to the certificates used to validate the binding of the public key to the identity that signed the message as well.

- 前两个问题也适用于用于验证公钥与签名消息的标识的绑定的证书。

The following algorithms have been called out for some level of support by previous S/MIME specifications:

以前的S/MIME规范要求以下算法提供一定程度的支持:

- RSA with MD5 was dropped in [SMIMEv4]. MD5 is no longer considered to be secure, as it is no longer collision resistant. Details can be found in [RFC6151].

- [SMIMEv4]中删除了带有MD5的RSA。MD5不再被认为是安全的,因为它不再抗碰撞。有关详细信息,请参见[RFC6151]。

- RSA and DSA with SHA-1 were dropped in [SMIMEv4]. SHA-1 is no longer considered to be secure, as it is no longer collision resistant. The IETF statement on SHA-1 can be found in [RFC6194], but it is out of date relative to the most recent advances.

- [SMIMEv4]中删除了带有SHA-1的RSA和DSA。SHA-1不再被认为是安全的,因为它不再抗碰撞。关于SHA-1的IETF声明可在[RFC6194]中找到,但与最新进展相比已过时。

- DSA with SHA-256 was dropped in [SMIMEv4]. DSA has been replaced by elliptic curve versions.

- 在[SMIMEv4]中删除了带有SHA-256的DSA。DSA已被椭圆曲线版本取代。

As requirements for "mandatory to implement" have changed over time, some issues have been created that can cause interoperability problems:

随着时间的推移,“强制实施”的要求发生了变化,因此产生了一些可能导致互操作性问题的问题:

- 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 v2客户端只需要使用带有SHA-1或MD5的RSA加密算法验证数字签名,可能根本无法实现id-dsa-with-sha1或id-dsa。

- 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.

- S/MIME v3客户端可能仅使用id-dsa-with-sha1实现签名或签名验证,还可能使用id dsa作为此字段中的算法标识符。

- Note that S/MIME v3.1 clients support verifying id-dsa-with-sha1 and rsaEncryption and might not implement sha256WithRSAEncryption.

- 请注意,S/MIME v3.1客户端支持使用-sha1和RSA加密验证id-dsa,并且可能不使用RSA加密实现SHA2566。

NOTE: Receiving clients SHOULD recognize id-dsa as equivalent to id-dsa-with-sha1.

注意:接收客户端应将id dsa识别为等同于id-dsa-with-sha1。

For 512-bit RSA with SHA-1, see [RFC3370] and [FIPS186-2] without Change Notice 1; for 512-bit RSA with SHA-256, see [RFC5754] and [FIPS186-2] without Change Notice 1; and for 1024-bit through 2048-bit RSA with SHA-256, see [RFC5754] and [FIPS186-2] with Change Notice 1. The first reference provides the signature algorithm's OID, and the second provides the signature algorithm's definition.

对于带SHA-1的512位RSA,请参见[RFC3370]和[FIPS186-2],无更改通知1;对于带SHA-256的512位RSA,请参见[RFC5754]和[FIPS186-2],无需更改通知1;对于带有SHA-256的1024位到2048位RSA,请参见[RFC5754]和[FIPS186-2]以及更改通知1。第一个参考提供了签名算法的OID,第二个参考提供了签名算法的定义。

For 512-bit DSA with SHA-1, see [RFC3370] and [FIPS186-2] without Change Notice 1; for 512-bit DSA with SHA-256, see [RFC5754] and [FIPS186-2] without Change Notice 1; for 1024-bit DSA with SHA-1, see [RFC3370] and [FIPS186-2] with Change Notice 1; and for 1024-bit and above DSA with SHA-256, see [RFC5754] and [FIPS186-4]. The first reference provides the signature algorithm's OID, and the second provides the signature algorithm's definition.

对于带有SHA-1的512位DSA,参见[RFC3370]和[FIPS186-2],无更改通知1;对于带有SHA-256的512位DSA,请参见[RFC5754]和[FIPS186-2],无更改通知1;对于带有SHA-1的1024位DSA,请参见[RFC3370]和[FIPS186-2]以及更改通知1;对于带有SHA-256的1024位及以上DSA,请参见[RFC5754]和[FIPS186-4]。第一个参考提供了签名算法的OID,第二个参考提供了签名算法的定义。

B.3. ContentEncryptionAlgorithmIdentifier
B.3. ContentEncryptionAlgorithmIdentifier

The following algorithms have been called out for some level of support by previous S/MIME specifications:

以前的S/MIME规范要求以下算法提供一定程度的支持:

- RC2/40 [RFC2268] was dropped in [SMIMEv3.2]. The algorithm is known to be insecure and, if supported, should only be used to decrypt existing email.

- RC2/40[RFC2268]被放入[SMIMEv3.2]。已知该算法是不安全的,如果支持,则应仅用于解密现有电子邮件。

- DES EDE3 CBC [TripleDES], also known as "tripleDES", was dropped in [SMIMEv4]. This algorithm is removed from the list of supported algorithms because (1) it has a 64-bit block size and (2) it offers less than 128 bits of security. This algorithm should be supported only to decrypt existing email; it should not be used to encrypt new emails.

- DES EDE3 CBC[TripleDES],也称为“TripleDES”,被放入[SMIMEv4]。此算法从支持的算法列表中删除,因为(1)它具有64位的块大小,(2)它提供的安全性小于128位。此算法应仅支持解密现有电子邮件;它不应用于加密新电子邮件。

B.4. KeyEncryptionAlgorithmIdentifier
B.4. 密钥加密算法标识符

The following algorithms have been called out for some level of support by previous S/MIME specifications:

以前的S/MIME规范要求以下算法提供一定程度的支持:

- DH ephemeral-static mode, as specified in [RFC3370] and [SP800-57], was dropped in [SMIMEv4].

- [RFC3370]和[SP800-57]中规定的DH瞬时静态模式被丢弃在[SMIMEv4]中。

- RSA key sizes have been increased over time. Decrypting old mail with smaller key sizes is reasonable; however, new mail should use the updated key sizes.

- RSA密钥大小随着时间的推移而增加。用较小的密钥大小解密旧邮件是合理的;但是,新邮件应使用更新的密钥大小。

For 1024-bit DH, see [RFC3370]. For 1024-bit and larger DH, see [SP800-56A]; regardless, use the KDF, which is from X9.42, specified in [RFC3370].

对于1024位DH,请参见[RFC3370]。对于1024位及以上的DH,请参见[SP800-56A];无论如何,请使用[RFC3370]中指定的来自X9.42的KDF。

Appendix C. Moving S/MIME v2 Message Specification to Historic Status

附录C.将S/MIME v2消息规范移动到历史状态

The S/MIME v3 [SMIMEv3], v3.1 [SMIMEv3.1], and v3.2 [SMIMEv3.2] specifications are backward 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, RFC 2311 [SMIMEv2] was moved to Historic status.

S/MIME v3[SMIMEv3]、v3.1[SMIMEv3.1]和v3.2[SMIMEv3.2]规范与S/MIME v2消息规范[SMIMEv2]向后兼容,但算法除外(删除了RC2/40要求,增加了DSA和RSASSA-PSS要求)。因此,RFC 2311[SMIMEv2]被移至历史状态。

Acknowledgements

致谢

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, v3.2, or v4.0.

非常感谢S/MIME版本2消息规范RFC的其他作者:Steve Dusse、Paul Hoffman、Laurence Lundblade和Lisa Repka。没有v2,就不会有v3、v3.1、v3.2或v4.0。

Some of the examples in this document were copied from [RFC4134]. Thanks go to the people who wrote and verified the examples in that document.

本文件中的一些示例复制自[RFC4134]。感谢编写和验证该文档中示例的人员。

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, and John Pawling.

托尼·卡佩尔、皮尔斯·奇弗斯、戴夫·克罗克、比尔·弗拉尼根、彼得·古特曼、阿尔弗雷德·霍恩斯、保罗·霍夫曼、罗斯·霍斯利、威廉·奥塔维和约翰·帕林。

The version 4 update to the S/MIME documents was done under the auspices of the LAMPS Working Group.

S/MIME文件的第4版更新是在LAMPS工作组的主持下完成的。

Authors' Addresses

作者地址

Jim Schaad August Cellars

吉姆·沙德八月酒窖

   Email: ietf@augustcellars.com
        
   Email: ietf@augustcellars.com
        

Blake Ramsdell Brute Squad Labs, Inc.

布莱克·拉姆斯代尔野蛮小队实验室有限公司。

   Email: blaker@gmail.com
        
   Email: blaker@gmail.com
        

Sean Turner sn3rd

肖恩·特纳

   Email: sean@sn3rd.com
        
   Email: sean@sn3rd.com