4 ms·
Nowadays it would be a complete waste of time to try to improve MD5, because there is no reason to use it for anything. Most modern CPUs from Intel, AMD or ARM
by adrian_b 4y ago
Nowadays it would be a complete waste of time to try to improve MD5, because there is no reason to use it for anything.
Most modern CPUs from Intel, AMD or ARM implement in hardware at least SHA-1 and SHA-256, so these both are faster than MD5 implemented in software.
If you only need 128 bits, you can truncate one of the longer hashes to 128 bits.
SHA-1 is the fastest in the current CPUs, so even if it is also obsolete for applications where there is an adversary who attempts to find collisions, it remains a good choice for various non-cryptographic applications that need a long hash or random numbers.
SHA-1 itself was an attempt to improve on MD5. Even if it was not entirely successful, it remains many orders of magnitude stronger than MD5.
So if you want to know how MD5 can be improved, the best way is to compare the MD5 and the SHA-1 algorithms, and look at what was changed between them.
Another improved MD5 is the RIPEMD-160 algorithm, so comparing RIPEMD-160 with MD5 is another source for seeing how MD5 can be improved, by different methods.
- TedDoesntTalk 4y ago> Nowadays it would be a complete waste of time to try to improve MD5 Not as a thought experiment. Thought experiments help you to grow.
- adrian_b 4y agoI agree about the usefulness of thought experiments, but there are many other much more useful thought experiments, even in the domain of hashes. A large number of people have thought for several years about how to improve MD5, and the results were SHA-1 and RIPEMD-160. It is very instructive to study the evolution from MD4 to MD5 and to SHA-1 and RIPEMD-160, but it is very unlikely that attempting 30 years later to do something better than those, without completely changing a hash algorithm structure that is now well understood as being inappropriate, can teach you anything.
- bombcar 4y agoThe useful thought experiments are often to realize WHY the "trick to fix MD5" you came up with doesn't work.
- bawolff 4y agoPeople are giving you shit, but people thinking about this sort of thing has yielded useful and interesting things like https://marc-stevens.nl/research/papers/C13-S.pdf https://marc-stevens.nl/research/papers/C13-S.pdf Of course in production, just use sha256, but there is nothing wrong with thinking about unorthodox solutions.