How Hash Algorithms Work (2007)
metamorphosite.com
How Hash Algorithms Work (2007)
1–10 of 61 posts
Re: How Hash Algorithms Work (2007)
#2Don't hashing functions have collisions?
Re: How Hash Algorithms Work (2007)
#3>The word 'cat' will hash to something that no other word hashes too, but it will always hash to the same thing. Don't hashing functions have collisions?
Usually you want a hash that maps similar strings to completely different output hashes (and I guess that's what the author actually wanted to describe). But that is not a necessity of a hash function, just a usual property.
Re: How Hash Algorithms Work (2007)
#4>The word 'cat' will hash to something that no other word hashes too, but it will always hash to the same thing. Don't hashing functions have collisions?
He knows there are collisions, he just chose to start with the simplest explanation and add the useful details as he moves on. It's fine by me, even though engineers tend not to like that (they prefer accuracy from the word go).
Re: How Hash Algorithms Work (2007)
#5>The word 'cat' will hash to something that no other word hashes too, but it will always hash to the same thing. Don't hashing functions have collisions?
1.46 x 10^48 = sha1 possible outputs
~7.5 x 10^5 = total English words [1]
If you computed all ~750,000 hashes for all known English words, none of the sha1 hashes will match sha1("cat"). I'm guessing that you still wouldn't get a collision if you include all words from all world languages.
For "words" to generate a collision, you'd have to increase the input domain by allowing "words" to mean any sequence of bytes (e.g. bytes of jpg image or audio file).
[1] https://en.oxforddictionaries.com/explore/how-many-words-are...
Re: How Hash Algorithms Work (2007)
#6>The word 'cat' will hash to something that no other word hashes too, but it will always hash to the same thing. Don't hashing functions have collisions?
They do. The text is somewhat misleading and not properly explaining that.
All hash functions have collisions. But from a cryptographically secure hash function we expect that nobody is able to find such a collision. They exist, but the computational power to find one is not available to humans.
Re: How Hash Algorithms Work (2007)
#7>The word 'cat' will hash to something that no other word hashes too, but it will always hash to the same thing. Don't hashing functions have collisions?
> Don't hashing functions have collisions? They do. The text is somewhat misleading and not properly explaining that. All hash functions have collisions. But from a cryptographically secure hash function we expect that nobody is able to find such a collision. They exist, but the computational power to find one is not available to humans.
Re: How Hash Algorithms Work (2007)
#8Re: How Hash Algorithms Work (2007)
#9As someone extremely new to this; can this procedure be worked backwards to retrieve the original text? If no, why not?
Re: How Hash Algorithms Work (2007)
#10As someone extremely new to this; can this procedure be worked backwards to retrieve the original text? If no, why not?
Of course this is assuming that the hash algorithm doesn't have any weaknesses you could exploit.