-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Is saltLength broken? Examples attached #441
Comments
Yes,
(see section 4. Parameter Choice) If you need a different length, you're probably doing something other than password hashing and likely are providing your own salts. Does this work for you? I'm not against the parameter, but I'd rather keep the library simple to avoid common mistakes - for a long time, providing your own salt was easier, and it just happened that people tended to provided their own salts, with bad quality.
This was never specified in documentation, but it would prefer |
thank you for answering. The motivation in using custom salt is password derivation for password managers. An user can choose an human password like "hello", then this password is normalized using nfd like the above example in the first post, then it is used with a random salt to derive the real password. Now if you use this output password to encrypt and decrypt, you always need the original human password and the salt to obtain exactly the same real password. So the custom salt is necessary for this purpose from my point of view. |
@xgiovio where do you need a custom salt in this scenario? |
well, as i said, the salt parameter is enough and changing the salt bytearray size it gives the correct raw output. The pipeline is the following: an user choose his human password, the app creates a random salt for him using a secure random generator. The argon2 function generates the raw output. The raw output is used in the rest of the pipeline to encrypt or decrypt. Does it make sense for you? |
output has always 16 bytes random salt:
$argon2id$v=19$m=65536,t=10,p=4$oJZM5QTIRFsTy7tJgcrDHQ$JUtK3qlr7MmQZ54dSiPJhxJtux+u7W+DTZ3pvblyGzE
it however gives the correct output if i input {salt:randomValuesHere} in the object.
I would like to understand:
Thanks
The text was updated successfully, but these errors were encountered: