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

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

问题描述

我已经启用符合FIPS模式在Windows 7中,但现在我的代码失败,出现以下错误编译:

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.')

我使用SHA1(哈希)和TripleDes的(加密)加密。
我也试过SHA512和AES(256位密钥)。

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

我不能拿到项目,以建立更多,但我需要编译它使用符合FIPS标准的算法。

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

推荐答案

试着做一个空白的C#应用​​程序,编译它,应该失败出于同样的原因。最终的问题是Visual Studio的,不是你的代码。遵循的说明这里并添加到您的IDE的配置文件( Devenv.exe.config / VCSExpress.exe.config / vbexpress.exe.config ):

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"/>

这并不意味着您的应用程序不符合FIPS模式下运行,这意味着视觉Studio是不是现在。不符合要求的代码仍然编译,但如果它试图执行您会收到 System.InvalidOperationException 例外。

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.

我想,但不知道是肯定的,那该VS用于库来产生一定的散列算法实际上不符合FIPS。

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.

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

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