I just finished writing my final report for Intro to Modern Cryptography. The topic: a light, home-brewed, C++, library-asisted OpenPGP equivalent for encrypting files. The basic concept is as follows for OpenPGP:

  1. Symmetric encryption (AES etc.) is fast but you have to get the key from point A to point B securely
  2. Asymmetric encryption (RSA etc.) negates the key sharing requirement but is slow
  3. Asymmetrically encrypt a symmetric “session” key, then use the session key to encrypt the file/message you’re trying to send and you get the best of both worlds!

So I made a command line utility, using the Chilkat Visual C++ library set, that did the above for file encryption, with automatic signing built in so the recipient knows who sent the file. The application is rather basic, but it works very well (and pretty quickly for encryption/decryption…my IdeaPad took about seven seconds each to encrypt and decrypt a 100MB file) and is easy to dissect for anyone who wants to do that sort of thing.

For more information, download the package below, which includes the Visual C++ Redistributable (I think it’s required to run the encryption/decryption applications, but you might already have it), encryption and decryption binaries (EXEs, sorry non-Windows folks), sample public and private keys, the source code for the project (all ~120 lines of it) anda report about the application. It’s an EXE file because 7-Zip does a much better job of compressing the encryption/decryption binaries than plain old Zip, meaning that the file, self-extractor included, is still 500+ KB smaller than the equivalent ZIP file. In other fun news,both encrypt.exe and decrypt.exe are under 1400 KB each (floppy size!), both sipped are around 1100 KB, and both 7-zipped (without self-extractor) are less than 500 KB!

Questions and comments are welcome…post below. As far as licensing on this goes, just attribute me and tell me that you’ve done so. Thanks!

Download Package