PBKDF2WithHmacSHA512 Vs. PBKDF2WithHmacSHA1

后端 未结 2 658
眼角桃花
眼角桃花 2020-12-13 00:32

I\'m working on a Java authentication subsystem that specs the storage of passwords in the DB as PBKDF2-generated hashes, and I\'m now trying to decide whether

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-13 01:13

    SHA512 belongs to the SHA2 family of cryptographic hash functions. Since SHA1 has theoretical weaknesses and SHA512 is slightly slower than SHA1 (slower is better when hashing passwords), SHA512 (or any of the SHA2 family) should be chosen over SHA1 for the purpose of hashing passwords.

    Actually understanding the differences in the functions is not going to be simple, but you might have a better chance of getting an answer on the Crypto SE site.

提交回复
热议问题