Seems like you're wasting a bunch of CPU cycles every time the password is entered in order to cause an attacker to have to waste a bunch of CPU cycles running a dictionary attack. Surely there is a better way to do that.
Perhaps after you hash the password, encrypt it with a private key stored in a different spot than the database, then store the result in the database? I guess it depends on how an attacker is getting your database, whether they have access to the memory of the running authentication code, but if their general strategy is going to be to get access and then just copy your database, the lack of your private key would make it difficult to run dictionary attacks, and there's only 1 extra step (decrypt) for your authenticator
Public private key encryption is so slow that hashing something a ridiculous number of times is less intensive. But that is interesting if you had the private key on an offsite computer running no other applications and accepting no other traffic at the firewall and router level. Then if you had a breach you could literally turn that computer off and the password database would be useless. But if you are storing hashes and don't need reverse encryption you might as well do something like hmac and just have your "secret hash server" just apply a secret long salt only it knows before hashing it once more. That would be way faster than asymmetric encryption.
Maybe not a bad idea. But if you are doing that in lou of pbkdf2 you are basically betting on no one ever getting access to that offsite computer. Maybe you daisy chain it and have a third computer it consults. If you build the server simple enough you can basically guarantee that physical access would be necessary and you can make it nearly impossible that anyone could physically obtain both computers, especially if one of them is behind tor and unlocatable.
I may adopt this.
You are right that another hash would serve this use case as well as encryption. And I was imagining using lightweight symmetric encryption, yes.
I was imagining the initial 10k iteration hashing happening on a client, which then sends the hash over to the server. Not sure if that's how you intended it. But if that is the case: Then having one more hash happen on the server provides some obscurity (presumably an attacker can see your client-side hashing code, but he might not have your server code). And makes your database useless for dict attacks on its own.
As an alternative to running a "secret hash server" as a whole other OS instance, you could leverage encryption support provided by the OS+hardware to black box hash/encrypt involving a secret key that's not readable even if the attacker roots your server. A TPM can enable that.
(post is archived)