Network Working Group                                         B. Kaliski
Request for Comments: 5208                                           EMC
Category: Informational                                         May 2008
        
Network Working Group                                         B. Kaliski
Request for Comments: 5208                                           EMC
Category: Informational                                         May 2008
        

Public-Key Cryptography Standards (PKCS) #8: Private-Key Information Syntax Specification Version 1.2

公钥加密标准(PKCS)#8:私钥信息语法规范1.2版

Status of This Memo

关于下段备忘

This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.

本备忘录为互联网社区提供信息。它没有规定任何类型的互联网标准。本备忘录的分发不受限制。

IESG Note

IESG注释

The IESG thanks RSA Laboratories for transferring change control to the IETF. Enhancements to this specification that preserve backward compatibility are expected in an upcoming IETF standards track document.

IESG感谢RSA实验室将变更控制转移到IETF。预计在即将发布的IETF标准跟踪文档中会对本规范进行增强,以保持向后兼容性。

Abstract

摘要

This document represents a republication of PKCS #8 v1.2 from RSA Laboratories' Public Key Cryptography Standard (PKCS) series. Change control is transferred to the IETF. The body of this document, except for the security considerations section, is taken directly from the PKCS #8 v1.2 specification.

本文档是RSA实验室公钥加密标准(PKCS)系列PKCS#8 v1.2的再版。变更控制转移到IETF。除安全注意事项部分外,本文档正文直接取自PKCS#8 v1.2规范。

This document describes a syntax for private-key information.

本文档描述了私钥信息的语法。

Table of Contents

目录

   1. Introduction ....................................................2
   2. Definitions .....................................................2
   3. Symbols and Abbreviations .......................................2
   4. General Overview ................................................2
   5. Private-Key Information Syntax ..................................3
   6. Encrypted Private-Key Information Syntax ........................4
   7. Security Considerations .........................................4
   Appendix A. ASN.1 Syntax ...........................................5
   Informative References .............................................6
        
   1. Introduction ....................................................2
   2. Definitions .....................................................2
   3. Symbols and Abbreviations .......................................2
   4. General Overview ................................................2
   5. Private-Key Information Syntax ..................................3
   6. Encrypted Private-Key Information Syntax ........................4
   7. Security Considerations .........................................4
   Appendix A. ASN.1 Syntax ...........................................5
   Informative References .............................................6
        
1. Introduction
1. 介绍

This document describes a syntax for private-key information. Private-key information includes a private key for some public-key algorithm and a set of attributes. The document also describes a syntax for encrypted private keys. A password-based encryption algorithm (e.g., one of those described in [PKCS#5]) could be used to encrypt the private-key information.

本文档描述了私钥信息的语法。私钥信息包括一些公钥算法的私钥和一组属性。该文档还描述了加密私钥的语法。可以使用基于密码的加密算法(例如[PKCS#5]中描述的算法之一)来加密私钥信息。

The intention of including a set of attributes is to provide a simple way for a user to establish trust in information such as a distinguished name or a top-level certification authority's public key. While such trust could also be established with a digital signature, encryption with a secret key known only to the user is just as effective and possibly easier to implement. A non-exhaustive list of attributes is given in [PKCS#9].

包含一组属性的目的是为用户提供一种简单的方法来建立对信息的信任,例如可分辨名称或顶级证书颁发机构的公钥。虽然这种信任也可以通过数字签名建立,但使用只有用户知道的密钥进行加密同样有效,而且可能更容易实现。[PKCS#9]中给出了非详尽的属性列表。

2. Definitions
2. 定义

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

在本文件中,以下定义适用。

AlgorithmIdentifier: A type that identifies an algorithm (by object identifier) and any associated parameters. This type is defined in [X.509].

AlgorithmIdentifier:识别算法(通过对象标识符)和任何相关参数的类型。此类型在[X.509]中定义。

ASN.1: Abstract Syntax Notation One, as defined in [X.208].

ASN.1:抽象语法符号1,如[X.208]中所定义。

Attribute: A type that contains an attribute type (specified by object identifier) and one or more attribute values. This type is defined in [X.501].

属性:包含属性类型(由对象标识符指定)和一个或多个属性值的类型。此类型在[X.501]中定义。

BER: Basic Encoding Rules, as defined in [X.209].

BER:基本编码规则,定义见[X.209]。

3. Symbols and Abbreviations
3. 符号和缩写

No symbols or abbreviations are defined in this document.

本文件中未定义任何符号或缩写。

4. General Overview
4. 概述

The next two sections specify private-key information syntax and encrypted private-key information syntax.

接下来的两部分指定私钥信息语法和加密私钥信息语法。

This document exports two types: PrivateKeyInfo (Section 6) and EncryptedPrivateKeyInfo (Section 7).

本文档导出两种类型:PrivateKeyInfo(第6节)和EncryptedPrivateKeyInfo(第7节)。

5. Private-Key Information Syntax
5. 私钥信息语法

This section gives the syntax for private-key information.

本节给出私钥信息的语法。

Private-key information shall have ASN.1 type PrivateKeyInfo:

私钥信息应具有ASN.1类型的私钥信息:

      PrivateKeyInfo ::= SEQUENCE {
        version                   Version,
        privateKeyAlgorithm       PrivateKeyAlgorithmIdentifier,
        privateKey                PrivateKey,
        attributes           [0]  IMPLICIT Attributes OPTIONAL }
        
      PrivateKeyInfo ::= SEQUENCE {
        version                   Version,
        privateKeyAlgorithm       PrivateKeyAlgorithmIdentifier,
        privateKey                PrivateKey,
        attributes           [0]  IMPLICIT Attributes OPTIONAL }
        
      Version ::= INTEGER
        
      Version ::= INTEGER
        
      PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
        
      PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
        
      PrivateKey ::= OCTET STRING
        
      PrivateKey ::= OCTET STRING
        
      Attributes ::= SET OF Attribute
        
      Attributes ::= SET OF Attribute
        

The fields of type PrivateKeyInfo have the following meanings:

PrivateKeyInfo类型的字段具有以下含义:

version is the syntax version number, for compatibility with future revisions of this document. It shall be 0 for this version of the document.

version是语法版本号,用于与本文档的未来版本兼容。此版本的文件应为0。

privateKeyAlgorithm identifies the private-key algorithm. One example of a private-key algorithm is PKCS #1's rsaEncryption [PKCS#1].

privateKeyAlgorithm识别私钥算法。私钥算法的一个例子是PKCS#1的RSA加密[PKCS#1]。

privateKey is an octet string whose contents are the value of the private key. The interpretation of the contents is defined in the registration of the private-key algorithm. For an RSA private key, for example, the contents are a BER encoding of a value of type RSAPrivateKey.

privateKey是一个八位字符串,其内容是私钥的值。内容的解释在私钥算法的注册中定义。例如,对于RSA私钥,内容是RSAPrivateKey类型值的BER编码。

attributes is a set of attributes. These are the extended information that is encrypted along with the private-key information.

属性是一组属性。这些是与私钥信息一起加密的扩展信息。

6. Encrypted Private-Key Information Syntax
6. 加密私钥信息语法

This section gives the syntax for encrypted private-key information.

本节给出加密私钥信息的语法。

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
        
      EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
        
      EncryptedData ::= OCTET STRING
        
      EncryptedData ::= OCTET STRING
        

The fields of type EncryptedPrivateKeyInfo have the following meanings:

EncryptedPrivateKeyInfo类型的字段具有以下含义:

encryptionAlgorithm identifies the algorithm under which the private-key information is encrypted. Two examples are PKCS #5's pbeWithMD2AndDES-CBC and pbeWithMD5AndDES-CBC [PKCS#5].

encryptionAlgorithm识别加密私钥信息的算法。两个例子是PKCS#5的PBewithmd2和DES CBC以及PBewithmd5和DES CBC[PKCS#5]。

encryptedData is the result of encrypting the private-key information.

encryptedData是加密私钥信息的结果。

The encryption process involves the following two steps:

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

1. The private-key information is BER encoded, yielding an octet string.

1. 私钥信息经过BER编码,产生八位字节字符串。

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的结果使用密钥加密,以给出加密过程的结果八位字节字符串。

7. Security Considerations
7. 安全考虑

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.

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

Appendix A. ASN.1 Syntax
附录A.ASN.1语法
PKCS-8 {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-8(8)
         modules(1) pkcs-8(1)}
        
PKCS-8 {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-8(8)
         modules(1) pkcs-8(1)}
        

-- $Revision: 1.5 $

--$修订:1.5$

-- This module has been checked for conformance with the ASN.1
-- standard by the OSS ASN.1 Tools
        
-- This module has been checked for conformance with the ASN.1
-- standard by the OSS ASN.1 Tools
        
DEFINITIONS IMPLICIT TAGS ::=
        
DEFINITIONS IMPLICIT TAGS ::=
        

BEGIN

开始

-- EXPORTS All --
-- All types and values defined in this module is exported for use in
-- other ASN.1 modules.
        
-- EXPORTS All --
-- All types and values defined in this module is exported for use in
-- other ASN.1 modules.
        

IMPORTS

进口

informationFramework
         FROM UsefulDefinitions {joint-iso-itu-t(2) ds(5) module(1)
                                 usefulDefinitions(0) 3}
        
informationFramework
         FROM UsefulDefinitions {joint-iso-itu-t(2) ds(5) module(1)
                                 usefulDefinitions(0) 3}
        

Attribute FROM InformationFramework informationFramework

来自InformationFramework的属性InformationFramework

AlgorithmIdentifier, ALGORITHM-IDENTIFIER
         FROM PKCS-5 {iso(1) member-body(2) us(840) rsadsi(113549)
         pkcs(1) pkcs-5(5) modules(16) pkcs-5(1)};
        
AlgorithmIdentifier, ALGORITHM-IDENTIFIER
         FROM PKCS-5 {iso(1) member-body(2) us(840) rsadsi(113549)
         pkcs(1) pkcs-5(5) modules(16) pkcs-5(1)};
        

-- Private-key information syntax

--私钥信息语法

PrivateKeyInfo ::= SEQUENCE {
   version Version,
   privateKeyAlgorithm AlgorithmIdentifier {{PrivateKeyAlgorithms}},
   privateKey PrivateKey,
   attributes [0] Attributes OPTIONAL }
        
PrivateKeyInfo ::= SEQUENCE {
   version Version,
   privateKeyAlgorithm AlgorithmIdentifier {{PrivateKeyAlgorithms}},
   privateKey PrivateKey,
   attributes [0] Attributes OPTIONAL }
        
Version ::= INTEGER {v1(0)} (v1,...)
        
Version ::= INTEGER {v1(0)} (v1,...)
        
PrivateKey ::= OCTET STRING
        
PrivateKey ::= OCTET STRING
        
Attributes ::= SET OF Attribute
        
Attributes ::= SET OF Attribute
        

-- Encrypted private-key information syntax

--加密私钥信息语法

EncryptedPrivateKeyInfo ::= SEQUENCE {
    encryptionAlgorithm AlgorithmIdentifier {{KeyEncryptionAlgorithms}},
    encryptedData EncryptedData
}
        
EncryptedPrivateKeyInfo ::= SEQUENCE {
    encryptionAlgorithm AlgorithmIdentifier {{KeyEncryptionAlgorithms}},
    encryptedData EncryptedData
}
        
EncryptedData ::= OCTET STRING
        
EncryptedData ::= OCTET STRING
        
PrivateKeyAlgorithms ALGORITHM-IDENTIFIER ::= {
     ... -- For local profiles
}
        
PrivateKeyAlgorithms ALGORITHM-IDENTIFIER ::= {
     ... -- For local profiles
}
        
KeyEncryptionAlgorithms ALGORITHM-IDENTIFIER ::= {
     ... -- For local profiles
}
        
KeyEncryptionAlgorithms ALGORITHM-IDENTIFIER ::= {
     ... -- For local profiles
}
        

END

终止

Informative References

资料性引用

[PKCS#1] RSA Laboratories. PKCS #1: RSA Encryption Standard. Version 1.5, November 1993.

[PKCS#1]RSA实验室。PKCS#1:RSA加密标准。1.5版,1993年11月。

[PKCS#5] RSA Laboratories. PKCS #5: Password-Based Encryption Standard. Version 1.5, November 1993.

[PKCS#5]RSA实验室。PKCS#5:基于密码的加密标准。1.5版,1993年11月。

[PKCS#9] RSA Laboratories. PKCS #9: Selected Attribute Types. Version 1.1, November 1993.

[PKCS#9]RSA实验室。PKCS#9:选定的属性类型。1.1版,1993年11月。

[X.208] CCITT. Recommendation X.208: Specification of Abstract Syntax Notation One (ASN.1). 1988.

[X.208]CCITT。建议X.208:抽象语法符号1(ASN.1)的规范。1988

[X.209] CCITT. Recommendation X.209: Specification of Basic Encoding Rules for Abstract Syntax Notation One (ASN.1). 1988.

[X.209]CCITT。建议X.209:抽象语法符号1(ASN.1)的基本编码规则规范。1988

[X.501] CCITT. Recommendation X.501: The Directory - Models. 1988.

[X.501]CCITT。建议X.501:目录-模型。1988

[X.509] CCITT. Recommendation X.509: The Directory - Authentication Framework. 1988.

[X.509]CCITT。建议X.509:目录认证框架。1988

Author's Addresses

作者地址

Burt Kaliski EMC Corporation 176 South Street Hopkinton, MA 01748 USA

美国马萨诸塞州霍普金顿南街176号Burt Kaliski EMC Corporation 01748

   EMail: kaliski_burt@emc.com
        
   EMail: kaliski_burt@emc.com
        

Full Copyright Statement

完整版权声明

Copyright (C) The IETF Trust (2008).

版权所有(C)IETF信托基金(2008年)。

This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.

本文件受BCP 78中包含的权利、许可和限制的约束,除其中规定外,作者保留其所有权利。

This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件及其包含的信息以“原样”为基础提供,贡献者、他/她所代表或赞助的组织(如有)、互联网协会、IETF信托基金和互联网工程任务组不承担任何明示或暗示的担保,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Intellectual Property

知识产权

The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.

IETF对可能声称与本文件所述技术的实施或使用有关的任何知识产权或其他权利的有效性或范围,或此类权利下的任何许可可能或可能不可用的程度,不采取任何立场;它也不表示它已作出任何独立努力来确定任何此类权利。有关RFC文件中权利的程序信息,请参见BCP 78和BCP 79。

Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.

向IETF秘书处披露的知识产权副本和任何许可证保证,或本规范实施者或用户试图获得使用此类专有权利的一般许可证或许可的结果,可从IETF在线知识产权存储库获取,网址为http://www.ietf.org/ipr.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.

IETF邀请任何相关方提请其注意任何版权、专利或专利申请,或其他可能涵盖实施本标准所需技术的专有权利。请将信息发送至IETF的IETF-ipr@ietf.org.