Cryptography Reference
In-Depth Information
used+=disp;
extra=((dispersion*(i+1))-used);
x+=disp;
// Move over x pixels. Code removed to handle
// wraparound.
}
There is a certain rough, frontier aspect to just choosing arbitrary
random walks throughout the data. It does not require that there
be any prior communication between two people who happen to be
hiding information in the same picture. They're just both keeping
their fingers crossed that the collisions will be minor and the error-
correcting codes will be able to fix them.
Here is a more principled way to create multiple channels in an
image. If all parties coordinate their use ahead of time, they can
ensure that their random walks will not collide. This saves space
because error-correcting codes do not need to be used, but it does
increase the complexity of the process.
To creat e
-byte blocks of data.
One byte from each block will be given to each channel. In the sim-
plest and most transparent approach, the assignment of byte and
channel number is hard coded. Channel 1 gets byte 1, channel 2 gets
byte 2, and so on. A better approach shuffles the bytes by using a set
of permutations of the values between 1 and
n
channels, divide the file into
n
. Here's a good way to
generate a sequence of random permutations of the set:
n
1. Start with the ordered set (1
,
2
,...,n
) .
2. To generate a new random permutation repeat this
j
times. A
larger
j
is better, but less efficient.
(a) Choose two items in the set at random using the output of
a cryptographically secure random number generator.
(b) Swap their positions. For example, if the set is (5
4)
before and the second and fourth values are chosen by
the random number generator, then the result will be
(5
,
1
,
3
,
2
,
,
2
,
3
,
1
,
4) .
3. Output this permutation. Goto step 2 to keep going.
Search WWH ::




Custom Search