The idea is to share $n$ images among $n$ persons so that all images can be reconstructed by someone in possession of all shares.
However, there must not be any data overhead (which means the shares sent to the persons must not be bigger in size than the original images. In other terms: No data overhead).
The idea is to encode two images $A$ and $B$ like this:
$$Q = A + B + Secret\\ U = A - B + Secret$$
which allows for reconstruction of $B$ through
$$Q - U = A + B + Secret - A + B - Secret = 2B\\ B = (Q - U) / 2$$
after that $A$ can be reconstructed by
$$A = Q - B - Secret$$
$Secret$ is required because simply doing $A + B$ or $A - B$ visually leaks information about the images to the other persons. The trick is to calculate the secret through the image $B$. (For example by calculating a hash of B and then feed it to a PRNG and then use this PRNG to generate the secret numbers you add to each pixel (ask for a new number for every pixel)).
In Pseudo-Code:
seed = hash(B);
r = Random(seed);
for (x,y) to (WIDTH, HEIGHT):
secret = r.nextInt(255);
Q[x,y] = A[x,y] + B[x,y] + secret;
U[x,y] = A[x,y] - B[x,y] + secret;
Arithmetic is $\mod(M)$ of course, where $M$ is a reasonable odd modulus for the required color depth etc. This method can be extended to more than two images. The odd modulus is what allows one to reconstruct the result uniquely.
The question now is: what fatal security flaws does this method have, if any?
How many secrets do you plan on having if you have n images (Itshould be more than one.)
For n images I plan on having n shares. Essentially the constraint is to encode n images into n images in a way that all n images can be reconstructed by somebody in possession of all n shares. This is what I mean by "no data overhead".
– mroman Apr 27 '15 at 08:51I'm more interested in the first case.
– mroman Mar 22 '16 at 15:50