Is there a key derivation/hashing function (that has any real value) that fulfills both of these criteria:
- Slow to compute the hash
- Fast to verify the hash based on the input string (not given a second, existing copy of said hash)
I know in general key-derivation is used to prevent brute-forcing of passwords, but that's typically to protect passwords against internal users.
I'm looking to set up an authentication system where a user must provide a username, password and a Proof of Work hash of the password, except.. I'd like to not have to do the work myself to quickly check.
The hash is not being compared against the actual hash in the database (e.g., it should be a different hashing algorithm than the one in the database.. PBKDF2), this is simply to discourage brute forcing while also not creating some endpoint on my server where a malicious actor can make my server do some hard work... for nothing.
Is this even possible? I know it's not necessary, but if it's possible it seems like a simple measure I could take to secure my web servers.