散列(哈希())与盐哈希 [英] hash(hash()) vs salted hash

查看:125
本文介绍了散列(哈希())与盐哈希的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自引入彩虹表并仅使用散列密码(例如:MD5)到存储在数据库中的密码是不是最安全的方式

当人们谈论盐渍散列时,总是以这种方式使用 hash(password。salt)或甚至 hash(hash(密码)。salt)



我不知道为什么要使用salt,并添加每个密码存储盐的额外条目?
为什么我们不使用 hash(hash(password)),甚至是 hash(hash(hash(password)))



放盐是否更安全?或只是更复杂的感觉?你可以建立一个彩虹表基于一个字典散列(散列(pwd) ))的时间只有散列(pwd)的两倍(甚至更少,因为性能主要是关于磁盘写入),甚至不会更大。使用salt大大扩展了表所需的大小,直到它变得不切实际。



此外(更重要的是),用户通常使用相同的密码。没有每个用户的个人用户密码,如果您打破了一个用户密码,那么您已经打破了所有拥有相同密码的其他用户。


Since the introduction of Rainbow tables, and using only hashed passwords (e.x: MD5) to stored passwords in database is not the best secured way.

When people talk about salted hashes, the always use it in this way hash(password . salt) or even hash(hash(password) . salt).

I don't know why to use salt, and add extra entry for each password to store the salt? Why don't we just use hash(hash(password)), or even hash(hash(hash(password)))?

Is it more secure to put salt? or just the sense of being more complex?

解决方案

You can build a rainbow table based on a dictionary for hash(hash(pwd)) in just twice the time as for hash(pwd) (even less because performance is mainly about disc writes) and it wouldn't even be larger. Using salt greatly expands the size needed for the table up to the amount where it becomes impractical.

Also (even more important), users often have the same password. Without an individual salt per user, if you've broken one users password, you've broken all other users that have the same password.

这篇关于散列(哈希())与盐哈希的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆