News for hackers. Stuff that matters.
Re:Hide a photo inside another photo by frumiousirc on Friday April 29, 2022 @07:56AM (#31204019)
I was curious and yes, I reproduce your numbers.

A robust zip decoder can beat those odds.

It can bail on a nominal start position by considering a bit more than the local file header signature magic word.

The next two bytes is a minimum version needed to extract and its legal values are sparse. A bit further comes 2 bytes giving the compression method which also has sparse values. I'd guess sparse values (small integers) are more likely to be found in a "random" non-zip stream but would still reduce the collision probability.

Then there are CRCs. These can greatly reduce the collision probability at the cost of the decoder doing speculative work which gets thrown away if a CRC fails to replicate.

There are no comments on this comment yet.