by shakna · 6y ago · 0 comments
That's a somewhat concerning choice of hash function. MD5's collision resistance is broken. It is well known to be broken, for more than a decade.
There's references to PHP on the page. 10 years ago [0] this message appeared in PHP's manual:
> The well known hash functions MD5 and SHA1 should be avoided in new applications. Collission attacks against MD5 are well documented in the cryptographics literature and have already been demonstrated in practice. Therefore, MD5 is no longer secure for certain applications.
PHP is a red herring; this would apply for any language.
I used the warning from the PHP manual, because the site creator should be familiar with it.
You'll find similar warnings against MD5 everywhere.
Search Google for f6f7fec07f372b7bd5eb196bbca0f3f4, and you’ll see the answer is Friday. That stateless PHP example is rendered useless by this.
In this case, the only threat model might be brute forcing the answer, but that applies to SHA-2 as well, since both are designed to be fast so that you can hash gigabytes in reasonable well. For that, something memory-hard such as Argon2 should be used.
So yes, I'd say that's a problem for this use case.