.NET 中的哪些散列算法适合密码散列? [英] Which of the .NET included hashing algorithms are suitable for password hashing?

查看:33
本文介绍了.NET 中的哪些散列算法适合密码散列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

LinkedIn 密码泄露 证明安全地散列密码是多么重要.然而,即使使用普通"散列算法(例如 MD5 和 SHA 系列)对密码进行散列处理也不安全,因为它们针对速度进行了优化,允许黑客每秒计算 23 亿个散列(蛮力).

The password leak of LinkedIn proved how important it is to securely hash your passwords. However, even hashing passwords with a salt is not secure with the 'normal' hashing algorithms (such as MD5 and the SHA family), since they are optimized for speed, which allows hackers compute 2300 million hashes per second (brute force).

有些散列算法使用起来更安全,因为它们的计算量更大,例如 PBKDF2Bcrypt、PBMAC 和 scrypt.然而,这些散列算法似乎并未包含在 .NET 框架中.

There are hashing algoritms that are safer to use because they are much more computational intensive, such as PBKDF2, Bcrypt, PBMAC, and scrypt. These hashing algorithms however, don't seem to be included in the .NET framework.

那么,.NET 框架中包含哪些性能密集型哈希算法?

So, which performance intensive hashing algorithms are included in the .NET framework?

答案: PBKDF2 包含在框架中,该站点显示如何正确使用它.

ANSWER: PBKDF2 is included in the framework and this site shows how to use it properly.

推荐答案

我认为这并不是一个真正有意义的类名,但我认为它包含在 .NET 框架中.根据多个消息来源,Rfc2898DeriveBytes 实际上是PBKDF2 实现.MSDN 也是这么说的.

I think it's not really a meaningful Class name, but I do think it is included in the .NET framework. According to multiple sources, Rfc2898DeriveBytes is actually a PBKDF2 implementation. MSDN says so as well.

为什么我需要使用 Rfc2898DeriveBytes 类(在 .NET 中)而不是直接使用密码作为密钥或 IV?使用 Rfc2898DeriveBytes 在 C# 中实现 PBKDF2

例如.

这篇关于.NET 中的哪些散列算法适合密码散列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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