According to this there are at least 6 "properties" all cryptographically secure hash functions strive to attain:
- Deterministic: the same message always results in the same hash;
- Quick: it is quick to compute the hash value for any given message;
- One-way function: it is infeasible to generate a message from its hash value except by trying all possible messages;
- Avalanche effect: a small change to a message should change the hash value so extensively that the new hash value appears uncorrelated with the old hash value;
- Collision resistant: it is infeasible to find two different messages with the same hash value
- Pre-image attack resistant: a pre-image attack on cryptographic hash functions tries to find a message that has a specific hash value. A cryptographic hash function should resist attacks on its pre-image.
The first 3 I think are pretty easy to adhere to as far as I can imagine so far (not having implemented a cryptographically secure hashing function). But how do you design something that has the last 3 though?
- Avalanche effect.
- Collision resistant.
- Pre-image attack resistant.
Are there specific things that you can do when designing a hashing function to make it have these 3 properties somehow? How do the ones that create the award-winning cryptographic hash functions do it?
If there are no principles to apply, the next best bet would be to know which examples to study to gain insight on how they managed to adhere to these properties. In that case, what papers or hash algorithms are good to study, and which parts to focus on from those cases?