Internet Engineering Task Force (IETF) S. Turner Request for Comments: 5959 IECA Category: Standards Track August 2010 ISSN: 2070-1721
Internet Engineering Task Force (IETF) S. Turner Request for Comments: 5959 IECA Category: Standards Track August 2010 ISSN: 2070-1721
Algorithms for Asymmetric Key Package Content Type
非对称密钥包内容类型的算法
Abstract
摘要
This document describes the conventions for using several cryptographic algorithms with the EncryptedPrivateKeyInfo structure, as defined in RFC 5958. It also includes conventions necessary to protect the AsymmetricKeyPackage content type with SignedData, EnvelopedData, EncryptedData, AuthenticatedData, and AuthEnvelopedData.
本文档描述了使用RFC 5958中定义的EncryptedPrivateKeyInfo结构的几种加密算法的约定。它还包括使用SignedData、EnvelopedData、EncryptedData、AuthenticatedData和AuthEnvelopedData保护AsymmetricKeyPackage内容类型所需的约定。
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/rfc5959.
有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc5959.
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 describes the conventions for using several cryptographic algorithms with the EncryptedPrivateKeyInfo structure [RFC5958]. The EncryptedPrivateKeyInfo is used by [P12] to encrypt PrivateKeyInfo [RFC5958]. It is similar to EncryptedData [RFC5652] in that it has no recipients, no originators, and no content encryption keys and requires keys to be managed by other means.
本文档描述了使用EncryptedPrivateKeyInfo结构[RFC5958]的几种加密算法的约定。[P12]使用EncryptedPrivateKeyInfo对PrivateKeyInfo[RFC5958]进行加密。它类似于EncryptedData[RFC5652],因为它没有收件人、发起者和内容加密密钥,并且需要通过其他方式管理密钥。
This document also includes conventions necessary to protect the AsymmetricKeyPackage content type [RFC5958] with Cryptographic Message Syntax (CMS) protecting content types: SignedData [RFC5652], EnvelopedData [RFC5652], EncryptedData [RFC5652], AuthenticatedData [RFC5652], and AuthEnvelopedData [RFC5083]. Implementations of AsymmetricKeyPackage do not require support for any CMS protecting content type; however, if the AsymmetricKeyPackage is CMS protected it is RECOMMENDED that conventions defined herein be followed.
本文档还包括使用加密消息语法(CMS)保护内容类型来保护AsymmetricKeyPackage内容类型[RFC5958]所需的约定:SignedData[RFC5652]、EnvelopedData[RFC5652]、EncryptedData[RFC5652]、AuthenticatedData[RFC5652]和AuthEnvelopedData[RFC5083]。AsymmetricKeyPackage的实现不需要支持任何CMS保护内容类型;但是,如果非对称密钥包受CMS保护,建议遵循本文定义的约定。
This document does not define any new algorithms instead it refers to previously defined algorithms.
本文档未定义任何新算法,而是参考先前定义的算法。
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]中所述进行解释。
The de facto standard used to encrypt the PrivateKeyInfo structure, which is subsequently placed in the EncryptedPrivateKeyInfo encryptedData field, is Password Based Encryption (PBE) based on PKCS #5 [RFC2898] and PKCS #12 [P12]. The major difference between PKCS #5 and PKCS #12 is the supported encoding for the password: ASCII for PKCS #5 and Unicode for PKCS #12, encoded as specified in Section B.1 of [P12]. [RFC2898] specifies two PBE Schemes (PBES) 1 and 2; [RFC2898] recommends PBES2 for new specification. PBES2 with a key derivation algorithm of PBKDF2 using HMAC with SHA-256 [RFC5754] and an encryption algorithm of AES Key Wrap with Padding as defined in [RFC5649] MUST be supported. AES-256 Key Wrap with Padding [RFC5649] MAY also be supported as an encryption algorithm.
用于加密PrivateKeyInfo结构(随后放入EncryptedPrivateKeyInfo encryptedData字段)的事实标准是基于PKCS#5[RFC2898]和PKCS#12[P12]的密码加密(PBE)。PKCS#5和PKCS#12之间的主要区别在于支持的密码编码:ASCII表示PKCS#5,Unicode表示PKCS#12,按照[P12]第B.1节的规定进行编码。[RFC2898]指定了两个PBE方案(PBE)1和2;[RFC2898]建议PBES2用于新规范。必须支持使用HMAC和SHA-256[RFC5754]的PBKDF2密钥派生算法的PBES2以及[RFC5649]中定义的带填充的AES密钥包裹加密算法。加密算法也可能支持带填充的AES-256密钥换行[RFC5649]。
As noted in Asymmetric Key Packages [RFC5958], CMS can be used to protect the AsymmetricKeyPackage. The following provides guidance for SignedData [RFC5652], EnvelopedData [RFC5652], EncryptedData
如不对称密钥包[RFC5958]中所述,CMS可用于保护不对称密钥包。以下为SignedData[RFC5652]、EnvelopedData[RFC5652]和EncryptedData提供了指导
[RFC5652], AuthenticatedData [RFC5652], and AuthEnvelopedData [RFC5083].
[RFC5652]、身份验证数据[RFC5652]和身份验证信封数据[RFC5083]。
If an implementation supports SignedData, then it MUST support the signature scheme RSA [RFC3370] [RFC5754] and SHOULD support the signature schemes RSASSA-PSS [RFC4056] and DSA [RFC3370] [RFC5754]. Additionally, implementations MUST support in concert with these signature schemes the hash function SHA-256 [RFC5754] and SHOULD support the hash function SHA-1 [RFC3370].
如果实现支持SignedData,那么它必须支持签名方案RSA[RFC3370][RFC5754],并且应该支持签名方案RSASSA-PSS[RFC4056]和DSA[RFC3370][RFC5754]。此外,实现必须与这些签名方案一起支持哈希函数SHA-256[RFC5754],并且应该支持哈希函数SHA-1[RFC3370]。
If an implementation supports EnvelopedData, then it MUST implement key transport and it MAY implement key agreement.
如果实现支持EnvelopedData,那么它必须实现密钥传输,并且可以实现密钥协议。
When key transport is used, RSA encryption [RFC3370] MUST be supported and RSAES-OAEP (RSA Encryption Scheme - Optimal Asymmetric Encryption Padding) [RFC3560] SHOULD be supported.
使用密钥传输时,必须支持RSA加密[RFC3370],并且应支持RSAES-OAEP(RSA加密方案-最佳非对称加密填充)[RFC3560]。
When key agreement is used, Diffie-Hellman (DH) ephemeral-static [RFC3370] MUST be supported.
使用密钥协议时,必须支持Diffie-Hellman(DH)瞬时静态[RFC3370]。
Since the content type is used to carry a cryptographic key and its attributes, an algorithm that is traditionally used to encrypt one key with another is employed. Regardless of the key management technique choice, implementations MUST support AES-128 Key Wrap with Padding [RFC5649] as the content encryption algorithm. Implementations SHOULD support AES-256 Key Wrap with Padding [RFC5649] as the content encryption algorithm.
由于内容类型用于携带加密密钥及其属性,因此采用了传统上用于用一个密钥加密另一个密钥的算法。无论选择何种密钥管理技术,实现都必须支持AES-128密钥封装和填充[RFC5649]作为内容加密算法。实现应支持使用填充[RFC5649]作为内容加密算法的AES-256密钥换行。
When key agreement is used, a key wrap algorithm is also specified to wrap the content encryption key. If the content encryption algorithm is AES-128 Key Wrap with Padding, then the key wrap algorithm MUST be AES-128 Key Wrap with Padding [RFC5649]. If the content encryption algorithm is AES-256 Key Wrap with Padding, then the key wrap algorithm MUST be AES-256 Key Wrap with Padding [RFC5649].
使用密钥协议时,还指定密钥包装算法来包装内容加密密钥。如果内容加密算法是带填充的AES-128密钥包裹,则密钥包裹算法必须是带填充的AES-128密钥包裹[RFC5649]。如果内容加密算法是带填充的AES-256密钥包裹,则密钥包裹算法必须是带填充的AES-256密钥包裹[RFC5649]。
If an implementation supports EncryptedData, then it MUST implement AES-128 Key Wrap with Padding [RFC5649] and SHOULD implement AES-256 Key Wrap with Padding [RFC5649].
如果实现支持EncryptedData,则必须实现带填充[RFC5649]的AES-128密钥换行,并应实现带填充[RFC5649]的AES-256密钥换行。
NOTE: EncryptedData requires that keys be managed by other means; therefore, the only algorithm specified is the content encryption algorithm. Since the content type is used to carry a cryptographic key and its attributes, an algorithm that is traditionally used to encrypt one key with another is employed.
注:EncryptedData要求通过其他方式管理密钥;因此,指定的唯一算法是内容加密算法。由于内容类型用于携带加密密钥及其属性,因此采用了传统上用于用一个密钥加密另一个密钥的算法。
If an implementation supports AuthenticatedData, then it MUST implement SHA-256 [RFC5754] and SHOULD support SHA-1 [RFC3370] as the message digest algorithm. Additionally, HMAC with SHA-256 [RFC4231] MUST be supported and HMAC with SHA-1 [RFC3370] SHOULD be supported.
如果实现支持AuthenticatedData,那么它必须实现SHA-256[RFC5754],并且应该支持SHA-1[RFC3370]作为消息摘要算法。此外,必须支持带有SHA-256[RFC4231]的HMAC,并且应支持带有SHA-1[RFC3370]的HMAC。
If an implementation supports AuthEnvelopedData, then it MUST implement the EnvelopedData recommendations except for the content encryption algorithm, which in this case MUST be AES-GCM [RFC5084]; the 128-bit version MUST be implemented and the 256-bit version SHOULD be implemented. Implementations MAY also support for AES-CCM [RFC5084].
如果实现支持AuthEnvelopedData,则必须实现EnvelopedData建议,内容加密算法除外,在本例中,该算法必须为AES-GCM[RFC5084];必须实现128位版本,应实现256位版本。实现也可能支持AES-CCM[RFC5084]。
The easiest way to implement the SignedData, EnvelopedData, and AuthEnvelopedData is with public key certificates [RFC5280]. If an implementation support RSA, RSASSA-PSS, DSS, RSAES-OAEP, or DH, then it MUST support key lengths from 1024-bit to 2048-bit, inclusive.
实现SignedData、EnvelopedData和AuthEnvelopedData的最简单方法是使用公钥证书[RFC5280]。如果实现支持RSA、RSASSA-PSS、DSS、RSAES-OAEP或DH,则它必须支持1024位到2048位(包括1024位)的密钥长度。
[RFC5751] defines the SMIMECapabilities attribute as a mechanism for recipients to indicate their supported capabilities including the algorithms they support. The following are values for the SMIMECapabilities attribute for AES Key Wrap with Padding [RFC5649] when used as a content encryption algorithm:
[RFC5751]将SMIMECapabilities属性定义为收件人指示其支持的功能(包括其支持的算法)的机制。以下是用作内容加密算法时带填充[RFC5649]的AES密钥换行的SMIMECapabilities属性的值:
AES-128 KW with Padding: 30 0d 06 09 60 86 48 01 65 03 04 01 08 AES-192 KW with Padding: 30 0d 06 09 60 86 48 01 65 03 04 01 1C AES-256 KW with Padding: 30 0d 06 09 60 86 48 01 65 03 04 01 30
AES-128千瓦带填料:30 0d 06 09 60 86 48 01 65 03 04 01 08 AES-192千瓦带填料:30 0d 06 09 60 86 48 01 65 03 04 01 1C AES-256千瓦带填料:30 0d 06 09 60 86 48 01 65 03 01 30
The security considerations from [RFC3370], [RFC3560], [RFC4056], [RFC4231], [RFC5083], [RFC5084], [RFC5649], [RFC5652], [RFC5754], and [RFC5958] apply.
[RFC3370]、[RFC3560]、[RFC4056]、[RFC4231]、[RFC5083]、[RFC5084]、[RFC5649]、[RFC5652]、[RFC5754]和[RFC5958]中的安全注意事项适用。
The strength of any encryption scheme is only as good as its weakest link, which in the case of a PBES is the password. Passwords need to provide sufficient entropy to ensure they cannot be easily guessed. The U.S. National Institute of Standards and Technology (NIST) Electronic Authentication Guidance [SP800-63] provides some information on password entropy. [SP800-63] indicates that a user-chosen 20-character password from a 94-character keyboard with no checks provides 36 bits of entropy. If the 20-character password is randomly chosen, then the amount of entropy is increased to roughly 131 bits of entropy. The amount of entropy in the password does not correlate directly to bits of security but in general the more than the better.
任何加密方案的强度都取决于其最薄弱的环节,在PBES的情况下,这是密码。密码需要提供足够的熵,以确保它们不容易被猜测。美国国家标准与技术研究所(NIST)电子认证指南[SP800-63]提供了一些关于密码熵的信息。[SP800-63]表示用户从94个字符的键盘上选择20个字符的密码,而不进行任何检查,可以提供36位的熵。如果随机选择20个字符的密码,那么熵的大小将增加到大约131位。密码中的熵大小与安全性的位数没有直接的关系,但一般来说是越多越好。
The choice of content encryption algorithms for this document was based on [RFC5649]: "In the design of some high assurance cryptographic modules, it is desirable to segregate cryptographic keying material from other data. The use of a specific cryptographic mechanism solely for the protection of cryptographic keying material can assist in this goal". Unfortunately, there is no AES-GCM or AES-CCM mode that provides the same properties. If an AES-GCM and AES-CCM mode that provides the same properties is defined, then this document will be updated to adopt that algorithm.
本文档内容加密算法的选择基于[RFC5649]:“在一些高保证加密模块的设计中,需要将加密密钥材料与其他数据分离。仅为保护加密密钥材料而使用特定加密机制有助于实现这一目标“。遗憾的是,没有提供相同属性的AES-GCM或AES-CCM模式。如果定义了提供相同属性的AES-GCM和AES-CCM模式,则本文件将更新以采用该算法。
[SP800-57] provides comparable bits of security for some algorithms and key sizes. [SP800-57] also provides time frames during which certain numbers of bits of security are appropriate and some environments may find these time frames useful.
[SP800-57]为某些算法和密钥大小提供了可比的安全性。[SP800-57]还提供了时间框架,在此期间,一定数量的安全位是合适的,一些环境可能会发现这些时间框架很有用。
[P12] RSA Laboratories, "PKCS #12 v1.0: Personal Information Exchange Syntax", June 1999.
[P12]RSA实验室,“PKCS#12 v1.0:个人信息交换语法”,1999年6月。
[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月。
[RFC2898] Kaliski, B., "PKCS #5: Password-Based Cryptography Specification Version 2.0", RFC 2898, September 2000.
[RFC2898]Kaliski,B.,“PKCS#5:基于密码的加密规范版本2.0”,RFC 28982000年9月。
[RFC3370] Housley, R., "Cryptographic Message Syntax (CMS) Algorithms", RFC 3370, August 2002.
[RFC3370]Housley,R.,“加密消息语法(CMS)算法”,RFC3370,2002年8月。
[RFC3560] Housley, R., "Use of the RSAES-OAEP Key Transport Algorithm in Cryptographic Message Syntax (CMS)", RFC 3560, July 2003.
[RFC3560]Housley,R.,“在加密消息语法(CMS)中使用RSAES-OAEP密钥传输算法”,RFC 3560,2003年7月。
[RFC4056] Schaad, J., "Use of the RSASSA-PSS Signature Algorithm in Cryptographic Message Syntax (CMS)", RFC 4056, June 2005.
[RFC4056]Schaad,J.,“在加密消息语法(CMS)中使用RSASSA-PSS签名算法”,RFC 4056,2005年6月。
[RFC4231] Nystrom, M., "Identifiers and Test Vectors for HMAC-SHA-224, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512", RFC 4231, December 2005.
[RFC4231]Nystrom,M.“HMAC-SHA-224、HMAC-SHA-256、HMAC-SHA-384和HMAC-SHA-512的标识符和测试向量”,RFC 42312005年12月。
[RFC5083] Housley, R., "Cryptographic Message Syntax (CMS) Authenticated-Enveloped-Data Content Type", RFC 5083, November 2007.
[RFC5083]Housley,R.,“加密消息语法(CMS)认证的信封数据内容类型”,RFC 5083,2007年11月。
[RFC5084] Housley, R., "Using AES-CCM and AES-GCM Authenticated Encryption in the Cryptographic Message Syntax (CMS)", RFC 5084, November 2007.
[RFC5084]Housley,R.,“在加密消息语法(CMS)中使用AES-CCM和AES-GCM认证加密”,RFC 5084,2007年11月。
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, May 2008.
[RFC5280]Cooper,D.,Santesson,S.,Farrell,S.,Boeyen,S.,Housley,R.,和W.Polk,“Internet X.509公钥基础设施证书和证书撤销列表(CRL)配置文件”,RFC 52802008年5月。
[RFC5649] Housley, R. and M. Dworkin, "Advanced Encryption Standard (AES) Key Wrap with Padding Algorithm", RFC 5649, September 2009.
[RFC5649]Housley,R.和M.Dworkin,“带填充算法的高级加密标准(AES)密钥封装”,RFC 5649,2009年9月。
[RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, RFC 5652, September 2009.
[RFC5652]Housley,R.,“加密消息语法(CMS)”,STD 70,RFC 56522009年9月。
[RFC5751] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 Message Specification", RFC 5751, January 2010.
[RFC5751]Ramsdell,B.和S.Turner,“安全/多用途Internet邮件扩展(S/MIME)版本3.2消息规范”,RFC 57512010年1月。
[RFC5754] Turner, S., "Using SHA2 Algorithms with Cryptographic Message Syntax", RFC 5754, January 2010.
[RFC5754]Turner,S.,“将SHA2算法与加密消息语法结合使用”,RFC 5754,2010年1月。
[RFC5958] Turner, S., "Asymmetric Key Packages", RFC 5958, August 2010.
[RFC5958]Turner,S.,“非对称密钥包”,RFC 5958,2010年8月。
[SP800-57] National Institute of Standards and Technology (NIST), Special Publication 800-57: Recommendation for Key Management - Part 1 (Revised), March 2007.
[SP800-57]国家标准与技术研究所(NIST),特别出版物800-57:关键管理建议-第1部分(修订版),2007年3月。
[SP800-63] National Institute of Standards and Technology (NIST), Special Publication 800-63: Electronic Authentication Guidance, April 2006.
[SP800-63]国家标准与技术研究所(NIST),专门出版物800-63:电子认证指南,2006年4月。
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