b2KIT

Visual Secret Sharing (Image Split)

Split an image into visual cryptographic shares that reveal the secret only when overlaid. Based on Naor-Shamir scheme.

Tested tool guide Tested browser tools Checked August 16, 2026

What Visual Secret Sharing (Image Split) does, with a checked example

This tool splits an image into two shares of random noise that decrypt by being stacked, not by computation, based on the Naor-Shamir visual cryptography scheme. Every pixel expands into a 2x2 block; white pixels get identical blocks in both shares, black pixels get complementary ones, and the choice is randomized per pixel. Overlay the shares - any black subpixel wins - and the original reappears at half contrast. The surprise: either share alone is meaningless noise, and there is no key to leak or lose.

Worked example

A concrete input and expected output from the current implementation.

Input

A 2x2 black-and-white image, pixels in row-major order: white, black, black, white (uploaded as an image file).

Expected output

Two 4x4 shares (B = black, W = white subpixel). One valid random run: Share 1: B W B W / W B W B / W B W B / B W B W. Share 2: B W W B / W B B W / B W W B / W B B W. Overlaid (OR, black wins): B W B B / W B B B / B B W B / B B B W - a gray 2x2 block top-left and bottom-right, solid black top-right and bottom-left, reproducing the original.

Each input pixel becomes a 2x2 block, so a 2x2 image yields two 4x4 shares. The example pairs identical diagonal blocks for white pixels and complementary blocks for black pixels, so the OR overlay shows two black subpixels per white pixel (read as gray) and four per black pixel (solid black). Any random choice of diagonals gives an equivalent result.

How the result is produced

1

Pixel expansion into 2x2 blocks

Every source pixel becomes a 2x2 block in each share, so each share is twice the source's width and height. White pixels are encoded with identical blocks in both shares; black pixels with complementary blocks. Which of the two diagonal patterns is used is chosen randomly, independently per pixel, which is what makes each share look like uniform noise.

2

Overlay is OR logic, and black wins

Reconstruction is a logical OR: wherever either share has a black subpixel, the stack shows black. Black pixels overlay to four black subpixels; white pixels to two black and two white, which the eye reads as gray. Because pattern choice is uniform and random, a single share is statistically identical whether the secret pixel was black or white - it carries zero information about the image.

Good uses

  • Split a photo of a recovery code or signed document between two custody holders: each holds one share, neither can view it alone, and both must physically meet - or stack prints - to reconstruct. No password exists to leak or brute-force.
  • Archive an image on paper without a software dependency: print both shares and file them separately. Years later, anyone with both prints recovers the document by stacking them, needing no decryption program, no key, and no format support that has since gone obsolete.
  • Send a secret image over two independent channels: email one share and hand over the other on paper or USB. An attacker who compromises either channel captures nothing but noise; both channels must fail before the image is exposed.

Limits and checks

  • Loss is total and one-way: a single share is random noise with no hidden content, and if one share is lost there is no key, password, or backup that recovers it. Regenerating a new pair from the original image is possible, but a fresh share will not overlay with a surviving old one.
  • The reconstruction is low-fidelity by design: shares are 2x the source dimensions, and overlaid white reads as 50% gray, roughly halving contrast. Fine text, thin lines, and busy photographs can become unreadable; treat the overlaid result as a degraded view, not a copy.
  • The Naor-Shamir construction is defined for binary black-and-white pixels. How a grayscale or color upload is converted - thresholding, dithering, or per-channel splitting - is a tool-specific choice, and the reconstruction will not faithfully match the original colors either way.

Common questions

Can a single share really hide everything? What if someone analyzes it with image processing?

With the standard 2-of-2 construction, yes: for every pixel, both diagonal patterns are equally likely in one share regardless of whether the secret pixel was black or white, so the share contains no information about the image - no filter, stretch, or statistical analysis can extract it. That guarantee assumes the tool's randomness is genuinely random and not predictable.

Can I split the image into more than two parts, so that any two or three can recover it?

The classic scheme is 2-of-2: exactly two shares, both required. Generalizations exist - k-of-n visual cryptography, where any k of n transparencies reconstruct the image - but they cost pixel expansion: shares grow several times larger and contrast drops further. Whether this tool offers such variants is something to verify before planning a multi-party split.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools