5 ms·
You can do the slow pbkdf2 hash on your webserver and use the result for your stored procedure to check the password. If the password column is only visible to
by tpetry 6y ago
You can do the slow pbkdf2 hash on your webserver and use the result for your stored procedure to check the password. If the password column is only visible to the stored procedure you have used the best features of both systems.
- koolba 6y agoNo you can’t. To do the hash you need the per user salt before you start hashing. Which would require reading from the DB.
- mvolfik 6y agoThen you can retrieve salt, do hash on server, and use the stored procedure to compare. More requests, but a tradeoff for security \o/
- tpetry 6y agoThere is no reason you can‘t have a deterministic function which generates a hash for the user. A simple sha256(lower(email)) is equally secure as a complete random salt, the only requirement on a salt is to be unique.