# Secret Sharing In Visual Cryptography Computer Science Essay

**Published:** **Last Edited:**

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Cryptography is a complex and difficult subject for students to learn: a simple message is scrambled using a key and an algorithm that tends to be highly abstract. Therefore new technologies have been explored to make it more concrete and easier to understand. One of these is visual cryptography. Visual Cryptography was originally proposed for the problem of secret sharing. Secret sharing is one of the early problems to be considered in Cryptography. In visual cryptography, the "key" is simply a sheet of clear plastic with apparently-random dots printed on it. The "encrypted message" is another such sheet, which also appears to be random. But when the two sheets are set on top of each other, a hidden message appears. There is an enormous literature on visual cryptography (see the References section). It was originally invented and developed for cryptographic reasons, but the pedagogical uses are clear. It allows the student to physically manipulate the elements of the system, and visually see the decryption process in action.

With the near universal use of the Internet in every field, the need to share important documents from one office to other, via this medium becomes increasingly more necessary. With the coming era of the electronic commerce, there is an urgent need to solve the problem of ensuring information safety in today's increasingly open network environment. The encrypting technologies of traditional cryptography are usually used to protect information security. With such technologies, the data become disordered after being encrypted and can then be recovered by a correct key. Without the correct key, the encrypted source content can hardly be detected even though unauthorized persons steal the data. Naor and Shamir [1] proposed a new cryptography area, visual cryptography, in 1994. Visual cryptography is a technique, to provide privacy protection when transmitting sensitive data between offices. It is a secret sharing scheme that can securely share image information (printed text, handwritten notes, pictures, etc.), and it is possible to decode shared secrets by the human visual system. This modern technique also makes it difficult for the recipient to modify the source, maintaining the authenticity of the document.

## Problem Background

When important secret information is managed by individuals, secrets may leak out by not enough management or personal grudge, and there is a possibility of exploitation. Assume a bank vault must be opened every day. Although the bank employs three senior tellers, management does not want to entrust any individual with the combination. Therefore bank management would like a vault access system that requires any two of the three senior tellers. This problem can be easily solved using a two-out-of-three threshold scheme.

Here is an interesting "real-world" example of this situation: According to Time Magazine, control of nuclear weapons in Russia in the early 1990s depended upon a similar "two-out-of-three" access mechanism. The three parties involved were the President, the Defense Minister and the Defense Ministry.

The (k, n) threshold scheme for secret sharing was proposed by G.R. Blakley and Adi Shamir [2, 12] and since then many researchers have further investigated. Generally a secret sharing scheme is a method of distributing a secret among a set of associates in such a way that qualified subsets of associates can reconstruct the value of the secret by combining their shares, whereas any non-qualified subset of associates cannot determine anything about the value of the secret by any way. In this basic secret sharing scheme, however, cryptographic computations using computer are necessary to share a secret and decode the secret from shared data. In all the secret sharing schemes, a great deal of complexity is necessary to encrypt and decode a secret, and therefore computers are essential.

## The Model

In a (k, n)-threshold problem, a secret is divided into n pieces. With any k of the n pieces, the secret can be perfectly reconstructed, while even complete knowledge of k-1 pieces reveals absolutely no information about the secret. Visual cryptography illustrated a new paradigm to solve the (k, n) problem. It was originally proposed by Moni Naor and Adi Shamir [1]. The original scheme generates n images (known as shares) based on the secret message (the original image) which can be printed on n transparencies. The original message can be recovered if any k or more than k transparencies are stacked together, but no information about the original image can be gained if fewer than the threshold number of k transparencies are stacked. Visual cryptography is a unique technique in the sense that the encrypted messages can be decrypted directly by the human visual system. Therefore, a system employing visual cryptography can be used by anyone without any knowledge of cryptography. Another interesting thing about visual cryptography is that it is a perfectly secure chipper. There is a simple analogy of the one time-pad cipher to visual cryptography.

Besides introducing the new paradigm, Naor and Shamir also provided their constructions of visual cryptographic solutions for the general k out of n secret sharing problem. One can assume that every secret message can be represented as an image, and furthermore that the image is just a collection of black and white pixels i.e. it is assumed to be a binary image. Each original pixel appears in n modified versions (called shares) of the image, one for each transparency. Each share consists of m black and white sub-pixels. Each share of sub-pixels is printed on the transparency in close proximity (to best aid the human perception, they are typically arranged together to form a square with m selected as a square number). The resulting structure can be described by a Boolean matrix M = (mij)n Ã- m where mij = 1 if and only if the j-th sub-pixel of the i-th share (transparency) is black. Usually, we will use R0 to refer to the constructed M when the pixel in the original image is white, and similarly R1 when the pixel in the original image is black. The important parameters of the scheme are:

m, the number of pixels in a share. This parameter represents the loss in resolution from the original image to the recovered one.

Î±, the relative difference in the weight between the combined shares that come from a white pixel and a black pixel in the original image. This parameter represents the loss in contrast.

Î³, the size of the collection of C0 and C1. C0 refers to the sub-pixel patterns in the shares for a white pixel and black refers to the sub-pixel patterns in the shares for the C1 pixel.

The difference between a visual threshold scheme and a traditional threshold scheme is in how the secret is reconstructed. A traditional-threshold scheme typically involves computations in a finite field; in a visual-threshold scheme, the computation is performed by the human visual system. The security condition is the same in the two types of schemes.

In general, there are four criteria's, used to evaluate the performance of a (k, n) Visual secret sharing scheme. The first criterion is security: fewer k shadows offer no information about the secret image, where k â‰¤ n. The second criterion is accuracy: it is similarity between the reconstructed image and the original one. The next criterion is computational complexity: the number of operators is required to produce shadows and to generate the reconstructed image. The last criterion is the size of a shadow, which is also called the pixel expansion problem.

So here, we propose a new recursive hiding of secrets, with applications to both images and text, to increase the efficiency of visual cryptography and to make it possible to incorporate additional secret information that serves as a steganographic channel [5]. Here, we extend the idea of recursive hiding of secrets to 3 out of 5 threshold scheme and apply it to both images and text. However we deal with only binary images and regard each pixel as one bit of information, denoting black or white pixel. We also propose to extend this to gray scale images and observe how secret sharing takes place. Experimental results confirm that the grayscale image quality in this proposed scheme is better than anything and this allow high quality images including that of perfect (original) quality to be reconstructed.

The whole document is organized as follows: Chapter II of this document outlines the previous work that has been done in this field. Chapter III explains the proposed approach in detail, i.e., how the secret information break down into smaller secrets in shares of larger secrets by doubling the secret size at every step. Chapter IV explains secret sharing scheme for gray scale images. Summary and conclusion are presented in Chapter V.

CHAPTER II

REVIEW OF LITERATURE

## Visual Cryptography Approach

Visual cryptography is a special encryption technique to hide information in images in such a way that it can be decrypted by the human vision if the correct key image is used. The technique was proposed by Naor and Shamir in 1994. Visual Cryptography uses two or more transient images (called shares). One image contains random pixels and the other image contains the secret information. It is impossible to retrieve the secret information from one of the images. Either transparent images or layers are required to reveal the information. The easiest way to implement visual cryptography is to print the two layers onto a transparent sheet. When the random image contains truly random pixels it can be seen as a one-time pad system and will offer unbreakable encryption. In the overlay animation you can observe the two layers sliding over each other until they are correctly aligned and the hidden information appears.

In visual secret sharing, the message bit consists of a collection of black and white pixels and each pixel is handled separately.

Each pixel in the original image appears in n modified versions, one for each transparency and they are called shares.

Each share is a collection of m black and white sub-pixels.

Here is a simple example that explains the idea of how visual cryptography works.

Visual_crypto_animation_demo

Wikipedia

Figure-1, Example to show how VC works

From Figure-1 we can observe that the original image is broken up into two parts and they are called shares. Separately these shares look like random noise but when combining reveals an image. Every single pixel is split into sub-pixels and the human vision still perceives them as one pixel.

## Two-out-of-Two Scheme (2 sub-pixels)

Naor and Shamir [1], proposed encoding scheme to share a binary image into two shares Share1 and Share2. Each pixel is divided into a black and a white sub-pixel placed next to each other. For the case of white pixel, one of the two combinations of sub-pixels will be chosen with a probability of 0.5 to represent the pixel in each of the shares. When these shares are placed one on top of the other, the pixel are visually ORed and hence a white pixel looks gray (half black and half white) to the human eye. The pixels are chosen in a similar manner for the case of a black pixel. But when the sub-pixels are visually ORed, the two black sub-pixels placed next to each other appear as a single black pixel. The above described idea can be applied to images to develop a basic Two-out-of-Two scheme by using 2 sub-pixels.

Figure-2, Partitions for black and white pixels for 2-out-of-2 scheme (2 sub-pixels)

## Two-out-of-Two Scheme (4 sub-pixels)

The original problem of visual cryptography is the special case of a Two-out-of-Two visual secret sharing problem. It can be solved with 2 sub-pixels per pixel, but in practice this can distort the aspect ratio of the original image. It is thus recommended to use 4 sub-pixels arranged in a 2 Ã- 2 array where each share has one of the visual forms in Figure-3. A white pixel is shared into two identical arrays from this list, and a black pixel is shared into two complementary arrays from this list. Any single share is a random choice of two black and two white sub-pixels, which looks medium grey. When two shares are stacked together, the result is either medium grey (which represents white) or completely black (which represents black).

Horizontal Shares Vertical Shares Diagonal Shares

Figure-3, Partitions for black and white pixels for 2-out-of-2 scheme (4 sub-pixels)

C0 = { all the matrices obtained by permuting the columns of }

C0 = { all the matrices obtained by permuting the columns of }

Figure-4, Superimposition of black and white sub-pixels for 2-out-of-2 scheme using 4 sub-pixels

The resulting picture can be thought as a [n m] Boolean matrix S = [Sij]

Sij = 1 if the subpixel in the share is black.

Sij = 0 if the subpixel in the share is white.

Definition 1. A solution to the k out of n visual secret sharing scheme consists of two collections of n Ã- m Boolean matrices C0 and C1. To share a white pixel, the associate randomly chooses one of the matrices in C0, and to share a black pixel, the associate randomly chooses one of the matrices in C1. The chosen matrix defines the color of the m sub-pixels in each one of the n transparencies. The solution is considered valid if the following three conditions are met [1]:

Contrast

For S in C0 (WHITE): H(V) â‰¤ d - Î±m

For S in C1 (BLACK): H(V) â‰¥ d

Security

The two collections of q m (1â‰¤qâ‰¤k) matrices, formed by restricting n m matrices in C0 and C1 to any q rows, are indistinguishable.

Hamming weight (H) of a string is the number of symbols that are different from the zero-symbol. Figure-5, explains the hamming weight of the pixels when they are stacked. A small example gives the clear idea of H.

String Hamming weight

11101 4

11101000 4

Figure-5, Stacking and finding the pixel contrast using hamming weight (H)

## Preliminary Notation

n Group Size

k Threshold

m Pixel Expansion

Î± Relative Contrast

C0 Collection of n m Boolean matrices for shares of White pixel

C1 Collection of n m Boolean matrices for shares of Black pixel

V OR'ed k rows

H(V) Hamming weight of V

d number in [1,m]

r Size of collections C0 and C1

In my work I am using recursive hiding of secrets and this is proposed in [5]. The idea used is to hide smaller secrets in the shares of larger secrets without an expansion in the size of the latter. While the scheme presented in [4] is a non-threshold scheme, here the size of the secret increases by a factor of two as one goes from the smallest to the largest. The smallest secret would be a single bit. At the next level it will be an image of size 2 x 1; the next will be an image is of size 2 x 2; and so on, until the full image size has been reached. Schemes in [5, 16-19] are threshold schemes. In [16], a tree data structure is used for recursive encoding of text such that the internal nodes of the tree also carry information in addition to leaves of the tree. Repeated application of Shamir's scheme is used in [17] to share k-1 secrets in n shares. However, the general threshold recursive schemes in [16-19] are not visual cryptography schemes. The scheme in [5], although a recursive visual cryptography scheme, is restricted to 2-out-of-3 scheme and the idea used is to divide the secret bit into 3 pieces p1, p2, and p3 such that p1 = p2 = p3 if we wish to encode bit 0, and p1 â‰ p2 â‰ p3 if we wish to encode bit 1.

To satisfy the above conditions we would need at least 3 symbols, say 0, 1 and 2. Therefore to encode bit 0 we could create pieces p1p2p3 as 000, 111, or 222. Whereas the candidates to encode bit 1 would be 012 and all possible permutations of it, i.e. 021, 102, 120, 210, and 201. In all, to encode secret bit 0 and secret bit 1, we have 3 and 6 possibilities, respectively, out of which any one can be chosen to satisfy our requirement based on the secret encoded.

Example: If M is a 27 bit long message that we wish to encode into 3 shares and the threshold is 2, then the shares S1, S2, and S3 may be created as follows: [5]

M : 011011010110110011100101101

S1 : 102012012010201201201020102

S2 : 110020022120111210101221001

S3 : 121001002200021222001122200

Viewed as a ternary alphabet, the efficiency of this system is 33%. If 0, 1 and 2 are encoded using prefix coding as 0, 10, and 11 respectively, then we are effectively mapping each bit of secret into 5 bits of shares and the efficiency is only 27 / (27 Ã- 5) = 1 / 5, i.e. 20%.

The above efficiency can be improved by recursively hiding secrets in the shares of M. However, since each bit is mapped into 3 shares, in order to take advantage of the recursive technique, the secrets at each step must increase by a factor of 3. We can then hide the following secrets M1, M2, and M3 in S1, S2, and S3 as follows:

Table-1, Recursive hiding of smaller messages in the shares of larger messages.

Note that at each step we have used the shares of the previous smaller messages to create the shares of larger messages, these smaller shares are denoted in bold. Also, we have distributed the shares at each step so that no player has access to all the shares of the smaller message and hence, every message remains secure until at least two players come together. This approach is different from that discussed in [4], where the shares of smaller messages were all accumulated into one of the larger shares instead of distributing them among all the possible players. As a result, any player having that share which encodes the smaller images could in principle recreate these smaller images without the help of the other player, which in some cases might not be acceptable. Therefore, this new approach seems to be more secure for certain applications.

Also seen in Table-1 is that using recursive hiding of secrets, we have been able to encode 13 characters of M1, M2, and M3 and 27 characters of M into shares of M alone. As a result the efficiency is (13 + 27) / (3 Ã- 27) = 40/81 => 1 / 3 bits. Compared to 1 / 5 bits of conventional approaches, this is an almost 40% increase in efficiency.

Further this idea can be organized to a 3 out of n threshold scheme. We consider monochrome images, and each pixel (or sub-pixel) is considered to be one bit of information. Later on this can be extended to grayscale images.

CHAPTER III

METHODOLOGY

There has been a steadily growing interest in visual cryptography. Despite its appearance of being a simple technique, visual cryptography is a secure and effective cryptographic scheme. Since the origin of this new paradigm, various extensions to the basic scheme have been developed to improve security and the areas of application have also been greatly expanded.

At each step I have used the shares of the previous smaller messages to create the shares of larger messages and also I have distributed the shares at each step so that no individual has access to all the shares of the smaller messages and hence, every message remains secure until at least 3 players come together. This approach is totally different from that discussed in [4], where the shares of smaller messages were all accumulated into one of the larger shares instead of distributing them among all the possible individuals. As a result, any individual having that share which encodes the smaller images could in principle recreate these smaller images without the help of the other individual, which means this might not be totally secured and our new approach seems to be more secure for certain applications. There are some properties to develop this scheme, by using them we need to construct black and white pixels.

## Properties of 3 out of n Scheme (n â‰¥ 3)

Pixel Expansion, m = 2n - 2.

Relative Contrast, Î± = .

Let B be the black n (n-2) matrix which contains only 1's.

Let I be the Identity n n matrix which contains 1's on the diagonal and 0's elsewhere.

BI is an n (2n-2) concatenated matrix.

C(BI) is the complement of BI.

C0 contains matrices obtained permuting columns of C(BI).

C1 contains matrices obtained permuting columns of BI.

Any single share contains an arbitrary collection of (n-1) black & (n-1) white sub-pixels.

Any pair of shares has (n-2) common black & two Individual black sub-pixels.

Any stacked triplet of shares from C0 has n black sub-pixels.

Any stacked triplet of shares C1 has (n+1) black sub-pixels.

Based upon the following properties we can design the matrix for 3(k) out of 5(n) scheme.

Let B be the black n (n-2) matrix which contains only 1's.

B = n (n-2) 5 (5-2) = 5 3

1 1 1

1 1 1

1 1 1

1 1 1

1 1 1

5 3

Let I be the Identity n n matrix which contains 1's on the diagonal and 0's elsewhere.

I = n n = 5 5

1 0 0 0 0

0 1 0 0 0

0 0 1 0 0

0 0 0 1 0

0 0 0 0 1

5 5

Two collections of n m Boolean matrices C0 and C1 are obtained by permuting the columns of C(BI) and BI

m = 2n - 2 2(5) - 2 = 8

i.e, 5 8 Boolean matrices.

0 0 0 0 1 1 1 1 Share1

0 0 0 1 0 1 1 1 Share2

C(BI) = 0 0 0 1 1 0 1 1 Share3

0 0 0 1 1 1 0 1 Share4

0 0 0 1 1 1 1 0 Share5

5 8

[1] [2] [3] [4] [5] [6] [7] [8]

Hamming weight of C(BI) i.e. is White H(V) = 5

1 1 1 1 0 0 0 0 Share1

1 1 1 0 1 0 0 0 Share2

BI = 1 1 1 0 0 1 0 0 Share3

1 1 1 0 0 0 1 0 Share4

1 1 1 0 0 0 0 1 Share5

5 8

[1] [2] [3] [4] [5] [6] [7] [8]

Hamming weight of BI i.e. is Black H(V) = 8

C0 = {all the matrices obtained by permuting the columns of C(BI)}

C1 = {all the matrices obtained by permuting the columns of BI}

If the columns are not permuted then there is a possibility to reveal the secret information in any single share and therefore the process fails.

For example here are few different permutations.

{[1] [8] [2] [7] [3] [6] [4] [5]}

{[2] [4] [6] [8] [1] [3] [5] [7]}

{[3] [2] [1] [8] [7] [6] [4] [5]}

{[5] [8] [1] [6] [2] [3] [7] [4]}

Shares of a white Pixel

Share1 Share2 Share3 Share4 Share5

Shares of a Black Pixel

Share1 Share2 Share3 Share4 Share5

Figure-6, Possible partitions for black and white pixels.

Figure-7, Superimposition of white and black sub-pixels

Any single share contains 4 black and 4 white pixels, so to make it a complete square array without distorting their aspect ratio, we need to add one more pixel. It should be either black or white.

White Pixel [0]

Black Pixel [1]

Figure-8, First Secret Image

Figure-8 is an example that shows how to transform the original pixels according to the shares we have designed; by this way we can maintain the aspect ratio of the image. These are the matrices for white and black pixels while we go for simulation.

000 111

White Pixel [0] 000 Black Pixel [1] 111

000 111

3 3 3

## Recursive Information Hiding in 3 out of 5 Scheme

Recursive information hiding is a technique where certain additional secret information can be hidden in one of the shares of the original secret image [4]. Here the secret information which we are going to hide is taken according to their sizes i.e. small images to larger. The first small secret image is divided into five different shares using visual cryptography. These shares are placed in the next level to create the shares of larger secret information. We are distributing the shares at each consecutive level so that no one has access to all the shares of the smaller images, unless until at least three participants come together to reveal the secret information, resulting in 3 out of 5 scheme.

Figure-9 is an example to help readers to understand the concept visually. The original secret image under consideration is of size 5 5 and the first secret image is of size 1 1. There are totally five shares obtained for the first secret image based on the basic idea of visual cryptography. The second secret image is of size 5 1. To obtain the second secret image we are going to use the shares of first secret image and they are placed in different levels (level 1-5) one after the other in five different shares. Now the shares of second secret image are designed by seeing the shares of first secret image and the original second secret image.

From Figure-9, we can see share 2 of the first secret image is placed on share 2 of the second secret image (level 2), and this share is a part of complete black pixel. The original second secret image has a complete white pixel under level 2, so we need to design all the shares of level 2 of second secret image by comparing both the shares of first secret image and the original second secret image to get a partial white pixel when we combine all the 5 shares or at least 3 shares in our case. This process is recursively repeated for all the shares. By doing this we can obtain the information of original second secret image by combining any 3 shares. This is the process for recursive information hiding of images. From Figure-7, we can see that the partitions of white pixel are stacked upon each other three fifth of the pixel is white and hence appears light gray to human eye. However, the sub-pixels of the black pixel are not complete black when 3 shares are stacked together but it is completely black when all the 5 shares are stacked.

Figure-10 shows an illustration of recursive information hiding. The original secret image considered is the Lena image of size 380 390. The first secret image is stick figure of size 78 78 and the second secret image is a text of size 380 78 and these both are hidden recursively.

Figure-9, Representation of Recursive Information Hiding of secret images in the shares of larger original image using a 3 out of 5 threshold scheme

Shares of original secret image are constructed by using the shares of second secret image and placed in different levels and the process gets repeated and finally when we combine any 3 shares the original secret information is revealed.

Figure-10, Interpretation of the process of recursive information hiding of secrets in shares of larger original image

## A General "k" out of "k" Scheme

For all k there exists a general construction of k out of k visual secret sharing scheme, the pixel expansion must use at least pixels, and the relative contrast should be . There is a need to construct two collections of Boolean matrices i.e. and.

Handles the white pixels.

Handles the black pixels.

All columns have an even number of 1's in and odd number of 1's in and no two k rows are same in both & . and contains all permutations of columns in & .

## Properties of "k" out of "k" Scheme

Pixel Expansion, ( m should be as small as possible)

Relative Contrast, = ( should be as large as possible)

r, the size of the collections. and (they need not be the same size, but in all of our constructions they are). Here

logr is number of random bits needed to generate share.

By Naor and Shamir, any k out of k scheme as and

Based upon the following properties we can design the matrix for k = 3 and k =4

k = 3, therefore m = 4, Î± = ¼ and r = 24

0 0 1 1 0 0 1 1

= 0 1 0 1 = 0 1 0 1

0 1 1 0 1 0 0 1

3 Ã- 4 3 Ã- 4

k = 4, therefore m = 8, Î± = and r = 40320

W = {1, 2, 3, 4}

Even cardinality subsets {{}, {3, 4}, {2, 4}, {2, 3}, {1, 4}, {1, 3}, {1, 2}, {1, 2, 3, 4}}

Odd cardinality subsets {{4}, {3}, {2}, {2, 3, 4}, {1}, {1, 3, 4}, 1, 2, 4}, {1, 2, 3}}

0 0 0 0 1 1 1 1 Share1

= 0 0 1 1 0 0 1 1 Share2

0 1 0 1 0 1 0 1 Share3

0 1 1 0 1 0 0 1 Share4

4 Ã- 8

Hamming weight of i.e. is White H(V) = 7

0 0 0 0 1 1 1 1 Share1

= 0 0 1 1 0 0 1 1 Share2

0 1 0 1 0 1 0 1 Share3

1 0 0 1 0 1 1 0 Share4

4 Ã- 8

Hamming weight of i.e. is Black H(V) = 8

We need two collections of 4 Ã- 8 Boolean matrices and , contains all permutations of columns in and , by these two matrices we can design the shares of black and white pixels. Similarly as above, we can apply recursive scheme for any "k" out of "k" scheme.

## A General "k" out of "n" Scheme

A general k out of n scheme is designed from k out of k scheme. Let C be k out of k visual secret sharing scheme with parameters m, r, Î±. The scheme C consists of two collections of k Ã- m Boolean matrices and = , , . . . . and = , , . . . .. H is a collection of l functions. Let B be the subset of of size k and is probability that randomly chosen function yields q different values on B, .

We construct from C and H a k out of n scheme with parameters = m . l, â‰¥ Î±, =

The ground set is V = U Ã- H

Each is indexed by a vector ) where each

The matrix for t = ) where b {0, 1} is defined as

Contrast

Contrast should be

k rows is , mapped to q < k different values by h

Hamming weight of OR of q rows is f(q)

Difference is white and black pixels occurs when h is one and happens at

WHITE:

BLACK:

Security

Security properties of the "k out of k" scheme imply the security of "k out of n" scheme because we are using (k, k) scheme to create (k, n) scheme. The expected hamming weight of OR of q rows, q < k is irrespective of WHITE or BLACK pixel.

## Secret Sharing Scheme for gray Scale Images

Grayscale images are distinct from one-bit black and white images. Grayscale is a range of shades of gray without apparent color. The darkest possible shade is black, which is the total absence of transmitted or reflected light. The lightest possible shade is white. According to their physical characteristics, different media use different ways to represent the color level of images. The computer screen uses the electric current to control lightness of the pixels. The diversity of the lightness generates different color levels. The general printer, such as dot matrix printers, laser printers, and jet printers can only control a single pixel to be printed (black pixel) or not to be printed (white pixel), instead of displaying the gray level. As such, the way to represent the gray level of images is to use the density of printed dots. The method that uses the density of the net dots to simulate the gray level is called "Halftone" and transforms an image with gray level into a binary image before processing. Every pixel of the transformed halftone image has only two possible color levels (black or white). Because human eyes cannot identify too tiny printed dots and, when viewing a dot, tend to cover its nearby dots, we can simulate different gray levels through the density of printed dots, even though the transformed image actually has only two colors - black and white.

Several schemes for grayscale images [19] and for color images [19, 20] have been proposed. However, all of these earlier works result in a decrypted image of reduced quality. I here proposed a new gray- level visual cryptography scheme and the image quality in this proposed scheme is better than anything and provides high quality images including that of perfect (original) quality to be reconstructed.

## Gray-Level Visual Cryptography

In my scheme I convert each grayscale block into a binary block. First of all each pixel value in a grayscale block is transformed into binary representation. For example take a grayscale block and transform into binary blocks.

111 159 20

254 10 198

40 215 100

Its corresponding binary blocks are as follows:

[0 1 1 0 1 1 1 1] [1 0 0 1 1 1 1 1] [0 0 0 1 0 1 0 0];

[1 1 1 1 1 1 1 0] [0 0 0 0 1 0 1 0] [1 1 0 0 0 1 1 0];

[0 0 1 0 1 0 0 0] [1 1 0 1 0 1 1 1] [0 1 1 0 0 1 0 0].

Take each binary block and go for different possible combinations of that block, and try to make the block into different shares. For example take a grayscale block and divide the block into shares

## Two-out-of-Three Scheme using Grayscale Images

This proposed scheme is totally different from that of previous schemes. Here I design the shares such a way that when combining any two shares will reveal the original bit information, but not the whole share just half of each single share will give me high quality image when reconstructed. I will explain this scheme by taking a value from the grayscale block and divide that value into shares.

254: [1 1 1 1 1 1 1 0]

1st half 2nd half

Share1: 0 1 0 1 0 1 0 0 1 1 0 1 1 0 1 0

Share2: 1 0 1 0 1 0 1 0 1 1 1 0 1 1 1 0

Share3: 0 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0

Share1(1st half): 0 1 0 1 0 1 0 0 Share3(1st half): 0 0 1 0 0 1 0 0

Share2(1st half): 1 0 1 0 1 0 1 0 Share1(2nd half):1 1 0 1 1 0 1 0

1 1 1 1 1 1 1 0 = 254 1 1 1 1 1 1 1 0 = 254

Share2(2nd half): 1 1 1 0 1 1 1 0

Share3(2nd half): 1 0 0 1 0 1 0 0

1 1 1 1 1 1 1 0 = 254

Combining any two half shares will give me exact bit and by doing the same procedure for the whole grayscale block gives me perfect high quality image when reconstructed without any loss of contrast.

C:\Users\sandeep\Documents\MATLAB\lena128.jpg

Original Image

Size 128 Ã- 128

(scaled)

C:\Users\sandeep\Desktop\share2 (2).jpgC:\Users\sandeep\Desktop\share2 (2).jpgC:\Users\sandeep\Desktop\share2 (2).jpg

Share1 Share2 Share3

CHAPTER IV

FINDINGS

## Simulation Results for Recursive Information Hiding in 3 out of 5 Scheme

After simulation these are few images than can reveal the secret information by combining any 3 shares out of 5 shares.

Figure-11, Regenerated smaller images from the shares hidden inside the shares of the original larger image

## Simulation Results for 2 out of 3 Scheme using Grayscale

C:\Users\sandeep\Documents\MATLAB\lena128.jpg

CHAPTER V

CONCLUSION

Undoubtedly, Visual Cryptography provides one of the secure ways to transfer images on the Internet. The advantage of visual cryptography is that it exploits human eyes to decrypt secret images with no computation required.

Visual Cryptography allows easy decoding of the secret image by a simple stacking of the printed share transparencies. However, there are some practical issues that need careful consideration. First, the transparencies should be precisely aligned in order to obtain a clear reconstruction. Secondly, there is usually some unavoidable noise introduced during the printing process. Thirdly, the stacking method can only simulate the OR operation which always leads to a loss in contrast.

Proper alignment is absolutely essential when superimposing the shares. In real experiments, we have found that obtaining perfect alignment is always troublesome. As visual cryptography schemes operate at the pixel levels, each pixel on one share must be matched correctly with the corresponding pixel on the other share. Superimposing the shares with even a slight shift in alignment results in a drastic degradation