The challenge of steganography is making it accessible without making it obvious. Steganography fails when the presence of a hidden message is obvious. The art and science of detecting steganography has been a topic of study for years. There are papers on hiding messages. There are papers on finding those messages. There are papers on hiding multiple messages so you can reveal one and deny the presence of the other.
Here’s how I made it with ImageMagick:
$ convert -size 100x100 canvas:#ffffff white.png
Let’s embed the message “One if by land, and two if by sea;” in the white image with the password “Henry Wadsworth Longfellow”. Here’s what it looks like:
As you can expect with decent steganography, it’s hard to tell that there is a message embedded. Since only the least‐significant bits are being modified, the difference is subtle. Let’s look at the difference between the two images:
$ composite white.jpg white_message.png -compose difference white_difference.png
That doesn’t seem to help much. The changes become much more obvious when we expand the contrast. Here’s what we get when we normalize the image:
$ convert white_message.png -normalize white_message_normalized.png
Now we can see what actually changed. Now this is a simple case—we had the source image and the image with the embedded message. However, it’s clear that the changes made to embed our image have generated a pattern atop the image.
In a future post, I’ll look at how software can look for these patterns.