Visual cryptography

Inspired by this post at DataGenetics,, I implemented a quick-and-dirty script in python to test it out. The first takes an input image and iterates over it pixel by pixel, splitting it into two output images. Ideally, the outputs are randomly assigned, so it is impossible to recover the original without both outputs. The outputs can be combined to recover the original. Here's an example of it in action:

Original image:

original

Intermediate images (hopefully look like static):

static fuzz

static fuzz 2

Final output:

revealed output

Not perfect, but it is definitely recognizable. The idea can apparently be extended to 9x9 (and 16x16, and 25x25... I presume) images, for a wider-shared secret. In any case, this scheme should make it possible for any number of people to share a secret, but none of them individually can recover it. I uploaded the code here on github.