Niels M?ller (entering a radioactive zone) @ Pike (-) developers forum wrote:
What systems is it important to interop with? System password/shadow files, defined by BSD and GNU libc, or PHP applications?
Both.
And the other bug mentioned affects only input passwords that are longer than 255 bytes. But the algorithm description says that password length is limited to 72 bytes, so then that shouldn't be an issue.
That was a bug in the input routine to some BSD systems. It allowed longer input, and then created severely broken hashes if you supplied > 256 characters.
Also, it's not entirely clear to me if these are fully under the control of the caller, or if the implementation selects variant depending on whether or not the input would trigger the old sign extension bug.
I'd like to hear the long answer... If I want to generate a new bcrypt line, and I pass a new password and salt, and "$2b" in the settings input, will I always get an output string with "$2b" in it? And similarly for the other three variants.
If you ask for a scheme, you always get a hashed result back which complies with the exact same scheme. Actually, both $2b and $2y are bug free.