Secret codes

Messages hidden in pictures

Date: c. 1985Who?: Computer scientists worldwide

Invisible messages slipped into the pixels of a photo

Hidden messages
A photo of trees
A photo of trees — it hides a picture of a cat in its pixels
The original uploader was Cyp at English Wikipedia — CC BY-SA 3.0 — Wikimedia Commons

In brief

A digital photo is made of millions of pixels, each coded by numbers. By changing some of those numbers very slightly, a whole text can be hidden inside without the picture changing to the naked eye. This is digital steganography, developed from the 1990s onwards.

The story

Each pixel of an image is described by three numbers (red, green, blue) between 0 and 255. If you change the last binary digit of these numbers, the colour shifts by one step out of 256: nobody can see the difference. These “least significant” bits can therefore carry a message. Software can hide and extract texts this way, or even other images.

The same idea is used to protect works: invisible “digital watermarks” sign photos, films and pieces of music. And in 2005, researchers showed that many colour laser printers print tiny, almost invisible yellow dots on every page, coding their serial number and the date of printing.

Example

Red pixel 200 = 11001000; replace the last bit with a bit of the message: 11001001 = 201. The eye sees no difference.

Did you know?

Printer dots measure only a fraction of a millimetre: you can only see them with a magnifying glass and blue light.

Sources: D. Kahn, The Codebreakers, 1967 (rev. ed. 1996); S. Singh, The Code Book, 1999; F. L. Bauer, Decrypted Secrets, 4th ed., 2007; C. P. Bauer, Secret History: The Story of Cryptology, 2nd ed., 2021; texts written for this site.

In the same family: Hidden messages