Skip the navigation

How Steganography Works

June 10, 2002 12:00 PM ET

Computerworld - Steganography strips less important information from digital content and injects hidden data in its place. This is done over the spectrum of the entire image. Here’s one way it could be implemented:

The following sequence of 24 bits represents a single pixel in an image. Its 3 bytes of color information provide a total of 256 different values for each color (red, green and blue) and thus can represent a total of 16.7 million colors. This particular value displays as a dark green:

How It Works

Now, let’s take 11 of these pixels that represent, say, part of a solid-color background. In the following sequence, the least significant (rightmost) bit of each 8-bit byte has been co-opted to hide a text message—the four characters Aha!—in ASCII binary:

How It Works

Here are the bits behind those 11 pixels:

How It Works

The hidden message occupies 32 of those 264 bits (about 12%) and contains four 8-bit bytes. In the diagram, each maroon or gold box represents a bit that had to be changed to include the hidden message. Notice that only 15 of 264 bits (less than 6%) had to be changed and only eight of the 11 pixels were altered.

The two figures below represent the 11 colored pixels we’ve been manipulating. The figure on the left is the original, unaltered version. The one on the right has been modified, as shown above. Can you see a difference? I can’t either.

How It Works

If instead of 11 pixels we had a 300KB bitmap file, we could accommodate a text message of 36KB, or about 6,000 words.

— Russell Kay

Read more about Security in Computerworld's Security Topic Center.

Our Commenting Policies