Just to make sure I’m being clear, for example if you have a keystream that starts: 0110100001101001

You would use your algorithm as is for the first bit of encoded data, and you would invert it for the second bit (if the bit is 1 and the chain pair has a first start index higher than the second, swap the order of the chains, otherwise if the bit is 0 and the chain pair has a first start index lower than the second, swap the order of the chains). The third bit would be with the inverted algorithm, and the fourth bit would be with the original one, and so on.

That ought to make the stego impossible to detect too (given a sufficiently random keystream).

Of course, it’s probably that applying encryption to the original file you’re hiding gets you the same level of protection, but baking it into the embedding algorithm itself is fun.

]]>