Internet Engineering Task Force (IETF)                         S. Turner
Request for Comments: 5958                                          IECA
Obsoletes: 5208                                              August 2010
Category: Standards Track
ISSN: 2070-1721
        
Internet Engineering Task Force (IETF)                         S. Turner
Request for Comments: 5958                                          IECA
Obsoletes: 5208                                              August 2010
Category: Standards Track
ISSN: 2070-1721
        

Asymmetric Key Packages

非对称密钥包

Abstract

摘要

This document defines the syntax for private-key information and a content type for it. Private-key information includes a private key for a specified public-key algorithm and a set of attributes. The Cryptographic Message Syntax (CMS), as defined in RFC 5652, can be used to digitally sign, digest, authenticate, or encrypt the asymmetric key format content type. This document obsoletes RFC 5208.

本文档定义了私钥信息的语法及其内容类型。私钥信息包括用于指定公钥算法的私钥和一组属性。RFC 5652中定义的加密消息语法(CMS)可用于对非对称密钥格式内容类型进行数字签名、摘要、验证或加密。本文件淘汰了RFC 5208。

Status of This Memo

关于下段备忘

This is an Internet Standards Track document.

这是一份互联网标准跟踪文件。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.

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

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

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

Copyright Notice

版权公告

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

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

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.

本文件可能包含2008年11月10日之前发布或公开的IETF文件或IETF贡献中的材料。控制某些材料版权的人员可能未授予IETF信托允许在IETF标准流程之外修改此类材料的权利。在未从控制此类材料版权的人员处获得充分许可的情况下,不得在IETF标准流程之外修改本文件,也不得在IETF标准流程之外创建其衍生作品,除了将其格式化以RFC形式发布或将其翻译成英语以外的其他语言。

1. Introduction
1. 介绍

This document defines the syntax for private-key information and a Cryptographic Message Syntax (CMS) [RFC5652] content type for it. Private-key information includes a private key for a specified public-key algorithm and a set of attributes. The CMS can be used to digitally sign, digest, authenticate, or encrypt the asymmetric key format content type. This document obsoletes PKCS #8 v1.2 [RFC5208].

本文档定义了私钥信息的语法及其加密消息语法(CMS)[RFC5652]内容类型。私钥信息包括用于指定公钥算法的私钥和一组属性。CMS可用于对非对称密钥格式内容类型进行数字签名、摘要、身份验证或加密。本文件淘汰了PKCS#8 v1.2[RFC5208]。

1.1. Requirements Terminology
1.1. 需求术语

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照[RFC2119]中所述进行解释。

1.2. ASN.1 Syntax Notation
1.2. ASN.1语法表示法

The key package is defined using ASN.1 [X.680], [X.681], [X.682], and [X.683].

密钥包是使用ASN.1[X.680]、[X.681]、[X.682]和[X.683]定义的。

1.3. Summary of Updates to RFC 5208
1.3. RFC 5208更新摘要

The following summarizes the updates to [RFC5208]:

以下总结了[RFC5208]的更新:

- Changed the name "PrivateKeyInfo" to "OneAsymmetricKey". This reflects the addition of the publicKey field to allow both parts of the asymmetric key to be conveyed separately. Not all algorithms will use both fields; however, the publicKey field was added for completeness.

- 将名称“PrivateKeyInfo”更改为“OneAsymmetricKey”。这反映了添加了公钥字段,以允许分别传送非对称密钥的两个部分。并非所有算法都会同时使用这两个字段;但是,为了完整性,添加了publicKey字段。

- Defined Asymmetric Key Package CMS content type.

- 已定义非对称密钥包CMS内容类型。

- Removed redundant IMPLICIT from attributes.

- 从属性中删除冗余隐式。

- Added publicKey to OneAsymmetricKey and updated the version number.

- 将publicKey添加到OneAsymmetricKey并更新了版本号。

- Added that PKCS #9 attributes may be supported.

- 添加了PKCS#9属性可能受支持。

- Added discussion of compatibility with other private-key formats.

- 增加了与其他私钥格式兼容性的讨论。

- Added requirements for encoding rule set.

- 增加了编码规则集的要求。

- Changed imports from PKCS #5 to [RFC5912] and [RFC5911].

- 将从PKCS#5的导入更改为[RFC5912]和[RFC5911]。

- Replaced ALGORITHM-IDENTIFIER with ALGORITHM from [RFC5912].

- 将ALGORITHM-IDENTIFIER替换为[RFC5912]中的算法。

- Registers application/pkcs8 media type and .p8 file extension.

- 注册应用程序/pkcs8媒体类型和.p8文件扩展名。

2. Asymmetric Key Package CMS Content Type
2. 非对称密钥包CMS内容类型

The asymmetric key package CMS content type is used to transfer one or more plaintext asymmetric keys from one party to another. An asymmetric key package MAY be encapsulated in one or more CMS protecting content types (see Section 4). Earlier versions of this specification [RFC5208] did not specify a particular encoding rule set, but generators SHOULD use DER [X.690] and receivers MUST support BER [X.690], which also includes DER [X.690].

非对称密钥包CMS内容类型用于将一个或多个明文非对称密钥从一方传输到另一方。非对称密钥包可以封装在一个或多个保护内容类型的CMS中(参见第4节)。本规范的早期版本[RFC5208]未指定特定的编码规则集,但生成器应使用DER[X.690],接收器必须支持BER[X.690],其中也包括DER[X.690]。

The asymmetric key package content type has the following syntax:

非对称密钥包内容类型具有以下语法:

     ct-asymmetric-key-package CONTENT-TYPE ::=
       { AsymmetricKeyPackage IDENTIFIED BY id-ct-KP-aKeyPackage }
        
     ct-asymmetric-key-package CONTENT-TYPE ::=
       { AsymmetricKeyPackage IDENTIFIED BY id-ct-KP-aKeyPackage }
        
     id-ct-KP-aKeyPackage OBJECT IDENTIFIER ::=
       { joint-iso-itu-t(2) country(16) us(840) organization(1)
         gov(101) dod(2) infosec(1) formats(2)
         key-package-content-types(78) 5
       }
        
     id-ct-KP-aKeyPackage OBJECT IDENTIFIER ::=
       { joint-iso-itu-t(2) country(16) us(840) organization(1)
         gov(101) dod(2) infosec(1) formats(2)
         key-package-content-types(78) 5
       }
        
     AsymmetricKeyPackage ::= SEQUENCE SIZE (1..MAX) OF OneAsymmetricKey
        
     AsymmetricKeyPackage ::= SEQUENCE SIZE (1..MAX) OF OneAsymmetricKey
        
     OneAsymmetricKey ::= SEQUENCE {
       version                   Version,
       privateKeyAlgorithm       PrivateKeyAlgorithmIdentifier,
       privateKey                PrivateKey,
       attributes            [0] Attributes OPTIONAL,
       ...,
       [[2: publicKey        [1] PublicKey OPTIONAL ]],
       ...
     }
        
     OneAsymmetricKey ::= SEQUENCE {
       version                   Version,
       privateKeyAlgorithm       PrivateKeyAlgorithmIdentifier,
       privateKey                PrivateKey,
       attributes            [0] Attributes OPTIONAL,
       ...,
       [[2: publicKey        [1] PublicKey OPTIONAL ]],
       ...
     }
        
     PrivateKeyInfo ::= OneAsymmetricKey
        
     PrivateKeyInfo ::= OneAsymmetricKey
        
     -- PrivateKeyInfo is used by [P12].  If any items tagged as version
     -- 2 are used, the version must be v2, else the version should be
     -- v1.  When v1, PrivateKeyInfo is the same as it was in [RFC5208].
        
     -- PrivateKeyInfo is used by [P12].  If any items tagged as version
     -- 2 are used, the version must be v2, else the version should be
     -- v1.  When v1, PrivateKeyInfo is the same as it was in [RFC5208].
        
     Version ::= INTEGER { v1(0), v2(1) } (v1, ..., v2)
        
     Version ::= INTEGER { v1(0), v2(1) } (v1, ..., v2)
        
     PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
                                        { PUBLIC-KEY,
                                          { PrivateKeyAlgorithms } }
        
     PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
                                        { PUBLIC-KEY,
                                          { PrivateKeyAlgorithms } }
        
     PrivateKey ::= OCTET STRING
                        -- Content varies based on type of key.  The
                        -- algorithm identifier dictates the format of
                        -- the key.
        
     PrivateKey ::= OCTET STRING
                        -- Content varies based on type of key.  The
                        -- algorithm identifier dictates the format of
                        -- the key.
        
     PublicKey ::= BIT STRING
                        -- Content varies based on type of key.  The
                        -- algorithm identifier dictates the format of
                        -- the key.
        
     PublicKey ::= BIT STRING
                        -- Content varies based on type of key.  The
                        -- algorithm identifier dictates the format of
                        -- the key.
        
     Attributes ::= SET OF Attribute { { OneAsymmetricKeyAttributes } }
        
     Attributes ::= SET OF Attribute { { OneAsymmetricKeyAttributes } }
        

The AsymmetricKeyPackage contains one or more OneAsymmetricKey elements.

AsymmetricKeyPackage包含一个或多个OneAsymmetricKey元素。

The syntax of OneAsymmetricKey accommodates a version number, an indication of the asymmetric algorithm to be used with the private key, a private key, optional keying material attributes (e.g., userCertificate from [X.520]), and an optional public key. In general, either the public key or the certificate will be present. In very rare cases will both the public key and the certificate be present as this includes two copies of the public key. OneAsymmetricKey renames the PrivateKeyInfo syntax defined in [RFC5208]. The new name better reflects the ability to carry both private- and public-key components. Backwards compatibility with the original PrivateKeyInfo is preserved via version number. The fields in OneAsymmetricKey are used as follows:

OneAsymmetricKey的语法包含版本号、与私钥一起使用的非对称算法的指示、私钥、可选的密钥材料属性(例如,来自[X.520]的用户证书)和可选的公钥。通常,公钥或证书都将存在。在极少数情况下,公钥和证书都会出现,因为这包括公钥的两个副本。OneAsymmetricKey重命名[RFC5208]中定义的PrivateKeyInfo语法。新名称更好地反映了携带私钥和公钥组件的能力。通过版本号保持与原始PrivateKeyInfo的向后兼容性。OneAsymmetricKey中的字段使用如下:

- version identifies the version of OneAsymmetricKey. If publicKey is present, then version is set to v2 else version is set to v1.

- 版本标识OneAsymmetricKey的版本。如果存在公钥,则版本设置为v2,否则版本设置为v1。

- privateKeyAlgorithm identifies the private-key algorithm and optionally contains parameters associated with the asymmetric key pair. The algorithm is identified by an object identifier (OID) and the format of the parameters depends on the OID, but the PrivateKeyAlgorithms information object set restricts the

- privateKeyAlgorithm标识私钥算法,并可选地包含与非对称密钥对关联的参数。算法由对象标识符(OID)标识,参数的格式取决于OID,但PrivateKeyAlgorithms信息对象集限制了

permissible OIDs. The value placed in privateKeyAlgorithmIdentifier is the value an originator would apply to indicate which algorithm is to be used with the private key.

允许的OID。privateKeyAlgorithmIdentifier中的值是发起者将应用的值,用于指示将与私钥一起使用的算法。

- privateKey is an OCTET STRING that contains the value of the private key. The interpretation of the content is defined in the registration of the private-key algorithm. For example, a DSA key is an INTEGER, an RSA key is represented as RSAPrivateKey as defined in [RFC3447], and an Elliptic Curve Cryptography (ECC) key is represented as ECPrivateKey as defined in [RFC5915].

- privateKey是包含私钥值的八位字节字符串。内容的解释在私钥算法的注册中定义。例如,DSA密钥是整数,RSA密钥表示为[RFC3447]中定义的RSAPrivateKey,椭圆曲线密码(ECC)密钥表示为[RFC5915]中定义的ECPrivateKey。

- attributes is OPTIONAL. It contains information corresponding to the public key (e.g., certificates). The attributes field uses the class ATTRIBUTE which is restricted by the OneAsymmetricKeyAttributes information object set. OneAsymmetricKeyAttributes is an open ended set in this document. Others documents can constrain these values. Attributes from [RFC2985] MAY be supported.

- 属性是可选的。它包含与公钥对应的信息(例如证书)。attributes字段使用class属性,该属性受OneAsymmetricKeyAttributes信息对象集的限制。OneAsymmetricKeyAttributes是本文档中的一个开放集。其他文档可以约束这些值。可能支持[RFC2985]中的属性。

- publicKey is OPTIONAL. When present, it contains the public key encoded in a BIT STRING. The structure within the BIT STRING, if any, depends on the privateKeyAlgorithm. For example, a DSA key is an INTEGER. Note that RSA public keys are included in RSAPrivateKey (i.e., n and e are present), as per [RFC3447], and ECC public keys are included in ECPrivateKey (i.e., in the publicKey field), as per [RFC5915].

- 公钥是可选的。当存在时,它包含以位字符串编码的公钥。位字符串中的结构(如果有)取决于privateKeyAlgorithm。例如,DSA密钥是一个整数。请注意,根据[RFC3447],RSA公钥包括在RSAPrivateKey中(即存在n和e),ECC公钥包括在ECPrivateKey中(即,在publicKey字段中),根据[RFC5915]。

3. Encrypted Private Key Info
3. 加密私钥信息

This section gives the syntax for encrypted private-key information, which is used by [P12].

本节给出了[P12]使用的加密私钥信息的语法。

Encrypted private-key information shall have ASN.1 type EncryptedPrivateKeyInfo:

加密私钥信息应具有ASN.1类型EncryptedPrivateKeyInfo:

     EncryptedPrivateKeyInfo ::= SEQUENCE {
       encryptionAlgorithm  EncryptionAlgorithmIdentifier,
       encryptedData        EncryptedData }
        
     EncryptedPrivateKeyInfo ::= SEQUENCE {
       encryptionAlgorithm  EncryptionAlgorithmIdentifier,
       encryptedData        EncryptedData }
        
     EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
                                        { CONTENT-ENCRYPTION,
                                          { KeyEncryptionAlgorithms } }
        
     EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
                                        { CONTENT-ENCRYPTION,
                                          { KeyEncryptionAlgorithms } }
        
     EncryptedData ::= OCTET STRING
        
     EncryptedData ::= OCTET STRING
        

The fields in EncryptedPrivateKeyInfo are used as follows:

EncryptedPrivateKeyInfo中的字段使用如下:

- encryptionAlgorithm identifies the algorithm under which the private-key information is encrypted.

- encryptionAlgorithm识别加密私钥信息的算法。

- encryptedData is the result of encrypting the private-key information (i.e., the PrivateKeyInfo).

- encryptedData是加密私钥信息(即PrivateKeyInfo)的结果。

The encryption process involves the following two steps:

加密过程包括以下两个步骤:

1. The private-key information is encoded, yielding an octet string. Generators SHOULD use DER [X.690] and receivers MUST support BER [X.690], which also includes DER [X.690].

1. 对私钥信息进行编码,生成八位字节字符串。发电机应使用DER[X.690],接收机必须支持BER[X.690],其中也包括DER[X.690]。

2. The result of step 1 is encrypted with the secret key to give an octet string, the result of the encryption process.

2. 步骤1的结果使用密钥加密,以给出加密过程的结果八位字节字符串。

4. Protecting the AsymmetricKeyPackage
4. 保护非对称密钥包

CMS protecting content types, [RFC5652] and [RFC5083], can be used to provide security to the AsymmetricKeyPackage:

保护内容类型[RFC5652]和[RFC5083]的CMS可用于为AsymmetricKeyPackage提供安全性:

- SignedData can be used to apply a digital signature to the AsymmetricKeyPackage.

- SignedData可用于对AsymmetricKeyPackage应用数字签名。

- EncryptedData can be used to encrypt the AsymmetricKeyPackage with symmetric encryption, where the sender and the receiver already share the necessary encryption key.

- EncryptedData可用于使用对称加密对非对称密钥包进行加密,其中发送方和接收方已共享必要的加密密钥。

- EnvelopedData can be used to encrypt the AsymmetricKeyPackage with symmetric encryption, where the sender and the receiver do not share the necessary encryption key.

- EnvelopedData可用于使用对称加密对非对称密钥包进行加密,其中发送方和接收方不共享必要的加密密钥。

- AuthenticatedData can be used to protect the AsymmetricKeyPackage with message authentication codes, where key management information is handled in a manner similar to EnvelopedData.

- AuthenticatedData可用于使用消息身份验证代码保护AsymmetricKeyPackage,其中密钥管理信息的处理方式类似于EnvelopedData。

- AuthEnvelopedData can be used to protect the AsymmetricKeyPackage with algorithms that support authenticated encryption, where key management information is handled in a manner similar to EnvelopedData.

- AuthEnvelopedData可以使用支持身份验证加密的算法来保护AsymmetricKeyPackage,其中密钥管理信息的处理方式与EnvelopedData类似。

5. Other Private-Key Format Considerations
5. 其他私钥格式注意事项

This document defines the syntax and the semantics for a content type that exchanges asymmetric private keys. There are two other formats that have been used for the transport of asymmetric private keys:

本文档定义了交换非对称私钥的内容类型的语法和语义。还有两种其他格式用于传输非对称私钥:

- Personal Information Exchange (PFX) Syntax Standard [P12], which is more commonly referred to as PKCS #12 or simply P12, is a transfer syntax for personal identity information, including private keys, certificates, miscellaneous secrets, and extensions. OneAsymmetricKey, PrivateKeyInfo, and EncryptedPrivateKeyInfo can be carried in a P12 message. The private key information, OneAsymmetricKey and PrivateKeyInfo, are carried in the P12 keyBag BAG-TYPE. EncryptedPrivateKeyInfo is carried in the P12 pkcs8ShroudedKeyBag BAG-TYPE. In current implementations, the file extensions .pfx and .p12 can be used interchangeably.

- 个人信息交换(PFX)语法标准[P12]通常被称为PKCS#12或简称为P12,是个人身份信息的传输语法,包括私钥、证书、杂项机密和扩展。P12消息中可以携带一个不对称密钥、PrivateKeyInfo和EncryptedPrivateKeyInfo。私钥信息,OneAsymmetricKey和PrivateKeyInfo,在P12钥匙袋中携带。加密的PrivateKeyInfo装在P12 PKCS8带护罩的钥匙袋袋中。在当前的实现中,文件扩展名.pfx和.p12可以互换使用。

- Microsoft's private-key proprietary transfer syntax. The .pvk file extension is used for local storage.

- Microsoft的私钥专有传输语法。.pvk文件扩展名用于本地存储。

The .pvk and .p12/.pfx formats are not interchangeable; however, conversion tools exist to convert from one format to another.

.pvk和.p12/.pfx格式不可互换;但是,存在用于从一种格式转换为另一种格式的转换工具。

To extract the private-key information from the AsymmetricKeyPackage, the encapsulating layers need to be removed. At a minimum, the outer ContentInfo [RFC5652] layer needs to be removed. If the AsymmetricKeyPackage is encapsulated in a SignedData [RFC5652], then the SignedData and EncapsulatedContentInfo layers [RFC5652] also need to be removed. The same is true for EnvelopedData, EncryptedData, and AuthenticatedData all from [RFC5652] as well as AuthEnvelopedData from [RFC5083]. Once all the outer layers are removed, there are as many sets of private-key information as there are OneAsymmetricKey structures. OneAsymmetricKey and PrivateKeyInfo are the same structure; therefore, either can be saved as a .p8 file or copied in to the P12 KeyBag BAG-TYPE. Removing encapsulating security layers will invalidate any signature and may expose the key to unauthorized disclosure.

要从AsymmetricKeyPackage中提取私钥信息,需要移除封装层。至少需要删除外部ContentInfo[RFC5652]层。如果AsymmetricKeyPackage封装在SignedData[RFC5652]中,则还需要删除SignedData和封装的ContentInfo层[RFC5652]。对于[RFC5652]中的EnvelopedData、EncryptedData和AuthenticatedData以及[RFC5083]中的AuthEnvelopedData,情况也是如此。一旦所有外层都被移除,私钥信息集的数量与非对称密钥结构的数量一样多。OneAsymmetricKey和PrivateKeyInfo是相同的结构;因此,可以将其另存为.p8文件或复制到P12 KeyBag BAG-TYPE中。移除封装安全层将使任何签名无效,并可能使密钥暴露于未经授权的泄露。

.p8 files are sometimes PEM-encoded. When .p8 files are PEM encoded they use the .pem file extension. PEM encoding is either the Base64 encoding, from Section 4 of [RFC4648], of the DER-encoded EncryptedPrivateKeyInfo sandwiched between:

.p8文件有时采用PEM编码。当.p8文件采用PEM编码时,它们使用.PEM文件扩展名。PEM编码是[RFC4648]第4节中DER编码EncryptedPrivateKeyInfo的Base64编码,夹在以下两者之间:

   -----BEGIN ENCRYPTED PRIVATE KEY-----
   -----END ENCRYPTED PRIVATE KEY-----
        
   -----BEGIN ENCRYPTED PRIVATE KEY-----
   -----END ENCRYPTED PRIVATE KEY-----
        

or the Base64 encoding, see Section 4 of [RFC4648], of the DER-encoded PrivateKeyInfo sandwiched between:

或DER编码的PrivateKeyInfo的Base64编码,见[RFC4648]第4节,夹在:

   -----BEGIN PRIVATE KEY-----
   -----END PRIVATE KEY-----
        
   -----BEGIN PRIVATE KEY-----
   -----END PRIVATE KEY-----
        
6. Security Considerations
6. 安全考虑

Protection of the private-key information is vital to public-key cryptography. Disclosure of the private-key material to another entity can lead to masquerades. The encryption algorithm used in the encryption process must be as 'strong' as the key it is protecting.

私钥信息的保护对于公钥密码学至关重要。向另一个实体披露私钥材料可能导致伪装。加密过程中使用的加密算法必须与其所保护的密钥一样“强大”。

The asymmetric key package contents are not protected. This content type can be combined with a security protocol to protect the contents of the package.

非对称密钥包内容不受保护。此内容类型可以与安全协议结合使用,以保护包的内容。

7. IANA Considerations
7. IANA考虑

This document makes use of object identifiers to identify a CMS content type and the ASN.1 module found in Appendix A. The CMS content type OID is registered in a DoD arc. The ASN.1 module OID is registered in an arc delegated by RSADSI to the SMIME Working Group. No further action by IANA is necessary for this document or any anticipated updates.

本文件利用对象标识符识别CMS内容类型和附录a中的ASN.1模块。CMS内容类型OID在国防部arc中注册。ASN.1模块OID在RSADSI委托给SMIME工作组的arc中注册。IANA无需对本文件或任何预期更新采取进一步行动。

This specification also defines a new media subtype that IANA has registered at http://www.iana.org/.

本规范还定义了IANA已注册的新媒体子类型http://www.iana.org/.

7.1. Registration of media subtype application/pkcs8
7.1. 媒体子类型应用程序/pkcs8的注册

Type name: application

类型名称:应用程序

Subtype name: pkcs8

子类型名称:pkcs8

Required parameters: None

所需参数:无

Optional parameters: None

可选参数:无

Encoding considerations: binary

编码注意事项:二进制

Security considerations: Carries a cryptographic private key. See section 6.

安全注意事项:携带加密私钥。见第6节。

Interoperability considerations:

互操作性注意事项:

The PKCS #8 object inside this media type MUST be DER-encoded PrivateKeyInfo.

此媒体类型中的PKCS#8对象必须是DER编码的PrivateKeyInfo。

Published specification: RFC 5958

已发布规范:RFC 5958

Applications which use this media type:

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

Any MIME-compliant transport that processes asymmetric keys.

处理非对称密钥的任何MIME兼容传输。

Additional information:

其他信息:

Magic number(s): None File extension(s): .p8 Macintosh File Type Code(s):

幻数:无文件扩展名:.p8 Macintosh文件类型代码:

Person & email address to contact for further information:

联系人和电子邮件地址,以获取更多信息:

     Sean Turner <turners@ieca.com>
        
     Sean Turner <turners@ieca.com>
        

Restrictions on usage: none

使用限制:无

Author:

作者:

     Sean Turner <turners@ieca.com>
        
     Sean Turner <turners@ieca.com>
        

Intended usage: COMMON

预期用途:普通

Change controller:

更改控制器:

The IESG

IESG

8. References
8. 工具书类
8.1. Normative References
8.1. 规范性引用文件

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, October 2006.

[RFC4648]Josefsson,S.,“Base16、Base32和Base64数据编码”,RFC4648,2006年10月。

[RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, RFC 5652, September 2009.

[RFC5652]Housley,R.,“加密消息语法(CMS)”,STD 70,RFC 56522009年9月。

[RFC5911] Hoffman, P. and J. Schaad, "New ASN.1 Modules for Cryptographic Message Syntax (CMS) and S/MIME", RFC 5911, June 2010.

[RFC5911]Hoffman,P.和J.Schaad,“用于加密消息语法(CMS)和S/MIME的新ASN.1模块”,RFC 59112010年6月。

[RFC5912] Hoffman, P. and J. Schaad, "New ASN.1 Modules for the Public Key Infrastructure Using X.509 (PKIX)", RFC 5912, June 2010.

[RFC5912]Hoffman,P.和J.Schaad,“使用X.509(PKIX)的公钥基础设施的新ASN.1模块”,RFC 5912,2010年6月。

[X.680] ITU-T Recommendation X.680 (2002) | ISO/IEC 8824-1:2002. Information Technology - Abstract Syntax Notation One.

[X.680]ITU-T建议X.680(2002)| ISO/IEC 8824-1:2002。信息技术.抽象语法符号1。

[X.681] ITU-T Recommendation X.681 (2002) | ISO/IEC 8824-2:2002. Information Technology - Abstract Syntax Notation One: Information Object Specification.

[X.681]ITU-T建议X.681(2002)| ISO/IEC 8824-2:2002。信息技术.抽象语法符号1:信息对象规范。

[X.682] ITU-T Recommendation X.682 (2002) | ISO/IEC 8824-3:2002. Information Technology - Abstract Syntax Notation One: Constraint Specification.

[X.682]ITU-T建议X.682(2002)| ISO/IEC 8824-3:2002。信息技术.抽象语法符号1:约束规范。

[X.683] ITU-T Recommendation X.683 (2002) | ISO/IEC 8824-4:2002. Information Technology - Abstract Syntax Notation One: Parameterization of ASN.1 Specifications.

[X.683]ITU-T建议X.683(2002)| ISO/IEC 8824-4:2002。信息技术.抽象语法符号1:ASN.1规范的参数化。

[X.690] ITU-T Recommendation X.690 (2002) | ISO/IEC 8825-1:2002. Information Technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER).

[X.690]ITU-T建议X.690(2002)| ISO/IEC 8825-1:2002。信息技术.ASN.1编码规则:基本编码规则(BER)、规范编码规则(CER)和区分编码规则(DER)的规范。

8.2. Informative References
8.2. 资料性引用

[P12] RSA Laboratories, "PKCS #12 v1.0: Personal Information Exchange Syntax", June 1999.

[P12]RSA实验室,“PKCS#12 v1.0:个人信息交换语法”,1999年6月。

[RFC2985] Nystrom, M. and B. Kaliski, "PKCS #9: Selected Object Classes and Attribute Types Version 2.0", RFC 2985, November 2000.

[RFC2985]Nystrom,M.和B.Kaliski,“PKCS#9:选定对象类和属性类型版本2.0”,RFC 29852000年11月。

[RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1", RFC 3447, February 2003.

[RFC3447]Jonsson,J.和B.Kaliski,“公钥密码标准(PKCS)#1:RSA密码规范版本2.1”,RFC 3447,2003年2月。

[RFC5083] Housley, R., "Cryptographic Message Syntax (CMS) Authenticated-Enveloped-Data Content Type", RFC 5083, November 2007.

[RFC5083]Housley,R.,“加密消息语法(CMS)认证的信封数据内容类型”,RFC 5083,2007年11月。

[RFC5208] Kaliski, B., "Public-Key Cryptography Standards (PKCS) #8: Private-Key Information Syntax Specification Version 1.2", RFC 5208, May 2008.

[RFC5208]Kaliski,B.,“公钥密码标准(PKCS)#8:私钥信息语法规范版本1.2”,RFC 5208,2008年5月。

[X.520] ITU-T Recommendation X.520 (2005) | ISO/IEC 9594-6:2005, Information technology - Open Systems Interconnection - The Directory: Selected attribute types.

[X.520]ITU-T建议X.520(2005)| ISO/IEC 9594-6:2005,信息技术-开放系统互连-目录:选定的属性类型。

[RFC5915] Turner, S. and D. Brown, "Elliptic Curve Private Key Structure", RFC 5915, June 2010.

[RFC5915]Turner,S.和D.Brown,“椭圆曲线私钥结构”,RFC 59152010年6月。

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

This annex provides the normative ASN.1 definitions for the structures described in this specification using ASN.1 as defined in [X.680] through [X.683].

本附录使用[X.680]至[X.683]中定义的ASN.1为本规范中描述的结构提供了规范性ASN.1定义。

   AsymmetricKeyPackageModuleV1
     { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
       smime(16) modules(0) id-mod-asymmetricKeyPkgV1(50) }
        
   AsymmetricKeyPackageModuleV1
     { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
       smime(16) modules(0) id-mod-asymmetricKeyPkgV1(50) }
        
   DEFINITIONS IMPLICIT TAGS ::=
        
   DEFINITIONS IMPLICIT TAGS ::=
        

BEGIN

开始

-- EXPORTS ALL

--全部出口

IMPORTS

进口

-- FROM New SMIME ASN.1 [RFC5911]

--来自新SMIME ASN.1[RFC5911]

   Attribute{}, CONTENT-TYPE
    FROM CryptographicMessageSyntax-2009
      { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
        smime(16) modules(0) id-mod-cms-2004-02(41) }
        
   Attribute{}, CONTENT-TYPE
    FROM CryptographicMessageSyntax-2009
      { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
        smime(16) modules(0) id-mod-cms-2004-02(41) }
        
   -- From New PKIX ASN.1 [RFC5912]
   ATTRIBUTE
    FROM PKIX-CommonTypes-2009
      { iso(1) identified-organization(3) dod(6) internet(1)
        security(5) mechanisms(5) pkix(7) id-mod(0)
        id-mod-pkixCommon-02(57) }
        
   -- From New PKIX ASN.1 [RFC5912]
   ATTRIBUTE
    FROM PKIX-CommonTypes-2009
      { iso(1) identified-organization(3) dod(6) internet(1)
        security(5) mechanisms(5) pkix(7) id-mod(0)
        id-mod-pkixCommon-02(57) }
        

-- From New PKIX ASN.1 [RFC5912]

--来自新的PKIX ASN.1[RFC5912]

   AlgorithmIdentifier{}, ALGORITHM, PUBLIC-KEY, CONTENT-ENCRYPTION
     FROM AlgorithmInformation-2009
       { iso(1) identified-organization(3) dod(6) internet(1)
         security(5) mechanisms(5) pkix(7) id-mod(0)
         id-mod-algorithmInformation-02(58) }
        
   AlgorithmIdentifier{}, ALGORITHM, PUBLIC-KEY, CONTENT-ENCRYPTION
     FROM AlgorithmInformation-2009
       { iso(1) identified-organization(3) dod(6) internet(1)
         security(5) mechanisms(5) pkix(7) id-mod(0)
         id-mod-algorithmInformation-02(58) }
        

;

;

   ContentSet CONTENT-TYPE ::= {
    ct-asymmetric-key-package,
    ... -- Expect additional content types --
   }
        
   ContentSet CONTENT-TYPE ::= {
    ct-asymmetric-key-package,
    ... -- Expect additional content types --
   }
        
   ct-asymmetric-key-package CONTENT-TYPE ::=
    { AsymmetricKeyPackage IDENTIFIED BY id-ct-KP-aKeyPackage }
        
   ct-asymmetric-key-package CONTENT-TYPE ::=
    { AsymmetricKeyPackage IDENTIFIED BY id-ct-KP-aKeyPackage }
        
   id-ct-KP-aKeyPackage OBJECT IDENTIFIER ::=
     { joint-iso-itu-t(2) country(16) us(840) organization(1)
         gov(101) dod(2) infosec(1) formats(2)
         key-package-content-types(78) 5
     }
        
   id-ct-KP-aKeyPackage OBJECT IDENTIFIER ::=
     { joint-iso-itu-t(2) country(16) us(840) organization(1)
         gov(101) dod(2) infosec(1) formats(2)
         key-package-content-types(78) 5
     }
        
   AsymmetricKeyPackage ::= SEQUENCE SIZE (1..MAX) OF OneAsymmetricKey
        
   AsymmetricKeyPackage ::= SEQUENCE SIZE (1..MAX) OF OneAsymmetricKey
        
   OneAsymmetricKey ::= SEQUENCE {
     version                   Version,
     privateKeyAlgorithm       PrivateKeyAlgorithmIdentifier,
     privateKey                PrivateKey,
     attributes            [0] Attributes OPTIONAL,
     ...,
     [[2: publicKey        [1] PublicKey OPTIONAL ]],
     ...
   }
        
   OneAsymmetricKey ::= SEQUENCE {
     version                   Version,
     privateKeyAlgorithm       PrivateKeyAlgorithmIdentifier,
     privateKey                PrivateKey,
     attributes            [0] Attributes OPTIONAL,
     ...,
     [[2: publicKey        [1] PublicKey OPTIONAL ]],
     ...
   }
        
   PrivateKeyInfo ::= OneAsymmetricKey
        
   PrivateKeyInfo ::= OneAsymmetricKey
        
   -- PrivateKeyInfo is used by [P12]. If any items tagged as version
   -- 2 are used, the version must be v2, else the version should be
   -- v1. When v1, PrivateKeyInfo is the same as it was in [RFC5208].
        
   -- PrivateKeyInfo is used by [P12]. If any items tagged as version
   -- 2 are used, the version must be v2, else the version should be
   -- v1. When v1, PrivateKeyInfo is the same as it was in [RFC5208].
        
   Version ::= INTEGER { v1(0), v2(1) } (v1, ..., v2)
        
   Version ::= INTEGER { v1(0), v2(1) } (v1, ..., v2)
        
   PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
                                      { PUBLIC-KEY,
                                        { PrivateKeyAlgorithms } }
        
   PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
                                      { PUBLIC-KEY,
                                        { PrivateKeyAlgorithms } }
        
   PrivateKey ::= OCTET STRING
                     -- Content varies based on type of key. The
                     -- algorithm identifier dictates the format of
                     -- the key.
        
   PrivateKey ::= OCTET STRING
                     -- Content varies based on type of key. The
                     -- algorithm identifier dictates the format of
                     -- the key.
        
   PublicKey ::= BIT STRING
                     -- Content varies based on type of key. The
                     -- algorithm identifier dictates the format of
                     -- the key.
        
   PublicKey ::= BIT STRING
                     -- Content varies based on type of key. The
                     -- algorithm identifier dictates the format of
                     -- the key.
        
   Attributes ::= SET OF Attribute { { OneAsymmetricKeyAttributes } }
        
   Attributes ::= SET OF Attribute { { OneAsymmetricKeyAttributes } }
        
   OneAsymmetricKeyAttributes ATTRIBUTE ::= {
     ... -- For local profiles
   }
        
   OneAsymmetricKeyAttributes ATTRIBUTE ::= {
     ... -- For local profiles
   }
        
   -- An alternate representation that makes full use of ASN.1
   -- constraints follows.  Also note that PUBLIC-KEY needs to be
   -- imported from the new PKIX ASN.1 Algorithm Information module
   -- and PrivateKeyAlgorithms needs to be commented out.
        
   -- An alternate representation that makes full use of ASN.1
   -- constraints follows.  Also note that PUBLIC-KEY needs to be
   -- imported from the new PKIX ASN.1 Algorithm Information module
   -- and PrivateKeyAlgorithms needs to be commented out.
        
   -- OneAsymmetricKey ::= SEQUENCE {
   --  version                  Version,
   --  privateKeyAlgorithm      SEQUENCE {
   --   algorithm                 PUBLIC-KEY.&id({PublicKeySet}),
   --    parameters               PUBLIC-KEY.&Params({PublicKeySet}
   --                               {@privateKeyAlgorithm.algorithm})
   --                               OPTIONAL}
   --  privateKey               OCTET STRING (CONTAINING
   --                             PUBLIC-KEY.&PrivateKey({PublicKeySet}
   --                             {@privateKeyAlgorithm.algorithm})),
   --  attributes           [0] Attributes OPTIONAL,
   --  ...,
   --  [[2: publicKey       [1] BIT STRING (CONTAINING
   --                             PUBLIC-KEY.&Params({PublicKeySet}
   --                             {@privateKeyAlgorithm.algorithm})
   --                             OPTIONAL,
   --  ...
   --    }
        
   -- OneAsymmetricKey ::= SEQUENCE {
   --  version                  Version,
   --  privateKeyAlgorithm      SEQUENCE {
   --   algorithm                 PUBLIC-KEY.&id({PublicKeySet}),
   --    parameters               PUBLIC-KEY.&Params({PublicKeySet}
   --                               {@privateKeyAlgorithm.algorithm})
   --                               OPTIONAL}
   --  privateKey               OCTET STRING (CONTAINING
   --                             PUBLIC-KEY.&PrivateKey({PublicKeySet}
   --                             {@privateKeyAlgorithm.algorithm})),
   --  attributes           [0] Attributes OPTIONAL,
   --  ...,
   --  [[2: publicKey       [1] BIT STRING (CONTAINING
   --                             PUBLIC-KEY.&Params({PublicKeySet}
   --                             {@privateKeyAlgorithm.algorithm})
   --                             OPTIONAL,
   --  ...
   --    }
        
   EncryptedPrivateKeyInfo ::= SEQUENCE {
     encryptionAlgorithm  EncryptionAlgorithmIdentifier,
     encryptedData        EncryptedData }
        
   EncryptedPrivateKeyInfo ::= SEQUENCE {
     encryptionAlgorithm  EncryptionAlgorithmIdentifier,
     encryptedData        EncryptedData }
        
   EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
                                       { CONTENT-ENCRYPTION,
                                         { KeyEncryptionAlgorithms } }
        
   EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
                                       { CONTENT-ENCRYPTION,
                                         { KeyEncryptionAlgorithms } }
        
   EncryptedData ::= OCTET STRING -- Encrypted PrivateKeyInfo
        
   EncryptedData ::= OCTET STRING -- Encrypted PrivateKeyInfo
        
   PrivateKeyAlgorithms ALGORITHM ::= {
     ... -- Extensible
   }
        
   PrivateKeyAlgorithms ALGORITHM ::= {
     ... -- Extensible
   }
        
   KeyEncryptionAlgorithms ALGORITHM ::= {
     ... -- Extensible
   }
        
   KeyEncryptionAlgorithms ALGORITHM ::= {
     ... -- Extensible
   }
        

END

终止

Acknowledgements

致谢

Many thanks go out to the Burt Kaliski and Jim Randall at RSA. Without the prior version of the document, this one wouldn't exist.

非常感谢RSA的Burt Kaliski和Jim Randall。如果没有文档的先前版本,这个版本将不存在。

I'd also like to thank Pasi Eronen, Roni Even, Alfred Hoenes, Russ Housley, Jim Schaad, and Carl Wallace.

我还要感谢帕西·埃隆、甚至罗尼、阿尔弗雷德·霍恩斯、罗斯·霍斯利、吉姆·沙德和卡尔·华莱士。

Author's Address

作者地址

Sean Turner IECA, Inc. 3057 Nutley Street, Suite 106 Fairfax, VA 22031 USA

Sean Turner IECA,Inc.美国弗吉尼亚州费尔法克斯市努特利街3057号106室,邮编22031

   EMail: turners@ieca.com
        
   EMail: turners@ieca.com