TripleDESCryptoServiceProvider FIPS 140-2 Compliance
Asked Answered
G

3

7

I am using the System.Security.Cryptography's TripleDESCryptoServiceProvider in the following manner:

  TripleDESCryptoServiceProvider CreateCipher()
        {
            TripleDESCryptoServiceProvider cipher = new TripleDESCryptoServiceProvider();
            cipher.KeySize = 192;
            cipher.BlockSize = 64;
            cipher.Padding = PaddingMode.ISO10126;
            cipher.Mode = CipherMode.CBC;
            return cipher;
        }

I would like to know if this is FIPS 140-2 compliant. I have found numerous pages outlining different aspects of compliance, but it seems to me that Microsoft gets their compliance certificates by the platform, not by the class (make sense). In lieu of that, I have not been able to find any positive confirmation that the above cipher is FIPS 140-2 compliant. So far, the most useful links I have found:

In short, does anybody know what certificate number that this class/encryption method would fall under? Or is it platform specific? (That's what I am gleaning.)

Gaye answered 5/10, 2010 at 20:27 Comment(2)
There's a difference between FIPS 140-2 approved ciphers and FIPS 140-2 certified implementations. Triple-DES CBC is approved, but whether your implementation is certified depends on what testing Microsoft had done, and whether you are deploying it according to the criteria specified for those tests.Roan
Not attempting to turn this into a forum, but is T-DES approved by itself, or is approved as a part of a suite of ciphers, and subject to platform specifics?Gaye
T
7

FIPS 140-2 certification applies to both algorithms and modules. Algorithm implementations get certified by passing a series of test cases. Modules get certified when they meet all FIPS requirements. One such requirement is to provide cryptographic services only with FIPS-certified algorithms (and non-FIPS-certified algorithms used in a FIPS-approved manner like Diffie-Hellman key exchange).

Triple-DES is a FIPS-certified algorithm, and therefore can obtain a FIPS certificate. That's one piece of the puzzle.

The next piece is finding out what module is providing Triple-DES, and whether that module is FIPS certified. You already linked to the page where Microsoft lists all their FIPS-approved modules. That's got all you need to know. I think as of Windows Vista everything ultimately goes through bcrypt.dll.

Of course, you can go straight to the source and search modules yourself. Take, for instance, certificate #1001 for Microsoft's bcrypt.dll in Windows Vista. You can see that this module has obtained an algorithm certificate for its Triple-DES implementation (Cert. #656), so you can use Triple-DES from this module.

So how do you know you're using the FIPS-certified module? You enable FIPS mode in Windows. If you don't enable FIPS mode, you aren't using a FIPS-certified algorithm in a FIPS-approved mode of operation. On Windows, if you try to use a non-FIPS algorithm while in FIPS mode, you'll get an exception.

Bringing me to my last point that a good way to find out whether an algorithm is approved for use in FIPS mode is to turn on FIPS mode and try it!

By the way, this Triple-DES certificate page lists all approved Triple-DES modes of operation:

ECB = TDEA Electronic Codebook
TCBC = TDEA Cipher Block Chaining
TCBC-I = TDEA Cipher Block Chaining - Interleaved
TCFB = TDEA Cipher Feedback
TCFB-P = TDEA Cipher Feedback - Pipelined
TOFB = TDEA Output Feedback
TOFB-I = TDEA Output Feedback - Interleaved

And the following Keying Options.

KO 1 = Three-key Triple DES
KO 2 = Two-key Triple DES
Topotype answered 8/10, 2010 at 0:46 Comment(1)
That was the depth and clarity I was looking for. Thanks!Gaye
M
3

This has a list of FIPS compliant algorithms.

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

I've also asked a similar question about AES.

Mezzosoprano answered 5/10, 2010 at 20:37 Comment(2)
I had seen the same thing, perhaps I am looking for too refined of an answer. I was wondering if there was a specific NIST certificate(s) that I could point our clients to that encapsulates this algorithm, or the specific Microsoft cryptographic library that it is housed in.Gaye
Also, as of .NET 3.5, the following are included and are FIPS-compliant: SHA256CryptoServiceProvider, SHA384SHA256CryptoServiceProvider, and SHA512SHA256CryptoServiceProviderVannie
R
1

I personally would use AES for my encryption as it is 'lighter' and more secure than TripleDES in fact I think it is the de facto algorithm at the moment. If AES does not meet the standards I would be surprised.

Rabb answered 5/10, 2010 at 21:59 Comment(2)
I know AES meets FIPS 197, which is a super-set of FIPS 140, but we already have deployments with Triple DES, so theres no changing it in the short term. I just need to know if there is a specific NIST cert for the TripleDESCryptoServiceProvider class.Gaye
TripleDESCryptoServiceProvider is FIPS 140-1 as it is part of the CryptoApi.Rabb

© 2022 - 2024 — McMap. All rights reserved.