【问题标题】:Authenticaion, hash, salt, https process?身份验证、哈希、盐、httpd 过程?
【发布时间】:2012-05-03 03:45:54
【问题描述】:

您好,我想我可能做错了,任何人都可以帮助解释您如何散列/加盐密码。你是从客户端还是从 web 服务做的?

我有一个包含密码数据成员的数据合同,在我的服务中,我这样做是为了在保存密码之前创建密码的哈希/盐:

  So here is the process in which I was thinking.

Rest Service has https for secure connection
User creates account (along with password)
//to stop packet sniffing when user creates account https is used during POST so no one can see the password? 
web service then creates a hash of the password to store it
//so if anyone did get access to the service/database they couldnt make much use of the data in terms of breaching accounts
Then some means to authenticate that user there after

这是正确的吗?

【问题讨论】:

    标签: c# wcf web-services rest authentication


    【解决方案1】:

    听起来你走在正确的轨道上。客户端永远不应该与盐值一起散列,因为攻击者将可以访问该代码。而且 https 确实会保护连接,不允许其他人读取数据。

    在身份验证期间,您执行相同的操作:获取用户通过 https 输入的密码,对该值进行哈希/加盐,然后将结果哈希与数据库中的值进行比较。当然,如果您曾经将 Student 对象返回给客户端,则它不应包含任何值。

    最好不要重用StudentPassword 属性,因为现在您无法判断它是包含普通密码还是散列值。

    【讨论】:

      猜你喜欢
      • 2012-11-04
      • 1970-01-01
      • 2017-06-19
      • 1970-01-01
      • 1970-01-01
      • 2020-07-06
      • 1970-01-01
      • 1970-01-01
      • 2011-05-08
      相关资源
      最近更新 更多