5 ms·
I think an average user password would be shorter than a sha256 hash no?
by l-lousy 5y ago
I think an average user password would be shorter than a sha256 hash no?
- LeifCarrotson 5y agoBcrypt truncates to 72 bytes, so it's kind of irrelevant IMO. Whether your average length is 12 or 20 or 64 bytes doesn't matter much. I expect the parent's concern came from experience with PBKDF2, where the length is unbounded. It's good to consider possible denial of service attacks: if someone submits an enormous 1 MB password a PBKDF2 hasher can be knocked offline for 60s. Sha256 will quickly crunch that attack to a more manageable length.
- stevewodil 5y agoExactly this, it’s a vector for DOS