Cryptography & Protocols

Steganography: Hiding Messages in Plain Sight

May 31, 2026 8 min read Haven Team

Encryption scrambles a message so an interceptor can't read it. Steganography goes a step further in one specific dimension: it hides that there's a message at all. Those are different goals, and confusing them is how people get hurt. Here's what steganography actually does, where it falls apart, and why it complements encryption rather than replacing it.


The word comes from the Greek steganos (covered) and graphein (writing): covered writing. The classic ancient example, recorded by Herodotus, is tattooing a message on a slave's shaved scalp and waiting for the hair to grow back. The medium carries a secret that an observer doesn't know to look for. That's the whole idea, and it has barely changed in 2,500 years — only the carriers have.

Today the carrier is usually a digital file: an image, an audio clip, a video, even the whitespace in a text document. The secret payload is woven into the file in a way that doesn't visibly or audibly change it. Someone who doesn't suspect anything sees an ordinary cat photo. Someone who does suspect — and has the right tools — may see something else entirely.

Confidentiality vs. Concealment

The single most important distinction in this entire topic is the one between hiding contents and hiding existence.

Property Encryption Steganography
What it hides The contents of the message The existence of the message
Observable? Yes — ciphertext is obviously encrypted No — the carrier looks ordinary
Security rests on The key, not the algorithm The adversary not looking, plus detection difficulty
If discovered Still unreadable without the key Often fully readable, unless the payload was also encrypted

That last row is the crux. Plain steganography — hiding an un-encrypted payload — fails completely the moment someone extracts it. There is no second line of defense. This is why serious practice always encrypts the payload first, then hides the ciphertext. If the concealment is discovered, the adversary still faces an encryption problem. The two techniques stack; they don't compete.

The rule

Steganography is not a substitute for encryption. It's a layer you add on top of it. Encrypt the secret, then hide the ciphertext. Never hide plaintext and call it secure.

How Data Gets Hidden in an Image

The most common technique is LSB (least significant bit) substitution. A pixel in a typical image is three bytes — one each for red, green, and blue — and each byte is a number from 0 to 255. The lowest bit of that number changes the color value by exactly 1, a difference no human eye can perceive. So you can overwrite the least significant bit of each color channel with a bit of your secret payload without visibly altering the picture.

A 1,000 × 1,000 pixel image has a million pixels, three channels each, giving three million bits — roughly 375 KB — of hidden capacity using just the lowest bit per channel. That's enough to conceal a long letter, a key, or a small file inside an unremarkable photograph.

LSB works on lossless formats like PNG and BMP, where every bit is preserved. It does not survive JPEG, whose lossy compression discards exactly the kind of fine detail LSB relies on. Hiding data in JPEGs requires embedding in the frequency-domain coefficients (DCT) the format uses internally — more complex, and the basis of tools like the historical JSteg and OutGuess.

Beyond images

Steganalysis: How Hidden Data Gets Found

The countermeasure to steganography is steganalysis, and it's surprisingly effective against naive techniques. The problem for the hider is that embedding data changes the statistics of the carrier even when it doesn't change anything a person would notice.

Natural images have predictable statistical regularities — for example, in how often adjacent pixel values pair up. LSB substitution disturbs these. A classic detector, the chi-squared attack, looks for the tell-tale evening-out of value pairs that LSB embedding produces. More modern steganalysis uses machine-learning classifiers trained on large sets of clean and stego images, and they detect crude embedding with high accuracy.

The hider's worst enemy is not the person who can read the message. It's the person who can simply prove a message is present.

This matters because in many threat models, detection alone is the failure. If you're trying to avoid suspicion at a border crossing or under an oppressive regime, it doesn't help that the discovered payload is encrypted — the mere fact that you were concealing something can be the incriminating part. Modern steganographic schemes fight back with adaptive embedding that targets noisy, hard-to-model regions of an image (textures, edges) and minimizes the statistical footprint, but it's an arms race, not a solved problem.

Where Steganography Actually Fits

For the overwhelming majority of privacy needs, you want encryption, not steganography. If your goal is "no one can read my messages," a modern end-to-end encrypted channel solves it cleanly, with decades of cryptographic scrutiny behind it. Steganography adds value only when the existence of communication is itself the thing you need to hide — and that's a narrower and more demanding requirement than most people realize.

It also overlaps conceptually with two related ideas worth knowing. Deniable encryption lets you plausibly deny that ciphertext contains a particular message; steganography lets you deny the message exists at all. And digital watermarking uses the same embedding mechanics for the opposite goal — making hidden data robust and traceable rather than secret.

If you do use it

Encrypt first. Use a carrier you generated yourself, never a file that exists publicly elsewhere (a side-by-side comparison instantly reveals the changes). Use a low embedding rate. And assume a determined, well-resourced adversary can detect that something is there.

The Honest Summary

Steganography is a genuinely useful tool with a real and ancient pedigree, but it is routinely oversold. It does not provide confidentiality on its own — that's encryption's job. Its one distinctive property, hiding the existence of a message, is also fragile against statistical analysis. Treat it as a specialized layer for the specific case where being seen to communicate is the danger, always built on top of encryption rather than instead of it.

For everyday private communication, the right foundation is strong, audited end-to-end encryption — and from there you can decide whether your threat model genuinely calls for hiding the channel too.

Try Haven free for 15 days

Encrypted email and chat in one app. No credit card required.

Get Started →