Visual Cryptography example
Here is something me and a friend of mine implemented. It is called Visual Cryptography.
Okay, now what is VC all about. Consider you have an image which you wish to have as a SECRET! The condition is you and your friend should have a part or ‘share’ of the image which individually will not make any sense but when the 2 shares overlap, you can discover your secret. This is an implementation of Shamir’s Secret Sharing techniques (Yes the same Shamir from the RSA algorithm).
If you want to learn more about Secret Sharing here are a few links: 1 and 2
The image we used was black and white or in other words only 0’s and 1’s. This means if you want to see a point when the 2 images overlap light should be blocked. There are three possibilities for that (1,1), (0,1) and (1,0). These can be chosen on the basis of the input image or the secret image(here sayCHEESE.bmp). The file uploaded is in jpg format as bmp format is not a supported file format for upload here.
Okay, now getting on to how to actually split the image into 2 shares. When we have a binary image we can be sure that each pixel is 1 or 0. One decision you need to make is when it is a foreground pixel do you want to see it as white or black. We chose it to be black and the code written is keeping that in mind. Traverse each and every pixel in the image. If it is a foreground pixel then light should be blocked ie, the corresponding pixels so created should be (1,1) or (0,1) or (1,0). Remember to achieve this each pixel is split into 2 pixels. Yes, size is doubled but thats the price you need to pay for secret sharing! (Thats the EXACT same line my project guide said! 😛 ). This can be easily done using MATLAB as there are read image functions defined. Reading the bmp file through C and creating 2 new images would definitely be a mammoth task if I were to stick to C.
The code is available for download on the box.net on the right.
Once you obtain the shares, take a printout on transparency sheets and witness Visual cryptography in action! 🙂 It will look something like this:
For those of you who want to know more about this, I have uploaded a ppt on the right. Hoping you like it!
Awesome..!
Hmm it appears like your site ate my first comment
(it was extremely long) so I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog.
I too am an aspiring blog writer but I’m still new to the whole thing. Do you have any helpful hints for novice blog writers? I’d certainly appreciate it.
i want the matlab code for vip synchronization in visual cryptography. Can you please send it to me? email id- pratima.nikate@gmail.com
Thanks for your marvelous posting! I definitely enjoyed reading it, you happen to be
a great author.I will make sure to bookmark your blog and will eventually
come back later on. I want to encourage that you continue your great writing, have a nice weekend!
where is the source code