TRex steganography - Developer's introduction

 
   
 

Index


Introduction

TRex' primary goal is to provide a framework for the evaluation of steganography algorithms. As such, there is a need for a plugin interface, a clean interface to the algorithms and easy integration of new algorithms.

Implementing new steganography algorithms primarily consists of implementing a new class derived/inheriting from the abstract class StegoAlgo. It's subclass StegoAlgoRGB simplifies integration of algorithms that operate pixel-wise, i.e. take one pixel, decide on what to do and return that pixel.

On all questions first read the API documentation created from the source (by javadoc).


Development environment

TRex development was done with Inprise's JBuilder 6.0 personal edition that is available for free for uncommercial use. You will find the JBuilder project file in the source distribution, so you can immediately start developing.

Get JBuilder from Inprise's server here.

Any combination of <put your favourite text editor here> and the java compiler will do the work fine, too, especially if you focus on algorithm development and do not change the GUI.


The TRex API

TRex' data flow is cleanly divided into the parts "GUI", "Data" and "Algorithm". The classes for GUI and algorithms are sourced out to their own packages (trex.GUI and trex.Algo, respectively).

From the main window's (class MainFrame) events, control is passed to the StegData object that loads and saves files, receives updates to the pass phrase, loads algorithm classes and the like. StegData in turn calls the currently loaded algorithm class' encryption and decryption methods, getEncrypted and getDecrypted.

As you can see from the method declaration, getEncrypted takes a String and an ImageIcon and returns a newly created ImageIcon containing the new image. getDecrypted takes an ImageIcon and returns the embedded String.

To include your new algorithm in the algorithm menu (eliminating the need to manually load the algorithm class), simply create a new line at the top of the file trex/GUI/MainFrame.java in the array "algos". The first String is the menu item, the second one is the class name and the last one should be any non-null string (null disables the string in the menu).


Important classes for algorithms

As said above, implementing a new algorithm "simply" means to write a new class that is a subclass of StegoAlgo. The main work is done by the getEncrypted and getDecrypted methods, but a few additional methods that are declared abstract in StegoAlgo; you will find them in the API documentation.

If your algorithm works on the pixels serially (i.e. "only" considering one pixel at a time in contrast to considering the whole image at once, or at least parts of it), you may consider to have a look at the subclass StegoAlgoRGB that does some of the work on it's own and relies on the implementation of TRexFilterRGB subclasses doing the actual work in the end. TRexFilterRGB on it's part is a subclass of RGBImageFilter from Sun's AWT package, mainly providing the "filterRGB" method that takes a pixel (color) and it's position in the image and returns the new pixel (color). TRex' StegoAlgoLSB is implemented inheriting from StegoAlgoRGB.

Many useful functions are provided by the TRexUtil class. There are functions for type conversions, bit shifting "wizardry", and the like.


Yes, I want to help! What can I do?

Currently, TRex waits for the following extensions:

  • A proper Makefile: Compile all java files, including algorithms (which are not recognized as belonging to the project by "javac trex/TRexApp.java" as they are not directly refferenced in the code), copy icons to class directory, ...
  • NEW ALGORITHMS! Especially advanced algorithms, e.g. working in the frequency domain (transformed by Fourier and Cosinus transformations), spreading data over the picture, preserving image statistics and so on are badly needed for TRex' future.