Symmetric Encryptor Beta1

Assemblies Used

  • System.IO
  • System.Security
  • System.Security.Cryptography

Free to use Encryptor / Decryptor using 2 Symmetric Algorithms 'DES' and 'RC2' coded in C#.

Installation Instructions

  • Unzip the zip file in to any directory (Remember to keep 'Use folder names' checked ON in your unzipping program).
  • Then go to the 'source' directory and click 'compile.bat' .

Files

  • ReadMe.txt - This File.
  • SymEncryptor.exe - Sample Program which can encrypt / decrypt any file using any of the 2 symmetric algorithm 'DES' or 'RC2'.

    [Source Directory]

    source>SymEncryptor.cs - Full commented Source Code for the SymEncryptor.exe
    source>compile.bat - a Batch file to compile the above source code.

Explaination

Cryptography is basically of 2 types Asymmetric and Symmetric. Asymmetric encryption is based on the concept of Public and Private Key's. On the other hand Symmetric encryption is based on a single 'Key' . Hence it upto the person to first send the password to the receiver of the file so that he can decrypt it.

In this example we learn how to use two of the Symmetric encryption algorithms namely Data Encryption Standard (DES) and RC2. Both these are Key based algorithms. Here we use 64 bit encryption in DES and 40 bit encryption in RC2 . Also in this example you will learn how to write your own implementations of the "ICryptoStream" interface.

To encrypt the file the user has to select the file to encrypt and the file to save the encrypted data in. The file gets encrypted with the password provided by the user using either of the two algorithms selected by the user. Decryption checks the input file for validity and the algorithm used in encryption automatically. So you do not have to provide with the encryption algorithm used. The program reads it from the automatically from the encrypted file. If the password provided for decryption is same as the one used for encryption then the file will decrypt. Both binary and text files can be encrypted / decrypted .

Requirements

.NET Framework Installed.

Disclaimer

This program is for demo purpose and the author is not responsible for any damage caused to the user of this program in any way.


Similar Articles