Everything started with that I wanted to have a free, secure, fast and easy to use file encryption/decryption utility. I found a lot of such applications on the Internet, but either they did not satisfy these four criteria together or they were too complicated for use. My main purpose was to keep my application as easy to use as possible and yet provide it with all the necessary options and features.
Here is the list of key features of
- Multiple file encryption/decryption
- File drag and drop feature
- Windows Explorer integration
- Mouse context menu integration
- System tray icon
First of all, I needed to select a symmetric encryption/decryption algorithm for
EnDe, which had to be both fast and secure. As I wanted to provide the implementation of the algorithm myself, I also wanted the algorithm to be easy to implement. Taking into consideration the above written criteria, I stopped my choice on
Blowfish - a symmetric block cipher designed by Bruce Schneier in 1993. It has a 64-bit block size and a variable key length from 4 to 56 bytes.
Below is the
public interface of
CBlowfish(const char sKey, const UINT_32 nSizeInBytes);
void Encrypt(char *const pData, const UINT_32 nNumberOfBlocks) ;
void Decrypt(char *const pData, const UINT_32 nNumberOfBlocks) ;
All operations considered with file encryption or decryption are performed in a single worker thread. Files are processed in the following way:
- Construct a
CBlowfish object used for data encryption/decryption.
- Calculate the size of the file that should be processed and make it a multiple of 8 (this is due to the block size of the
Blowfish cipher - 8 bytes).
- Allocate memory on the heap and read the data that the specified file contains to the buffer.
- Encrypt or decrypt the data in memory by using
CBlowfish object constructed in the first step, and write the encrypted/decrypted data to a new file (if the relevant option is set, then we delete the original file).
How to use EnDe ?
In order to encrypt or decrypt files with
EnDe, you need to perform three simple operations:
- Load the files you want to process
- Enter the encryption/decryption password
- Press the Encrypt or Decrypt button
EnDe does not store the passwords of encrypted files anywhere, therefore keep in mind that in case of entering the wrong password during decryption, you will get junk data instead of the original file.
As mentioned above, before encrypting or decrypting files,
EnDe first reads the contexts of the file to the allocated memory and then performs encryption/decryption operations. This approach has some drawbacks, specifically in case of very large files, i.e. their size is more than available free memory - the operating system may hang or experience significant performance loss. Therefore the next version of
EnDe will possibly be operating on files in a stream mode, i.e. reading first 8 bytes of a given file, encrypting/decrypting it and writing the output to the new file, then moving to the next 8 bytes and so on. However, it should also be noted that the first approach appears to be faster than the latter one.
I would like to thank the following people for their contributions:
- 02/12/2007 - First public release
Any comments and suggestions are highly appreciated.