steg-encode.pl is a basic tool for hiding secret messages in images. It comes with a friend: steg-decode.pl.

Download

Usage Example

To hide a message in an image, use the following syntax.

steg-encode.pl image message output

Output should be to either an uncompressed image file or a non-lossy compressed image file, and should be 24-bit colour. Formats such as PNG or Windows Bitmap are ideal.

An example is:

steg-encode.pl test-in.png test-in.txt test-out.png

To convert back:

steg-decode.pl image output

And to decode the file created in the example above:

steg-decode.pl test-out.png test-out.txt

Results

Performance is very slow right now — mainly the fault of the perl::Magick library. Hopefully I'll be able to speed it up for version 0.0.2.

On the other hand, image quality is fantastic! See for yourself:

OriginalWith a hidden message

As for file sizes, steg-encode.pl adds a 32-bit (4 byte) header to the front of the hidden message and then pack 3 bits into each pixel of the output file.

Testemonials

If only I'd known about this little baby soonerG Hoon, London.

Next time, I might even get away with it!G Glitter, Wandsworth.

The CIA still haven't found that hidden multi-map link I left on eBay!O bin Laden, Milwaukee.