储存盐的安全性与散列密码一样 [英] How secure is storing salts along with hashed password

查看:195
本文介绍了储存盐的安全性与散列密码一样的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您查看了asp.net会员系统的表格模式,那么它们将原始密码的哈希值与用于生成密码的盐一起存储。请参阅下面的模式,

dbo.aspnet_Membership



If you had looked at table schema of asp.net membership system they store the hash of raw password along with salt used to produce it. see the schema below,

ApplicationId
UserId
Password
PasswordFormat
PasswordSalt
MobilePIN
Email
. . .




  • 如果攻击者持有数据库不是他更容易从盐中打开原始密码并加密密码?

    • If a attacker gets hold of the datbase isn't it easier for him to crack open the raw password from the salt and hashed password?

      在查看某些记录后,每个密码似乎都会生成一个新的盐。这是什么意义?

      After looking into some records it seems a new salt is generated for each password. What is significance of this?

      Are salts useless for security if the attacker knows them?

      推荐答案

      有关ASP.NET密码/哈希/盐存储的具体信息,请参见例如 http://msdn.microsoft.com/en-us/library/aa478949.aspx

      For the specifics of ASP.NET password/hash/salt storage see for example http://msdn.microsoft.com/en-us/library/aa478949.aspx

      攻击者是允许

      An attacker is "allowed" to know the salt - your security must be designed in a way that even with the knowledge of the salt it is still secure.

      盐是什么做??

      盐帮助防御暴力攻击使用预先计算的彩虹表。暴力比以前多对于攻击者来说,这是一个沉重的(时间/内存条件)。
      计算这样一个表是昂贵的,通常只有当它可以用于多个攻击/密码时才能完成。 b如果您对所有密码使用相同的盐,攻击者可以预先计算此类表格,然后强制将密码强制为... ...
      只要您生成一个新的(最好的cryptogrpahically strong )每个要存储的密码的密码的随机盐都没有问题。

      Salt aids in defending against brute-force attacks using pre-computed "rainbow-tables".
      Salt makes brute-force much more expensive (in time/memory terms) for the attacker.
      Calculating such a table is expensive and usually only done when it can be used for more than one attack/password.
      IF you use the same salt for all password an attacker could pre-compute such a table and then brute-force your passwords into cleartext...
      As long as you generate a new (best cryptogrpahically strong) random salt for every password you want to store the hash of there is no problem.

      如果你想进一步加强安全性, strong> _
      您可以多次计算哈希(哈希散列等) - 这不会花费太多,但它会进行暴力攻击/计算彩虹表甚至更多昂贵的...请不要发明自己 - 有成熟的标准方法,例如 http: //en.wikipedia.org/wiki/PBKDF2 http://msdn.microsoft.com/en-us/library/system.security.cryptography.rfc2898derivebytes.aspx

      注意:

      使用这样的机制是这些日子 mandatrory 因为CPU时间(可用于诸如彩虹台/暴力等)的攻击越来越广泛地使用(例如,参见例如亚马逊的云服务是世界上速度最快的超级用户排名前50的事实,可以是任何人用于相对较少的数量)!

      Using such a mechanism is these days mandatrory since "CPU time" (usable for attacks like rainbow tables/brute force etc.) is getting more and more widely available (see for example the fact that Amazon's Cloud service is among the top 50 of fastest supercomuters worldwide and can be used by anyone for a comparatively small amount)!

      这篇关于储存盐的安全性与散列密码一样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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