Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Commented Unassigned: Allow specifying the iteration count in System.Web.Helpers.Crypto.HashPassword() [1047]

$
0
0
The current implementation of Crypto.HashPassword() uses a hard-coded iteration count for the PBKDF2 algorithm of 1,000 ([Crypto.cs](https://aspnetwebstack.codeplex.com/SourceControl/latest#src/System.Web.Helpers/Crypto.cs)). This is the minimum recommended iteration count as specified in RFC2898, published in September 2000.

Given the hardware advancements in recent years, this number seems to be very low (e.g. LastPass now uses 100,000 PBKDF2 iterations for the master password, Django defaults to 10,000).

The whole point of using PBKDF2 is that the number of iterations can be increased when hardware gets faster, so I think it would make sense to provide an overload for HashPassword() that takes the iteration count as a parameter.

Sources:
[1] http://stackoverflow.com/questions/6054082/recommended-of-iterations-when-using-pkbdf2-sha256
[2] http://www.levigross.com/post/18880148948/a-review-of-djangos-new-password-authentication
Comments: The password hashing method is there for existing built-in security systems and fits their design goals. For implementing a different password hashing mechanism, we recommend to implement your own method, after carefully weighing the security vs. scaling/server load and dos attack risk. Keep in mind that many of the examples above relate to applications where the password hashes can be relatively easily be accessed by an attacker, and hashing is the first line of defense, also in these cases there is typically only thread trying to hash a password, in contrast to server implementation when password hashing might even happen on every request in some cases, causing a significant server load.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>