# Re: A revision of my text stego scheme

Am 23.05.2011 13:54, schrieb jbriggs444:
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.

Thank you for the comments. In my recent follow-up to Goldberg,
I asked him to do an experiment on some 5 text lines to actually
compare the two schemes (and also let the general readers
(including me) know more of what to do in real practice). Would
you be kind enough to take over that work, if he for whatever
reasons couldn't quickly respond? Thanks in advance.

M. K. Shen

.

## 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: My hash table is in need of peer review
... that the only reason to use a hash table in the first place is because ... struct entry *next; ... But there are other hash functions available, ... reprobe deltas, and prime table sizes with arbitrary reprobe deltas. ...
(comp.lang.c)