Home
%3CLINGO-SUB%20id%3D%22lingo-sub-287873%22%20slang%3D%22en-US%22%3EFIPS%20compliant%20machinekey%20section%20for%20IIS%20Application%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-287873%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3EFirst%20published%20on%20MSDN%20on%20Sep%2005%2C%202018%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20One%20of%20my%20customers%20needed%20to%20configure%20his%20ASP.NET%20site%20under%20FIPS.%20The%20information%20was%20scattered%20in%20various%20MSDN%20blogs%20and%20docs.%20To%20prevent%20the%20good%20work%20go%20to%20waste%2C%20I%20am%20blogging%20it%20here%20so%20that%20others%20can%20be%20benefited%20as%20well%3A%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20FIPS%20compliant%20machinekey%20section%20in%20web.config%3A%20%3CBR%20%2F%3E%20%3CMACHINEKEY%3E%3CBR%20%2F%3E%20validationKey%3D%22XXXXXXXXXXXXXXXXXXX%22%26nbsp%3B%26nbsp%3B%20(same%20key%20for%20all%20IIS%20servers)%20%3CBR%20%2F%3E%20decryptionKey%3D%22XXXXXXXXXXXXXXXXXXX%22%20(same%20key%20for%20all%20IIS%20servers)%20%3CBR%20%2F%3E%20validation%3D%22HMACSHA256%22%20(you%20can%20use%20any%20of%20the%203%20validation%20options%20below%20based%20on%20your%20required%20encryption%20strength)%20%3CBR%20%2F%3E%20decryption%3D%22AES%22%20%3CBR%20%2F%3E%20%2F%26gt%3B%20%3CBR%20%2F%3E%20Decryption%3A%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20AES%20Specifies%20that%20ASP.NET%20uses%20the%20AES%20(Rijndael)%20algorithm%20to%20encrypt%20and%20decrypt%20data.%20AES%20is%20the%20default%20algorithm%20and%20is%20the%20one%20that%20is%20used%20when%20the%20value%20of%20this%20attribute%20is%20Auto.%20This%20algorithm%20is%20compliant%20with%20the%20United%20States%20Federal%20Information%20Processing%20Standards%20(FIPS).%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Validation%3A%20%3CBR%20%2F%3E%3COL%3E%3CBR%20%2F%3E%3CLI%3EHMACSHA256%20Specifies%20that%20ASP.NET%20uses%20the%20HMACSHA256%20hash%20algorithm%20to%20validate%20data.%20This%20is%20the%20default%20value.%20This%20algorithm%20is%20compliant%20with%20the%20United%20Stated%20Federal%20Information%20Processing%20Standards%20(FIPS).%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EHMACSHA384%20Specifies%20that%20ASP.NET%20uses%20the%20HMACSHA384%20hash%20algorithm%20to%20validate%20data.%20This%20option%20is%20available%20for%20applications%20that%20require%20stronger%20security%20than%20is%20provided%20by%20the%20HMACSHA256%20algorithm.%20This%20algorithm%20is%20compliant%20with%20the%20United%20States%20Federal%20Information%20Processing%20Standards%20(FIPS).%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EHMACSHA512%20Specifies%20that%20ASP.NET%20uses%20the%20HMACSHA512%20hash%20algorithm%20to%20validate%20data.%20This%20option%20is%20available%20for%20applications%20that%20require%20stronger%20security%20than%20is%20provided%20by%20the%20HMACSHA384%20algorithm.%20This%20algorithm%20is%20compliant%20with%20the%20United%20States%20Federal%20Information%20Processing%20Standards%20(FIPS).%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FOL%3E%3CBR%20%2F%3E%20Do%20not%20forget%3A%20%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EBesides%20the%20above%20machinekey%20settings%2C%20you%20also%20need%20to%20ensure%20that%20the%20compilation%20section%20of%20your%20web.config%20and%20the%20page%20directives%20of%20individual%20aspx%20page%20should%20all%20have%20debug%3D%22false%22.%20A%20Debug%3D%22true%22%20will%20throw%20a%20FIPs%20compliance%20error%20before%20any%20code%20in%20your%20ASPX%20pages%20can%20run.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EIf%20you%20like%20to%20test%20your%20code%20in%20Visual%20studio%2C%20please%20ensure%20FIPS%20is%20disabled%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EAlso%2C%20FIPS%20needs%20to%20be%20enabled%20at%20the%20Machine%2FOS%20level.%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%0A%20%0A%3C%2FMACHINEKEY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-287873%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Sep%2005%2C%202018%20One%20of%20my%20customers%20needed%20to%20configure%20his%20ASP.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-287873%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eaes%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Edecrypt%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Efederal%20information%20processing%20standards%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Efips%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eiis%20fips%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Emachine%20config%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Evalidation%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eweb%20config%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3C%2FLINGO-BODY%3E
Microsoft
First published on MSDN on Sep 05, 2018
One of my customers needed to configure his ASP.NET site under FIPS. The information was scattered in various MSDN blogs and docs. To prevent the good work go to waste, I am blogging it here so that others can be benefited as well:

FIPS compliant machinekey section in web.config:
<machineKey
validationKey="XXXXXXXXXXXXXXXXXXX"   (same key for all IIS servers)
decryptionKey="XXXXXXXXXXXXXXXXXXX" (same key for all IIS servers)
validation="HMACSHA256" (you can use any of the 3 validation options below based on your required encryption strength)
decryption="AES"
/>
Decryption:

AES Specifies that ASP.NET uses the AES (Rijndael) algorithm to encrypt and decrypt data. AES is the default algorithm and is the one that is used when the value of this attribute is Auto. This algorithm is compliant with the United States Federal Information Processing Standards (FIPS).

Validation:

  1. HMACSHA256 Specifies that ASP.NET uses the HMACSHA256 hash algorithm to validate data. This is the default value. This algorithm is compliant with the United Stated Federal Information Processing Standards (FIPS).

  2. HMACSHA384 Specifies that ASP.NET uses the HMACSHA384 hash algorithm to validate data. This option is available for applications that require stronger security than is provided by the HMACSHA256 algorithm. This algorithm is compliant with the United States Federal Information Processing Standards (FIPS).

  3. HMACSHA512 Specifies that ASP.NET uses the HMACSHA512 hash algorithm to validate data. This option is available for applications that require stronger security than is provided by the HMACSHA384 algorithm. This algorithm is compliant with the United States Federal Information Processing Standards (FIPS).


Do not forget:

  • Besides the above machinekey settings, you also need to ensure that the compilation section of your web.config and the page directives of individual aspx page should all have debug="false". A Debug="true" will throw a FIPs compliance error before any code in your ASPX pages can run.

  • If you like to test your code in Visual studio, please ensure FIPS is disabled

  • Also, FIPS needs to be enabled at the Machine/OS level.