LSB steganography in five minutes
How to hide bytes inside an image without changing how it looks. The technique behind Stiger, explained from scratch.
Steganography is the older cousin of cryptography. Cryptography says “you can see this, but you can’t read it.” Steganography says “you can’t see this.” Stiger uses both, but the hiding part is worth understanding on its own. The simplest, most-cited technique is LSB substitution: hide bytes in the least significant bits of an image.
A pixel is three numbers
A normal PNG pixel is three numbers — red, green, blue — each from 0 to
255. A pixel of value (220, 100, 50) is some shade of orange. Change
the blue from 50 to 51, and the pixel becomes (220, 100, 51). To
your eye, it’s still the same orange. The change is below your perception
threshold.
The “least significant bit” of 50 is the one that flips between 50 and
51. Decimal 50 is binary 00110010; the 0 on the right is the LSB.
Flip it and you get 00110011, which is 51. The bit is “least
significant” because flipping it changes the number by exactly one,
whereas flipping the leftmost bit changes it by 128.
That one bit is the slot. We can put one bit of our data in there instead.
How many bits fit
A 512×512 sticker has 262 144 pixels. One bit per pixel, in the blue channel, is 32 768 bytes: room for a few kilobytes of text after the framing, which is many paragraphs. More channels or more bits per channel would hold more, and would also move the image further from a natural one. One bit in one channel is the conservative choice, and blue is the channel the eye is least sensitive to.
Why pixel order matters
The naive approach is to write your data starting at pixel 0 and going in row order. Easy to write, easy to detect: the first ~thousand pixels of the image have suddenly higher entropy than the rest, because random bytes don’t follow the smooth gradients of natural images.
The fix is to permute the pixel order using a key derived from the password. Instead of writing to pixels 0, 1, 2, 3…, you write to pixels 84372, 11, 200001, 99… — a deterministic shuffle that only the password-holder can reproduce.
Now the bytes are scattered evenly across the image, with no region that looks different from the rest. To anyone without the password, the order can’t be reproduced, so the bits read as random. To anyone with the password, the original ordering is recoverable trivially.
Why encryption on top
A permuted order hides the data from the eye and removes the obvious pattern. It does not protect the data itself from someone who guesses the technique and the key. So the payload is encrypted first (Stiger uses AES-256-GCM with PBKDF2-derived keys, 600 000 iterations) and only then embedded: whoever works out the whole layout still holds bytes that look like noise without the password. Cryptography hides what the bytes say; steganography hides that there are bytes.
What breaks LSB steganography
Three things, all of them lossy operations on the carrier:
- Resampling. Resize the image, even by 1 pixel, and the LSB layer is gone — the new pixels are interpolated from the old, with no relationship to the original bits.
- Recompression. JPEG, in particular, throws away high-frequency detail, including LSB noise. PNG-to-JPEG re-encode destroys LSB-hidden data.
- Format conversion. Anything that touches the pixel values — a filter, a colour-space conversion, an “auto-enhance” — disturbs the LSBs.
The carrier has to survive unchanged from sender to receiver. This constrains where steganography is useful: chat platforms that recompress aggressively are bad carriers; ones that pass images through byte for byte are good. iMessage image attachments mostly are, but not on every path: group chats, cross-platform forwarding and saving to Photos before re-sharing may recompress them, and a photo with a wide-gamut Display P3 colour profile is re-encoded even in a one-to-one chat. Its native stickers are not carriers at all, they get re-encoded to HEIC — which is why Stiger sends attachments.
What this is not
LSB substitution is the textbook intro to steganography, not the state of the art. There’s a whole field of steganalysis: statistical tests that detect hidden bits in images, permuted order or not. Textbook tests from around the year 2000 flagged every stealth sticker of the builds before November 2026 and no longer do; a trained classifier still finds a send on a drawn emoji almost every time, and anyone with the original image sees the change. I measured both, and what I changed because of it, in I pointed steganalysis tools at Stiger’s own stickers. Forensic vendors ship such tools. Against anyone running them, LSB-1 is not invisible.
For Stiger’s use case, looking like a sticker to someone scrolling a chat or running a keyword search, it’s enough. If someone runs forensic tools on your phone, assume they can see that something is hidden, just not what, as long as the password holds.
The practical version of all of this: the open spec, and the story of how Stiger came to be.