-
Notifications
You must be signed in to change notification settings - Fork 118
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
Wrong salt length: [0-9]+ bytes when 0 expected. #119
Comments
0 means that this is not supported. It is not completely trivial to pass the yescrypt salt to crypt(3) because generating the parameters string for it cannot be done by mkpasswd itself. I cannot remember if there is a reasonable solution, but I welcome discussions on how to implement this. |
As user I got confused by this behaviour as well and assumed a bug. Now that I know it's not, I'm curious:
Background: [1] Lines 38 to 44 in 41b3435
[2]
|
In my case, the salt seems to be always I think using one salt only (of three-byte length) is less secure than providing a custom, possibly much longer salt. |
Because that's not the salt but the algorithm parameters. The salt is after it. |
🤦♂️ You’re right! I have missed the dollar sign after it. Thanks! Anyway, how would you verify a hash matches a particular password if you can’t provide the salt? 🤔 Using an expernal program? |
In the shadow file there is also the algorithm parameters bit (e.g.
I only looked into this casually today, but found a couple helpful SO answers that cover some detail on generating the required parameters for ...obviously that isn't a solution, but if I (or someone else) gets around to picking up fixing this...those might be a good point to start in terms of understanding what needs to be done. Use case here is in devops environment where want to enforce setting passwords to certain values (automated) but do not want to set them over and over and over again...because we track number of changes made on each box as a metric. So need a method to check a known/expected password against shadow and then change or not change depending on whether it was already set. Currently we use (Yeah yeah yeah, normally we only use publickey and disallow remote password logins...or intentionally lock ourselves out of the boxes after provisioning...but sometimes we have a case where we can't avoid passwords.) |
When I tried to generate a yescrypt hash with a salt I got this issue:
How can I generate a valid yescrypt hash using a specific salt?
The text was updated successfully, but these errors were encountered: