This article proposes an efficient XOR-based visual cryptography scheme with lossless reconfigurable algorithms, which includes an encryption and a decryption schemes for gray-scale and color secret images. The encryption scheme aims to encrypt secret images by mapping them to several shared images that do not suffer any pixel expansion problem and do not reveal any information of the secret images by considering a random column selection algorithm based on the 0-mapping and 1-mapping matrices, where the two matrices are dynamically generated in the encryption scheme. Moreover, the proposed decryption scheme can reconstruct the secret images with only a series of XOR operations. The reconstructed images do not suffer any contrast distortion and pixel expansion problems comparing with their original secret images. Finally, the proposed two schemes are illustrated with the practical examples.
A visual cryptography scheme (VCS) that belongs to one of the visual secret sharing schemes was first proposed by Naor and Shamir1 in 1994. In this scheme, a secret image can be printed on documents, photographs, and pictures, and it assumes that a secret image consists of a collection of only black and white pixels. The secret image can be directly revealed by stacking only of the shared images together if the secret image is encrypted to shared images. It means that the reconstruction processes of the revealed secret image can be automatically performed by human visual systems without any cryptography knowledge or computation. Therefore, the studies of VCSs have become more and more valuable.2
In the aforementioned VCS, each pixel of the secret image is split into black and white subpixels, which means that the pixels of the reconstructed image are expanded comparing with the original image.3 In recent years, a large number of studies aim to reduce the contrast loss rates and pixel expansion scales for reconstructed images. Hofmeister and Krause4 proposed a (, )-threshold VCS to compute the optimal contrast by resolving simple linear programming problems. In their proposed scheme, the optimal contrast is , , or if is , , or , respectively. Otherwise, the scheme that is proposed by Naor and Shamir1 has the ideal optimal contrast if . Viet and Kurosawa5 proposed a VCS to generate a reconstructed image that almost has no contrast loss with simple reverse operations. The white area of the reconstructed image can be reconstructed completely. However, the size of reconstructed image is increased comparing with the original image. Cimato and DeSantis6 proposed a VCS that can be reconstructed using white and black pixels completely. However, this scheme is only applicable to binary images and cannot be used to deal with gray-scale images. Wang and Song7 introduced a reverse operation–based VCS that can encrypt the gray-scale images with the optimal contrast. Moreover, Hou8 proposed a VCS for color images by adopting a color separation technology to separate a color image to three gray-scale images that are further converted into corresponding three binary images with a halftone technique, where the halftone technique is also extensively used in some other VCSs.9–11 Finally, the binary images are encrypted to the shared images. Wang and Arce12 proposed an error diffusion algorithm to construct meaningful shared images, which aimed to as much as possible reduce errors during the encryption processes.
Pixel expansion problems of VCSs also should be considered during the encryption processes.13 Each pixel of a secret image will be split into black and white subpixels that are used to generate the shared images. This process may suffer pixel expansion and contrast distortion problems comparing with the reconstructed image and the original image. Yang14 proposed a probability-based VCS that uses the white pixel probability of a secret image as the contrast of the reconstructed image. Subsequently, this scheme is extended by Cimato et al.15 Shyu16 proposed a random grids-based VCS that can encrypt gray-scale and color images, where the size of the reconstructed image is same as the original image since the proposed scheme avoids the pixel expansion problems. However, this scheme is not suitable for any of the (, )-threshold VCSs. Chen and Tsao17 proposed a (, )-threshold VCS and a (, )-threshold VCS by extending the scheme that is proposed by Shyu.16 Chen and Tsao18 proposed a random grids-based (, )-threshold VCS that can optimize the pixel expansion problems and construct basis matrices. Furthermore, more probability-based VCSs and random grids-based VCSs are proposed,19–21 which aim to achieve the lossless reconstructed images.
An XOR-based visual cryptography system (XVCS) is developed to achieve more better contrast and resolution for the reconstructed images. In practical applications, although the XOR operations need the help of computers or other optical devices in decryption steps, but it provides a new way to optimize the pixel expansion and contrast distortion problems for the reconstructed images.22 For a (, )-threshold XVCS, the contrast of a reconstructed image is , and it does not suffer any pixel expansion problem.23 For a (, )-threshold XVCS, the mentioned two problems can be avoided with some sufficient and necessary conditions.24 They proposed a region by region construction to achieve the preferable contrast with some small pixel expansion. Furthermore, their proposed scheme contains an exhaustive search method that is very hard and quite time-consuming. Some revised (, )-threshold XVCSs are proposed to improve the pixel expansion problems by using linear coding,25 integer linear programming,26 and linear algebraic.24 However, these XVCSs include many complex computation processes to construct the basis matrices, and the pixel expansion problems do not be completely avoided.27
Inspiring from the aforementioned schemes, a (, )-threshold XVCS with lossless reconfigurable algorithms is proposed in this article. It contains an encryption scheme and a decryption scheme. The former aims to encrypt secret images by mapping them to shared images. For a secret image, its each original bit will be mapped to shared bits that are randomly selected from the columns of a 0-mapping matrix and a 1-mapping matrix, where the two matrices are also dynamically generated. Therefore, the original bits are replaced by the shared bits that are used to construct the shared images. It is clear that the shared images do not reveal any information of the secret images. Moreover, the proposed decryption scheme can reconstruct the secret images with only a series of XOR operations. The reconstructed images do not suffer any contrast distortion problem and they also have the same size as their original secret images.
The main contributions of this article are concluded as follows:
An efficient XVCS with a lossless reconfigurable algorithm is proposed, which can encrypt gray-scale and color secret images because the two classes of secret images can be converted to the corresponding binary matrices and the core steps of the encryption and decryption schemes primarily consider the binary XOR operations that are a typical class of logical operations.
The shared images do not reveal any information of the secret images because each original bit of the secret images is randomly mapped to other shared bits. Moreover, they also do not suffer any contrast distortion and pixel expansion problems comparing with their original secret images.
The proposed encryption scheme can rapidly construct the shared images with a series of matrix column selection operations and the proposed decryption scheme can also rapidly reconstruct the secret images with only a series of XOR operations. The proposed schemes have an ideal computation complexity.
The rest of this article is organized as follows. Section “Basic definition” defines the basic concepts and parameters. The encryption and decryption schemes are presented in section “The encryption and decryption schemes.” In section “Examples,” the proposed schemes is illustrated with several practical examples, and section “Conclusion” concludes this article.
Basic definition
Let be a secret image, where is a pixel of . Pixel is composed of three components , , and if is a color image, where , , and represent the red, green, and blue channels, respectively. Otherwise, pixel is a gray-scale pixel point if is a gray-scale image.
Definition 1.Let be a secret image. Matrix is called as the pixel matrix of such that (1) if is a gray-scale image, where . (2) , , and such that , , and are the red, green, and blue channels of , respectively, if is a color image, where and .
Example 1: Let be a secret image. Then, the pixel matrix of is
if is a gray-scale image. Otherwise,
if is a color image, where items , , and are the , , and components of pixel , respectively. Items , , and are the , , and components of pixel , respectively. Similarly, it can obtain the items – . It is shown that the secret image and its pixel matrix have the same rows. However, the pixel matrix has the three times as many columns as . This means that the pixels of are expanded three times in if is a color image. Of course, the pixels do not be expand if is a gray-scale image.
Let be a pixel of an image. Then, can be transformed into a 8-bit binary number, denoted as
and the inverse function is denoted as
where and . For example, we have and .
Definition 2.Let be a pixel matrix. Matrix is called as the binary matrix of if and such that and
where and .
Example 2: Let be a pixel matrix. The binary matrix of is
In a VCS, it is inadvisable that directly share the original bits of a secret image with the participants since it will reveal the information of the secret images. A better idea is to construct some transparent random bits to replace the original bits. This means that the original bits should be mapped to other irrelevant bits that are shared for participants. Therefore, a mapping matrix is defined as follows.
Definition 3.Let be the number of participants. Matrix is called as a mapping matrix if such that and such that
Example 3: Assume that there are three participants, that is, . The mapping matrix is
where , , , , and .
Since each original bit of a secret image should be mapped to other irrelevant bits, it can randomly select one of the columns from the mapping matrix to as the mapped bits. Moreover, the value of each original bit of secret images is ‘0’ or ‘1.’ It is necessary to consider which one column is selected to as the mapped bits for the original bit ‘0’ and which one column is selected for the original bit ‘1.’ Considering the parity-check of XOR operations on a series of bits, their result is zero (resp. one) if these bits contain an even (resp. odd) number of ‘1.’ Therefore, the mapping matrix should be divided into two submatrices according to the number of “1” in its each column.
Definition 4.Let be the number of participants, be a mapping matrix, be a vector, and be two matrices such that , , and such that
where represents the th column of . Then, is called as a 0-mapping matrix and is called as a 1-mapping matrix.
This means that a mapping matrix is divided into a 0-mapping matrix and a 1-mapping matrix , where each column of contains an even number of “1” and each column of contains an odd number of “1.”
Example 4: For the mapping matrix in Example 3, the th column is . We have since . The th column is since . We have , , , , , and . Then, and are
Definition 5. Let be the number of participants, and be the 0-mapping and 1-mapping matrices, respectively, and be an original bit of a secret image. The th column of (resp. ), denoted as (resp. ), is called as the 0-mapping(resp. 1-mapping) vector of if (resp. ) is selected to replace the original element to be shared for the participants.
Example 5: In Example 2, we know that and are two original bits in the binary matrix . If the secret image will be shared for three participants, we can construct a 0-mapping matrix and a 1-mapping matrix , as shown in Example 4. Therefore, the th column of , denoted as , is called as the 0-mapping vector for the original bit if it is selected to replace to be shared for the three participants, where the first participant obtains “0” and the other two participants both obtain “1.” Similarly, the th column of , denoted as , is called as the 1-mapping vector for the original bit if it is selected to replace to be shared for the three participants, where they all obtain “1.”
For a secret image, its original bits can be shared and reconstructed according to the column items of 0-mapping and 1-mapping matrices. Assume that the value of an original bit is ’0.’ It can be mapped by selecting one of the columns from the 0-mapping matrix. Certainly, the original bit can be reconstructed by a series of XOR operations for all bits of the selected column. Similarly, an original bit can also be mapped and reconstructed by one of the columns in a 1-mapping matrix if its value is “1.” To further enhance the secrecy of the secret image, the column selections in 0-mapping and 1-mapping matrices should consider their randomness.
Definition 6.Let be the number of participants, = and = be the 0-mapping and 1-mapping matrices, respectively, =(, ,, be a vector such that and , . Vector is called as a probability vector of matrices and if such that is the probability of selecting (resp. ) to be the 0-mapping (resp. 1-mapping) vector of an original bit “0” (resp. “1”).
Example 6: If a secret image will be shared for three participants, we can construct a 0-mapping matrix and a 1-mapping matrix , as shown in Example 4. Let be a probability vector of and . The probabilities of selecting columns , , , and from are 0.2, 0.4, 0.1, and 0.3, respectively. In the same way, the probabilities of selecting columns , , , and from are same with the former.
In the actual applications of Example 6, it is difficult to precisely generate a random number such that for each bit of the secret image. An ideal method is to construct a probability interval for each column selection from or according to the probability vector . The corresponding column will be selected from or if . Therefore, a probability interval vector is defined as follows.
Definition 7.Let be the number of participants and =(, ,, be a probability vector. Vector =(, ,, is called as the probability interval vector if and such that .
Example 7: In Example 6, we know that = (0.2, 0.4, 0.1, 0.3) is a probability vector and . We have , , ,, and . Therefore, the probability interval vector is . The probability intervals of selecting columns , , , and from to be the 0-mapping vectors are , , , and , respectively. It is similar for the column selections of .
The encryption and decryption schemes
Let be the number of participants and , ,, be a probability vector. For each original bit of a secret image, the probability of selecting its 0-mapping vector or 1-mapping vector should be equal in order to ensure the fairness in the whole encryption processes. Then,
Therefore, , we have
The encryption scheme
In the encryption processes, Algorithms 1 and 2 are proposed to encrypt a secret image to its shared images for participants. Figure 1 shows the whole framework of the proposed encryption scheme.
The whole framework of the proposed encryption scheme.
Computing the intermediate variables according to the secret image and the number of participants.
Input: A secret image ;
The number of participants, denoted as .
Output: A binary matrix ;
A 0-mapping matrix ;
A 1-mapping matrix ;
A probability interval vector ,;
A random probability matrix .
1: Getting the pixel matrix according to the secret image (Definition 1);
2: Computing the binary matrix = according to pixel matrix (Definition 2), where ;3: Getting a mapping matrix according to the number of participants (Definition 3);
4: Computing the 0-mapping and 1-mapping matrices = and = according to the mapping matrix = (Definition 4);
5: According to the number of participants , getting a probability vector by using the methods of Definition 6;
6: Computing the probability interval vector according to (Definition 7);
7: Randomly generating a random probability matrix for binary matrix , where such that is a random value and ;
8: return, , , , and ;
Generating shared images , ,, for the participants.
Input: A binary matrix ;
A 0-mapping matrix ;
A 1-mapping matrix ;
A probability interval vector ,;
A random probability matrix .
Output: The shared images , , , .
1: Let, , , and be binary matrices with the size of and their all bits be ‘0’;
2: For(; ; )
3: For(; ; )
4: If(== 0) then
5: ;
6: Else
7: ;
8: End if
9: For (; ; )
10: , where ;
11: End for
12: End for
13: End for
14: Converting the binary matrices to pixel matrices - according to the reverse processes of definition 2;
15: Computing the shared images , , , according to the pixel matrices - with the reverse processes of definition 1;
16: return, , , and ;
In Algorithm 1, several intermediate variables that are used to generate the shared images are computed according to the input secret image and the number of participants , such as the binary matrix , the 0-mapping and 1-mapping matrices and , a probability interval vector , and a random probability matrix that are the inputs of Algorithm 2.
In Steps 1 and 2 in Algorithm 1, the pixel values of the input secret image are converted into binary matrix according to definitions 1 and 2, since the proposed scheme is based on the XOR operations. The binary matrix of the secret image can be directly obtained by equation (1) if is a gray-scale image. If is a color image, it should be first converted to a pixel matrix and continually converted into the binary matrix that is three times as the width as the case of the gray-scale image.
In Steps 3 and 4, the 0-mapping and 1-mapping matrices and are computed, where is the number of participants. For each original bit , it is inadvisable that directly sharing to the participants. An ideal scheme is that the original bit is mapped to other bits in which each bit is used to replace the original bit and is shared to a corresponding participant. Conversely, the shared bits of the participants can be used to reconstruct the original bit by a series of XOR operations. Step 3 is the mapping processes from the original bit to the shared bits. We first generate a series of numbers, that is, 0, 1, 2,, , and each number can be converted to a -bit binary number. Therefore, a mapping matrix is constructed, where each original bit can be mapped to one of the columns of the mapping matrix . Considering the reconstruction problems of the original bit , the column selections from the mapping matrix should consider the fact that the original bit has two values or . Therefore, the mapping matrix should be divided into two parts. Step 4 realizes the dividing processes. According to Definition 4, a column of the mapping matrix is also the column of the 0-mapping matrix (resp. 1-mapping matrix ) if the bits of this column contain an even (resp. odd) number of “1.” This means that the mapped bits can be randomly selected from the 0-mapping matrix if . Otherwise, the mapped bits can be randomly selected from the 1-mapping matrix .
In order to facilitate the random column selections in step 4, a probability interval vector is proposed in Steps 5 and 6. For all original bits in , the probabilities of their column selections should be in step 4 according to equations (3) and (4). We have the probability vector is
Therefore, the probability interval vector is
For the binary matrix of secret image , , bit will be mapped to shared bits by randomly selecting a column from the 0-mapping or 1-mapping matrixes according to the probability interval vector and a random value (). In step 7, a corresponding random probability matrix is randomly generated for the binary matrix , where it is a one-to-one correspondence between and and . This means that, , there must be one and only one such that the mapped bits of are uniquely determined by .
In Algorithm 2, the shared images , ,, and are computed according to the outputs of Algorithm 1, which have a same size as the secret image , that is, .
In step 1, the temporary binary matrices , ,, and are created and their all bits are initialized to “0.” They are used to save the mapping bits that are randomly selected from the 0-mapping matrix or 1-mapping matrix .
In Steps 2 to 13, the shared bits are randomly selected from the 0-mapping matrix and the 1-mapping matrix . They are stored to the temporary binary matrices , ,, and . In Steps 4 to 8, the value of a temporary variable is first determined according to the value of original bit . In steps 9 to 11, the th column are selected to as the shared bits from the 0-mapping or 1-mapping matrices according to the temporary variable since such that , where is a random value and .
In Steps 14 and 15, the temporary binary matrices , ,, and are converted to pixel matrices – according to the reverse processes of definition 2 and the pixel matrices – are continuously converted to shared images , ,, and according to the reverse processes of definition 2. Therefore, the shared images , ,, are encrypted and shared for participants.
The decryption scheme
After the shared images , ,, and are collected from the participants, the secret image can be reconstructed by Algorithm 3.
The secret image can be reconstructed according to shared images , ,, and .
Input: The shared images , ,, and .
Output: The secret image .
1: Converting the shared images - to pixel matrices - (definition 1);
2: Getting the binary matrices - according to the pixel matrices - (definition 2);
3: Let be a binary matrix and their all bits be initialized to ’0’;
4: For(; ; )
5: For(; ; )
6: , where and ;
7: End for
8: End for
9: Converting the binary matrix to a pixel matrix by the reverse processes of definition 2;
10: Getting the secret image according to the pixel matrix by the reverse processes of definition 1;
11: return;
In Steps 1 and 2, the shared images , ,, and are converted to pixel matrices – according to definition 1 and the pixel values of the pixel matrices are continuously converted to binary numbers, denoted as – , according to definition 2 since the proposed decryption scheme is based on the XOR operations.
In Step 3, a binary matrix is created and their all bits are initialized to “0.” It is used to save the binary bits that are reconstructed according to the corresponding bits of the shared images , , , and .
In Steps 4–8, , is reconstructed by a series of XOR operations among the binary bits , ,, and that are one of the columns in the 0-mapping matrix or 1-mapping matrix and are randomly selected to as the mapping bits in the steps 9–11 of Algorithm 2. According to Steps 4–8 of Algorithm 2, the group of , ,, and is selected from the columns of the 0-mapping matrix if the original bit is “0,” that is, . Otherwise, it is selected from the columns of the 1-mapping matrix . In other words, according to Definition 4, the selected binary bits , ,, and should contain an even number of “1” if they are selected from the columns of 0-mapping matrix . Otherwise, they should contain an odd number of “1.” In step 6 of Algorithm 3, we have , where and . Therefore, we have if the binary bits , ,, and contain an even number of “1.” Otherwise, we have .
In Steps 9 and 10, the binary matrix is converted to a pixel matrix according to the reverse processes of Definition 2 and the pixel values of the pixel matrix are continuously converted to binary numbers, denoted as , according to the reverse processes of definition 2.
Finally, the secret image can be reconstructed according to the shared images , ,, and using Algorithm 3. It is shown that the reconstructed image has the same size as the original secret image. Moreover, the reconstructed image can remain the same quality comparing with the original secret image. Furthermore, all shared images do not reveal any information of the original secret image.
Examples
In this section, a brief example is presented to illustrate the proposed schemes and a series of experiments is given to demonstrate the feasibility of the proposed schemes.
A brief example
Figure 2(a) shows a secret image that will be encrypted and shared to three participants, that is, . According to the step 1 of Algorithms 1, the pixel matrix of is
In Algorithms 1–3, both the pixel matrices and are identical with the secret image since is agray-scale image. According to the step 2 of Algorithms 1, the binary matrix of the pixel matrices is
We know . According to the Steps 3 and 4 of Algorithms 1, the mapping matrix is constructed, as shown in Example 3. The 0-mapping matrix and 1-mapping matrix are obtained, as shown in Example 4.
(a) A secret image ; (b)–(d) the shared images , , and , respectively; and (e) the reconstructed image.
According to equations (3) and (4), , the probabilities of column selections for from the 0-mapping matrix or 1-mapping matrix are equal to , where . According to the Steps 5 and 6 of Algorithms 1, the probability vector is
and the probability interval vector is
Considering Step 7 of Algorithms 1, a temporary random matrix that has the same size with the binary matrix is randomly generated, that is,
where and . Therefore, the random probability matrix can be computed with and such that .
Let = , = , and = be three binary matrices such that
According to Steps 2 to 13 in Algorithm 2, and , if
and , we have and . Since in , we have and the 1th column of is selected to as the mapping bits for , that is, . Therefore,
, , and .
and , we have and . Since in , we have and the 0th column of is selected to as the mapping bits for , that is, . Therefore,
, , and .
and , we have and . Since in , we have and the 0th column of is selected to as the mapping bits for , that is, . Therefore,
, , and .
and , we have and . Since in , we have and the 1th column of is selected to as the mapping bits for , that is, . Therefore,
, , and .
and , we have and . Since in , we have and the 3th column of is selected to as the mapping bits for , that is, . Therefore,
, , and .
Therefore, the binary matrices , , and are
By converting the binary matrices , , and to the pixel matrices , , and , we have
The three shared images , , and are same as the three pixel matrices , , and since the secret image is a gray-scale image. Therefore, we have , , and , as shown in Figure 2(b)–(d), respectively. It is obvious that each shared image does not reveal any information of the original secret image.
After the shared images , , and are collected from the three participants, the secret image can be reconstructed by Algorithm 3. First, the shared images , , and should be converted to the binary matrices , , and that are presented above. Let be a binary matrix. According to Steps 4–8 of Algorithm 3, and , if
and , we have
.
and , we have
.
and , we have
.
and , we have
.
and , we have
.
We have
Therefore, the reconstructed image is
Figure 2(e) shows the reconstructed image . It is shown that the reconstructed image has the same size as the original secret image. Moreover, the reconstructed image remains the same quality comparing with the original secret image.
The practical examples
To further demonstrate the feasibility of the proposed encryption and decryption schemes, a series of practical examples are given including some classical gray-scale and color images. The secret images are tested with an Qt-based tool that is developed with the language C++ and Qt development platform28 in our laboratory according to the proposed schemes. Figures 3–7(a) show a part of secret images, where Figures 3(a) and 4(a) are gray-scale images and Figures 5–7(a) are color images. Figures 3–6(a) will be encrypted and shared to four participants, that is, . Figure 7(a) will be encrypted and shared to seven participants, that is, .
(a) A gray-scale secret image ; (b)–(e) are the shared images , , , and , respectively; and (f) is the reconstructed image.
(a) A gray-scale secret image ; (b)–(e) are the shared images , , , and , respectively; and (f) is the reconstructed image.
(a) A color secret image ; (b)–(e) are the shared images , , , and , respectively; and (f) is the reconstructed image.
(a) A color secret image ; (b)–(e) are the shared images , , , and , respectively; and (f) is the reconstructed image.
(a) A color secret image ; (b)–(h) are the shared images – , respectively; and (i) is the reconstructed image.
In Figures 3–6, each secret image can be encrypted into four shared images , , , and according to Algorithms 1 and 2. Figures 3–6(b)–(e) show the four shared images that have the same size as the secret images, respectively. In Figure 7, the secret image is encrypted into seven shared images – according to Algorithms 1 and 2. It is obvious that the shared images do not reveal any information of the corresponding secret images because they are meaningless. After each shared images are collected from all the participants, the corresponding secret images can be reconstructed by Algorithm 3. It is shown that the reconstructed images have the same size as the original secret images, which also remain the same contrasts comparing with the original secret images, respectively.
The comparison
Table 1 shows a comparison between the schemes that are proposed by Shen et al.,24 Shyu,26 and Guo et al.,27 and this article, which mainly consider the pixel expansion, contrast, and computation complexity problems. The size of the reconstructed image is equal to that one of secret image if its pixel expansion is zero. Otherwise, the size of the reconstructed image relative to the secret image will gradually increase as the increasing of its pixel expansion. In Table 1, the schemes that are proposed by Shen et al.,24 Shyu,26 and Guo et al.27 suffer the pixel expansion problems since their pixel expansions are six, eight, and seven, respectively. However, our proposed scheme do not suffer any pixel expansion problem since its pixel expansion is zero. The main reason is that the matrices of the secret image, shared images, and reconstructed image all maintain the same size.
Moreover, the reconstructed image has the same quality as the secret image if its contrast is one. Otherwise, the quality of the reconstructed image relative to the secret image will gradually decrease as the decreasing of its contrast. In Table 1, the qualities of the reconstructed images that are reconstructed by Guo et al.,27 Shyu,26 and Shen et al.24 gradually deteriorate since their contrasts gradually decrease. Fortunately, our proposed scheme do not suffer any contrast problem since its contrast is one. The main reason is that each bit of the secret image can be correctly reconstructed for the reconstructed image with the reversibility of XOR operations. Therefore, it can be concluded that our proposed scheme do not suffer any pixel expansion and contrast distortion problems.
Furthermore, the main steps of Algorithm 1 can be divided into two categories. One is to compute the binary matrix of a secret image. The another one is to computer the 0-mapping and 1-mapping matrixes for the binary matrix. Let be the number of participants and be a secret image, where and . The binary matrix of is and the 0-mapping and 1-mapping matrixes are and , respectively. Therefore, the computation complexity of Algorithm 1 is since and . Algorithm 2 is the encryption scheme that is used to generate shared images for the participants. It contains bits and each bit will be randomly selected the shared bits from the columns of the 0-mapping or 1-mapping matrixes. Therefore, the computation complexity of Algorithm 2 is also . Algorithm 3 is the decryption scheme that is used to reconstruct the secret image based on the shared images. Each shared image contains bits since it has the same size with the secret image . In Algorithm 3, all bits of the shared images will be sequentially and simultaneously extracted to reconstruct the original bits with a series of XOR operations. Similarly, the computation complexity of Algorithm 3 is . Comparing with the existing schemes, the proposed schemes have an ideal computation complexity.
Conclusion
In this article, an efficient (, )-threshold XVCS with lossless reconfigurable algorithms is proposed. It contains an encryption scheme and a decryption scheme. The former aims to encrypt gray-scale and color secret images by mapping a secret image to shared images. The extensive experimental results show that the shared images do not suffer any pixel expansion problem but also do not reveal any information of the secret images. The main reason is that each original bit of the secret images will be mapped to other bits by randomly selecting a column from the 0-mapping and 1-mapping matrices that are dynamically generated in the proposed encryption scheme. In the latter scheme, the reconstructed images have the same size and quality as the original secret images. In the future, a (, )-threshold visual cryptography scheme will be proposed by expanding the 0-mapping and 1-mapping matrices based on their partial reconfigurability. Furthermore, some other performance analyses will be considered, such as the security of the proposed methods.
Footnotes
Handling Editor: Yanjiao Chen
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the Guizhou Provincial Science and Technology Plan under grant QKH-Basic-ZK[2021]311, the Youth Science and Technology Talent Growth Project of Guizhou Provincial Education Department under Grants QJH-KY-Z[2022]206 and QJH-KY-Z[2021]132, the Guizhou University of Finance and Economics General Project under grant 2020XYB07, the National Natural Science Foundation of China(NSFC) under grant 61902085.
ORCID iD
Huan Wang
References
1.
NaorMShammirA. Visual cryptography. In: De SantisA (ed.) Advances in cryptology-EURO-CRYPT. Berlin: Springer, 1995, pp.1–12.
ThomasSGhargeS. Halftone visual cryptography for color images using error diffusion and direct binary search. In: KadambiGRKumarPBPaladeV (eds) Emerging trends in photonics, signal processing and communication engineering. Berlin: Springer, 2020, pp.99–105.
11.
WangZArceG. Halftone visual cryptography via error diffusion. IEEE Trans Inf Foren Secur2009; 4(3): 383–396.
12.
WangLYanBYangHM, et al. Flip extended visual cryptography for gray-scale and color cover images. Symmetry2021; 13(1): 281–295.
13.
HuHShenGLiuY, et al. Improved scheme for visual secret sharing based on random grids. Multimedia Tools Appl2019; 78(9): 12055–12082.
14.
YangCN. New visual secret sharing scheme using probabilistic method. Pattern Recogn Lett2004; 25(4): 481–494.
WuXLaiZR. Rondom grid based color visual cryptogrophy scheme for black and white secret images with general access structures. Signal Process Image Commun2019; 75: 100–110.
20.
YanXLiuFSYanWQ, et al. Applying visual cryptography to enhance text captchas. Mathematics2020; 8(3): 332.
21.
YanXLiuFSYanWQ, et al. Weighted visual cryptographic scheme with improved image quality. Multimedia Tools Appl2020; 79: 21345–21360.
22.
YanXLiJPanZ, et al. Multiparty verification in image secret sharing. Inf Sci2021; 562: 475–490.
23.
WangDZhangLMaN, et al. Two secret sharing schemes based on Boolean operations. Pattern Recogn2007; 40: 2776–2785.
24.
ShenGLiuFFuZ, et al. Perfect contrast XOR-based visual cryptography schemes via linear algebra. Codes Cryptogr2016; 85: 1–23.
ShyuSJ. XOR-based visual cryptographic schemes with monotonously increasing and flawless reconstruction properties. IEEE Trans Circ Syst Video Technol2018; 28(9): 2397–2401.
27.
GuoYSJiaXXChuQM, et al. A novel XOR-based threshold visual cryptography with adjustable pixel expansion. Appl Sci2020; 10(4): 1321.
28.
BlanchetteJSummerfieldM. C++ GUI programming with Qt 4. Hoboken, NJ: Prentice Hall, 2006.