【发布时间】:2015-12-22 06:50:25
【问题描述】:
Fundamental difference between Hashing and Encryption algorithms
Preferred Method of Storing Passwords In Database
http://codahale.com/how-to-safely-store-a-password/
我对两件事感到困惑。如果 PHP 7.0 bcrypt 提供随机盐。我们应该如何检索它以进行密码验证?
我知道像 PBKDF2 这样的关键拉伸函数,但是有人可以向我解释为什么像 scrypt 这样的内存密集型哈希算法比 bcrypt 更受欢迎吗?除了蛮力攻击方面。从我在网上阅读的逻辑来看,人们建议使用 scrypt 进行多次迭代。
【问题讨论】:
-
@Anmol 谢谢,不知道为什么我找不到这篇文章。
-
为什么不推荐使用 Scrypt blog.ircmaxell.com/2014/03/why-i-dont-recommend-scrypt.html
-
Bcrypt 哈希将盐存储在 $ 分隔符之间的哈希中。您不需要在外部存储盐。 $2y$10$TwentytwocharactersaltThirtyonecharacterspasswordhash 工作原理示例
标签: php bcrypt password-encryption php-7