如何在Visual Studio 2010和Windows 7中使用FIPS验证的加密算法? [英] How do you use FIPS validated cryptographic algorithms with Visual Studio 2010 and Windows 7?

查看:189
本文介绍了如何在Visual Studio 2010和Windows 7中使用FIPS验证的加密算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Windows 7中启用了FIPS合规模式,但现在我的代码无法编译,出现以下错误:

 源文件'whatever.cs'无法打开(此实现不是Windows平台FIPS验证加密算法的一部分)

我正在使用SHA1(散列)和TripleDes(加密)加密。
我也尝试过SHA512和AES(256位密钥)。



我无法让项目再次构建,但是我需要编译它以使用符合FIPS的算法。

解决方案

尝试制作一个空白的C#应用​​程序并编译它,它应该因为同样的原因而失败。最终问题是Visual Studio,而不是你的代码。按照这里的说明,并将其添加到IDE的配置文件( Devenv.exe.config / VCSExpress.exe.config / vbexpress.exe。 config ):

 < enforceFIPSPolicy enabled =false/> 

这并不意味着您的应用程序没有在FIPS兼容模式下运行,这意味着Visual工作室不是现在不符合规范的代码仍然会被编译,但如果它尝试执行,您会收到一个 System.InvalidOperationException 异常。



我认为,但是不清楚,VS使用的算法在库中产生某些哈希算法实际上并不符合FIPS。


I've enabled FIPS compliance mode in Windows 7, but now my code fails to compile with the following error:

Source file 'whatever.cs' could not be opened ('This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.')

I'm using SHA1 (hashing) and TripleDes (encryption) encryption. I also tried SHA512 and AES (256 bit key).

I can't get the project to build any more, but I need to compile it to use FIPS Compliant algorithms.

解决方案

Try making a blank C# app and compiling it, it should fail for the same reason. Ultimately the problem is Visual Studio, not your code. Follow the instructions here and add this to your IDE's config file (Devenv.exe.config/VCSExpress.exe.config/vbexpress.exe.config):

<enforceFIPSPolicy enabled="false"/>

This doesn't mean that your app isn't running in FIPS compliant mode, it means that Visual Studio isn't now. Non-compliant code will still compile but if it tries to execute you'll receive an System.InvalidOperationException exception.

I think, but don't know for sure, that the algorithms that VS uses to generate certain hashes in libraries isn't actually FIPS compliant.

这篇关于如何在Visual Studio 2010和Windows 7中使用FIPS验证的加密算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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