**VISUAL CRYPTOGRAPHY (a.k.a VISUAL SECRET SHARING SCHEME)**

*prepared by Antonius Cahya Prihandoko*

Visual cryptography is another cryptographical approach to improve DRM capability. This concept provides a simple and powerful method which can accomplish privacy protection in delivering sensitive shared information. This approach can be employed to secure the distributed content.

Visual cryptography is a cryptographic technique which makes opportunity for visual information, such as pictures or text to be encrypted in such a way that the decryption can be performed by human visual system (HVS), without the aid of any computation. This concept was invented by Moni Naor and Adi Shamir in 1994 and is an extended scheme of secret sharing scheme and thus it also be known as *visual secret sharing* (VSS). Therefore, before advance discussing on visual cryptography, we briefly describe the concept of secret sharing scheme.

**Secret Sharing Schemes**

Secret sharing refers to mechanism for distributing a *secret* amongst a group of participants which each of them is given a particular *share* of the secret. The *secret* is firstly encrypted into a number of shares, which are then independently distributed to all participants in the group. The secret can be reconstructed only when a sufficient number of shares are combined together.

Formally, in a *secret sharing scheme* there is one ** dealer** and

*n*

**or**

*players**. The dealer has a secret, splits the secret into*

**participants***n*shares and gives the shares to all participants. Each participant receives one particular share. Any group of

*t*participants or more can together reconstruct the secret but no group of fewer than

*t*players can do so. Such a system is called a

*(t,n)*-threshold scheme. The formal definition of the scheme can be described as follow.

**Definition 1. **Let *t*, *n* be positive integers, . A ** (t,n)-threshold scheme** is a method of sharing a key

*K*among a set of

*n*participants (denoted by

*P*), in such a way that any

*t*participants can compute the value

*K*, but no group of

*t-1*participants can do so.

In the Shamir *(t,n)*-threshold scheme in , initially the dealer *D* chooses *n* distinct non-zero elements of , denoted , where . This scheme requires that . *D* then gives the value to the participant , for . The values are public. When *D* wants to share a secret key , *D* secretly chooses, independently at random, *t-1* elements of , denoted . *D* then computes , where and

*D* finally gives the shares to participant , for . Thus, each participant receives a pairs of .

In order to be able to reconstruct the secret, *K*, it requires that all possible , i.e all non-zero elements of , have each multiplication inverse in . Thus, must be a field, i.e *p* has to be a prime number.

**Example 1 :**

Let the dealer *D* works on *(3,7)*-threshold scheme in . Initially, *D* chooses 7 distinct non-zero elements of , say *6, 3, 8, 11, 5, 2, 4*, and denotes them , respectively. Let he has the secret value *K = 9*, and wants to share the secret to 7 participants, then he has to secretly choose 2 random elements of . Let the chosen secret random values are 5 and 3, and be denoted and , respectively. With these values, *D* then computes , for and

This computation will give the shares for 7 participants as follows.

*x *6 3 8 11 5 2 4

y 9 5 11 13 17 8 8

In the secret reconstruction, any group of 3 participants can reveal the secret *K*. Suppose that participants , , and pool their shares, which are (3,5), (2,8), and (4,8), respectively. Writing the polynomial *y=a(x)* as

and computing a(3), a(2), and a(4), the following three linear equations in are obtained:

This system has a unique solution in , i.e , , and . The secret is therefore .

Another approach to compute the secret *K* from an adequate number of shares is by meant the Lagrange interpolation as the following equation.

Suppose we define

for .

Then we have

Hence, the key *K* is a linear combination of the *t* shares. To illustrate this approach, let recompute *K* from previous example.

**Example 2:**

The participants can compute , , and according formula given above.

Then given shares , , , they would obtain

as before.

In the case when *n=t*, the protocol of *(t,t)*-threshold scheme in is as follows. Suppose the dealer *D* wants to share the secret, *K*, to *t* participants. Initially, *D*, secretly and independently determine at random *t-1* elements of , denoted . *D* then computes the *y* using the equation:

and finally gives the share to participant , for .

In order to reveal the secret, *K*, all those *t* participants have to combine their shares together and reconstruct the secret *K* using the formula:

It is clear that any group of *t-1* participants or less can not reconstruct *K* as they receive *t-1* independent random numbers as their shares. Those *t-1* participants may sum their shares, i.e

and yield

However, they have no information about the random value , and hence, unsuccessfully reveal the secret, *K*.

Unlike *(t,n)*-threshold scheme, this *(t,t)*-threshold scheme do not require *m* to be a prime number as all elements of have each addition inverse that are necessary for reconstructing *K*. Let us consider the following example to simulate this protocol.

**Example 3:**

Let the dealer, *D*, uses *(8,8)*-threshold scheme in to share his secret, *K*, say 5. Suppose the 7 independent random numbers secretly determined by *D* are 1, 6, 3, 12, 5, 8, 3, then the share will be

*D* then distributes the shares 1, 6, 3, 12, 5, 8, 3, 15 to 8 participants.

To reveal the secret, all 8 participants have to present their shares and sum them together, yielding

, i.e the secret, *K*.

**Shamir’s Visual Sharing Scheme**

Unlike a regular secret sharing scheme, that the secret reconstruction typically involves computation in a finite field, in a visual sharing scheme the secret can be reveal visually without any computations. Figure 1 illustrates this concept. The original gray scale image {em cameraman} is encrypted into two shares which are appeared as random images. The information of the original image can only be revealed by combining these two shares. In the printing application, each share can be printed on a separate transparency. The decryption step is performed by superimposing those share transparencies, and the original image or its approach would be appear.

The illustration depicted in figure 1 is an implementation of *(2,2)*-visual threshold scheme (VTS). In this scheme, a secret image is encrypted into two shares: each of them appears as a black and white random image. In order to reveal the secret image, those two shares have to be combined together. In this case, the secret is also a black and white image and the encryption scheme is visualized in figure 2. For each pixel of the secret image, if the pixel is white then the first two rows are randomly chosen to encode the pixel, and if the pixel is black then the last two rows are the choice for encoding.

In the printing application, however, the reconstructed image is not as exactly same as the original secret one due to the human visual system. The human visual system performs a boolean “OR”, while the expected operation in order to reveal the secret image is “XOR”. Suppose black is associated with 1 and white with 0. All superimposing are agree with boolean operation “XOR” and “OR” except superimposing black and black that will yield black instead of white, thus it is agree with “OR” but not “XOR”. Therefore, the decrypted image is an approach of the original one.

In general implementation, that is *(t,n)*-VTS, the secret image is encrypted into *n* shares and in the decryption process, at least *t* shares have to be combined together in order to reveal the secret, while *t-1* or fewer shares will have no information about the secret.

**Stinson’s Model of Visual Cryptography**

Stinson (1996) have improved Shamir’s scheme, in the term of qualified sets: the sets of participants that can recover the secret image. Unlike in Shamir’s *(t,n)*-VTS, that any group of *t* or more participants can recover the secret image, in Stinson’s model the qualified groups are restricted. For example, let is the set of participants and let that qualified sets are all subset of containing at least one of two sets and . Then the family of qualified sets is

while the remaining subsets of are forbidden.

Originally, share images in Stinson’s model, , look like random patterns, as those in Shamir’s scheme. However, in the extended visual cryptography scheme, -EVCS, Stinson *et al* developed a technique to encode the secret image into *n* innocent looking images in such a way that any set, , can reveal the secret, while any set, , can recover nothing.

**Townsville, 27 February 2013**