Cryptography Reference
In-Depth Information
nography. The compression algorithm is lossy so it will usually de-
stroy any of the subtle changes youmight make to embed a message.
DerekUpham recognized that it was possible to tweak the JPEG coef-
ficients instead of the individual pixels, an approach, he called Jsteg .
The JPEG algorithm compresses data in two steps. First, it breaks the
image into 8
8 blocks of pixels and fits cosine functions (Figure 14.9)
to these pixels to describe them. That is, it finds a weighted average
of the functions that adds up to something pretty close to the original
block of 8
×
8 pixels. Then it stores the weights of these cosine func-
tions to serve as a description of this block of pixels. The amount of
compression can be increased or decreased by setting more or fewer
of the weights to be zero. Upham recognized that you could tweak
the least significant bits of the weights to store information.
His solution is coded in C and distributed as a diff file that can
be added to the standard JPEG version 4 distributed on the Net. His
code adds an additional command line feature for UNIX machines
that allows you to hide a file as you compress an image. This is a nice
approach because it builds on the standard JPEG distribution. Also,
it is important because the JPEG image format more common on the
Net. It is much more efficient than the GIF format for photographs,
although GIF is usually better for graphics when there are a limited
number of colors and run-length compression works well.
There are also a number of physiological reasons why this ap-
proach may actually generate better effects than tweaking the least
significant bits of the data. The programs like S-Tools and Stego
jump through many hoops to handle 8-bit color images. They end
up with clusters of colors in the color table that are quite similar to
each other. This can be accomplished quite well, but it may be easy
to detect by someone scanning the color tables.
Tweaking the frequencies of the discrete cosine transform that
models the 8
×
8 block of data has a different effect. Although these
tweaks can harm the quality of the final image, it is hard to distin-
guish their effects. After all, the discrete transformation is already an
approximation and it is harder to notice changes in an approxima-
tion. In essence, the bits are hidden by controlling whether the JPEG
program rounds up or rounds down. Rounding up is a 1 and round-
ing down is a 0. These numbers can be recovered by looking at the
least significant bits of the frequencies.
Upham chose one interesting approach to hiding the informa-
tion. There must be some header at the beginning of the block of
data to tell how many bits are there. Ordinarily, this would be a sin-
gle number. So the first 32 bits would be devoted to a number that
would say that there are, say, 8,523 bytes stored in the least signif-
×
Search WWH ::




Custom Search