Skip to content

Commit 75be702

Browse files
authored
Readability...
1 parent 83655bd commit 75be702

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

src/Org.Security.Cryptography.X509Extensions/ReadMe-FIPS.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
Is this package FIPS compliant? Depends.
55

66
### .NET Core Federal Information Processing Standard (FIPS) compliance
7+
* [.NET Core and FIPS](https://docs.microsoft.com/en-us/dotnet/standard/security/fips-compliance)
78
* Does not enforce the use of FIPS Approved algorithms or key sizes in .NET Core apps.
8-
* The developer is responsible for ensuring that non-compliant FIPS algorithms aren't used.
9-
REF: [.NET Core and FIPS](https://docs.microsoft.com/en-us/dotnet/standard/security/fips-compliance)
9+
* The developer is responsible for ensuring that non-compliant FIPS algorithms aren't used.
1010

1111
### Microsoft’s approach to FIPS 140-2 validation
1212

13-
REF: [Microsoft’s approach to FIPS 140-2 validation](https://docs.microsoft.com/en-us/windows/security/threat-protection/fips-140-validation)
14-
REF: [Using Windows in a FIPS 140-2 approved mode](https://docs.microsoft.com/en-us/windows/security/threat-protection/fips-140-validation#using-windows-in-a-fips-140-2-approved-mode-of-operation)
15-
REF: [Use FIPS compliant algorithms for encryption, hashing, and signing](https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/system-cryptography-use-fips-compliant-algorithms-for-encryption-hashing-and-signing)
16-
REF: [Why We’re Not Recommending FIPS Mode Anymore](https://docs.microsoft.com/en-us/archive/blogs/secguide/why-were-not-recommending-fips-mode-anymore)
13+
* [Microsoft’s approach to FIPS 140-2 validation](https://docs.microsoft.com/en-us/windows/security/threat-protection/fips-140-validation)
14+
* [Using Windows in a FIPS 140-2 approved mode](https://docs.microsoft.com/en-us/windows/security/threat-protection/fips-140-validation#using-windows-in-a-fips-140-2-approved-mode-of-operation)
15+
* [Use FIPS compliant algorithms for encryption, hashing, and signing](https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/system-cryptography-use-fips-compliant-algorithms-for-encryption-hashing-and-signing)
16+
* [Why We’re Not Recommending FIPS Mode Anymore](https://docs.microsoft.com/en-us/archive/blogs/secguide/why-were-not-recommending-fips-mode-anymore)
1717

1818
> ### FIPS Mode:
1919
> This policy setting determines whether the TLS/SSL security provider supports only the FIPS-compliant strong cipher suite known as TLS_RSA_WITH_3DES_EDE_CBC_SHA, which means that
@@ -26,30 +26,29 @@ REF: [Why We’re Not Recommending FIPS Mode Anymore](https://docs.microsoft.com
2626

2727
Credit: [https://social.msdn.microsoft.com/Forums/vstudio/en-US/521b669d-09d8-46c9-812b-843b611f42e4/aescryptoserviceprovider-and-fips-mode]
2828

29-
Abstract:
29+
Aes algorithm (as in "the algorithm") is FIPS 140-2 compliant.
30+
Aes algorithm implementation by Microsoft (Enhanced Cryptographic Provider in rsaenh.dll) is also FIPS 140-2 compliant.
31+
System.Security.Cryptography.AesCryptoServiceProvider uses rsaenh.dll CSP, hence is its also FIPS 140-2 compliant.
3032

31-
Aes algorithm (the algorithm) is FIPS 140-2 compliant.
32-
Aes algorithm implementation by Microsoft (Enhanced Cryptographic Provider in rsaenh.dll) is also FIPS 140-2 compliant.
33-
System.Security.Cryptography.AesCryptoServiceProvider uses rsaenh.dll CSP, hence is its also FIPS 140-2 compliant.
34-
35-
As an example, AesManaged DOESN'T use rsaenh.dll CSP.
36-
AesManaged checks for FIPS mode and will throw an exception is FIPS compliance is turned on.
33+
As an example, AesManaged DOESN'T use rsaenh.dll CSP.
34+
AesManaged checks for FIPS mode and will throw an exception is FIPS compliance is turned on.
3735

38-
Strictly speaking it's not the AesCryptoServiceProvider or AesManaged that are FIPS 140-2 compliant.
39-
Its the underlying libraries accessed through the CAPI (like the Enhanced Cryptographic Provider in rsaenh.dll).
40-
All other .NET CSPs, e.g. AesManaged or MD5CryptoServiceProvider, that do not rely on this libraries are not compliant.
36+
Strictly speaking it's not the AesCryptoServiceProvider or AesManaged that are FIPS 140-2 compliant.
37+
Its the underlying libraries accessed through the CAPI (like the Enhanced Cryptographic Provider in rsaenh.dll).
38+
All other .NET CSPs, e.g. AesManaged or MD5CryptoServiceProvider, that do not rely on this libraries are not compliant.
4139

42-
The security policy FIPS mode simply turns on a flag in the registry, nothing more
43-
REF: HKLM\SYSTEM\CurrentControlSet\Control\Lsa\fipsalgorithmpolicy)
40+
The security policy FIPS mode simply turns on a flag in the registry, nothing more
41+
REF: HKLM\SYSTEM\CurrentControlSet\Control\Lsa\fipsalgorithmpolicy)
4442

45-
The AesManaged class for example checks the flag in its constructor and
46-
if it's set it simply throws an exception that tells the user that this is not a FIPS compliant algorithm,
47-
because it doesn't call into the compliant libraries.
43+
The AesManaged class for example checks the flag in its constructor and
44+
if it's set it simply throws an exception that tells the user that this is not a FIPS compliant algorithm,
45+
because it doesn't call into the compliant libraries.
46+
47+
Turning the flag in the registry ON suggestes the use of FIPS compliant algorithms.
48+
But does not trigger any other system-side processing.
49+
By enabling this flag, you'll get an exception every single time an application attempts to use a non-compliant algorithm.
4850

49-
Turning the flag in the registry ON suggestes the use of FIPS compliant algorithms.
50-
But does not trigger any other system-side processing.
51-
By enabling this flag, you'll get an exception every single time an application attempts to use a non-compliant algorithm.
51+
Since rsaenh.dll is FIPS compliant, the AesCryptoServiceProvider will not throw such an exception.
52+
After all, it is only a thin wrapper around the CAPI (advapi32.dll, crypt32.dll).
5253

53-
Since rsaenh.dll is FIPS compliant, the AesCryptoServiceProvider will not throw such an exception.
54-
After all, it is only a thin wrapper around the CAPI (advapi32.dll, crypt32.dll).
5554

0 commit comments

Comments
 (0)