Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While the collisions themselves would increase it's not statistically significant to cause an issue in practice. Plus the idea here isn't to increase the strength of the overall construct. It's to ensure that all characters that the user entered have some contribution to the final product.

What I'd consider a much worse issue is considering the following to be the same by silently truncating things:

- some really long password ... that ends with foo

- some really long password ... that ends with bar

- some really long password ... that ends with baz

The only acceptable alternatives when using something like bcrypt are:

- Restrict user passwords to 72 bytes (not chars!)

- Hash with something like SHA-512 prior to passing them to bcrypt.



> Plus the idea here isn't to increase the strength of the overall construct

I see. If that wasn't a design goal, this construction is sound.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: