|
|
|
|
|
by emidln
4462 days ago
|
|
I'm pretty sure the intention behind something like this: (def a-password (-> pass
(hmac server-stored-key)
(scrypt-kdf work-factor))
is to prevent all information necessary to calculate the stored hash being on the same system where the hash is stored. By HMAC'ing and not storing that key in the database (but on the app server), you now make the attacker pull off two attacks.You could replace HMAC with encrypt with AES (or scrypt for that matter) to get the same practical effect. Edit: clarification |
|