I am developing a windows service from where i cannot read registry. So i am looking forward for code solution to check whether machine is FIPS compliant or not.

Security Options.

if you could see the highlighted entry in the image. That particular entry i have to read from the code.

How To Read Security Options "System cryptography: Use FIPS compliant algorithms for encryption, hasing and signing" Programmatically. Where in RSOP I should query?

1

There are 1 best solutions below

1
On

A dirty workaround to detect if FIPS algorithms are enforced may be to use one that is known to be non FIPS complaint like RijndaelManaged. If enforcement is enabled it will throw an exception explicitly saying it's because of FIPS compliancy.

Dirty, but it may solve your problem...