3 ms·
> [sha256 is] also a slower hashing algorithm Unfortunately, in an otherwise good post, the author is likely just repeating a myth. Due to HW acceleration, sha
by vlovich123 4y ago
> [sha256 is] also a slower hashing algorithm
Unfortunately, in an otherwise good post, the author is likely just repeating a myth. Due to HW acceleration, sha512 is the fastest and both sha256 and sha512 are faster than sha1. Go ahead. Compare sha1sum, sha256sum and sha512sum on a large file. If you don’t have HW acceleration for some reason Blake3 is the fastest and as secure as sha3 (since sha1 doesn’t benefit from HW acceleration, Blake3 would be a better hashing algorithm from this perspective). That being said, it might be true that sha1 is faster on lots of small inputs as most benchmarks focus on the aggregate speed of large files. Still, my prior would be that sha1 would still lose out unless I specifically benchmarked that use case and found it performed differently.
This doesn’t take away from the author’s main point that sha1 is still fine and there’s probably a certain amount of inertia with HIBP that makes changing the hash more difficult operationally/not worth it.
- Vecr 4y agoYou can truncate blake3 down to 128 bits output without massive problems to create a perfect drop-in for sha1, and it's still way, way faster.
- vlovich123 4y agoThe problems would likely not be around the hash length but that the hashes need to be recomputed for a very large amount of data AND that they change from what they were previously (ie clients would have to know to look for a different hash)