SSL is an ideal solution for protecting the M-C-A (Mission Critical Applications). For providing this feature .NET Framework provides the support using Cryptography classes. Namespace used is System.Security.Cryptography.
Closer Analysis
Cryptographic algorithms use keys to scramble information. The two kinds of encryption are secret key (symmetric) encryption and public key (asymmetric) encryption.
Symmetric Encryption
Most of us are familiar with Symmetric encryption that uses the same key to encrypt and decrypt information. This type of encryption is extremely fast, but it is easily comprised if another user knows the secret key value.
. NET Framework provides the following classes that implement Private-Key Encryption algorithms:
1. DESCryptoServiceProvider
2. RC2CryptoServiceProvider
3. RijindaelManaged
4. TripleDESCryptoServiceProvider
Asymmetric Encryption
Asymmetric encryption uses a key pair that consists of a public key and a corresponding private key. With asymmetric encryption, information encrypted using the public key can be decrypted only using the matching private key. The reverse also applies: The public key is the only key that can decrypt data encrypted with the private key.
Asymmetric encryption is an elegant solution to the problems faced by symmetric encryption, but its added complexity comes with a significant cost: Using it is hundreds of times slower. Often, symmetric and asymmetric encryptions are combined, such that asymmetric encryption is used to distribute a random key. This random key is then used to encrypt subsequent messages using symmetric encryption. This technique is used natively in SSL. If you attempt to encode all communication using asymmetric encryption, your application will probably perform terribly.
. NET Framework provides the following classes that implement Public-Key Encryption algorithms:
1. DSACryptoServiceProvider
2. RSACryptoServiceProvider
Additional Information
. NET also provides additional classes in the System.Security.Cryptography namespace that generate random numbers and create hash values and digital signatures, which can be used to verify data and ensure that it hasn't been altered in transmission.
Some of these classes actually perform the appropriate cryptographic tasks in managed .NET code, while others are just thin .NET wrappers over the unmanaged CryptoAPI library.
Algorithm Type
Key Size Information
RC2
64 BITS
DES
64 BITS
3DES
192 BITS
AES
256 BITS
IDEA
128 BITS
CAST
128 BITS