This idea poped into my head the other day so I thought I would bosh out a test.
Basically the idea was to take an input image (the private key) and some data. Encode the data into a copy of the image (the public key) by increasing or decreasing the value of each pixels color channel by the ASCII code of each character in the dataset.
In the below example we encode the character
H into a single pixel.
72 in ASCII.
To decode the pixel we diff the public and private RGB channels and we arrive back at
So without the original image it should be impossible to extract the data from the public key.
In this example I opted for subtlety over volume of data. I am splitting each characters ASCII code across 3 colour channels. That way the maximum increase or decrease in each channel is limited to 9. In effect this makes the new image practically identical to the original.
Please note that I wrote this in the latest flavour of JS without a transpiler so you will need Chrome 55 or similar. Yea I konw.