I do not know much about cryptography. But, I'm in a situation where I need a hashing method that does not exhibit the avalanche effect. I tried Googling but couldn't find anything.
-
1$\begingroup$ What's this hash for, and why don't you want the avalanche effect? $\endgroup$– cpastCommented May 18, 2015 at 16:57
-
$\begingroup$ Also, what security properties do you need from the hash? Collision resistance (we can't find two messages that hash to the same value)? Preimage resistance (given a value, we can't find a message that hashes to that value)? $\endgroup$– ponchoCommented May 18, 2015 at 17:26
-
$\begingroup$ maybe sponge based hash functions are what you're looking for(ex.: SHA-3) $\endgroup$– SEJPMCommented May 18, 2015 at 17:42
-
1$\begingroup$ Perfect Hash Functions might give you some direction to look. They aren't secure hashes at all, of course, but that's sort of what you're asking for, NOT having an avalanche means that there's information leakage. $\endgroup$– Steve PeltzCommented May 18, 2015 at 18:20
1 Answer
In general, most hashing methods do not exhibit the avalanche effect:
most hash functions -- unless they were specifically designed to be cryptographically secure -- accidentally fail the avalanche test -- all cyclic redundancy checks (CRCs), all error correcting codes, nearly all checksums, etc.
A few hash functions -- such as Locality-sensitive hashing and the way feature hashing summarizes a document as a short vector of integers -- deliberately fail the avalanche test, because they are designed to have certain features that are incompatible with the avalanche effect.
In cryptography, my understanding is that failing the avalanche test makes a hash function vulnerable to many attacks that every cryptographic hash function is specifically designed to prevent. So every cryptographic hash function either exhibits the avalanche effect or is considered broken.
Are you looking for an example of a broken hash function to show students why this is such a bad thing? Or (what I would find more interesting) are you designing a system where this property would be useful in some way? I'd like to learn more about what you are trying to do.