BoltBait's Pages - Steganography

Sarcasm, just one of the services I offer.
 

From a request on the Paint.NET discussion board, user Alph Tech / STUART requested a plugin to detect hidden messages in existing graphics.  Using the least significan bit of color information to encode hidden messages/images is called steganography.  More information can be seen at Wikipedia here: http://en.wikipedia.org/wiki/Steganography

 

The Idea

My first thought was to devise a code for encoding text to the least significant bit of the target image.  This would have worked well, but I saw on the Wiki article that this technique could be extended to images!  Cool.  So, my second thought was to encode a 1 bit image (black-and-white).  I played around with CodeLab until I had something workable.  Then I started wondering how many bits it would take to encode a color photograph... :D

Once I had a working algorithm, I found Paint.NET user pleska's photo flood fill plugin source code.  I started with his code and made the necessary changes.

I learned a couple of new things while coding this plugin.  First, stay out of other people's namespace. Heh.  And, second, I learned how to put multiple plugins into a single DLL file.

 

The Effect DLL

You can download the precompiled effect DLL here: Steganography.dll

Just drop this file in your \program files\Paint.NET\effects directory and you should be all set.

If you need help installing effects, read this page: Installing Effects 

 

Instructions for Use

To use this plugin, you must have 2 image files.  Then, follow these steps:

1.  Open the graphic into which you wish to hide an image.  It is best if this image has lots of detail and not much area that is a solid color. 

 2.  Click the Effects > Steganography > Hide Image menu.  You will see the following UI:

3. Click on the "..." button to select the image you wish to hide.

4. Select the method (either Color or Black and White) for the encoding.

5. Click the OK button to finalize the image.

6. Save your image in a lossless format.  THIS IS CRITICAL.  Lossless formats include PNG and BMP.  This will not work if you save as JPG!

 

To view the hidden image, follow these steps:

1. Open the graphic that contains the hidden image. 

2. Click the Effects > Steganography > Reveal Hidden B&W Image to view a black and white hidden image.

Or, click the Effects > Steganography > Reveal Hidden Color Image to view a color hidden image.

 

Sample Images

This image has a hidden Black & White image:

 

  • To view the hidden image, right click on the image and pick "Save Image As" to save it to your computer.  Then, open the image in Paint.NET and follow the steps above.

This image has a hidden Color image:

 

  •  To view the hidden image, right click on the image and pick "Save Image As" to save it to your computer.  Then, open the image in Paint.NET and follow the steps above.

 

Thursday, July 5, 2007