在提交之前在 javascript 中加密密码是否有意义?
我不完全了解的事情理解这样做的好处是什么?秘密单词发布在表单中,因此任何可能嗅探的人肯定会看到该秘密单词以及 javascript,并且无论如何都能够找出密码。这样做真的有意义吗?
I'm following the example on http://marakana.com/blog/examples/php-implementing-secure-login-with-php-javascript-and-sessions-without-ssl.html
The thing I don't fully understand is what is the gain by doing this? The secret word is posted in the form, so anyone who might be sniffing would surely see that secret word, as well as the javascript and be able to figure out the password anyways. Does it really make sense to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
窃听者无法导出密码,因为他们只知道:
由于散列是单向的,因此您无法从中导出密码本身。
您将获得什么:用户设置了服务器能够验证的密码,而无需发送明文密码本身。
An eavesdropper would not be able to derive the password, because they only know:
Since hashes are one-way, you cannot derive the password itself from these.
What you gain: The user has set up a password which the server is able to verify, without having to send the plaintext password itself.