# Re: A revision of my text stego scheme

On May 21, 10:30 am, Mok-Kong Shen <mok-kong.s...@xxxxxxxxxxx> wrote:
I have a presumably very dumb question: Isn't it a general
property of hash functions that it is difficult to predict
what a change of input has on the hash output? If that's
indeed the case, then one might under circumstances have
to do a couple of tries to get the right stego bit in
your scheme IMHO, while in my scheme it is deterministic
in the sense that one knows exactly that a change is right.

Yes, the easiest way to predict what effect a change
in the input will have on the output is typically by
computing the hash.

The expected value of the number of tries to find a
random modification that affects a particular hash bit
is 2 (assuming a good hash function). The expected
value of the number of tries to find a random
modification that affects a particular pair of hash bits
in a particular way is 4.

In general, the expected value of the number of tries
to find a one in n match is n.

That's 0.5 bits per try for either a one or a two
bit match.

You could improve the bits per try by shifting to
base 3, thus getting log(3)/log(2) bits per 3 tries

That's about 0.528 bits per try.

The optimal criterion is for a one in 2.718
match, yielding just under 0.531 bits per try.

You may recognize Euler's number.

[This computation is my excuse for feeding the troll]

your scheme IMHO, while in my scheme it is deterministic
in the sense that one knows exactly that a change is right.

.

## Relevant Pages

• Re: Crack in Computer Security Code Raises Red Flag
... > Crack in Computer Security Code Raises Red Flag ... Hash functions are at work, for instance, for most of the ... the uniqueness of the hash is what makes ... > Also worrying cryptographers is a stream of recent hash compromises. ...
(sci.crypt)
• Re: Crack in Computer Security Code Raises Red Flag
... > Crack in Computer Security Code Raises Red Flag ... Hash functions are at work, for instance, for most of the ... the uniqueness of the hash is what makes ... > Also worrying cryptographers is a stream of recent hash compromises. ...
(alt.computer.security)
• Hash functions (was: Maximum String size in Java?)
... > when the hash values mismatch. ... Your library necessarily requires seperate hash and rehash ... > Bob Jenkins' collection of hash functions. ... the effect of a modulo division is probably negligible. ...
(comp.programming)
• Re: Flow ID, LACP, and igb
... May I express my glee and astonishment that  you're debating the use of complicated hash functions ... the *most* important thing is distribution with realistic data. ... Many of your ports will be 80 and 53, and if you're going through a router your ethernets ... I pulled all four hash functions out into userland and microbenchmarked ...
(freebsd-net)
• Re: Maximum String size in Java?
... > I find it interesting that Paul Hsieh, alias websnarl, ... when the hash values mismatch. ... Bob Jenkins' collection of hash functions. ...
(comp.programming)