3 ms·
bcrypt has a maximum input length of 72 bytes: https://www.usenix.org/legacy/events/usenix99/provos/provos_html/node4.html https://www.usenix.org/legacy/events
by bascule 12y ago
bcrypt has a maximum input length of 72 bytes:
https://www.usenix.org/legacy/events/usenix99/provos/provos_html/node4.html https://www.usenix.org/legacy/events/usenix99/provos/provos_...
- daigoba66 12y agoI suppose one could split the input into 72 byte chunks, hash each chunk and then combine again. Either store that, or rinse-and-repeat until you end up with one final hash.
- mason55 12y ago> I suppose one could split the input into 72 byte chunks, hash each chunk and then combine again This sounds like a recipe for screwing something up and opening yourself up to some kind of weird attack. I'm not enough of a crypto expert to know what the downside of this would be but it's more mucking around with crypto that I would be comfortable with.
- arielb1 12y agoYou should first SHA-512 the password (to get a uniformly-64-byte string) and then apply bcrypt to that.