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

SHA245, SHA512 rounds are too low #117

Open
MilanKral opened this issue Jan 22, 2021 · 1 comment
Open

SHA245, SHA512 rounds are too low #117

MilanKral opened this issue Jan 22, 2021 · 1 comment
Labels
bug Confirmed to be a bug in libxcrypt. help wanted The libxcrypt core developers do not plan to work on this themselves but would review a PR.

Comments

@MilanKral
Copy link

The default number of SHA245, SHA512 iterations is 5000.
#define ROUNDS_DEFAULT 5000

This is too low to be considered secure again even moderate GPU, ASIC attacks.
Please increase the default number to 100000

A modern desktop computer can compute 10 000 000 SHA256 iterations in about 5 seconds

@zackw zackw added bug Confirmed to be a bug in libxcrypt. help wanted The libxcrypt core developers do not plan to work on this themselves but would review a PR. labels Jun 10, 2021
@zackw
Copy link
Collaborator

zackw commented Jun 10, 2021

I keep forgetting to get back to you about this, sorry.

You're quite correct that the default rounds settings for SHAxxx hashes (and several others) are too low. However, we cannot change ROUNDS_DEFAULT because that would change the interpretation of existing hashed passphrases: $5$saltstring$... must continue to be processed with 5000 rounds. Also, new defaults will need to depend on what hardware is actually available; 100,000 SHA256 iterations would be fine on a "modern desktop computer" but might make logins unacceptably slow on embedded devices, for instance.

There is a plan to make the rounds defaults used by crypt_gensalt runtime-configurable, see #4 and #26. Unfortunately I do not expect to have time to work on this in the near future.

I'm going to leave this bug open and mark it 'help wanted' but people who are interested in helping should come to #26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed to be a bug in libxcrypt. help wanted The libxcrypt core developers do not plan to work on this themselves but would review a PR.
Projects
None yet
Development

No branches or pull requests

2 participants