Internet Engineering Task Force (IETF)                      S. Josefsson
Request for Comments: 6070                                        SJD AB
Category: Informational                                     January 2011
ISSN: 2070-1721
        
Internet Engineering Task Force (IETF)                      S. Josefsson
Request for Comments: 6070                                        SJD AB
Category: Informational                                     January 2011
ISSN: 2070-1721
        

PKCS #5: Password-Based Key Derivation Function 2 (PBKDF2) Test Vectors

PKCS#5:基于密码的密钥派生函数2(PBKDF2)测试向量

Abstract

摘要

This document contains test vectors for the Public-Key Cryptography Standards (PKCS) #5 Password-Based Key Derivation Function 2 (PBKDF2) with the Hash-based Message Authentication Code (HMAC) Secure Hash Algorithm (SHA-1) pseudorandom function.

本文档包含公钥加密标准(PKCS)#5基于密码的密钥派生函数2(PBKDF2)和基于散列的消息身份验证码(HMAC)安全散列算法(SHA-1)伪随机函数的测试向量。

Status of This Memo

关于下段备忘

This document is not an Internet Standards Track specification; it is published for informational purposes.

本文件不是互联网标准跟踪规范;它是为了提供信息而发布的。

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). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 5741.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。并非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/rfc6070.

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

Copyright Notice

版权公告

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

版权所有(c)2011 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许可证中所述的无担保。

Table of Contents

目录

   1. Introduction ....................................................2
   2. PBKDF2 HMAC-SHA1 Test Vectors ...................................2
   3. Acknowledgements ................................................4
   4. Copying Conditions ..............................................4
   5. Security Considerations .........................................4
   6. References ......................................................4
      6.1. Normative References .......................................4
      6.2. Informative References .....................................5
        
   1. Introduction ....................................................2
   2. PBKDF2 HMAC-SHA1 Test Vectors ...................................2
   3. Acknowledgements ................................................4
   4. Copying Conditions ..............................................4
   5. Security Considerations .........................................4
   6. References ......................................................4
      6.1. Normative References .......................................4
      6.2. Informative References .....................................5
        
1. Introduction
1. 介绍

The Public-Key Cryptography Standards (PKCS) #5 [RFC2898] Password-Based Key Derivation Function 2 (PBKDF2) is used by several protocols to derive encryption keys from a password.

公钥加密标准(PKCS)#5[RFC2898]基于密码的密钥派生函数2(PBKDF2)被多个协议用于从密码派生加密密钥。

For example, Salted Challenge Response Authentication Mechanism (SCRAM) [RFC5802] uses PBKDF2 with Hash-based Message Authentication Code (HMAC) [RFC2104] and Secure Hash Algorithm (SHA-1) [FIPS.180-1.1995].

例如,Salted质询-响应认证机制(SCRAM)[RFC5802]使用PBKDF2和基于散列的消息认证码(HMAC)[RFC2104]和安全散列算法(SHA-1)[FIPS.180-1.1995]。

Test vectors for the algorithm were not included in the original specification, but are often useful for implementers. This document addresses the shortcoming.

算法的测试向量未包含在原始规范中,但通常对实现人员有用。本文件解决了这一缺点。

2. PBKDF2 HMAC-SHA1 Test Vectors
2. PBKDF2 HMAC-SHA1测试向量

The input strings below are encoded using ASCII [ANSI.X3-4.1986]. The sequence "\0" (without quotation marks) means a literal ASCII NUL value (1 octet). "DK" refers to the Derived Key.

下面的输入字符串使用ASCII[ANSI.X3-4.1986]编码。序列“\0”(不带引号)表示文字ASCII NUL值(1个八位字节)。“DK”是指派生密钥。

Input: P = "password" (8 octets) S = "salt" (4 octets) c = 1 dkLen = 20

输入:P=“password”(8个八位组)S=“salt”(4个八位组)c=1 dkLen=20

Output: DK = 0c 60 c8 0f 96 1f 0e 71 f3 a9 b5 24 af 60 12 06 2f e0 37 a6 (20 octets)

输出:DK=0c 60 c8 0f 96 1f 0e 71 f3 a9 b5 24 af 60 12 06 2f e0 37 a6(20个八位组)

Input: P = "password" (8 octets) S = "salt" (4 octets) c = 2 dkLen = 20

输入:P=“password”(8个八位组)S=“salt”(4个八位组)c=2 dkLen=20

Output: DK = ea 6c 01 4d c7 2d 6f 8c cd 1e d9 2a ce 1d 41 f0 d8 de 89 57 (20 octets)

输出:DK=ea 6c 01 4d c7 2d 6f 8c cd 1e d9 2a ce 1d 41 f0 d8 de 89 57(20个八位组)

Input: P = "password" (8 octets) S = "salt" (4 octets) c = 4096 dkLen = 20

输入:P=“password”(8个八位组)S=“salt”(4个八位组)c=4096 dkLen=20

Output: DK = 4b 00 79 01 b7 65 48 9a be ad 49 d9 26 f7 21 d0 65 a4 29 c1 (20 octets)

输出:DK=4b 00 79 01 b7 65 48 9a be ad 49 d9 26 f7 21 d0 65 a4 29 c1(20个八位组)

Input: P = "password" (8 octets) S = "salt" (4 octets) c = 16777216 dkLen = 20

输入:P=“password”(8个八位字节)S=“salt”(4个八位字节)c=16777216 dkLen=20

Output: DK = ee fe 3d 61 cd 4d a4 e4 e9 94 5b 3d 6b a2 15 8c 26 34 e9 84 (20 octets)

输出:DK=ee fe 3d 61 cd 4d a4 e4 e9 94 5b 3d 6b a2 15 8c 26 34 e9 84(20个八位组)

Input: P = "passwordPASSWORDpassword" (24 octets) S = "saltSALTsaltSALTsaltSALTsaltSALTsalt" (36 octets) c = 4096 dkLen = 25

输入:P=“passwordpassword”(24个八位字节)S=“saltsalt”(36个八位字节)c=4096 dkLen=25

Output: DK = 3d 2e ec 4f e4 1c 84 9b 80 c8 d8 36 62 c0 e4 4a 8b 29 1a 96 4c f2 f0 70 38 (25 octets)

输出:DK=3d 2e ec 4f e4 1c 84 9b 80 c8 d8 36 62 c0 e4 4a 8b 29 1a 96 4c f2 f0 70 38(25个八位字节)

Input: P = "pass\0word" (9 octets) S = "sa\0lt" (5 octets) c = 4096 dkLen = 16

输入:P=“pass\0word”(9个八位字节)S=“sa\0lt”(5个八位字节)c=4096 dkLen=16

Output: DK = 56 fa 6a a7 55 48 09 9d cc 37 d7 f0 34 25 e0 c3 (16 octets)

输出:DK=56 fa 6a a7 55 48 09 9d cc 37 d7 f0 34 25 e0 c3(16个八位组)

3. Acknowledgements
3. 致谢

Barry Brachman and Love Hornquist Astrand confirmed the test vectors (using independent implementations) and pointed out a mistake in the salt octet length count.

Barry Brachman和Love Hornquist Astrand确认了测试向量(使用独立的实现),并指出了salt八位组长度计数中的一个错误。

4. Copying Conditions
4. 复制条件

This document should be considered a Code Component and is thus available under the BSD license.

本文档应视为代码组件,因此可在BSD许可证下使用。

5. Security Considerations
5. 安全考虑

The security considerations in [RFC2898] apply. This document does not introduce any new security considerations.

[RFC2898]中的安全注意事项适用。本文档没有引入任何新的安全注意事项。

6. References
6. 工具书类
6.1. Normative References
6.1. 规范性引用文件

[ANSI.X3-4.1986] American National Standards Institute, "Coded Character Set - 7-bit American Standard Code for Information Interchange", ANSI X3.4, 1986.

[ANSI.X3-4.1986]美国国家标准协会,“编码字符集-信息交换用7位美国标准代码”,ANSI X3.41986。

[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, February 1997.

[RFC2104]Krawczyk,H.,Bellare,M.,和R.Canetti,“HMAC:用于消息认证的键控哈希”,RFC 2104,1997年2月。

[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月。

[FIPS.180-1.1995] National Institute of Standards and Technology, "Secure Hash Standard", FIPS PUB 180-1, April 1995, <http://www.itl.nist.gov/fipspubs/fip180-1.htm>.

[FIPS.180-1.1995]国家标准与技术研究所,“安全哈希标准”,FIPS PUB 180-1,1995年4月<http://www.itl.nist.gov/fipspubs/fip180-1.htm>.

6.2. Informative References
6.2. 资料性引用

[RFC5802] Newman, C., Menon-Sen, A., Melnikov, A., and N. Williams, "Salted Challenge Response Authentication Mechanism (SCRAM) SASL and GSS-API Mechanisms", RFC 5802, July 2010.

[RFC5802]Newman,C.,Menon Sen,A.,Melnikov,A.,和N.Williams,“盐渍挑战响应认证机制(SCRAM)SASL和GSS-API机制”,RFC 5802,2010年7月。

Author's Address

作者地址

Simon Josefsson SJD AB Hagagatan 24 Stockholm 113 47 SE

西蒙·约瑟夫松SJD AB哈加坦24斯德哥尔摩113 47东南

   EMail: simon@josefsson.org
   URI:   http://josefsson.org/
        
   EMail: simon@josefsson.org
   URI:   http://josefsson.org/