C# AES 算法何时兼容 FIPS?
现在,我获得 RijndaelManaged 在打开 FIPS 本地安全设置的计算机上工作的算法是 禁用它。 这是一台政府计算机,所以我不确定它会如何运行。 我看过 msdn 博客网站 表示他们正在开发符合 AES FIPS 的版本,但我似乎无法找到更多信息。 有谁知道这什么时候会发生?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在这个问题之前我从未意识到这一点,但你是对的。 构造函数具有以下内容:
System.Security.Cryptography.AesManaged< /a> 有类似的内容:
您尝试过 System.Security .Cryptography.AesCryptoServiceProvider? 它应该可以工作,因为它使用 Windows 内置的基于 CAPI 的 FIPS AES 实现。
此问题 Microsoft 的 .NET 基类库论坛讨论了哪些算法符合 FIPS 标准并具有良好的链接。
看来 Microsoft 正在持续努力遵守 HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control 的设置 Vista 之前的计算机上的 \Lsa\FIPSAlgorithmPolicy 以及使用 BCryptGetFipsAlgorithmMode 用于后 Vista 的 API。
我认为验证实施是否符合 FIPS 需要付出很大的努力,这就是为什么 Microsoft 可能不想重复该过程,并且只为绝对需要此要求的客户提供 AesCryptoServiceProvider。
这篇 MSDN 博客文章有一条评论,使其更加清晰:
I never realized this before this question, but you're right. The constructor has this:
System.Security.Cryptography.AesManaged has something similar:
Have you tried System.Security.Cryptography.AesCryptoServiceProvider? It should work since it's using the CAPI based FIPS AES implementation built into Windows.
This question on Microsoft's .NET Base Class Library forum discusses which algorithms are FIPS compliant and has good links.
It appears that Microsoft is making a consistent effort to obey the setting of HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy on pre-Vista machines and use of the BCryptGetFipsAlgorithmMode API for post-Vista.
I assume there is non-trivial effort involved in certifying an implementation as FIPS compliant, that is why Microsoft probably doesn't want to repeat the process and only offers the AesCryptoServiceProvider for customers that absolutely need this requirement.
This MSDN blog post has a comment that makes it clearer:
这个问题比大多数受访者理解的要复杂得多。 这就是大多数人的答案不起作用的真正原因(我刚刚花了近 48 小时的马拉松时间试图理解并解决这个问题):
因此,如果您处于满足以下条件的环境中:
然后,您唯一的选择(或者至少是我在广泛搜索和大量哀嚎和咬牙切齿之后找到的唯一选择)是使用 RijndaelManaged 并使用“ ; Application.exe.config 中的 " 以关闭该特定应用程序的 FIPS 强制合规性。
什么样的恶梦! 我希望这个答案可以帮助下一个不幸遇到这个问题的人。
关键词: Cisco IOS SNMPv3 FIPS AES 128 CFB 128 AesCryptoServiceProvider Rijndael
This problem is much more complex than most of those responding understand. Here is the true reason why most of people's answers just won't work (I just spent a nearly 48-hour marathon session trying to understand and fix this problem):
So, if you are in an environment where the following is true:
Then, your ONLY option (or at least the only I could find after extensive searching and much wailing and gnashing of teeth) is to use RijndaelManaged AND use the "
<configuration> <runtime> <enforceFIPSPolicy enabled="false"/> <runtime> </configuration>
" in the Application.exe.config to turn-off FIPS forced compliance for that particular application.What a nightmare! I hope this answer helps the next unfortunate soul to run into this problem.
Keywords: Cisco IOS SNMPv3 FIPS AES 128 CFB 128 AesCryptoServiceProvider Rijndael
如果操作系统本身在调用操作系统时经过认证,则非托管 AesCryptoServiceProvider 也经过认证。 而且它也会更快地成为一个该死的网站,但代价是跨平台兼容性。
The unmanaged AesCryptoServiceProvider is certified if the OS itself is certified as it calls the OS. And it will be a darned site quicker as well, at the cost of cross platform compatibility.