GZSteg

From Just Solve the File Format Problem
Revision as of 01:08, 9 November 2023 by Parchivist (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
File Format
Name GZSteg
Ontology
Released 1994

GZSteg by Andrew Brown and Ken Pizzini is a modification to the GZip source code that enables hiding a file in a gzip

gzip uses LZ77 which compresses data by storing length/offset pairs that refer back in the uncompressed data stream to previous occurrences of the information being compressed. gzip considers a length of 3 to be the shortest acceptable length. We allow gzip to find the length/offset pairs and then do the following.

If the length is at least 5 then we subtract 1 and set bit 0 to the value of the bit that we need to hide. We have now hidden information in the length without pushing it beyond a valid value. Drawbacks are a slight decrease in compression (very slight) since we have to disallow lengths of 4 and some of our meddling will decrease the actual matched length by 1. The hidden file is totally invisible to the normal operation of gzip, gunzip et al and (if encrypted) will only be visible to those in the know. When the "-s" flag is not used gzip performs as normal.

You can hide about 1 Kbyte in every 100 Kbytes of uncompressed data


Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox