News for hackers. Stuff that matters.
Re:How Hash Algorithms Work (2007) by jasode on Friday January 13, 2017 @06:41AM (#13390058)
You're right but I'm guessing the writer is thinking of the limited list of English "words".

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) by comicjk on Friday January 13, 2017 @08:48AM (#13390706)
> 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).

That is way overkill - the input domain could just be strings of words. Each word of a typical English text adds about one byte of entropy (2^8 states). We get a probable collision by having a number of text states around the square root of the number of hash states (because of the birthday paradox). So, sqrt(10^48) = 10^24 = (10^3)^8 which is about (2^10)^8. So the space of ordinary 10-word strings is big enough to give a sha-1 collision, without invoking inputs like binary files.