Sept. 9, 2008, 12:39 p.m.
posted by vendetta
Protecting Network Data
Sending data across the Internet can be a risky business. There are lots of prying eyes looking at your packets as they traverse nodes on the Internet. Many applications that send data across networks incorporate some type of encryption system to encrypt data. While encrypting data is not 100 percent fool-proof, it adds a basic level of data protection to your applications. The .NET Framework includes several encryption classes to help protect your data as it travels across the network.
| Warning |
Encrypted data is not totally safe from prying eyes. No matter how complex the encryption method, it can still be broken. The key is to use an encryption method that would take so long to break, the data would not be useful anymore. |
Data Encryption
When you are sending data over the network, anyone can intercept your packets and look at their contents. If the data you are sending is sensitive (or even if it isn’t) you can encrypt it before sending out in the packets.
The .NET library’s System.Security.Cryptography namespace includes lots of classes for encrypting data. Many encryption algorithms are in use, and trying to differentiate between them can be difficult. Basically, they fall into two encryption/decryption schemes: symmetric encryption and asymmetric encryption.
Symmetric Encryption
Symmetric encryption algorithms use a single key to both encrypt and decrypt a message. The same key must be shared between both parties involved on the encrypted data transaction. Because of this arrangement, symmetric encryption is often referred to as private key encryption. A single private key performs all of the encrypting and decrypting tasks.
Symmetric encryption algorithms encrypt data in blocks, often padding data to ensure the same block sizes are used for each block. Each block of encrypted data is chained together