How do you use FIPS validated cryptographic algorithms with Visual Studio 2010 and Windows 7?

ScArcher2 picture ScArcher2 · Feb 17, 2011 · Viewed 13.7k times · Source

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.

Answer

SwDevMan81 picture SwDevMan81 · Feb 17, 2011

This has a list of FIPS compliant algorithms. A more complete list is here

FIPS compliant Algorithms:

Hash algorithms

HMACSHA1

MACTripleDES

SHA1CryptoServiceProvider

Symmetric algorithms (use the same key for encryption and decryption)

DESCryptoServiceProvider

TripleDESCryptoServiceProvider

Asymmetric algorithms (use a public key for encryption and a private key for decryption)

DSACryptoServiceProvider

RSACryptoServiceProvider

So you will need to use SHA1CryptoServiceProvider and TripleDESCryptoServiceProvider to be FIPS compliant