A Novel XOR-Based Threshold Visual Cryptography with Adjustable Pixel Expansion

: A ( k , n ) visual cryptography (VC) scheme encodes a secret image into n shadows that are printed on transparencies distributed among a group of n participants secretly, and reveal the secret image by stacking no less than k of them. Its decryption requires no computation and attracts much attention in image security applications. The pixel expansion and contrast are two important characteristics to evaluate the visual quality of the revealed secret image for a ( k , n ) -VC scheme. The ( k , n ) XOR-based VC (XVC) schemes can greatly improve the visual quality including both pixel expansion and contrast. Previous methods require complex computation and result in high pixel expansion when they are used to construct such schemes. In this paper, we propose a pixel expansion adjustable ( k , n ) -XVC scheme, which allows pixel expansion to be changed among 2 k − 1 − 1 different values. It can ensure each pixel being exactly recovered with the same average contrast no matter it takes any pixel expansion value. The least pixel expansion is much smaller than previous schemes. Our scheme can be easily implemented based on any conventional OR-based ( k , n ) -VC (OVC) scheme.


Introduction
Visual cryptography (VC) was firstly designed by Naor and Shamir in 1994 to share an image secret in visual pattern instead of computational pattern as the traditional secret sharing [1]. It is a new type of secret sharing scheme that encodes an image secret into n seemingly random shadow images and printed them on n transparencies. When k or more of them are stacked together, the secret image will be recognized by the human visual system. This visual decoding method attracted much attention and was used in many applications such as visual image encoding [2][3][4], visual authentication [5,6], and steganography [7][8][9][10], as well as an important solution for secure multimedia content protection on cloud-based media hosting [11][12][13].
In a (k, n)-VC scheme, each pixel in the secret image is encoded into m subpixels on each shadow image. m is called the pixel expansion. Generally speaking, to minimize the pixel expansion, contrast takes the value 1/m. Since the pioneering work of [1], much effort has been devoted to putting forward the optimization of VC construction. Most of the VC schemes inherited two drawbacks that are high pixel expansion and low contrast, which results in lower visual quality of the recovered image. Although some methods, including linear coding [1,14], supergraph [15,16], integer linear programming method [17][18][19], and linear algebraic technique [20,21], formulated the construction of VC schemes as the mathematical model to decrease the pixel expansion, the resulting pixel expansion m is still large located in [C k n · 2 k−2 + 1, C k−1 n−1 · 2 k−1 + 1]. The resulting contrast is quite small with a value 1/m.
A good strategy was proposed to improve the contrast, which introduced the "XOR" operation in recovering the secret [11,19,[22][23][24][25]. It is investigated that the contrast for a (k, n)-XVC scheme is 2 k−1 times the contrast for the (k, n)-OVC scheme if the the basis matrices of the latter scheme are adopted [26]. The "XOR" operation can be easily run by the special lightweight devices such as smart phone or iPad. It just requires a little computation overload, but it can greatly enhance the contrast compared with the "OR" operation. With the "XOR" operation, some special schemes can greatly improve the contrast. The (2, n)-XVC scheme can even reach contract being 1/2 with no pixel expansion [23]. The special (n, n)-XVC scheme has perfect contrast and no pixel expansion [21,23]. Some systematic methods by using linear coding [22], and integer linear programming [25], and linear algebraic [21] were proposed to improve the pixel expansion of a (k, n)-XVC scheme. However, these XVC schemes need complex computation to construct the basis matrices and also suffer from severe pixel expansion problem.
As proved by [26], the basis matrices in a (k, n)-OVC scheme also satisfy the contrast and security conditions of a (k, n)-XVC scheme. Meanwhile, the contrast is 2 k−1 times enhanced by "XOR" operation. This is also an effective construction method for a (k, n)-XVC scheme. However, it has the same large pixel expansion as a (k, n)-OVC scheme. We propose to use part columns of the basis matrices of (k, n)-OVC scheme to construct a (k, n)-XVC scheme with flexible pixel expansion, and it can reduce the pixel expansion from the least 1 pixel to the largest 2 k−1 − 1 pixels at the same time it can keep the same average contrast with the corresponding (k, n)-XVC scheme. It is a deterministic scheme suitable for any secret image. The resulting pixel expansion is still optimal to the related (k, n)-XVC schemes [21,22,25].
The remainder of the article is organized as follows. Section 2 briefly introduces the definitions of a (k, n)-OVC scheme and a (k, n)-XVC scheme, and the relationship between them. The new solution to construct a (k, n)-XVC scheme with adjustable pixel expansion from a (k, n)-XVC scheme is proposed in Section 3. In Section 4, two detailed examples and its experimental images are presented to demonstrate the scheme. Section 5 is the conclusion.

Preliminaries
In this section, the preliminary knowledge such as the definitions of a (k, n)-OVC scheme and a (k, n)-XVC scheme are presented. The demonstrative examples are shown separately to explain their related concepts. The relation between them is important to construct our scheme and is shown in this section. Then the motivation about our scheme is shown.

A (k, n)-OVC Scheme
When a binary secret image is shared in a (k, n) VC scheme, each pixel in the secret image is encoded into m subpixels in each one of the n shadow images that are printed on transparencies. The encoding rule is represented by two n × m Boolean matrices B 1 and B 0 , whose elements are 1 and 0 denoting black and white subpixels, respectively. A white pixel lets through the light, and a black pixel blocks the light. Two families of basis matrices C 1 (resp. C 0 ) include all matrices obtained by permuting the columns in B 1 (resp. B 0 ). When a black (resp. white) pixel is taken from the secret image, one row of the basis matrix B 1 (resp. B 0 ) in the family C 1 (resp. C 0 ) is distributed to a related shadow image. Stacking shadows i 1 , . . ., i r together, we obtain the OR-ed ("OR" operation) m-vector being V = ⊕(i 1 , . . . , i r ) and "⊕" denotes the "OR" operation for each secret pixel. The gray-level of each secret pixel in the recovered secret image is proportional to Hamming weight (the number of 1s in the vector V) H(V). Let ⊕(B i |U) denote the Boolean OR-ing of the row j, j ∈ U of B i , i = 0, 1. Let |U| denote the cardinality of participant set U. The formal definition of (k, n)-OVC scheme is given below [26]. Definition 1 ([26]). With a set of two n × m Boolean basis matrices, B 0 and B 1 , the result of a column permutation of B i defines the color of the m subpixels in each one of the n shadows when encoding a pixel i ∈ {0, 1}. Such basis matrices constitute a (k, n)-OVC scheme if the following conditions are met.
(2) Security condition: Condition (1) is called contrast condition: it requires that the secret image can be visually recognized by human eyes as the different Hamming weights of black and white colors. The contrast is generally defined as α = (H(⊕(B 1 |U)) − H(⊕(B 0 |U)))/m, and it uses the relative difference of the gray levels of the two pixel to represent the visual quality of the recovered secret image. Condition (2) shows the perfect security of a (k, n)-OVC scheme such that any less than k shadows obtains nothing about the secret images. m is the pixel expansion.
The following is a more intuitive description of a (k, n)-OVC scheme through a simple example of a (2, 2)-OVC scheme. Example 1. The form of B 0 and B 1 is as follows when n = 2 and k = 2, The encoding and decoding process of the shadows is shown below in Table 1. Table 1. The encoding and decoding process of the shadows in a (2, 2)-OR-based (k, n)-VC (OVC) scheme.

Shadow 1 Shadow 2 XOR
The white (resp. black) subpixels in pre-pixel are expressed by φW (resp. ϕB); here, φ (resp. ϕ) is the number of white (resp. black) subpixels in a pixel. It is observed that the (2, 2)-VC scheme has perfect security through Example 1. When stacking less than two shadows, all black and white pixels are encoded as 1B1W or 1W1B. We have 2B0W and 1B1W for black and white secret pixels when stacking two shadows. The contrast is α = 1/2.

A (k, n)-XVC Scheme
It is proven that a (k, n)-XVC scheme has higher contrast and lower pixel expansion than the (k, n)-OVC scheme [25,26]. It simply requires that the decryption of the secret from the shadows are assisted by the small, cheap, and lightweight computational devices, which can be flexibly connected through the internet network. When such mobile devices are available, a (k, n)-XVC schemes can be widely adopted to substitute a (k, n)-OVC scheme. Many schemes focused on a (k, n)-XVC scheme to decrease the construction complexity [21,[23][24][25][26]. Let "⊗" denote the Boolean "XOR" operation and ⊗(B i |U) denote the Boolean XOR-ing of the row j, j ∈ U of B i , i = 0, 1. The formal definition of a (k, n)-XVC scheme is presented as follows [26].
It is analogous to Section 2.1. The following is a more intuitive description of a (k, n)-XVC scheme through a simple example of a (2, 2)-XVC scheme.
Example 2. The form of B 0 and B 1 is as follows when n = 2 and k = 2.
The encoding and decoding process of the shadows is shown below in Table 2. Table 2. The encoding and decoding process of the shadows in a (2, 2)-XVC scheme.

Shadow 1 Shadow 2 XOR
Similar to the analysis in Section 2.1, the (2, 2)-XVC scheme has perfect security. When stacking one shadow, all black and white pixels are 1B1W. We have 2B0W and 0B2W for black and white secret pixels when stacking two shadows. The contrast is α = 1/2, which is 2 k−1 times of the contrast in Section 2.1.

Motivation
A (k, n)-XVC scheme provides a simple way to greatly increase the contrast of a (k, n)-OVC scheme from Examples 1 and 2. It provides the possibility to reveal secret image on lightweight equipments, such as mobile phone and iPad, which can be used in the transmission of the secret images, security authentication, and access control. A (k, n)-XVC scheme greatly enhances the utility and flexibility of secret image sharing. However, it requires the same pixel expansion as a (k, n)-OVC scheme. Yang [26] proved that the contrast of a (k, n)-XVC scheme is 2 k−1 times better than that of a (k, n)-OVC scheme if two kind of schemes are built based on the same basis matrix of a (k, n)-OVC scheme. Yang's specific conclusion is described in Theorem 1.
Theorem 1 (Theorem 1 in [26]). Basis matrices satisfying the conditions of Definition 1 also satisfy the conditions of Definition 2. The relative difference of the gray levels of the recovered white and black pixels is h − l = 2 k−1 (h − l), where l and h (resp. l and h ) are the gray levels of recovered white and black pixels for a (k, n)-OVC (resp. a (k, n)-XVC) scheme, respectively.
Yang's conclusion gives us such inspiration; we can construct a new (k, n) scheme by replacing "OR" operation with "XOR" operation directly without changing the basis matrices. Although the pixel expansion of the two schemes is the same, the contrast of a (k, n)-XVC scheme is enhanced 2 k−1 times than that of a (k, n)-OVC scheme. To solve the problem of pixel expansion in a (k, n)-XVC scheme, we can allow the difference of the gray levels of recovered white and black pixels to be changed among the interval [1, 2 k−1 ]. To ensure such revealing condition, the corresponding new basis matrices can take any m − 2 k−1 + 1 columns to any m columns in the original basis matrices of a (k, n)-OVC scheme. This process allows pixel expansion to be changed among a lightly large interval, and it can ensure each pixel being exactly recovered with the same average contrast no matter it takes any pixel expansion.
The least pixel expansion m − 2 k−1 mα + 1 is much smaller than that of the previous schemes. Our scheme can be easily implemented on any conventional (k, n)-OVC scheme.

The Proposed (k, n)-XVC Scheme with Adjustable Pixel Expansion
In this part, we propose a (k, n)-XVC scheme with adjustable pixel expansion being m , which is built on any (k, n)-OVC scheme with pixel expansion m denoted as (k, n) m -OVC scheme. We denote the proposed scheme as a (k, n) m -XVC scheme. It greatly improves the contrast and allows pixel expansion to be changed among a lightly large interval [m − 2 k−1 mα + 1, m]. It can ensure each pixel being exactly recovered with the same average contrast no matter it takes any pixel expansion. The least pixel expansion is much smaller than previous schemes.

The Proposed Scheme
Given a (k, n)-OVC scheme with basis matrices B 0 and B 1 , its pixel expansion is m. The scheme meets the contrast and security conditions: where 0 ≤ l < h ≤ m. The contrast is α = (h − l)/m. According to the contrast condition, it is known that αm = h−l m m = h − l ≥ 1. Next, we will give the construction of (k, n) m -XVC scheme, the shadows of the proposed scheme is presented in Construction 1. 2. When encoding a white (resp. black) pixel, the dealer randomly chooses a n × m column matrix in B 0 (resp. B 1 ), and do random column permutation on it. The resulting matrix is denoted as B 0 (resp. B 1 ). The i-row of B 0 (resp. B 1 ) is assigned to a relative shadow S i , where Here, the shadow S i is sent to participant U i ; And the B 0 [i 1 , . . . , i m ] denotes the any m columns of B 0 . B 1 [j 1 , . . . , j m ] denotes the another any m columns of B 1 . The chosen columns and their orders are completely independent.

Contrast of the Proposed Scheme
To demonstrate that the proposed (k, n) m -XVC scheme is an effective (k, n)-XVC scheme, we first prove that the contrast condition is satisfied. When any k rows of the basis matrices are superimposed, contrast α of the proposed scheme must be large than 0. As the any m columns are randomly chosen, we use average contrast to describe the visual quality of the recovered secret image. Then, we prove that the average contrast of the scheme is equal in Theorem 2 no matter whatever pixel expansion is taken.
Theorem 2. Construction 1 above is a (k, n)-XVC scheme. The pixel expansion is m ∈ [m − 2 k−1 mα + 1, m] and the average contrast is for |U| = k, if a original (k, n)-OVC scheme has pixel expansion m and contrast α, where mα ≥ 1.
Before proving the theorem, we will give some description and notations. For any basis matrices B 0 and B 1 of a (k, n)-OVC scheme, it satisfies the relationship: When any k rows are superimposed, the secret image will be revealed with contrast α and 2 k−1 α when "OR" and "XOR" operation are used, separatively. The XORing results of any rows in U of B 0 and B 1 can be represented in the following form regardless of the arrangement order: for |U| = k. When |U| < k, the above relationship has the following form: Considering the Hamming weight of ⊗(B 1 |U) (resp. ⊗(B 1 |U), we need only determine H(⊗(B 0 |U)) (resp. H(⊗(B 1 |U))) with |U| = k. Considering the extreme situation, ⊗(B 1 |U) has the least "1"s of ⊗(B 1 |U) and ⊗(B 0 |U) has the most '1's of ⊗(B 0 |U). In such situation, if the contrast condition is satisfied, then all other possible basis matrices B 1 and B 0 must satisfy the contrast condition. Applying (6) and (7), the extreme situation of basis matrices has the following XORing results if any rows in U of B 0 and B 1 are XORed, regardless of the arrangement order of the elements.

Experimental Results and Analysis
We designed two different experiments for the proposed scheme to demonstrate the construction process and effectiveness of our approach. The overall performance is compared with the state-of-the-art schemes shown in Section 4.2.

Experimental Results
In this subsection, we give two different schemes to show the visual quality of the recovered images with different pixel expansion.
Its pixel expansion is m = 8 and the contrast is α = 1/8 in a (3, 5)-OVC scheme. To decrease the pixel expansion, we take m = 4 to construct a (3, 5) 4 -XVC scheme. The contrast is α = 1/2. Its shadow images and reconstructed secret images are shown in Figure 1. It is easy to verify the security condition is satisfied. Superimposing two shadows leaks no information about the secret image, which is shown in Figure 1g-i. The secret image can be revealed by superimposing any three shadows, which is shown in Figure 1j-l. The contrast condition is satisfied.
It can be seen that the proposed (3, 5) 4 -XVC scheme keeps the same contrast with that of the (3, 5)-XVC scheme, and furthermore reduces the pixel expansion. Relative to a (3, 5)-OVC scheme, the visual quality of the recovered image is greatly improved. Experiment 2: The other experiment is regarding a (4, 5) 6 -XVC scheme. This example aims to show that the proposed scheme with different pixel expansion still shows good visual quality of the recovered image. It is constructed by a (4, 5)-OVC scheme with basis matrices Its pixel expansion is m = 15, and the contrast is α = 1/15 in a (4, 5)-OVC scheme. To decrease the pixel expansion, we take m = 6 to construct a (4, 5) 6 -XVC scheme. The contrast is α = 8/15. Its shadows and reconstructed secret images are shown in Figure 2. It is easy to verify that the security condition is satisfied. Superimposing two shadows or three shadows leaks no information about the secret image, which is shown in Figure 2g-l. The secret image can be revealed by superimposing any four shadows, which is shown in Figure 2m-o. The contrast condition is satisfied.
It can be seen that the proposed (4, 5) 6 -XVC scheme keeps the same contrast with that of a (4, 5)-XVC scheme, and furthermore reduces the pixel expansion. Relative to the (4, 5)-OVC scheme, the visual quality of the recovered image is greatly improved.

Performance Comparison with the Related Schemes
The performance of the proposed scheme is compared with other important (k, n)-XVC schemes in terms or pixel expansion and contrast. The state-of-the-art schemes [21,22,25] formulated the different constructions of the existing (k, n)-XVC schemes. We compare the experimental (3, 5)-XVC scheme and (4, 5)-XVC scheme with three other schemes. The results are shown in Table 3. We can see that our scheme keeps the high unchanged contrast, and, at the same time, it allows the pixel expansion to change among a slight large interval. Only the scheme in [21] has perfect contrast, but it reveals the secret image on a fraction of the recovered image. The proposed scheme does not need any mathematical model to compute the basis matrices, it can be built on any existing (k, n)-OVC scheme. However, the schemes in [22,25] require complex computation by using linear coding or integer linear programming. Although the proposed scheme uses average contrast to represent the visual quality of the revealed secret image, it can recover each pixel of the secret image deterministically. It provides a good strategy to improve the image quality of the VC scheme.

Conclusions
In this paper, we propose a novel strategy to construct a (k, n)-XVC scheme. It is built on any existing (k, n)-OVC scheme. It can enhance the contrast by 2 k−1 times from its original scheme. More importantly, it allows the pixel expansion to change among an interval [m − 2 k−1 mα + 1, m]. The proposed scheme is a deterministic scheme with the high unchanged contrast 2 k−1 α regardless of if it takes any pixel expansion. The security and contrast conditions are proved by theoretical analysis. 2 k−1 − 1 different choices of pixel expansion provides many different potential applications for VC schemes.