Steganography and Data Hiding
Steganography hides the existence of a message; cryptography hides its content. This domain tests carrier selection, embedding capacity, the trade-off between imperceptibility and robustness, and detection through steganalysis.
Core rules
- Terms: the payload is the hidden data, the cover or carrier is the innocuous medium, and the stego-object is the result. Capacity, imperceptibility and robustness compete, so improving one usually costs another.
- Spatial-domain methods: LSB substitution alters the least significant bits of pixel or sample values; palette images and JPEG compression complicate it. Transform-domain methods (DCT, DWT) embed in coefficients and survive compression better.
- Other channels: file slack space and unallocated clusters, data appended after an end-of-file marker, EXIF and document metadata, whitespace and homoglyphs in text, unused header fields, and covert timing channels.
- Watermarking and fingerprinting are related but aim at provenance and traitor tracing; they must survive normal processing, which LSB data does not.
- Steganalysis uses statistical tests: chi-square on LSB pairs, RS analysis, histogram and noise anomalies, and comparison with a known clean reference. Detection, not extraction, is often the goal.
- Encrypting before embedding is normal, because it removes structure so the payload resembles random bits, though high-entropy payloads can themselves flag a low-noise carrier.
Worked example
A 1024 x 768 true-colour image has 1024 x 768 = 786,432 pixels and three colour channels, so 2,359,296 bits are available at one LSB per channel, about 294,912 bytes or 288 KiB. Embedding a 2 KB message uses under 1% of that capacity and leaves the image visually unchanged, which is why LSB is easy to demonstrate and easy to detect. The same image re-saved as JPEG may destroy the bits, so capacity is not the only constraint.
Traps
Steganography does not replace encryption: a discovered payload is readable unless it was encrypted first. Metadata is the usual giveaway. Hidden in an image is not the same as encrypted, and compression, resizing and colour conversion frequently erase embedded data.