使用 AES256 作为“解密”在 SqlMembershipProvider 的 MachineKey 中
我正在为 SharePoint 2010 网站的基于表单的身份验证创建自定义注册表单,并将密码作为“加密”存储在 aspnet_Membership 数据库表中。
我在 web.config 中的设置显示“解密”参数是“AES”。我的老板要求我考虑使用 AES256,因为它更安全,但我无法弄清楚如何做到这一点。我一直在谷歌搜索和“stackoverflow-ing”,但到目前为止我还没有找到一篇文章来解释我需要做什么,或者在哪里寻找好的信息。
我认为我的问题是:
- “AES256”是“解密”参数的有效值吗?
- 如果不是,是否只需生成更长的“解密密钥”即可使 AES 更强?即,如果我将解密密钥设置为 64 个字符长,这会构成 AES256 吗?
- 如果我完全偏离了我目前的想法,任何人都可以让我走上正轨,或者解释(或链接到解释)如何更新我的 web.config 以使用 AES256 而不是默认的 AES?
以防万一有人想说“你应该使用散列”......去过那里,讨论过,决定使用加密。只是想我能解决这个问题:)
I'm creating custom registration forms for Forms Based Authentication for a SharePoint 2010 site, and storing passwords as 'Encrypted' in the aspnet_Membership database table.
My setting in web.config shows that the 'decryption' parameter is "AES". My boss is asking that I look to use AES256, as it's more secure, but I'm having trouble working out how to do this. I've been Googling and "stackoverflow-ing", but so far I've not been able to find that one post that either explains what I need to do, or where to look for good information.
My questions, I think, are:
- is "AES256" a valid value for the "decryption" parameter of ?
- if not, is simply generating a longer "decryptionkey" all that's required to make AES stonger? i.e. if I make my decryption key 64 characters long, would that constitute AES256?
- if I'm totally off base with my current thinking, can anyone put me on track, or explain (or link to an explanation of) how to update my web.config to use AES256 rather than the default AES?
Just in case anyone wants to say "You should use Hashed".. been there, discussed that, decision made to use Encrypted. Just thought I'd get that out of the way :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不可以,您只能使用“AES”作为 AES 算法的解密参数。
是的,如果您生成 256 位(64 字节)长的长度,则您实际上拥有 AES256。实际上,您也可以生成 512 位长的长度。该值越长,加密越强。
没必要。你好像明白了。
现在,在 .NET 4.0 中,他们对此进行了一些增强,允许使用 SHA256 进行验证。请参阅 MSDN 文档(存档.org 快照) 了解详细信息。
No, you can only use "AES" as the decryption parameter for the AES algorithm.
Yes, if you generate one that is 256 bits (64 bytes) long, you effectively have AES256. In reality, you could generate one that is 512 bits long, too. The longer this value is, the stronger the encryption.
No need. You seem to be understanding it.
Now, in .NET 4.0, they've enhanced this a bit, allowing SHA256 to be used for validation as well. See MSDN's documentation (archive.org snapshot) for details.