AES 128 using SslStream in .Net Framework 2.0
Hello,
I just wanted to inquire if all the cipher suite Cipher Algorithm types (specifically AES group) are usable in .Net framework or not. According to my understanding, AES ciphers are still not recognized by the .Net environment. I just wanted to ask if AES 64, 128, 256, etc. are available in the .Net framework to work with or not.
I have pasted some relevant posts from the other forums below:
Post 1:
CryptoAPI AES 128bit for SSL stream in Windows VISTA seems not compatibale with openssl
Does anyone know how to make it work for Openssl and CryptoAPI using AES 128bit?
I had tried the SDK sample in the "Microsoft Platform SDK\Samples\Security\SSPI\SSL\WebServer". Client side is using Openssl library, both can handshake and exchange symmetric encryption key. Openssl side can decrypt the AES 128bit stream, but Microsoft CryptoAPI side can not decrypt AES 128bit data from OpenSSL side.
If use CryptoAPI in both sides, or OpenSSL in both sides then AES will work fine. If not use AES encryption, Openssl can talk with CryptoAPI without problem. Is this a compatible problem?
Post 2:
Here is that newsgroup inquiry from somebody - November 2005:
"I am having major problems connecting to a specific SSL-enabled server.
This server only supports AES 128 and AES 256, but the .NET 2.0 SslStream
class doesn't seem to support it (although the CipherAlgorithmType enum
has the values Aes128 and Aes256)."
Answer:
The underlying security package that System.Net uses (SSPI - a part of
Windows) currently does not support those cipher suites.
Mike Flasko - PM, System.Net & Winsock, MSFT
Is it still the case that AES is not useable from .NET and only useable
via the CryptoAPI using C++ or C?
Here is the list from the CipherAlgorithmType page, where only the last 4
are useable.
Aes The Advanced Encryption Standard (AES) algorithm.
Aes128 The Advanced Encryption Standard (AES) algorithm with a 128 bit
key.
Aes192 The Advanced Encryption Standard (AES) algorithm with a 192 bit
key.
Aes256 The Advanced Encryption Standard (AES) algorithm with a 256 bit
key.
Des The Data Encryption Standard (DES) algorithm.
None No encryption algorithm is used.
Rc2 Rivest's Code 2 (RC2) algorithm.
Rc4 Rivest's Code 4 (RC4) algorithm.
TripleDes The Triple Data Encryption Standard (3DES) algorithm.
Thanks
Shuaib Ali