4 ms·
Forgive my ignorance, but it seems a solution to collision worries is to just use two hashing algorithms instead of one. We have two factor authentication for l
by mysterydip 10y ago
Forgive my ignorance, but it seems a solution to collision worries is to just use two hashing algorithms instead of one. We have two factor authentication for logins, why not the equivalent for hashed things?
Give me the sha1 and md5, rather than one or the other. Am I wrong in thinking even if one or both are broken individually, having both broken for the same data is an order of magnitude more complex?
- pornel 10y agoYou're effectively creating a new hashing algorithm, which is twice as long and twice as slow, and is built using constructs known to be weak.
- mysterydip 10y agoThanks, that makes sense.
- Lanzaa 10y agoThe complexity of creating a collision for both hashes is pretty much just a sum of the two complexities. Since the sha1 collision is more difficult, that dominates the cost. Once you have the sha1 collision, making the md5 collide should only take a few seconds of CPU time.