Are hashed and salted passwords secure against dictionary attacks?

早过忘川 提交于 2019-12-01 15:54:27

Salt doesn't prevent dictionary attacks, just precalculated dictionary attacks. In particular, it protects against rainbow tables (http://en.wikipedia.org/wiki/Rainbow_table) and also ensures that cracking one user's password doesn't automatically let you crack any user who shares that password.

The article I linked to mentions some ways to improve upon salting, incudling key strengthening (http://en.wikipedia.org/wiki/Key_strengthening).

Nothing keeps an attacker from just guessing the password.

Salts just make it harder by forcing an attacker to hash the dictionary on a per-user (effectively, per-salt) basis.

To improve security, a tunable hash function is your best bet. Crank the time-per-hash up, making dictionary attacks impractical on whatever hardware your attacker is likely to have available.

Basically, read this.

That's correct. If someone got the password material, a dictionary attack would be effective.

To guard against this:

  • Make sure your passwords aren't subject to dictionary attacks.
  • Make sure your password file (/etc/shadow) is readable only by root.

Without salt, the attacker can generate hashes for every word in his dictionnary then run the new dictionnary against your passwords list

With salt, each password is hashed with a random string so even with the prior hashed dictionnary knowledge, he still have to re-create a new hashed dictionnary containing the salt for every different salt in your database.

Just think of dictionnaries tables as a subset (small portion) of the rainbow tables. While rainbow tables can contain billions of entries, dictionnaries contain "known words", so maybe a few million entries at most.

The reason why rainbow tables fail against salt is because the re-creation process would be "billions of entries" of recalculation while dictionnary attacks are still "few millions of entries". The salt just blocks precomputed values

Your logic is sound, but in reality, with enough computing power and time, there is no protection against dictionary/brute-force attacks.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!