Page 1

Journal of Research and Practice in Information Technology, Vol. 37, No. 2, May 2005 179

A Visual Cryptographic Technique for Chromatic Images

Using Multi-pixel Encoding Method

Young-Chang Hou

Department of Information Management

Tamkang University

151 Ying-Chuan Road, Tamshui, Taipei County 251, Taiwan, R.O.C.

TEL: +886-2-2621-5656 ext. 3514 FAX: +886-2-2620-9737

Email: ychou@mail.im.tku.edu.tw

Shu-Fen Tu1

Department of Information Management

Chao Yang University of Technology

No. 168, Jifong E. Rd., Wufong Township, Taichung County 413, Taiwan, R.O.C.

TEL: +886-4-233-23000 ext. 4761

Email: ariel_tu@anet.net.tw

Visual cryptography is a secret sharing method that uses human eyes to decrypt the secret. Most

visual cryptographic methods utilize the technique of pixel expansion, which causes the size of the

shares to be much larger than that of the secret image. This situation is more serious for grey-level

and chromatic images. In this paper, we propose a multi-pixel encoding method for grey-level and

chromatic images without pixel expansion. We simultaneously encrypt r successive white or black

pixels each time. The probability of these r pixels being coloured black depends on the ratio of

blacks in the basis matrices. Afterward, we incorporate the techniques of colour decomposition

and halftoning into the proposed scheme to handle grey-level and chromatic images. The

experimental results show that the shares are not only the same size as the secret image, but also

attain the requirement of security. The stacked images have good visual effect as well. Besides, our

method can be easily extended to general access structure.

Keywords: Visual Secret Sharing, Halftoning, Colour Model, Information Security

ACM Classification: K.6.5 (Security and Protection)

Manuscript received: 13 April 2004

Communicating Editor: Rei Safavi-Naini

Copyright© 2005, Australian Computer Society Inc. General permission to republish, but not for profit, all or part of this

material is granted, provided that the JRPIT copyright notice is given and that reference is made to the publication, to its

date of issue, and to the fact that reprinting privileges were granted by permission of the Australian Computer Society Inc.

1. INTRODUCTION

Cryptography is a method of protecting confidential information. It usually scrambles the content

of the information through some mathematical computation, and the disordered content is difficult

to revert to the original one within limited time and resources if the secret key is unknown. Hence

cryptography can be used to avoid the secret being disclosed. Nevertheless, the drawback of the

traditional cryptography is that it heavily relies on a lot of complex computation to encrypt and

decrypt a secret; hence computers are essential for both encryption and decryption.

In 1994, Naor and Shamir (1995) proposed a new method applied on secret images, called visual

cryptography. It’s a visual secret sharing scheme to split a secret image into n shares, which reveal

1Shu-Fen Tu is the correspondence author for this article: ariel_tu@anet.net.tw

Page 2

A Visual Cryptographic Technique for Chromatic Images Using Multi-pixel Encoding Method

Journal of Research and Practice in Information Technology, Vol. 37, No. 2, May 2005 180

no information about the secret. The secret can be seen from the stacked shares with human eyes;

therefore it provides a solution to decrypt secrets without computers. Initially, the scheme realized

a (k, n)-threshold access structure for black-and-white images, called (k, n)-threshold visual secret

sharing (VSS) scheme. That means that the secret image can be recovered when k out of n shares

are stacked. An access structure is a rule, which defines how to share a secret. Tzeng and Hu (2002)

define a general access structure in the form of Γ Γ = (P, F, Q), where P = {1, 2, …, N}, F and Q are

sets of subsets of 2P, and Q ∩ F =∅. P denotes the set of participants, F denotes a collection of

forbidden sets, and Q denotes a collection of qualified sets. An element of a forbidden set or a

qualified set represents a share held by the corresponding participant. Stacking all the shares of a

forbidden set cannot reveal any information about the secret image, but stacking all the shares of a

qualified set can recover the secret image. The (k, n)-threshold VSS scheme mentioned above is a

special case of the general access structure, and the (2, 2)-threshold VSS scheme can consequently

be represented as Γ Γ = (P={1, 2} , F={{1},{2}} , Q={{1, 2}}); therefore share 1 and share 2 cannot

reveal the secret image, and only stacking share 1 and share 2 can recover the secret image. In this

paper, we adopted the form Γ Γ = (P, F, Q) to represent an access structure, and the term “stacked

image” is used to represent the result of stacking all the shares of a forbidden set or a qualified set.

Therefore, a stacked image may be composed of one or more shares. In many studies, the visual

cryptography scheme, which realizes an access structure, is denoted by black and white basis

matrices. There are many studies about how to design the basis matrices (Ateniese et al, 1996b;

Blundo et al, 1999; Naor and Shamir, 1995; Tzeng and Hu, 2002; Verheul and van Tilborg, 1997).

Most visual cryptographic methods need to expand pixels (Ateniese et al, 1996a, 1996b, 2001;

Blundo et al, 2001; Blundo and De Santis, 1998; Blundo et al, 2000; Blundo et al, 1999; Droste, 1996;

Eisen and Stinson, 2002; Hofmeister et al, 2000; Hou, 2003; Naor and Shamir, 1995; Tzeng and Hu,

2002; Verheul and van Tilborg, 1997; Yang and Laih, 2000); that is, every pixel on the secret image is

expanded to m sub-pixels on the shares, where m ≥ 2. Consequently, the share is m times the size of

the secret image, and that leads to not only distortion of images but also inconvenience of carrying

shares and waste of the storage space. The parameter m is called “pixel expansion”, and “m = 1” refers

to the situation that the size of shares is the same as that of the secret image. Afew studies have been

done on this situation. Hou et al (2001) proposed a (2, 2)-threshold visual cryptographic scheme

without pixel expansion. For each time, an L × M block B with cnt black pixels on the secret image is

encoded to corresponding blocks B1and B2on the first and second shares respectively. B1is filled with

(L × M)/2 blacks randomly. (L × M)-cnt pixels of B2corresponding to the black area of B1are filled

with blacks, and cnt-(L × M)/2 pixels of B2corresponding to white area of B1are filled with blacks.

Hence B2also has (L × M)/2 black pixels, which satisfies the security requirement. Although Hou et

al’s method does not need to expand pixels, it only fits (2, 2)-threshold access structure. It is

impossible for the method to realize (k, n)-threshold or general access structure. Moreover, the secret

image has to be preprocessed to ensure the number of black pixels of a block B is more than (L × M)/2.

Ito et al (1999) utilized black and white basis matrices to implement a (k, n)-threshold visual

secret sharing scheme without pixel expansion. When a black (resp. white) pixel is encrypted, one

of the columns of the black (resp. white) basis matrix is picked randomly, and the i-th row of the

column is then assigned to the i-th share. Since the corresponding rows of the black and white basis

matrix have the same ratio of ‘0’ to ‘1’, each pixel on the share has the same probability of being

coloured black or white, no matter what the colour of the corresponding pixel on the secret image

is. Therefore it is impossible to perceive any clue about the secret image from the shares. The

contrast of the stacked image depends on Eq. 1.

β = |p0– p1|(1)

Page 3

A Visual Cryptographic Technique for Chromatic Images Using Multi-pixel Encoding Method

Journal of Research and Practice in Information Technology, Vol. 37, No. 2, May 2005 181

In Equation 1, p0(resp. p1) denotes the probability that a white (resp. black) pixel of the secret

image becomes black on the stacked image. As long as the difference between these two

probabilities is large enough, human eyes can discriminate black areas from white areas on the

stacked image. However, they did not mention how to apply their method to continuous-tone

images. Moreover, although the whole stacked image may truly attain the contrast defined by β, it

is still possible for a small area that the distribution of black and white pixel can’t totally fulfill the

values of p0and p1because the selection of the columns of the basis matrix is fully random. Thus

the visual effect of the stacked image is probably poor.

In this paper, we propose another visual cryptographic method without pixel expansion, called

multi-pixel encoding method (MPEM). Afterward we utilize MPEM incorporated halftoning and

colour model to share a secret grey-level and chromatic image. The experimental results show that

the shares are secure enough, and the stacked images have better visual effects compared to Ito et

al’s method. With appropriate basis matrices, our method can be easily extended to realize any

access structure.

2. THE MULTI-PIXEL ENCODING METHOD

2.1 The Proposed Scheme

To attain the aim of not expanding the pixel, we propose that MPEM encrypt multiple pixels of the

secret image simultaneously. Let M0and M1be the two n × r basis matrices corresponding to white

and black pixels, respectively. We simultaneously take r successive white (resp. black) pixels as a

unit of encryption. The set of positions of these r white (resp. black) pixels is called “a white (resp.

black) encryption sequence”. The steps of encryption are as follows:

1. Take r successive white (resp. black) pixels, which have not been encrypted yet, from the secret

image sequentially. Record the positions of the r pixels as (p1, p2, …, pr).

2. Permute the columns of M0(resp. M1) randomly.

3. Fill in the pixels in the positions p1, p2, …, prof the i-th share with the r colours of the i-th row

of the permuted matrix, respectively.

4. Repeat step (1) to step (3) until every white (resp. black) pixel is encrypted.

Take a (2, 2)-threshold visual secret sharing scheme for example to compare the MPEM with

the traditional method (i.e. Naor and Shamir’s method). The two basis matrices for white and black

pixels are as follows:

(a) The secret image

(700 × 591 pixels)

(b) The stacked image of Naor and Shamir’s method

(1400 × 591 pixels)

(c) The stacked image of

the MPEM

(700 × 591 pixels)

Figure 1: The quality comparison of MPEM and Naor and Shamir’s method (500 dpi)

(2)

Page 4

A Visual Cryptographic Technique for Chromatic Images Using Multi-pixel Encoding Method

Journal of Research and Practice in Information Technology, Vol. 37, No. 2, May 2005 182

Suppose Figure 1(a) is the secret black-and-white image. In Naor and Shamir’s method, when

encoded a black (resp. white) pixel, the columns of M1(resp. M0) are randomly permuted, and the

two pixels of each row of the permuted matrix are distributed to each share. Hence, each pixel is

encoded into two sub-pixels on each share. Observing Figure 1(b), we can see that the size of the

stacked image is larger, and the shape is distorted. If we want to avoid distortion, we can encode

each pixel into a block of 2 × 2 sub-pixels on each share. However, the pixel expansion becomes

larger; that is, four sub-pixels. We can glance at Figure 3, which is a recovered image with a pixel

expansion m = 4. On the contrary, the size of the stacked image (See Figure 1(c)) generated by the

proposed MPEM is the same as that of the secret image, and naturally, the shape is not changed.

Moreover, the recovered logo is as visually perceivable as that of Naor and Shamir’s method. It

should be noted that the spirit of visual cryptographic method is that the stacked image is decoded

by human eyes; hence, the secret should be visually perceivable. Therefore, the proposed MPEM

attain the requirement just like the traditional method does.

2.2 Contrast and Security

Let Γ Γ = (P, F, Q) be an access structure on a set of n participants. A VSS scheme for (P, F, Q) with

relative difference α(r) and set of thresholds {(X, tX)}X ∈ Qis realized using the two n × r basis

matrices M0and M1if the following two conditions hold (Ateniese et al, 1996b).

1. If X = {i1, i2, …, ip} ∈ Q, then the r-vector V formed by “OR”-ing rows i1, i2, …, ipof M0

satisfies H(V) < tX- α(r)⋅r; whereas, for M1it results that H(V) ≥ tX.

2. If X = {i1, i2, …, ip} ∈ F, then the two p × m matrices obtained by restricting M0and M1to rows

i1, i2, …, ipare equal up to column permutation.

In the conditions above, H(V) denotes the Hamming weight of the r-vector V, i.e. the number of

bit ‘1’ in V, and tXdenotes a threshold and 1 < tX< r. The first condition is referred to as contrast;

that is, the number of black pixels within the r-vector V corresponding to white pixels of the secret

image has to be smaller than tX- α(r)⋅r, while that of black pixels within the r-vector V

corresponding to black pixels of the secret image has to be larger than tX. Therefore, the blackness

of r-vector V corresponding to white pixels will obviously differ from that corresponding to black

pixels. The second condition is referred to as security; that is, the original secret is totally invisible

if analyzed by any other method from the stacked image of the forbidden set.

Every encryption sequence of the secret image is encoded either by M0or M1, depending on its

type. Since both M0and M1have to satisfy the security condition, the security of the proposed

MPEM is based on the security of visual cryptography. In accordance with the contrast condition of

the basis matrices, the r-vector corresponding to the black encryption sequence contains more black

pixels than that corresponding to the white encryption sequence on the stacked image, which

produces the contrast as Equation 1. That means that the black area looks blacker than the white

area. Hence the proposed MPEM can hold the contrast condition of visual cryptography.

3. THE VISUAL CRYPTOGRAPHIC METHOD FOR GREY-LEVEL IMAGES WITH m=1

As we mentioned earlier, most studies about visual cryptographic methods need to expand pixels,

especially those methods for grey-level and chromatic images (Blundo et al, 2000; Hou, 2003;

Rijmen and Preneel, 1996; Verheul and van Tilborg, 1997; Yang and Laih, 2000). This research

usually tries to design respective basis matrices for different colours on a secret continuous-tone

image (Blundo et al, 2000; Verheul and van Tilborg, 1997; Yang and Laih, 2000). In this paper, we

introduce a technique, called halftoning, which can transform a continuous-tone image into a bi-

Page 5

A Visual Cryptographic Technique for Chromatic Images Using Multi-pixel Encoding Method

Journal of Research and Practice in Information Technology, Vol. 37, No. 2, May 2005 183

level image (Mese and Vaidyanathan, 2002). By employing halftoning, we can apply the proposed

MPEM to grey-level and chromatic images easily. In this section, we will describe halftoning

briefly and demonstrate how we incorporate halftoning in MPEM to encode a grey-level

secret image.

3.1 Halftoning

The main idea of halftoning is to utilize the density of printed dots to simulate the grey scale of

pixels. Human eyes can integrate the fine detail in an image viewed from a distance and record

only the overall intensity. The denser the dots are, the darker the image is; on the contrary, the

sparser the dots are, the lighter the image is. Therefore, we can use two colours – black and

white – to simulate a continuous tone so that a continuous-tone image can be transformed into

a bi-level image. For example, a grey-level image (Figure 2(a)) is transformed into a bi-level

image (Figure 2(b)) with black and white dot only by halftoning. Although, in fact, Figure 2(b)

is a black-and-white image, we can still perceive the change of the grey level as if it is a grey-

level image.

Most visual cryptographic methods are for black-and-white images, so if we utilize halftoning

to transform a grey-level image into a bi-level image, those visual cryptographic methods can be

applied to halftone images directly. For example, we can use the (2, 2)-threshold VSS scheme

proposed by Naor and Shamir (1995) to encrypt Figure 2(b). The result is shown in Figure 3, which

illustrates the suitability and feasibility of using halftoning to construct a visual cryptographic

scheme for grey-level images. In this paper, we will not discuss halftoning in detail. The emphasis

will be put on that the bi-level feature of the grey-level and chromatic images can extend the

application of the black-and-white visual cryptographic method.

3.2 The Proposed Scheme for Grey-level Images and Experimental Results

Let M0and M1denote the two n × r basis matrices corresponding to a white and a black pixel,

respectively. For applying the two basis matrices to grey-level images directly, we incorporate the

halftoning into the encryption procedure. The whole encryption procedure of the proposed scheme

for chromatic images is as follows.

1. Transform the secret grey-level image SI into a halftone image SI’.

2. Encode SI’ by MPEM.

(a) A continuous-tone image

Figure 2: Halftoning (512 × 512 pixels, 300 dpi)

(b) A halftone image