4 ms·
You've misunderstood the two key requirements of a hashing function. The first is to be secure. It should produce irreversible, unpredictable changes to at lea
by jacques_chester 15y ago
You've misunderstood the two key requirements of a hashing function.
The first is to be secure. It should produce irreversible, unpredictable changes to at least half of the bits in the output string if one bit of input is changed.
The second is to be fast. Hash functions are typically used to produce authentication of various pieces of original data. Each such unit of data might be small; hashes should not add an unacceptable overhead to communications, for example.
By contrast, key-derivation functions should be slow, because they have a different threat profile. Using a hash function for key-derivation purposes is a mistake.
- saurik 15y agoThe problem I have with this simplification is that if I can brute force your hash (which is a feasible attack vector as computers get faster: people even sit around brute forcing MD5 nowadays, thanks to some mathematical attacks that reduce some of its strength), then I can spoof your "authentication". If you have two 128-bit hash algorithms, and one is fundamentally twice as slow as the other, it is effectively a 129-bit hash in comparison.
- jacques_chester 15y agoYou don't see hashes with, say, thousands of rounds because it's just too slow. Hash algorithms always exist in tension between security and speed. Because authentication is their purpose, not secrecy.