[ Download Code ] | [ Download Help ]
Many programmers out there in the code wise community, and those that are in your everyday office life, may state that implementing a strong encryption is a very difficult chore. It is a difficult task, but with a little ground work, any difficult task becomes easy. We've covered most of the aspects of the DES and Triple DES encryption. In a total of 350 lines of code including comments, we've implemented one of the most widely-used encryption algorithms available.
Key points to remember:
- Triple DES is as secure as your Private-Key and Initialization Vector.
- It is best to research the different types of encryption algorithms to ensure your choice is the right one for the job.
- The DES-base algorithms have been broken in the past. However, realistically, Triple DES is more than enough in terms of encryption strength for most of our applications.
- NEVER lose the Private-Key, Initialization Vector, and Cipher Mode combination per encryption. Without all three parts absolutely correct, you may never decrypt the original data.
- The example source may work as is but may require some alterations to fit your applications needs.
- Read, read, read. Test, fail, test again. Always try what you've read, and continue to keep your knowledge up to date.
Salted MD5, Triple DES, Rijndael (AES), Blowfish, and RSA are common encryption algorithms used in the programming world today to safely store sensitive information. Prior to jumping on a technology, it's to your best interest to know the overall details of each encryption algorithm including their flaws before deciding on the exact one you wish to implement.
For further reading on cryptography with the .NET Framework, you may visit the following sites.