Tag Archive | programming

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.

The shares are :

Share 2

Share 1

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!


Tribute to Randy Pausch

More thann a year since Randy Pausch died leaving behind him a legacy one can barely imagine. A man who achieved his childhood dreams. A man who taught people how to live their life. A man who gave family utmost importance. A man who battled out against all the odds of life but eventually lost to Pancreatic cancer.

For me his life is the epitome of how one should live their life. His last lecture became the most popular videos.

His time management lecture at one point the first google result for time management, something he was extremely proud of. Here is the last lecture! A must watch for those who havent!

His never-say-die spirit is what he is remembered for the most! For me he was te symbol of hope and persistent hard work. What I liked the most in the Last lecture was the way in which the great Virtual Reality Researcher describes Brick walls. He is says the brick walls are there to separate the ones who REALLY want something from the others!

His aim to teach and attract young girls to the field of science and technology was achieved through Alice. A software that visually imparts programming concepts to young girls.  http://www.alice.org/

He did all he could to increase awareness and research funds to fight Pancreatic cancer.

In May 2008 he was listed by Time among one of the Worlds most influencial people. He is known to have given hope to all people who had lost the zest for life. He has not only changed the world for his students, family but also for all those who have watched his video and got greatly inspired.

To me what is special about Randy are the attempts he made to leave his young children a legacy in various forms right from his lecture,to his book and to all those special things he did for his kids and wife. This surely will have a huge impact on the way his kids think. I am sure they would price these more than anything else. Here is a picture of the man doing what he is best at-being with family.

These two pictures are simply great but nothing beats the one below!

PS:I was working on this post and I was asked to speak about a famous personality I admire! I had no problems at all there! No second thoughts! 🙂

Playwright Conversations

Black Playwrights, Black Artists, Black Plays

Walk The Line

Guided by Karma, Dharma and Drama!

Pink Chai Living

Creativity + Entrepreneurship + Motherhood

The Write Side

A little bit of this and a little bit of that!

The Domestic Man

Gluten-free & Paleo-friendly recipes, inspired by traditional & international cuisines.

today was meaningful

a collection of thoughts, life lessons, and days full of meaning.

Blogging for a Good Book

A suggestion a day from the Williamsburg Regional Library

Books, j'adore

story lovers unite

TED Blog

The TED Blog shares interesting news about TED, TED Talks video, the TED Prize and more.

A Little Blog of Books

Book reviews and other literary-related musings


scribble doodle sketch


Just another WordPress.com site


Veritas Vos Liberabit

Freedom to Fail

An aspiring young professional with a blog

Bytes won't bite ...

Networks | OS | Games | Fun | 11111000011