-
Notifications
You must be signed in to change notification settings - Fork 6k
Update the default strength for password encoders #7411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The Spring Security Reference Documentation says:
|
Thanks, @larsgrefer for checking on this. @rwinch do we have a hardware profile that we target when determining when to increase this? My concern would be if we bump the number up to early, lots of folks suddenly see password hashing taking quite a bit longer than 1 second. |
I've written a small test application and ran it on different systems: https://github.com/larsgrefer/password-encoder-tester MacBook Pro (Early 2015, 2.7GHz i5)
Hetzner CX30 Cloud Server (2.1GHz Intel Xeon)
AMD FX6300 (8GB DDR3 RAM)
Raspberry PI B (800MHz ARM)
|
Despite this being created first, I'm going to close this as a duplicate of gh-10506 in order to preserve the assignee |
MacBook Pro (2021, M1 Pro):
|
I propose to increase the default strength for some password encoders.
The BCrypt encoder currently uses
10
as default strength, with which it only takes ~80ms to encode a password (on my Early 2015 MacBook Pro). I think the default should be increased to (at least) 12.The Argon2 encoder only needs ~40ms, so its defaults should be increased too.
The SCrypt encoder needs ~80ms with its default parameters.
The text was updated successfully, but these errors were encountered: