Skip to main content

New : Cipher Breaker, the codebreaking assistant, is now on Android Discover

▮ CipherChronicle

Image methods Steganography

Alpha channel

A PNG file can carry a fourth channel besides red, green and blue: the alpha channel, which gives the opacity of each pixel, from 0 (transparent) to 255 (opaque). Most steganalysis looks at the colours. That makes this channel a good hiding place.

How does alpha-channel steganography work?

It is LSB applied to a single channel:

  1. Convert the message to bits, preceded by its length on 32 bits.
  2. Walk through the pixels in order (or in the order set by a key).
  3. Replace the last bit of each pixel’s alpha with a bit of the message.

On an opaque image, every alpha is 255. After writing, they are 255 or 254. A pixel that is 99.6% opaque cannot be told from one that is 100% opaque, whatever background the image is shown on.

The three colour channels are not modified: an image diff tool that ignores transparency reports the two files as identical.

What does an image processed with the alpha channel look like?

Like the original, pixel for pixel in colour. The only visible difference in an editor: the file “has transparency” although nothing looks transparent.

Capacity is lower than colour LSB: 1 bit per pixel instead of 3. A 600 × 400 image holds about 30,000 bytes.

What are the weaknesses of the alpha channel?

Strengths

  • Colours untouched: no analysis of the colour histogram detects anything.
  • Rarely inspected: many tools do not look at alpha by default.
  • Invisible on any background.

Weaknesses

  • A useless alpha channel is suspicious. A photo has no reason to have one; an alpha that flickers between 254 and 255 even less.
  • Removed by JPEG, which has no transparency, and by many services that flatten images.
  • Destroyed by a plain re-save in software that optimises PNGs by dropping alpha when it is almost all 255.
  • Reduced capacity: a third of LSB.

How do you recover a message hidden in alpha?

  1. Check that the PNG has an alpha channel (colour type 6 in the header, or “RGBA” in an editor).
  2. List the alpha values present: an image containing only 254 and 255 is nearly a confession.
  3. Display bit plane 0 of alpha, then read the bits in order.

Without a traversal key, reading is immediate.

What are the variants of the alpha channel?

  • Fully transparent pixels — when alpha is 0, the R, G, B values are not displayed: whole bytes can be written there. Huge capacity in cut-out logos, but much software resets those pixels to zero.
  • Multi-bit alpha — use 2 or 3 bits; the image becomes very slightly translucent.
  • Keyed traversal — spread the bits across the image, as with LSB.

In CipherChronicle

The workbench writes 1 bit per pixel into alpha, with an optional traversal key. Keep the PNG file as is: sending it “as a photo” in a messaging app strips transparency, and the message with it.

Demonstration

The CipherChronicle artwork is encrypted then decrypted right here, in your browser, with the same engine as the workbench. Drag the bar to compare.