Tuesday 24 January 2012

Encrypting Data With a Symmetric Key in C#

Protecting data is important in many software applications. The field of cryptography has come up with methods to keep data secure, one of which is symmetric key encryption. Symmetric key encryption in natively supported in C#.NET. But first, what is symmetric key encryption?

Symmetric encryption is a method to encrypt data. More specifically, a single key is used for encryption and decryption. This allows the process to be fast and to work on large amounts of data. The size of the key is important since a long key ensures attempts to decrypt the data without the key become infeasible.Even more important than the key is the symmetric key encryption algorithm. Let's go over some of the most common ones:

DES is an outdated algorithm used by older systems. The DES algorithm uses a relatively short key which makes it vulnerable to cracking attempts by today's fast computers.

TripleDES is an attempt to address the weakness of DES by effectively using a longer key to apply the DES algorithm three times. TripleDES is significantly more secure if a long key bit size is used.

RC2 is an algorithm designed to replace DES by allowing different size keys.

The Rijndael algorithm is the most secure symmetric encryption algorithm out there today. It uses a long 256-bit key to encrypt and decrypt data. This algorithm has no known weaknesses and is the official Advanced Encryption Standard (AES).

The.NET Framework contains a namespace (the System.Security.Cryptography) namespace that contains a number of classes that implement the algorithms mentioned above. Using these classes, programmers can keep data secure.

Article Source: http://EzineArticles.com/3660236

1 comment:

  1. Really this symmetric encryption technique is very helpful in security purpose, Thanks for sharing.
    web designing course in Chandigarh

    ReplyDelete