CryptoBench User's Guide
CryptoBench User's Guide
Foreword
There are several very good cryptographic libraries available on the internet. Some are
offered with little or no licensing restrictions on their use, while others impose
regulations that range from non-commercial use only, to the payment of royalty fees.
CryptoBench uses a library that falls in the former group: Crypto++.
Developed and maintained by Wei Dai, Crypto++ is one of the best open source
cryptographic C++ libraries available. Offering a comprehensive set of algorithms, it is
portable across multiple operative systems and compilers. The library’s quality, stability
and performance are outstanding. Version 5.0.4 was validated by NIST and CSE for FIPS
140-2 level 1 compliance.
While there are other open -or quasi open- source libraries like Peter Gutmann’s cryplib,
Jack Lloyd’s Botan or GNU Libgcrypt, I decided on Crypto++ mainly for two reasons;
first, the library is copyrighted as a compilation, but the individual files are not (with very
few exceptions) and second, I like its design. Elegant and based on sound, almost
academic principles of object oriented software development.
1
CryptoBench v1.0
Introduction
Simply put, CryptoBench provides a source of strong cryptographic transformations to
help in the cryptanalysis process of common cryptographic schemes.
If the previous sentence doesn’t make much sense, you’ll probably find the software an
odd curiosity. Something worth tinkering with for a few moments and deleting later.
However, in doing so, I hope to spark enough interest in the subject of cryptography so
that you’ll continue experimenting. There are many websites with valuable information,
and the search engine of your preference is likely to yield hundreds of thousands (if not
millions) of links. Nevertheless a couple of good places to start are PGP’s Introduction to
Cryptography and the RSA Labs FAQ.
Cryptanalysis seeks to discover a method to translate encrypted information back to its
unencrypted state or to “break” the security of cryptographic algorithms and protocols.
However as Bruce Schneier puts it in A Self Study Course in Block-Cipher
Cryptanalysis:
“…Breaking a cipher doesn’t necessarily mean finding a practical way for an eavesdropper to
recover the plaintext from just the ciphertext. In academic cryptography, the rules are
relaxed considerably. Breaking a cipher simply means finding a weakness in the cipher that
can be exploited with a complexity less than brute-force…”.
For the most part modern cryptography is the domain of the numerical sciences, notably
Discrete Mathematics, Statistics and Information Theory. Anyone seriously interested in
this topic will undoubtedly benefit from academic training in those areas but, I think,
their mastery isn’t a sine qua non condition to get involved in this fascinating subject.
Overall, the process of cryptanalysis entails three steps: 1) identification of the
cryptographic algorithm, 2) recovery of encryption keys and 3) reconstruction of the
plaintext. Most of the available literature centers around the second step but, to my
knowledge, there is very little material regarding fingerprinting an encryption scheme
based on ciphertext only. That’s the subject of my (hobby) research and that’s what
ultimately led me to develop CryptoBench, since I couldn’t find a freely available
software that will provide multiple encryption algorithms and allow for low level control
of the encryption parameters.
Developing good cryptographic software is hard -very hard- so, if CryptoBench works
it’s because of Wei Dai’s Crypto++ library. When it doesn’t, it’s most likely my fault.
CryptoBench assumes you have a basic knowledge of cryptography and that you are
familiar with terms like hash, initialization vector, cipher-mode, asymmetric
cryptography, etc. and while the program is as intuitive and user-friendly as I could make
it (considering I wasn’t planning on releasing it to the public), it won’t stop you from
shooting yourself in the foot, so use it only on files you don’t care to lose.
2
CryptoBench v1.0
Installation
The CryptoBench software package is composed by this user’s guide and the main
executable CrytoBench.exe.
To install, just copy the files into an empty directory.
The software is certified to work on Microsoft Windows 2000, 2003 Server and XP
(Home and Pro)
CryptoBench.exe v1.0 SHA-1: 61E8107A0E642F0756A186AD448AA4B40830C3B5
Usage
Hash/Message Digest Tab
14 cryptographic hashes and 2 non-cryptographic checksums can be generated for ASCII
Strings, Hexadecimal strings and Files by selecting the appropriate checkbox and
clicking on Generate.
If you would like to produce HMACs for cryptographic hashes (not available for
checksums), select the HMAC type, enter the authentication code you wish to use and
click on Generate.
3
CryptoBench v1.0
4
CryptoBench v1.0
5
CryptoBench v1.0
Known Issues
Here’s the list of known problems that I’d like to resolve for the next release (if there
ever is one)
• There are a few memory leaks here and there. Just a few Kb, nothing horrible.
• Filename validation and file manipulation is weak.
• The error messages aren’t very clear.
• The user’s guide could be much more complete.
Future Enhancements
New functionality and improvements I would like to add for the next versions (same
caveat)
• Improve error handling.
• Optimize the code to improve speed and reduce the executable’s size.
• Control the number of rounds for every symmetric algorithm.
• Secret sharing algorithms
• LUC public key cryptosystem and LUC signature system.
• Compression operations.
• Binary Ù Text encoding/decoding.
• Stream ciphers ARC4, SEAL, WAKE and Panama.