This article makes use of the Crypto++ Library v4.2, see "Obtaining the
Crypto++ v4.2 Library" below...
I developed this for two reasons,
- Because I promised in an earlier article, and
- I wanted to use the Crypto++ Library components in an application with a
Below is the GUI that is presented in this demo:
Obtaining the Crypto++ v4.2 Library
To run compile the demo code, you will need to download the Windows version
of the Crypto++ Library v4.2 and source files from http://www.eskimo.com/~weidai/cryptlib.html, and compile
Below you will find out what I did to get this built and working. If you
follow the steps below, you will be able to compile/run this example.
- Download the Crypto++ v4.2 Library (see link above) & this demo.
- Compile the Crypto++ Library (both Debug/Release).
- Take the Debug version of the library and rename it to
- Take the Release version of the library and rename it to
- Copy the *.lib files to both of the LIB directories where VC++
- Unzip the demo and put it into a directory of your choice.
- Go to the Menu -> Tools | Options | Directory Tab, and enter the
directory path where you unziped the Crypto++ Library to.
- Go to the Menu -> Project | Settings | Link Tab, and enter the build
library (cryptlib42d.lib/cryptlib42r.lib) in the "Object/Library modules"
- Make sure the above library matches the build
(*r.lib=Release/*d.lib=Debug) for the Cryptest demo.
- Compile the Cryptest demo (do not run it from here).
- For the validation portion to work, you need to copy the .dat files
from the Crypto++ location to the build directory (Debug/Release).
- Go To the Cryptest.exe and execute it from Windows Explorer.
- Let me know how it goes!!!!
Now that you have the demo working, let me explain a few things...
I have made the GUI so that it is a bit hard to get it to error (although it
I used the following functions in this demo:
EncryptString(using DES-EDE in CBC Mode)
DecryptString(using DES-EDE in CBC Mode)
I notified Wei Dai that I was doing this project and asked his permission to
post this at CodeProject. He was kind enough to answer the email and he let me
know that this posting was covered in the License.txt file. So, you do
not need to bother him with these dumb questions as I did.
A special thanks to Wei Dai for making the Crypto++ Library publically
available for us to enjoy it!!!
- Only tested with Visual C++ 6.0 SP5.
- Only tested with Windows 2000.
- NOT tested with WindowsXP (yet).
- It is not fully tested and debugged.
- For you to see TCP forwarding working, you must receive TCP packets on the
port specified, otherwise the machine will seem to hang whilst it listens on the
I have been programming for 19 years (Unix C, Scripting, VB, C/C++, C#). I am getting too old to talk about it and been in the Security line of work (both Military/Civilian) for 25+ years.