Balancing image privacy and usability

Keep the thumbnail.
Encrypt the detail.

Thumbnail-Preserving Encryption turns a photo into a reversible ciphertext image while preserving the exact low-resolution preview people use to browse it.

Your image and key stay in this browser.

Original detail
→
Preparing ciphertext…
=Same thumbnail

The idea

An image can remain browsable without revealing its fine detail.

Conventional encryption hides everything, including the visual cue you need to find a photo. TPE deliberately reveals one measurable property: the average color of each image block.

Everything else is mixed by a keyed, reversible substitution–permutation network. Larger blocks reveal a smaller thumbnail; smaller blocks reveal more.

Live demo

See the construction work.

Start with the highlighted slider Drag the block size to choose how recognizable the preserved preview remains. Everything runs locally.

Ready
Plaintext
Original image “The witches of Chaosah family” by David Revoy, CC BY 4.0. Cropped.
Ciphertext
Encrypted image
The preserved signal The detail changed.
The thumbnail did not.

From plaintext

=exact

From ciphertext

Preserved

Exact block averagesEncrypt the sample to verify the invariant.

Method

The paper’s construction,
made visible.

Each color channel and thumbnail block is processed independently. One round substitutes pixel pairs without changing their sum, then permutes their positions.

  1. 01

    Divide

    Split each channel into b × b blocks. A block’s integer sum defines one exact thumbnail pixel.

  2. 02

    Substitute

    Re-rank each pixel pair among every valid pair with the same sum, using key-derived pseudorandomness.

  3. 03

    Permute

    Shuffle pixels within the block. Repeating both operations mixes detail while the block sum stays fixed.

  4. 04

    Reverse

    Regenerate the same keyed choices, undo each permutation, and reverse each substitution.

What encryption preserves
Each block keeps the same RGBA channel sums. Σ blockplaintext = Σ blockciphertext

So the block averages—and the resulting thumbnail—are exactly identical.

Paper

Balancing Image Privacy and Usability with Thumbnail-Preserving Encryption

Kimia Tajik, Akshith Gunasekaran, Rhea Dutta, Brandon Ellis, Rakesh B. Bobba, Mike Rosulek, Charles V. Wright, and Wu-chi Feng

Network and Distributed System Security Symposium, 2019

Download PDFDOI ↗