PBKDF2-HMAC-SHA-512 测试向量 [英] PBKDF2-HMAC-SHA-512 test vectors

查看:23
本文介绍了PBKDF2-HMAC-SHA-512 测试向量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法找到 PBKDF2-HMAC-SHA-512 的已发布测试向量.我已经构建了一个函数,它(终于!)在 中重现了 7 个 HMAC-SHA-512 测试向量RFC 4231,以及在 这个话题.

I have not been able to find published test vectors for PBKDF2-HMAC-SHA-512. I've built a function that (finally!) reproduces the 7 HMAC-SHA-512 test vectors in RFC 4231, and the 32-byte test vectors for PBKDF2-HMAC-SHA-256 found in this thread.

这是它为 PBKDF2-HMAC-SHA-512 生成的内容.谁能帮我验证这个输出?
谢谢,弗雷德

Here is what it generates for PBKDF2-HMAC-SHA-512. Can anyone help me verify this output?
Thanks, Fred

Input:
  P = "password"
  S = "salt"
  c = 1
  dkLen = 64

Output:
  DK = 86 7f 70 cf 1a de 02 cf 
       f3 75 25 99 a3 a5 3d c4 
       af 34 c7 a6 69 81 5a e5 
       d5 13 55 4e 1c 8c f2 52 
       c0 2d 47 0a 28 5a 05 01 
       ba d9 99 bf e9 43 c0 8f 
       05 02 35 d7 d6 8b 1d a5 
       5e 63 f7 3b 60 a5 7f ce 

 
Input:
  P = "password"
  S = "salt"
  c = 2
  dkLen = 64

Output:
  DK = e1 d9 c1 6a a6 81 70 8a 
       45 f5 c7 c4 e2 15 ce b6 
       6e 01 1a 2e 9f 00 40 71 
       3f 18 ae fd b8 66 d5 3c 
       f7 6c ab 28 68 a3 9b 9f 
       78 40 ed ce 4f ef 5a 82 
       be 67 33 5c 77 a6 06 8e 
       04 11 27 54 f2 7c cf 4e 


Input:
  P = "password"
  S = "salt"
  c = 4096
  dkLen = 64

Output:
  DK = d1 97 b1 b3 3d b0 14 3e 
       01 8b 12 f3 d1 d1 47 9e 
       6c de bd cc 97 c5 c0 f8 
       7f 69 02 e0 72 f4 57 b5 
       14 3f 30 60 26 41 b3 d5 
       5c d3 35 98 8c b3 6b 84 
       37 60 60 ec d5 32 e0 39 
       b7 42 a2 39 43 4a f2 d5 


Input:
  P = "passwordPASSWORDpassword"
  S = "saltSALTsaltSALTsaltSALTsaltSALTsalt"
  c = 4096
  dkLen = 64

Output:
  DK = 8c 05 11 f4 c6 e5 97 c6 
       ac 63 15 d8 f0 36 2e 22 
       5f 3c 50 14 95 ba 23 b8 
       68 c0 05 17 4d c4 ee 71 
       11 5b 59 f9 e6 0c d9 53 
       2f a3 3e 0f 75 ae fe 30 
       22 5c 58 3a 18 6c d8 2b 
       d4 da ea 97 24 a3 d3 b8 

推荐答案

我能够根据我创建的结果验证所有结果

I was able to verify all results against one I created

通过另一次运行来验证我自己的结果,我使用从 SO 复制/粘贴的 BouncyCastle 实现验证了 P = "password" S = "salt" c = 4096 dkLen = 64

With another run to verify my own results, I verified P = "password" S = "salt" c = 4096 dkLen = 64 with a BouncyCastle implementation that was copy/pasted from SO

非常感谢您发布测试向量.希望更多人验证

Thank you so much for posting test vectors. I hope more people will verify

这篇关于PBKDF2-HMAC-SHA-512 测试向量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆