Code
Messages hidden in plain sight, in words, invisible characters, pixels, sound, printed dots, stacked transparencies, DNA and the bytes of files, and the analyses that find them.
Image Stego
Hides a message, or a second picture, in the lowest bits of a picture’s red, green and blue, saved as a PNG. Inspect reads a PNG exactly, the colour under transparent pixels and 16-bit samples too, scans 84 layouts and runs Westfeld and Pfitzmann’s chi-square attack (1999), shows every bit plane, channel, palette entry and value, and mirrors the picture in a line the reader moves.
Terms
History, how it works, how it was checked, limits
History
Steganography hides that a message exists at all; the word is Trithemius’s, from a book of about 1499. A picture’s lowest bits hide well: a step nobody sees. Low-bit coding is among the methods in Bender, Gruhl, Morimoto and Lu’s “Techniques for data hiding” (1996). In 1999 Westfeld and Pfitzmann showed that bits written in sequence even out each pair of values 2k and 2k+1, which a chi-square test measures.
How it works
Hide writes a 32-bit byte length and the message’s UTF-8 bytes, a bit in the lowest bit of each red, green and blue value, or a second picture’s highest one to four bits into the cover’s lowest, and saves a PNG Unveil writes itself, every value kept.
A PNG is read by Unveil’s own decoder, written from the W3C’s specification (2025): a palette’s indices, 16-bit samples whole, and the colour under fully transparent pixels, which a browser’s canvas turns black. Other pictures go through the canvas, and the tool says so.
Detect shows this tool’s message, scans 84 layouts as zsteg does, runs the chi-square attack and lists where the file could hide more. Bit planes steps through every plane; Channels adds luma, HSV and CMYK; Palette lights an entry or deals its colours far apart, a GIF’s frame by the table its indices name; Values gives histograms and a region’s values; Mirror reflects the picture in a line the reader moves.
How it was checked
The decoder reads 38 pictures of every colour type and depth, with and without Adam7, to the samples written, which Python’s Pillow reads back the same. Histograms, luma, the flips and turns are held to Pillow, HSV to Python’s colorsys. A message is read back exactly; the chi-square attack is run on a clean scene, random lowest bits and sixty noisy greys.
The tests hold 73 checks of this tool; 3 rest on outside material:
- Another’s computation PNG decoder (W3C PNG Specification, Third Edition): the 45 fixtures of scripts/build-picture-fixtures.py — every colour type at every depth Table 12 allows, without interlace and with Adam7, the five filters in turn, two IDAT chunks, and Image Forensics’ seven — each read to the samples written, which Python’s Pillow reads back the same
- Another’s computation Channels: the scene’s histograms of red, green and blue are Python’s Pillow’s histogram(), its luma Pillow’s convert to mode L, its hue, saturation and value Python’s colorsys.rgb_to_hsv × 255, rounded
- Another’s computation Mirror: flipped across and down, and turned 90, 180 and 270 degrees clockwise, as Python’s Pillow transposes the scene
Limits
The message is not encrypted; JPEG compression destroys it. The chi-square attack’s p is the paper’s, no calibrated p-value and no verdict: a smooth histogram, as noise gives, can hold it high with nothing hidden. The scan knows its 84 layouts only. Only a PNG is read exactly, its colour chunks unapplied; a GIF’s pixels go through the canvas, its colour tables read from the file. CMYK follows no printer’s profile. A palette’s order is measured, never read as gifshuffle’s message: Kwan’s page does not say how its bits become characters. A face seen along a mirror is no sign that one was put there.
- Andreas Westfeld and Andreas Pfitzmann, “Attacks on Steganographic Systems”, Information Hiding (IH 1999), LNCS 1768 (Springer, 2000), pp. 61–76
- W. Bender, D. Gruhl, N. Morimoto and A. Lu, “Techniques for data hiding”, IBM Systems Journal 35 (3–4), 1996, pp. 313–336
- W3C, Portable Network Graphics (PNG) Specification (Third Edition), Recommendation of 24 June 2025
- Python Software Foundation, colorsys — Conversions between color systems (the Python documentation)
- Matthew Kwan, gifshuffle (darkside.com.au): an order of n colours as a number below n!