Skip to content
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

Prevent DOS attacks by pre-hashing password #11

Open
dhui opened this issue May 17, 2019 · 1 comment
Open

Prevent DOS attacks by pre-hashing password #11

dhui opened this issue May 17, 2019 · 1 comment

Comments

@dhui
Copy link
Owner

dhui commented May 17, 2019

Hash used for pre-hashing should be configurable. Default to SHA-3.
e.g. Use hash.Hash and sha3.New512() (each hash sum call will either need to lock and reset the hash.Hash OR create a new hash.Hash)

Reference: https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Password_Storage_Cheat_Sheet.md#hash-the-password-as-one-of-several-steps

@dhui
Copy link
Owner Author

dhui commented Mar 10, 2023

Turns out pre-hashing a password can be dangerous. e.g. bcrypt of an MD5 hash can be shucked

It's not clear if SHA3 currently has similar vulnerabilities (e.g. any breaches containing SHA3 hashes) but the potential vulnerability is always there in the future. As the linked video mentions, this can be mitigated by peppering the pre-hashed password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant