Is “double hashing” a password less secure than just hashing it once?

后端 未结 16 1795
梦谈多话
梦谈多话 2020-11-22 08:09

Is hashing a password twice before storage any more or less secure than just hashing it once?

What I\'m talking about is doing this:

$hashed_password         


        
16条回答
  •  -上瘾入骨i
    2020-11-22 09:02

    Most answers are by people without a background in cryptography or security. And they are wrong. Use a salt, if possible unique per record. MD5/SHA/etc are too fast, the opposite of what you want. PBKDF2 and bcrypt are slower (wich is good) but can be defeated with ASICs/FPGA/GPUs (very afordable nowadays). So a memory-hard algorithm is needed: enter scrypt.

    Here's a layman explanation on salts and speed (but not about memory-hard algorithms).

提交回复
热议问题