Cryptography Reference
In-Depth Information
The source code was also included with the earlier versions of
Hide and Seek, which makes it possible to look at the guts of the
program. This makes it possible to examine how information is dis-
persed throughout the bits. If a smaller file is going to be packed into
the bits, then the program tries to randomly arrange the bits so that
they're not adjacent to each other. This has two effects. First, the
noise is more randomly distributed throughout the image instead of
being clustered on the top half. Second, you must know the loca-
tion of bits to find the data and the location is governed by a random
number generator driven by a user-chosen key. Both of these en-
hance the security of the system.
The dispersion is controlled by an 8-byte header for the file. The
first 2 bytes are the length of the file, the second 2 bytes are a ran-
dom number seed that is chosen at randomwhen the information is
packed and the third pair of bytes is the version number. The fourth
pair is not used, but is included to fill out an 8-byte block for the IDEA
cipher. This block is encrypted with the IDEA cipher using an op-
tional key and then stored in the first 64 pixels of the image. If you
don't know the key, then you can't recover the header information
that controls the dispersion of the data throughout the image.
The actual dispersion is random. At the beginning, the random
number generator is seeded with the second pair of bytes from the
header block. The code fromHide and Seek 4.1 just uses the built-in
C random number generator which may be adequate for most in-
tents and purposes. A stronger implementation would use a crypto-
graphically secure random number generator. Or, perhaps, it would
use IDEA to encrypt the randombit streamusing a special key. Either
method would add a a great deal of security.
Here's the section of C code devoted to handling the dispersion.
The code for getting the color table entry for pixel (
) and flipping
it appropriately is removed. This code will store an entire byte in the
eight pixels. The amount of the variable dispersion controls how
many pixels are skipped on average. It is set to be the rounded off
amount of 19000 divided by the length of the incoming data.
x, y
int used=0,disp=0,extra=0;
for(i=0;i<8;i++) {
// Code removed here for flipping LSB of (x,y)
disp=(random(dispersion+extra)+1);
Search WWH ::




Custom Search