QR visual cryptography

in programming •  8 years ago 

Some time ago, I wrote a script that implements visual cryptography for QR codes. From an input text, it generates a QR code, and then, it splits it into random image shares. When the shares are superposed, they reveal the QR code.

This way, I thought it would be cool to print them on transparent film (slides) so that they will reveal the QR code only when superposed in the right orientation.

This is an example:

and this is the result when the slides are superposed:

Alignment has to be done in the right orientation (out of 8 possible) and needs sub-millimeter adjustment to form an image.

Some QR code readers will read it directly; others might need some contrast forcing:

The crypto

Individually, each share leaks no information about the resulting image. There is hence no risk in using QR's error correction, even at its 30% maximum. The formalism can be adapted to N-of-M schemes, but I implemented only the 2-of-2 (shown above) and 2-of-3 cases. There is also the possibility of a steganographic mode where the individual slides can show decoy images.

This is the script.

I did not know it at first, but I was made aware that the implementation I followed was a case of Naor and Shamir's Visual Cryptography.

There is also a video showing the criticality of alignment and a simulation of a 2-of-3 example.

When I posted it some time ago (in another forum), it started rather interesting discussions.

Anyway, enjoy it!

(and feel free to ask me anything about this)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Excellent posts! I've suddenly seen a new perspective; thanks.

Glad you enjoyed it

Me too

cani5boh
Thanks for the post

bullionstackers