by streety · 15y ago · 0 comments
"Second, the salts are only 12 bits. A proper implementation would use salts twice as large as the logarithm of the number of passwords which could ever be stored, forcing the attacker to break accounts one-by-one (64 bits would be a reasonable size to support the entire population of the Earth)."
I haven't come across a formal rule for salt length before and a search for more information didn't turn up much more than the rules of thumb I've seen previously.
https://secure.wikimedia.org/wikipedia/en/wiki/Birthday_para...
the rule of thumb to remember is that there is a 50% chance of a collision when the sample size reaches half the bits of the total available.
But if it was feasible to store 10^32 rainbow tables you should make it longer. Ah, it should probably be longer. I think 128 bit salts would be more sensible.
I just ran a quick shell script over the database file. There are only 3329 password collisions. Of 700,000+. Sure, a bigger salt could have reduced that. But was that in any way the cause of the problem? No.
Now perhaps you would double that as a just-in-case scenario or because there is some fundamental property of every (existing or future) hash algorithm that causes a collision half the time (i.e. both salt 10001 and salt 10000 generate the same hash value).
Also, encryption implies decryption which isn't possible here, apart from brute forcing. What's being done here, albeit badly, is hashing.</pedantry>