?? file encryption utility.txt
字號:
File Encryption Utility
By Nir Dremer
File Encryption Utility based on Blowfish Encryption Algorithm.
Introduction
After a long search for a simple & secure file encryption utility that is simple and intuitive to use I’ve decided to write something of my own.
File Encryption utility is a simple tool for encrypting both text & binary files using blowfish encryption algorithm.
The utility can create a self extracted encrypted file, for a deep view of how to create a self extracted executable check my other article Creating Self-Extracted Executable .
Features
File Encryption Utility Has the following features:
? Fast & Quick File Encryption/Decryption.
? Internal File Wiping Utility.
? Creating Self-Extracted Encrypted File.
? Explorer Integration (through Configuration Dialog).
? Command Line Parameters.
Language
The File Encryption utility is writen in native C++ using ATL only for windowing classing.
The usage is ATL is minimal so anyone who’s not familiar with the library should understand the code as well.
Overview
File Encryption Utility is divided to few small projects:
? FileEnc – The UI of the file encryption utility, also holding Processing class which is also used by SelfExtract and it’s responsible for reading/writing files.
? Enc_Blowfish – Blowfish encryption implementation (based upon Bruce Schneier & Jim Conger implementation).
? SelfExtract – Self Extracted executable “header”.
? GenLib – Small Library holding all commonly used in other project parts.
? Builder – Small Console utility for creating the final File Encryption Executable.
GenLib – The General Library
In order to save time and to have a central point for all general purpose classes I’m working with a static library call GenLib.
Stripped version of the GenLib is available with the File Encryption Utility. In this version you can see the following general purpose classes:
? GenFiles – Openning OpenFile/SaveFile & OpenDirectory Dialog Boxes.
? SelfExtract – Creating Self-Extracted Executable.
? Thread – Implementation of a parent class for classes who want to execute code in separated thread (more information can be seen in the header – thread.h).
? FileWipe – Wiping a File from Hard Drive.
All those classes are under the GenLib namespace.
Additional Encryptions
Inside the FileEnc project there’s an interface called EncryptionInterface – implementing this interface can make you easily change the encryption the utility uses.
Implementing this interface requires only stream cipher implementation and saves all the overhead of working with files.
Blowfish implementation is statically linked to the utility in order to avoid hacking by changing the dll, with few minutes of work the utility can support few encryptions dlls loaded at runtime based user decision.
Security
In order to make the utility the most secure I can I’ve tried wiping information from memory when application closes.
When looking at the source, you can see that I’ve used ZeroMemory API and few others APIs to delete information from memory (like the password used).
When encrypting a file you can mark the ‘Wipe Source After Process’ checkbox and by that insure that the file you’re encrypting is not accessible.
Remarks
Decryption does NOT verify password correctness (information is being encrypted without adding any information about the file), as a result when decrypting with wrong password you will receive a file with junk inside – this is not a bug, any other implementation security for comfort.
The file encryption is based upon the password length – larger passwords equal better security.
Although I believe that the file wiping method is very secure, to be 100% sure you should use a product dedicated to that purpose.
Reference
Blowfish encryption algorithm - http://www.counterpane.com/bfsverlag.html
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -