HashGUI: Hash Utility GUI

By Mitch Stuart
Copyright © 2005 FullSpan Software  -  Usage subject to license
Software Version: 1.0  -  Document Version: $Revision: 1.1 $, $Date: 2005/03/18 08:16:14 $

Introduction

The Hash Utility GUI is a graphical interface to the hashing and password related functions of the FSJUtil library. The utility computes hash values based on input plaintext and salt values. It can also generate random plaintext (for example, to create a random password) and salt values. Here is a screenshot showing HashGUI in action:

Value generation screen

It might seem like overkill to have an entire GUI program just to deal with passwords and hash values. But imagine if we used a text-mode (console) program: how would we allow the user to input private data, like passwords?

I decided to write a GUI program to avoid the console-mode issues mentioned above, plus the fact that I wanted a user-friendly, self-explanatory program.

Getting HashGUI

Background and Terminology

Hash Values
Let's say you need to store a password in a file or database. You could just store the plaintext password. But then anyone with access to the file or database could see the plaintext password and impersonate the owner. By using a cryptographic hash function, you can store the hash value instead of the plaintext value. Later, when you need to check if a password matches, you hash the input password and compare it to the stored hash value. Hashing is a one-way operation: the original plaintext value cannot be recovered from the hash value.

Salt Values
A salt value is an additional input (besides the original plaintext) into a hash function. Using a salt makes the hash value more secure.

Base64
Hash and salt values are made up of binary data. To work with such values in a user interface like HashGUI, they need to be encoded in a way that makes them easy to read and type. HashGUI uses the Base64 encoding.

Installing and Running HashGUI

To install HashGUI, simply expand the distribution archive (.zip or .tar.gz file) into a directory of your choice. For the remainder of this document, we'll refer to this installation directory as HASHGUI_DIR.

To run HashGUI, open a shell or command window and type the following command:

   java -jar HASHGUI_DIR/build/lib/hashgui.jar

Windows
Once you have confirmed that HashGUI runs properly by manually entering the above command, you might want to do one or more of the following:

Unix (Linux or other)
Once you have confirmed that HashGUI runs properly by manually entering the above command, you might want to do one or more of the following:

Using HashGUI

HashGUI was designed to be self-explanatory: you should be able to use it fairly easily by just reading the text on the screens. In this section we'll look at the menu screen and one of the computation screens, which should give you a good feel for how to use HashGUI.

Menu Screen
The menu screen (below) shows the functions that are available in HashGUI. The input(s) and output(s) of each function are listed. Click the associated button to access the function. For example, click button 3 to access the value generation screen described in the next section.

Menu screen

Value Generation Screen
When you click button 3 on the menu screen, you will see the value generation screen below. This screen:

Value generation screen

You can click the Compute button to repeat the above process. Each time you click Compute, new values will be generated.

Click the Back button to go back to the menu, or the Exit button to exit HashGUI.

When you first access this screen, the default values will be present in the editable fields. You can type over these values to specify your own:

Building HashGUI

To build HashGUI using Ant, change to the top-level HashGUI directory and run ant. This will use the build.xml build file in that directory.

HashGUI was programmed using the NetBeans 4.0 development environment and GUI builder. To build HashGUI using NetBeans, open the top-level HashGUI directory as a NetBeans project. NetBeans will automatically detect the presence of the nbproject subdirectory, and will allow you to import and build the project.

License and External Libraries

HashGUI is released under the FullSpan license. HashGUI uses the FSJUtil library, which is released under the same license.

In addition, HashGUI uses the following external libraries, which are distributed under license from their copyright holders:

Component Description License
Apache Commons Codec Base64 encoder/decoder This product includes software developed by the Apache Software Foundation (http://www.apache.org/).

License text: license-apache.txt
JGoodies Looks "The JGoodies look & feels make your Swing applications and applets look better." This product includes software developed by JGoodies (http://www.jgoodies.com/).

License text: license-jgoodies.txt