4 ms·
Encrypting the hashes in the database would make it safer. That way the password hashes can't be attacked in this way unless they can decrypt them first.
by peterclary 9y ago
Encrypting the hashes in the database would make it safer. That way the password hashes can't be attacked in this way unless they can decrypt them first.
- a_imho 9y agoIs this method used/recommended? What could be the drawbacks?
- raesene9 9y agoEncrypting passwords wouldn't add a lot here unless you're using some mechanism to protect the encryption/decryption key (like using a Hardware Security Module), as an attacker who compromises the database is likely to compromise the key at the same time. If you do have a hardware security module, then why not just do away with hashing altogether, encrypt the passwords with AES-128 and you'll likely be fine (as long as the attacker can't extract the key from the HSM)
- bcoates 9y agoIt's slightly useful if you only give the key to your application servers, and not your database servers. Now you need an application server breach and not just read access to a database. It's not unheard of for something like a decommissioned database backup to wind up insecure and on the internet without being properly wiped, causing a whole-db leak without anyone actually breaking into a production system. Not sure it's worth the effort:reward though