File Exchange

image thumbnail

Visual Cryptography

version 1.2 (24.8 KB) by

Generation of two-out-of-two Visual Cryptography Scheme shares.



View License

This program generates a two-out-of-two Visual Cryptography Scheme shares. The input image for this program should be a binary image. The shares and the overlapping result of the shares are written as output. The Shares (1 & 2) can be printed in separate transparent sheets and overlapping them reveals the secret image.

Comments and Ratings (18)

sir how do i do for multiple share

manal rezz

Nikesh Tanwer

ashwathy dev

Sir What is the difference in the effect of 4 shares and 6 shares.


sir how to apply vcs to color face images.. relpy me fast sir


sir how to apply vcs to color face images.. rely me fast sir


draj (view profile)


dipjit (view profile)

please reply me fast. Sir...


dipjit (view profile)

what is the meaning of the code portion"
and is the pixShare is a variable which is userdefined or it is a function from matlab library.

Huynh Tu


STEVEN (view profile)

I want code for 2 out 3 sheme sharing visual cryptography,can you explain the code u used in 2outof 2 scheme, the line is share1((a),(2*b-1):(2*b))=pixShare(1,1:2); pls?

I have the same question as how to generate the same shares for colour images.


sander (view profile)

sir how to generate the same shares for colour images. shares of red green and blue. den combining them to get colour visual cryptography

Why pixel expansion 2 is used?. Comments not enough.
Open source is way the technology free to learn, not just code.
 - Freedom Software

Code without proper comments is a Bread without jam

priya anthony

Hi Athi
It is quite interesting could u tell me how to do it for 3 out of 3 scheme


Quite Interesting. Its working for my own images.



Author Info Updated


The first two columns of the share were always "0" in the previous release. The file "VisCrypt.m" has been updated to fix this issue.

MATLAB Release
MATLAB 6.5 (R13)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video