3

Is enforceFIPSPolicy config key, as described here meant for windows application only?

On my development machine (Windows 7) I enabled FIPS and then If I created a simple console app, as follows:

static void Main(string[] args)
{
    var algorithm = new RijndaelManaged();
    Console.WriteLine("Algorithm created!");
}

When I run it I get FIPS error:

System.InvalidOperationException: This implementation is not part of the Windows 
Platform FIPS validated cryptographic algorithms.

Then if I add following under configuration element in app.config file:

<runtime>
  <enforceFIPSPolicy enabled="false"/>
</runtime>

The application executes successfully.

Now if I do the same thing in the web application (ASP.NET MVC 4):

public ActionResult Index()
{
    var alg = new RijndaelManaged();
    return View();
}

The code will fail, even if I add same config section in the application web.config file.

I was also able to observe the same behavior in WCF web service.

I would assume that this has to do with the fact that web applications and web services are hosted in IIS (although I reproduced the same behavior with Cassini as well).

Is there any way to have a web app to "opt out" of FIPS checks same way we can do it for windows applications? Has anybody been successful in doing that?

Sebastian K
  • 6,235
  • 1
  • 43
  • 67
  • Hi Sebastian, did you find a solution to this? – JD. Mar 02 '15 at 22:41
  • unfortunately not, w ended up rewriting FIPS-incompatible pieces – Sebastian K Mar 03 '15 at 14:52
  • Thanks, was this a lot of work? We are using md5 and what scares me is if it hashes are saved and with the changes it will not be able to read them. – JD. Mar 03 '15 at 15:35
  • We were lucky and were able to tune parameters between FIPS approved and non-approved version of AES so that no data was lost. I do not believe there is FIPS compliant implementation of MD5, see here [link](http://stackoverflow.com/questions/4893088/is-there-an-alternate-hashing-algorithm-to-md5-for-fips-enabled-systems) – Sebastian K Mar 03 '15 at 21:54

0 Answers0