Steganography lab · v2

Hide words
in plain sight.

Justeg tucks a message into the lowest bits of an image's pixels. The picture looks the same; the words are there for anyone holding the right key.

  • AES-256-GCM optional encryption
  • 0 bytes uploaded
  • ±1 per channel change

The lab

Pick an image. Leave a trace.

Runs entirely in your browser

0 B / –

Pick an image to see how much it can hold.

Without it, the message cannot be found or read.

Bits per channel

How it works

The secret lives in the least significant bit.

  1. 01

    Every pixel is three numbers

    Red, green and blue, each stored as 8 bits from 0 to 255. Your eye can't tell 182 from 183.

  2. 02

    The last bit is spare

    Justeg overwrites the lowest one or two bits of each channel with bits of your message. Colours shift by at most ±1 or ±3.

  3. 03

    A key decides where

    With a passphrase, the message is encrypted first and then scattered across the image in an order only the key can reproduce.

Why nobody notices

A channel's bits are not equal. The top bit is worth 128 steps of brightness, the bottom bit just one. Changing the bottom bit moves the colour by less than 0.4%, well under the smallest difference human vision can pick out, measured below as ΔE in the CIELAB colour space.

Try it Flip one bit of every channel
original
bit 0 flipped
R10110111182 → 183
G01101001104 → 105
B11010111214 → 215

ΔE 0.37 · below the 2.3 just-noticeable difference. Your eye can't tell them apart.

Zoom in Hiding the letter “J” in three pixels

“J” is byte 74, or 01001010 in binary. Each bit replaces the lowest bit of one colour channel, so it takes eight channels: just under three pixels.

PixelChannelBeforeMessage bitAfterChange
1R011101100011101100
1G10100100110100101+1
1B110101000110101000
2R01111001001111000−1
2G10100110110100111+1
2B11010101011010100−1
3R011101111011101110
3G10100011010100010−1
3B11010010–110100100

Roughly half the bits already match, so only 5 of 8 channels change, each by one step out of 256. The largest colour difference is ΔE 1.38, 60% of the smallest difference the eye can notice.

What happens when you press Hide

Pipeline From message to image
  1. 01TextAny Unicode, encoded as UTF-8 bytes.
  2. 02Derive keysPBKDF2-SHA256, 600k rounds, random 16-byte salt.
  3. 03EncryptAES-256-GCM seals the bytes and adds a tamper tag.
  4. 04FrameA header records the length so the reader knows where to stop.
  5. 05OrderSequential from the first pixel, or a keyed Feistel scatter.
  6. 06Write LSBs1 or 2 bits replace the lowest bits of each R, G and B.
  7. 07Save losslesslyPNG, or PPM for Netpbm covers. JPEG would wipe the bits.

runs only with a passphrase. Revealing reads the same slots in the same order and runs every step in reverse. With encryption, a wrong passphrase picks the wrong slots and fails the tag check, so it finds nothing rather than garbage.

Layout What is actually written

Plain · written in order from the top-left pixel

The magic bytes let the reader find it, and also let anyone else find it. Hidden, not secret.

Encrypted · salt in order, the rest scattered by the key

No magic bytes and no fixed position: without the passphrase there is nothing fixed to search for.

Invisible, not undetectable

The eye judges a whole colour value; a forensic view can isolate the one bit Justeg changed. The bit plane shows only the lowest bit of every channel, and that is where a message shows itself.

Real example The message hidden in this site's favicon

The egg in your browser tab carries a 100-byte plain message. These are its 64×64 pixels before and after Justeg wrote it, rebuilt with the same code the lab uses.

Favicon, before
Favicon, after
Bit plane, before
Bit plane, after
Pixel 1RGBBit plane
Before000001110000011000001011
After000001100000011100001010

rgb(7, 6, 11) → rgb(6, 7, 10) · ΔE 1.00, below the 2.3 just-noticeable difference. In the bit plane the same pixel jumps from magenta to green.

Why the band only shows up in the bit plane

  • The bit plane amplifies one step to the full range. It throws away the top seven bits and paints bit 0 as either 0 or 255. A change of 1 out of 255, invisible in the favicon, becomes the largest contrast the screen can show.
  • A flat colour has uniform lowest bits. The background is rgb(7, 6, 11) everywhere. Its lowest bits are 1, 0, 1, so the whole plane is one solid magenta.
  • Message bits look random. The 100 bytes become 800 bits, one per channel, written in order from the top-left: 267 pixels, just over 4 rows. Where a message bit disagrees with the background's bit, the channel changes. That is 389 of 800 channels, about half, scattered with no pattern, so the uniform magenta breaks into noise.
  • Texture hides it, even here. Inside the egg the plane is busy before and after: the gradient already moves neighbouring pixels by a step or two, so its lowest bits are naturally noisy. Bits written there would blend in. That is why photos make better covers than flat graphics, and why a passphrase scatters the message across the whole image instead of leaving a band.

Try it on your own images: open the lab, load a picture and switch to Bit plane. A plain message shows up as a band along the top, while an encrypted one is spread across the whole picture.

Security model

Hidden and sealed.

  • AES-256-GCM

    Authenticated encryption. A wrong passphrase or a single flipped bit is detected, never misread.

  • PBKDF2 · 600k

    Passphrases are stretched with 600,000 rounds of SHA-256 and a random salt per image.

  • Keyed scatter

    A Feistel permutation spreads bits across the whole image, so there is no band to spot.

  • No signature

    Encrypted images carry no magic number. Without the key they look like any other PNG.

  • Nothing uploaded

    Images are decoded, edited and encoded on your device. No server ever sees them.

Honest limits

  • Re-saving as JPEG, resizing or posting to most social apps destroys the hidden bits. Share the PNG as a file.
  • Statistical steganalysis can still flag that an image was edited, even if it can't read the message.
  • Unencrypted mode is hidden, not secret: anyone with Justeg can read it.