Asp.net 身份散列是否安全?

Is Asp.net identity hashing Secured?

我在以下 url.

中引用了 Rijndael 和 Asp.net 哈希实现的以下站点
  1. Rijndael - How to generate Rijndael KEY and IV using a passphrase?
  2. Asp.net 散列 - ASP.NET Identity default Password Hasher, how does it work and is it secure?

在这两个实现中, 以下用于获取密码的随机字节。 RijnDael

Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(password, SALT);

Asp.net 身份散列

Rfc2898DeriveBytes bytes = new Rfc2898DeriveBytes(providedPassword, salt, HasingIterationsCount)

在上述代码之后,RijnDael 对 returned 字节应用加密。 但是 asp.net identity 复制盐字节数组和 return 散列键的结果。

这里我有一个困惑。 RijnDael 和 Asp.net 身份哈希使用相同的 Rfc2898DeriveBytes.

当 RijnDael 可以解密加密密钥时(这是在 Rfc2898DeriveBytes 的帮助下完成的),为什么我们可以解密 Asp.net 身份散列密钥?

有没有可能做到这一点? Asp.net 身份安全吗?

是的,ASP.NET的密码哈希方法是安全的。

在您提供的示例中,用户使用的是一种加密技术,称为高级加密标准(AES,也称为 Rijndael ).这就是秘密可以被解密的原因。

用户仅使用 Rfc2898DeriveBytes class 以获得 key and an initialisation vector

class 不用于散列秘密消息。加密是隐藏消息的原因。

ASP.NET 使用 Rfc2898DeriveBytes class 来散列密码。此过程不可逆。