cryptography Article
A New Visual Multi-Secrets Sharing Scheme by Random Grids Joy Jo-Yi Chang, Bo-Yuan Huang and Justie Su-Tzu Juan * Department of Computer Science and Information Engineering, National Chi Nan University, Nantou 54561, Taiwan;
[email protected] (J.J.-Y.C.);
[email protected] (B.-Y.H.) * Correspondence:
[email protected]; Tel.: +886-49-291-0960 (ext. 4875); Fax: +886-49-291-5226 Received: 19 August 2018; Accepted: 14 September 2018; Published: 17 September 2018
Abstract: In (2, 2)-visual secret sharing (VSS) schemes, a common type of (k, n)-threshold VSS schemes, secret information can be decoded directly through only two shares by using a human vision system. Several studies have analyzed methods of simplifying the decoding process and refining encoding to pass more secret images through two identical shares. However, limited secret images are retrieved, and the quality of the recovered images is low. This paper proposes an advanced (2, 2)-VSS scheme that can embed N secret images into two rectangular shares. Compared with other related VSS schemes, more secret images can be encrypted and the distortion is adjustable in the proposed scheme, yielding more flexibility in theory and practice. Keywords: visual secret sharing; random grids; image encryption
1. Introduction The rapid growth of network technology has enabled the convenient transmission of images through the Internet. However, under certain unknown conditions, images may be vulnerable to attacks. In recent years, image encryption has been an emergent topic. Traditional techniques of cryptography provide numerous means of protecting secret information, but most of these techniques incur additional cost in the decryption phase. However, to avoid the use of complex calculations for decrypting a message, a human vision system seems to the best solution, and visual secret sharing (VSS) is exactly such a scheme. The two main techniques to achieve VSS are random grid (RG) and visual cryptography (VC) approaches. In 1987, the first concept of RG was proposed by Kafri and Keren [1]. Their method can encode a binary image into two RGs. Given a sufficient difference in light transmission between black and white pixels, secret information can be directly obtained through human vision systems. With this advantage, secret messages can be revealed simply by superimposing the two shares. Therefore, no computation cost is involved in decoding. In 1995, Noar and Shamir proposed a VC approach [2] that entails encrypting a secret image into n (≥ 2) share images. The secret image can be recovered by collecting more than k (≤ n) share images. This approach provides a general (k, n)-threshold VSS scheme. However, the approach is accompanied by problems of pixel expansion and the necessity of a codebook. Compared with VC, RG is the superior approach because it does not exhibit these two drawbacks of VC. In 2009, Shyu proposed RG-based VSS schemes for binary, gray-level, and color images [3]. Further research on VSS schemes has been presented extensively [4,5]. From the perspective of time cost, encoding more than one image at the same time can increase the time-cost efficiency. Several visual multi-secret sharing (VMSS) schemes have been discussed in the past few years. Studies [6–12] have demonstrated methods for encrypting several images simultaneously. In 2008, Chen et al. [6] proposed a VMSS scheme that involves using an RG to encrypt two secret images into two shares. In 2010, Chang et al. [7] proposed a method that entails using Cryptography 2018, 2, 24; doi:10.3390/cryptography2030024
www.mdpi.com/journal/cryptography
Cryptography 2018, 2, 24
2 of 11
shifting RGs to embed two secret images; this method can reduce the distortion to 1/2p. An improved VMSS scheme proposed by Chen et al. [8] uses appropriate angles (0◦ , 90◦ , 180◦ , and 270◦ ) to embed four secret images into two shares. In 2012, Chang and Juan [9] proposed extended VMSS schemes that have the property of adjustable distortion and can encrypt three secret images simultaneously. In 2014, Salehi and Balafar proposed several VMSS schemes using a cylindrical RG [10]. They provided two recovery operations, OR and XOR; the XOR operation yields a better restored quality than the OR operation does. However, the XOR operation requires more computation and cannot be used without a computer. By contrast, the OR operation does not require computation, and the secret image can be recovered by stacking two shares directly. Moreover, the distortions of their VMSS schemes are fixed according to the number of secret images. In 2015, Tsao et al. proposed another VMSS scheme for a general access structure [11]; this scheme can serve special cases such as (2, n), (n, n), and (k, n). They also outlined the method to extend the scheme for multiple secrets. In their scheme, multiple secrets can be encrypted into multiple shares. However, any two shares cannot recover two different secret images. Actually, suppose that a secret image cannot be encrypted into any individual share; their scheme can only encrypt one secret image for two participants (signifying that only two shares must be made). Accordingly, this scheme is identical to Kafri and Keren’s scheme [1] when encrypting one secret into two shares. In 2016, Reddy and Prasad proposed an efficient share generation method of multi-secret sharing schemes that provides a lossless recovery of multiple secrets [12]. However, their method uses the XOR operation, and the number of shares must be three times the number of secrets. The aforementioned studies [6–12], have their own unique features, and we can observe that none of them can satisfactorily deal with the concerns of encoding of more than two secret images into two shares simultaneously while possessing adjustable distortion. In this paper, we provide a general shifting approach that can embed N (≥ 2) secret images simultaneously with adjustable distortion. The rest of this paper is organized as follows: The related works and our proposed scheme are presented in Sections 2 and 3, respectively. The experimental results are presented in Section 4. Discussions and conclusions are presented in the last two sections. 2. Related Works In 1987, Kafri and Keren [1] proposed the first concept of RG, in which each RG pixel is defined to be black or white, with 0 representing white and 1 representing black. The light transmittance of an image G (denoted as T(G)) is defined as the ratio of the number of white pixels to all pixels in the image. Through random processing, the light transmittance of each RG can be determined to be 1/2. That is, the number of black pixels in one RG is the same as the number of white pixels. Furthermore, three algorithms were proposed to encode a binary secret image G with size w × h (w pixels width and h pixels height) into two shares R1 and R2 in [1]. Because these algorithms are well established, we only demonstrate the following Algorithm 2 adopted in our main algorithm: Algorithm 1. Encoding a binary secret image into two random grids (KK) Input: The secret image S0 with size w × h pixels Output: The cipher shares G1 and G2 Generate an w × h random grid R1 , where the light transmittance is 1/2 For (int i = 0; i < w; i++) For (int j = 0; j < h; j ++) If G(i, j) == 0 then R2 (i, j) = random(0, 1); else R2 (i, j) = 1 − R1 (i, j); Return R1 and R2
Cryptography 2018, 2, 24
3 of 11
After these two cipher shares are collected, restored images can be easily decoded by superimposing the two shares according to the stacking rules shown in Table 1. The stacking value of two pixels p1 and p2 is presented as p1 ⊕ p2 , where ⊕ stands for the OR operation under Boolean law. Table 1. Stacking rules of two pixels. p1
p2
p1 ⊕ p2
0 0 1 1
0 1 0 1
0 1 1 1
Next, to improve efficiency, VMSS schemes are commonly used. In 2010, Chang et al. [7] provided an approach that can embed two secret images into two shares and reduce the distortion to 1/2p, where p is a positive factor of w (can be determined by the user). Distortion is defined as the ratio of the number of pixels that are not considered during encryption to the number of all pixels in secret images. In the encryption phase, each image is subjected to the encryption process randomly; therefore, the distortion can be distributed over each restored image. Furthermore, the higher the value of p is, the lower the distortion becomes. Notably, users can choose a suitable value of p according to their requirements. Salehi and Balafar [10] proposed a scheme that can encode multiple images into multiple shares at the same time. By using a concept similar to shifting an RG, we can rotate the shares cylindrically to restore all the secret messages. During the encryption of m secrets images, the first share is randomly generated. Then, a secret image is randomly selected for each pixel of the second share. The corresponding pixel in the first share and the selected secret image decide the value of this second share pixel. Thus, we can observe that only 1/m parts are to be encrypted for each secret image. Although Salehi and Balafar provided two recovery operations, OR and XOR, for their scheme, we consider only the OR operation in this paper because the calculation of OR corresponds to the procedure of VC and can recover the secret image with no extra computation apart from human vision. We compare our result with this scheme in Section 5. 3. Proposed Scheme To encrypt N secret images simultaneously, we present three functions to develop our main algorithm, Algorithm 2. The main concept of our approach is as follows: First, we number all the secret images from 0 to N − 1 and then select a random pair in (0, 1), (1, 2), . . . , (N − 2, N − 1), (N − 1, 0). Next, we use the function fp to pick up a pixel to be the basis of the encryption process. Subsequently, fRG and fORG encode the corresponding pixels in the chosen pair. Finally, we repeat the same steps as mentioned previously until all the cipher pixels of two shares are generated. Accordingly, all the input secret images are evenly distributed into two shares, and the distortion is ((N − 2)p + 1)/Np. In VSS, secret images can be restored using the human vision system. Given two cipher shares G1 and G2 , we can easily reconstruct all the images through Algorithm 3. Notably, during the practical execution of Algorithm 3, the share G2 can be rolled into a cylinder instead of being divided or swapped. All the functions and algorithms are structured as follows. Our approach is relatively flexible because of its capacity to encode more secret images simultaneously and to achieve adjustable distortion.
((N − 2)p + 1)/Np. In VSS, secret images can be restored using the human vision system. Given two cipher shares G1 and G2, we can easily reconstruct all the images through Algorithm 3. Notably, during the practical execution of Algorithm 3, the share G2 can be rolled into a cylinder instead of being divided or swapped. All the functions and algorithms are structured as follows. Our approach Cryptography 2018, 2, 24 4 of to 11 is relatively flexible because of its capacity to encode more secret images simultaneously and achieve adjustable distortion. Function 1. (fp) Input: A secret image S with size w × h pixels Output: One pixel of the input secret image S(i, j) i = random(0, w − 1); j = random(0, h − 1); Cryptography 2018, 3, FOR PEER REVIEW Return2018, S(i,3, j)xxx FOR Cryptography 2018, 3, FOR PEER PEER REVIEW REVIEW Cryptography
4 of 10 of 10 10 44 of
Function 2. (f RG Function 2. 2. (f (fRG RG))) Function Input: The pixel of secret image S(i, j) Input: The The pixel pixel of of secret secret image image S(i, S(i, j) j) Input: Output: The pixels of shares G (i, j) and G (i, j) 1 Output: The The pixels pixels of of shares shares G G11(i, (i, j) j) and and G G222(i, (i, j) j) Output: G (i, j) random(0, 1); G111(i, (i, j) j) === random(0, random(0, 1); 1); G If S(i, j) == 0 If S(i, j) == 0 If S(i, j) == 0 then G (i, j) random(0, 1); then G G222(i, (i, j) j) === random(0, random(0, 1); 1); then else G (i, j) = 1 − G (i, j); 2 1 else G G22(i, (i, j) j) == 11 −− G G11(i, (i, j); j); else Return G (i, j) and G (i, j) Return G G111(i, (i, j) j) and and G G222(i, (i, j) j) Return Function 3. (f ORG Function 3. 3. (f (fORG ORG))) Function Input: The pixel of secret image S(i, j) and the pixel of one share G (i, j) Input: The The pixel pixel of of secret secret image image S(i, S(i, j) j) and and the the pixel pixel of of one one share share G G111(i, (i, j) j) Input: Output: The pixels of the other share G j) 22(i, Output: The pixels of the other share G (i, j) Output: The pixels of the other share G2(i, j) If S(i, j) == If S(i, S(i, j) j) == == 000 If then G (i, j) random(0, 1); then G G222(i, (i, j) j) === random(0, random(0, 1); 1); then else G (i, j) = 1 − G (i, j); 2 1 2 1 else G G2(i, (i, j) j) == 11 −− G G1(i, (i, j); j); else Return G (i, j) Return G G222(i, (i, j) j) Return Algorithm 2. Visual Multi-Secrets Sharing Scheme (VMSSS) Algorithm 2. 2. Visual Visual Multi-Secrets Multi-Secrets Sharing Sharing Scheme Scheme (VMSSS) (VMSSS) Algorithm 0 1 N−1 Input: The secret images S , S , …, S with size w × pixels, and positive integer 0 1 N−1 Input: The The secret secret images images SS0,, SS1,, …, …, SSN−1 with with size size w w ×× hhh pixels, pixels, and and positive positive integer integer ppp Input: Output: The cipher shares G and G 1 2 Output: The The cipher cipher shares shares G G11 and and G G22 Output: Repeat Repeat Repeat A random(0, N 1); A === random(0, random(0, N N −−− 1); 1); A A p A S (i, j) ← f (S ) A p A (i, j) j) ← ← ffp(S (SA)) SSA(i, G (i, j) and G ((i A w/p) mod w, j) ← (S (i, j)); RG G111(i, (i, j) j) and and G G222((i ((i +++ A A ××× w/p) w/p) mod mod w, w, j) j) ← ← fffRG (SAAA(i, (i, j)); j)); RG(S G For (int k = 0; k < p − 1; k++) For (int k = 0; k < p − 1; k++) For (int k = 0; k < p − 1; k++) int A’ (A 1) mod p; int A’ A’ === (A (A +++ kkk +++ 1) 1) mod mod p; p; int G ((i + A’ × w/p) mod w, j) ← (S ((i w/p) mod w, j), G ((i × w/p) mod w, j); 2 ORG A+1 G22((i ((i ++ A’ A’ ×× w/p) w/p) mod mod w, w, j) j) ← ← fffORG (SA+1 ((i +++ kkk ××× w/p) w/p) mod mod w, w, j), j), G G111((i ((i +++ kkk × × w/p) w/p) mod mod w, w, j); j); ORG(S A+1((i G 11((i ORG A 22((i G + (k + 1) × w/p) mod w, j) ← f (S ((I + (k + 1) × w/p) mod w, j), G + A’ × w/p) mod w, j) ORG A G ((i + (k + 1) × w/p) mod w, j) ← f (S ((I + (k + 1) × w/p) mod w, j), G ((i + A’ × w/p) mod w, j) j) G1((i + (k + 1) × w/p) mod w, j) ← fORG(SA((I + (k + 1) × w/p) mod w, j), G2((i + A’ × w/p) mod w, Until all the cipher-pixels of two cipher shares are generated Until all all the the cipher-pixels cipher-pixels of of two two cipher cipher shares shares are are generated generated Until Algorithm 3. The inverse operation of VMSSS Algorithm 3. 3. The The inverse inverse operation operation of of VMSSS VMSSS Algorithm 11 and 22 Input: The two cipher shares G G Input: The two cipher shares G and G Input: The two cipher shares G1 and G2 Output: The reconstructed secret images R for N Output: The The reconstructed reconstructed secret secret images images R Riii for for 000 ≤≤≤ iii ≤≤≤ N N −−− 111 Output: First of all, divide G into two parts, the first i/p and the remaining part, according to the value First of of all, all, divide divide G G222 into into two two parts, parts, the the first first i/p i/p and and the the remaining remaining part, part, according according to to the the value value First of p. of p. p. of Second, reshape G by swapping two parts. Second, reshape reshape G G222 by by swapping swapping two two parts. parts. Second, Finally, superimpose G G decode the secret image R 11 and 22 to Finally, superimpose G and G to decode the secret secret image image R Riii... Finally, superimpose G1 and G2 to decode the 4. Experimental Results 4. Experimental Experimental Results Results 4. We designed five experiments to demonstrate our scheme through simulations. Experiment We designed designed five five experiments experiments to to demonstrate demonstrate our our scheme scheme through through simulations. simulations. Experiment Experiment 111 We entailed encoding four secret images, and Experiment 2 involved encrypting five secret images. In entailed encoding encoding four four secret secret images, images, and and Experiment Experiment 22 involved involved encrypting encrypting five five secret secret images. images. In In entailed Experiments 3–5, six input secret images were encoded into two shares by using Algorithm VMSSS. Experiments 3–5, six input secret images were encoded into two shares by using Algorithm VMSSS. Experiments 3–5, six input secret images were encoded into two shares by using Algorithm VMSSS. All the input secret images measured 540 540 pixels, see Figure 1. All the the input input secret secret images images measured measured 540 540 ××× 540 540 pixels, pixels, see see Figure Figure 1. 1. All
Cryptography 2018, 2, 24
5 of 11
4. Experimental Results We designed five experiments to demonstrate our scheme through simulations. Experiment 1 entailed encoding four secret images, and Experiment 2 involved encrypting five secret images. In Experiments 3–5, six input secret images were encoded into two shares by using Algorithm VMSSS. All the input images measured 540 × 540 pixels, see Figure 1. Cryptography 2018, secret 3, x FOR PEER REVIEW 5 of 11 Cryptography 2018, 3, x FOR PEER REVIEW
(a)(a)
(b) (b)
5 of 10
(c) (c)
(d) (d)
(e) (e)
(f)(f)
Figure 1. The inin Experiment 2 (a–e), in Experiments 3~53~5 (a–f). (a) Theinput inputimages imagesininExperiment Experiment1 1(a–d), (a–d), Experiment 2 (a–e), in Experiments (a–f).
Figure 1.image The input images in Experiment 1((a) ~S2(d)), in Experiment 23 ;((a) ~ (e)), inSExperiment Secret S (b) Secret image S 1; S (c) image ;S (d) Secret image S3; S(e) Secret image (f) 0; S 4; S (a) Secret image Secret image (c) Secret image Secret image (e) Secret image 0 ; (b) 1 ; Secret 2 ; (d) 4; image S(a) 5. S5 3~5Secret ~ (f)). Secret image S0. (b) Secret image S1. (c) Secret image S2. (d) Secret image S3. (e) (f)((a) Secret image . Secret image S4. (f) Secret image S5. Experiment by using using Algorithm Algorithm VMSSS. VMSSS. Experiment 1. 1. Encoding Encoding four four secret secret images images into into two two shares shares by
Experiment 1. Encoding four secret images into two shares by using Algorithm VMSSS In this experiment, we set the value of p to 10. In the decryption phase, the first restored image In this experiment, we set the value of p to 10. In the decryption phase, the first restored was obtained by stacking two shares together. The second, third, and fourth restored image were image was obtained by stacking two shares together. The second, Figure third, and fourth restored image decoded using the reshaped G2 described in Algorithm 3 with G G11. Figure 2a–d shows the decoded were decoded using the reshaped G 2 described in Algorithm 3 with G1. Figures 2(a)-2(d) show the input secret images, and Figure 2e,f shows the two cipher shares. shares. decoded input secret images, and Figures 2(e) and 2(f) show the two cipher shares.
(a)
(a)
(b)
(c)
(b)
(d)
(c)
(e)
(d)
(f)
(e)
(f)
Figure 2. Simulations of Experiment 1. (a) Restored image R0; (b) Restored image R1; (c) Restored FigureR2.2; (d) Simulations Experiment 1. (a)image Restored image Rimage image R1 ; (c) Restored 0 ; (b) Restored image Restored of image R3; (e) Share G1; (f) Share 2. Restored image Figure 2. Simulations of Experiment 1. (a) Restored image S0.G(b) S1. (c) Restored image R2 ; (d) Restored image R3 ; (e) Share image G1 ; (f) Share image G2 .
image S2. (d) Restored image S3. (e) Share image G1. (f) Share image G2.
Experiment 2. Encoding five secret images into two shares by using Algorithm VMSSS. Experiment 2. Encoding five secret images into two shares by using Algorithm VMSSS. Experiment 2. Encoding five secret images into two shares by using Algorithm VMSSS Figure 3a–g illustrates the implementation results of the Algorithm VMSSS, where the parameter Figure3(a)-3(g) 3a–g illustrates the implementation results of the Algorithm VMSSS, where the parameter Figures illustrate the implementation results of the Algorithm VMSSS , where the p was set to 9. Through decryption, the second, third, fourth, and fifth secret images could be p was set to 9. Through decryption, the second, third, fourth, and fifth secret images could could be parameter p wasby setsuperimposing to 9. Through decryption, the second third, 1/9, fourth, images reconstructed G2 with horizontally shifting 2/9, and 3/9, fifth and secret 4/9 (×540 pixels), reconstructed by superimposing G with horizontally shifting 1/9, 2/9, 3/9, and 4/9 ( × 540 pixels), 2G2 with horizontally shifting 1/9, 2/9, 3/9, and 4/9 ( 540 pixels), be respectively, reconstructed by superimposing to the left and G1. Additionally, stacking two shares G1 and G2 together could restore the respectively, to the left and G . Additionally, stacking two G Gtogether could restore the 1 1 and respectively, to the left and G 1 . Additionally, stacking twoshares sharesGG 1 and 2 2 together could restore the first input image. first input image. first input image.
(a)
(a)
(b)
(c)
(b)
(d)
(c)
(e)
(f)
(g)
(e)
(f)
(g)
(d)
Figure 3. Simulations of Experiment 2. (a) Restored image R0; (b) Restored image R1; (c) Restored image R2; (d) Restored image R3; (e) Restored image R4; (f) Share image G1; (g) Share image G2.
Figure 3. Simulations of Experiment 2. (a) Restored image S0. (b) Restored image S1. (c) Restored image S2. (d) Restored S3. images (e) Restored 4. using (f) Share imageVMSSS. G1. (g) Share image G2. Experiments 3–5. Encodingimage six secret into twoimage shares Sby Algorithm In these three experiments, we used six secret images to conduct the simulations. In particular,
Comm
immed
Experiment 2. Encoding five secret images into two shares by using Algorithm VMSSS Figures 3(a)-3(g) illustrate the implementation results of the Algorithm VMSSS, where the parameter p was set to 9. Through decryption, the second third, fourth, and fifth secret images could be reconstructed by superimposing G2 with horizontally shifting 1/9, 2/9, 3/9, and 4/9 ( 540 pixels), Cryptography 2018, 2, 24 6 of 11 respectively, to the left and G1. Additionally, stacking two shares G1 and G2 together could restore the first input image.
(b)
(a)
(c)
(e)
(f)
(d)
(g)
Figure 3. Simulations of Experiment 2. (a) Restored image R0 ; (b) Restored image R1 ; (c) Restored Figure 3. Simulations of Experiment 2. (a) Restored image S0. (b) Restored image S1. (c) Restored image R2 ; (d) Restored image R3 ; (e) Restored image R4 ; (f) Share image G1 ; (g) Share image G2 . image S2. (d) Restored image S3. (e) Restored image S4. (f) Share image G1. (g) Share image G2.
Experiments 3–5. 3–5. Encoding Encoding six into twotwo shares by using Algorithm VMSSS. Experiments sixsecret secretimages images into shares by using Algorithm VMSSS In In these these three three experiments, experiments, we we used used six six secret secret images images to to conduct conduct the the simulations. simulations. In In particular, particular, the set values of p in Experiments 3, 4, and 5 were 9, 18, and 27, respectively. These values were the set values of p in Experiments 3, 4, and 5 were 9, 18, and 27, respectively. These values were setset to to study the influence of p on the quality of the restored images. The results of the three experiments study the influence of p on the quality of the restored images. The results of the three experiments are are presented in Figures Similarly, ofsecret the secret images be easily restored through the presented in Figures 4–6. 4–6. Similarly, all ofall the images couldcould be easily restored through the steps steps described in Algorithm 3. described in Algorithm 3. Cryptography 2018, 2018, 3, 3, xx FOR FOR PEER PEER REVIEW REVIEW Cryptography
of 11 11 66 of
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
Figure 3. (a) Restored image R0 ; (b) image R1 ; (c) Figure4.4.Simulations SimulationsofofExperiment Experiment 3. (a) Restored image S00. Restored (b) Restored image S11Restored . (c) Restored image R22; (d) Restored image R3 ; 3(e) Restored image R4 ; (f) Restored image R ; (g) Share image G1 ; 5 image S2. (d) Restored image S3. (e) Restored image S44. (f) Restored image S55. (g) Share image G11. (h) Share image G . (h) Share image 2G22.
(a)(a)
(e) (e)
(b)(b)
(f) (f)
(c) (c)
(d)(d)
(g)(g)
(h) (h)
Figure 5. Simulations of Experiment 4. (a) Restored image R ; (b) Restored image R ; (c) Restored
0 1 Figure 5. Simulations of Experiment 4. (a) Restored image S00. (b) Restored image S11. (c) Restored image R2 ; (d) Restored image R3 ; (e) Restored image R4 ; (f) Restored image R5 ; (g) Share image G1 ; image S22. (d) Restored image S33. (e) Restored image S44. (f) Restored image S55. (g) Share image G11. (h) Share image G2 . (h) Share image G22.
Commente
immediately
(e)
(f)
(g)
(h)
Figure 5. Simulations of Experiment 4. (a) Restored image S0. (b) Restored image S1. (c) Restored 7 of 11 image S2. (d) Restored image S3. (e) Restored image S4. (f) Restored image S5. (g) Share image G1. (h) Share image G2.
Cryptography 2018, 2, 24
(a)
(e)
(b)
(c)
(d)
(f)
(g)
(h)
Figure 6.6. Simulations 5. 5. (a)(a) Restored image R0 ; (b) Restored image R1 ; (c) Figure SimulationsofofExperiment Experiment Restored image S0. (b) Restored image S1Restored . (c) Restored image R2 ; (d) Restored image R3 ; (e) Restored image R4 ; (f) Restored image R5 ; (g) Share image G1 ; image S2. (d) Restored image S3. (e) Restored image S4. (f) Restored image S5. (g) Share image G1. (h) Share image G2 . (h) Share image G2.
5. Discussion 5. Discussion From the five experiments presented in Section 4, we observed that the original secret could be identified the recovered image. in None of the shares generated using Algorithm VMSSS From thefrom five experiments presented Section 4, we observed that the original secret could be revealed secret information aboutEvery the input Among the schemes innot Section 1, identifiedany from the recovered image. shareimages. generated using our VMSS discussed scheme did reveal those proposed by Chang et al. [7,9] are equipped with adjustable distortion but cannot encrypt any secret information about the input images. Among the schemes discussed in this paper, those more secret with our scheme. approach proposed [8] canencrypt embedmore four secret proposed byimages Changcompared et al. [7,9] are equipped withThe adjustable distortion butincannot secret images but it cannot The increase the number of input Salehi and Balafar [10] images simultaneously, compared with our scheme. approach proposed in [8]images. can embed four secret images presented two operations (XOR and OR) for recovery. Notably, the XOR operation is an indirect simultaneously, but it cannot increase the number of input images. Salehi and Balafar [10] presented method for restoring images, whereas the OR operation can recover secret images by printing two shares on a transparency and stacking them together directly. Nevertheless, for the OR operation (i.e., the direct method for recovery) presented in [10], the quality of the restored images is relatively poor. The restored quality of images is unsatisfactory through the direct method for recovery in [10] (OR operation). The VMSS scheme proposed in [11] can prevent the extraction of secret images by stacking some specific shares. However, any two shares cannot recover two different secret images. Moreover, that scheme cannot encrypt more than one secret image into two shares. The XOR operation recovery used in [12] indicates only the indirect method of decoding. Furthermore, the ratio of the number of shares to the number of secret images must be fixed at 3. Therefore, regarding the number of secret images, the number of shares, quality adjustable, and any rectangle secret images, our method was determined to demonstrate excellent performance, see Table 2. The visual analysis and security analysis of our scheme are explained in Sections 5.1 and 5.2, respectively. Table 2. Comparison among related schemes. Scheme
Number of Secret Images
Number of Shares
Quality Adjustable
Any Rectangle Secret Images
Direct Recovery Operation
The proposed scheme Reddy et al., 2016 [12] Tsao et al., 2015 [11] Salehi et al., 2014 [10] Chang et al., 2012 [9] Chen et al., 2012 [8] Chang et al., 2010 [7] Chen et al., 2008 [6]
s≥2 s≥2 2n − n − 1 ≥ s ≥ 1 s≥2 3 4 2 2
2 3s n n 2 2 2 2
Yes No No No Yes No Yes No
Yes Yes Yes Yes Yes No Yes No
Yes No Yes Yes/No Yes Yes Yes Yes
5.1. Visual Analysis For high-capacity use, the quality of restored images and the security of the encryption scheme are critical. Let T(G[X0 ]) be the average transmittance of the area in an image G, which corresponds to the white area in image X, and T(G[X1 ]) be the average transmittance of the area in an image G,
Cryptography 2018, 2, 24
8 of 11
which corresponds to the black area of image X. Through the design of function fRG , the probability of displaying black and white pixels can be determined to be 1/2. This signifies that the average light transmittance levels of white and black pixels contributed by every secret image in each share are equal, thus preventing the revelation of any secret message in the two cipher shares. As discussed in Section 3, all secret images are classified into N pairs, where N is the number of the input secret images, and the encryption process is divided into p parts, where p is a positive factor of w (image width). With this design of the main algorithm, the average light transmittance of white and black pixels in each restored image can be calculated as follows: Let T(R[Si,0 ]) and T(R[Si,1 ]) be the average light transmittance of the areas in the restored image R, which correspond to the white and black areas, respectively, of the secret image Si , for 0 ≤ i ≤ N − 1. 1 1 ×0+ × T ( R[Si,1 ]) = N N 1 1 1 T ( R[Si, 0 ]) = × + × N 2 N
p−1 1 1 ×0+ × p p 4
p−1 1 1 1 × + × p 2 p 4
+
+
N−2 1 ( N − 2) p + 1 × = N 4 4N p
N−2 1 ( N − 2) p + 4p − 1 × = N 4 4N p
As discussed in [3], T ( R[Si,0 ]) > T ( R[Si, 1 ]), where p ≥ 1; therefore, the areas of white and black pixels in each secret image can be visually distinguished (or the information of secret images can be observed) from the restored image R. Additionally, if the reconstructed image is recognizable as the input secret image, then the contrast (denoted by σ) should be higher than 0, as presented in [11]. In our scheme, the contrast of each share can be computed as follows: σ=
T ( R[Si,0 ]) − T ( R[Si,1 ]) 4p − 2 2(2p − 1) 2(2p − 1) = = = 1 + T ( R[Si,1 ]) 4N p + N p − 2p + 1 5N p − 2p + 1 (5N − 2) p + 1
The boundary conditions N ≥ 2 and p ≥ 1 can be used to ensure that σ > 0. Therefore, all the reconstructed images can have sufficient contrast to be recognized as the input images, and the two shares generated through our scheme would not disclose any secret message. Our scheme can now be compared with the scheme proposed by Salehi and Balafar [10] for encrypting N images into two shares. The average light transmittance of their scheme, TSB (R[Si,0 ]) and TSB (R[Si,1 ]), of the areas in the restored image R, which correspond to the white and black areas, respectively, in the secret image Si , for 0 ≤ i ≤ N − 1, can be calculated as follows: TSB ( R[Si,1 ]) =
1 N−1 1 N−1 ×0+ × = N N 4 4N
TSB ( R[Si, 0 ]) =
1 1 N−1 1 N+1 × + × = N 2 N 4 4N
Therefore, the contrast of each share can be computed as follows: σSB =
TSB ( R[Si,0 ]) − TSB ( R[Si,1 ]) 2 ( N + 1) − ( N − 1) = = 1 + TSB ( R[Si,1 ]) 4N + ( N − 1) 5N − 1
Because 4 − 2/p ≥ 2 and 5N − (2 − 1/p) ≤ 5N − 1 for p ≥ 1, the contrast generated by our scheme is always higher than generated by the scheme of Salehi and Balafar [10]. This proves the performance levels of our scheme to be higher than those of the scheme presented in [10] for identical conditions (number of secret images and shares and recovery of secret images by staking the shares directly). 5.2. Security Analysis A correlation test was used to evaluate the security of our proposed scheme. This test has been widely used in secret image sharing [4,5]. Through this test, we could clearly determine whether high correlations exist among pixels in each share in our proposed scheme. Usually, four types of
Cryptography 2018, 2, 24
9 of 11
correlations in input secret images and shares are computed: The correlations between two horizontally adjacent pixels, two vertically adjacent pixels, two diagonally adjacent pixels, and two vice-diagonally adjacent pixels. The correlation coefficient of two adjacent pixels R(x, y) can be obtained using the following formula, where x and y are the values of two adjacent pixels in one image and w × h is the number of the pair of two adjacent pixels: R( x, y) =
Sxy 1 , Sxy = S x × Sy w×h
v u u Sx = t v u u Sy = t
w×h
∑ (xi − E(x)) × (yi − E(y))
i =1
1 w×h
w×h
∑ (xi − E(x))2 , E(x) =
1 w×h
w×h
1 w×h
w×h
1 w×h
w×h
i =1
∑ (yi − E(y))2 , E(y) =
i =1
∑
xi
i =1
∑
yi
i =1
The correlation test involved 540 × 539 (or 539 × 539) pairs of two neighboring pixels (including two horizontally adjacent pixels, two vertically adjacent pixels, two adjacent diagonal pixels, and two vice-diagonal adjacent pixels). For the first experiment stated in Section 4, four images were encoded into two shares, with p being set to 10, and the correlation coefficients are presented in Table 3. Table 3. The correlation coefficients of two adjacent pixels in Experiment 1. p
Image
Horizontal
Vertical
Diagonal
Vice-Diagonal
-
Secret image S0 Secret image S1 Secret image S2 Secret image S3
0.98295 0.98522 0.99021 0.99127
0.98462 0.98563 0.98745 0.99042
0.96997 0.97789 0.97654 0.96134
0.97720 0.97012 0.96665 0.96522
p = 10
Share image G1 Share image G2
0.00103 0.00073
0.00325 0.00045
0.00069 −0.00131
0.00106 0.00156
As shown in Table 3, the correlation coefficients of the two shares were nearly 0 (irrespective of whether the value was negative or positive), indicating that all the pixels in each share were weakly correlated. Therefore, the shares can be viewed as random shares. As shown by the results, no sufficient information of the input image was revealed from each share. Correlation test results from Experiments 3–5 are presented in Table 4. Notably, the first four secret images were identical to those in Experiment 1 in Table 3. From these correlation tests, we strongly believe that the two shares generated by our scheme were merely noise-like, thus demonstrating that the secret message could not be revealed from each share. Table 4. The correlation coefficients of two adjacent pixels in Experiment 3~ 5. p
Image
Horizontal
Vertical
Diagonal
Vice-Diagonal
-
Secret image S4 Secret image S5
0.99455 0.99033
0.98215 0.98771
0.97774 0.98821
0.96412 0.97655
p=9
Share image G1 Share image G2
0.00042 0.00035
0.00022 0.00019
0.00041 0.00034
0.00016 0.00072
p = 18
Share image G1 Share image G2
0.00054 0.00069
0.00010 −0.00032
0.00078 0.00037
0.00123 0.00024
p = 27
Share image G1 Share image G2
0.00025 0.00145
0.00058 0.00058
0.00157 0.00012
−0.00032 0.00013
Cryptography 2018, 2, 24
10 of 11
Furthermore, if someone obtained one of the shares, they could still hardly decode the secret information. To demonstrate this security, consider two cases (G1 and G2 ). A total of (1/2)(w × h) combinations would be required to restore input information. All the pixels in G1 can be generated by random colors (either black or white), with w and h representing the width and height of an input image, respectively. Similarly, for the share G2 , (1/2)(w × h) combinations would be required to decode secret messages. We conclude that it is difficult to extract the full information in a limited time. 6. Conclusions This paper presents an extended VSS scheme, which can encode N secret images into two shares simultaneously. The shape of the input image can be rectangular. The proposed scheme was demonstrated to be correct and secure, as discussed in Section 5. Furthermore, users can select the value of p according to their requirements. When reconstructing the secret images, we can directly superimpose two shares to decode the first image, and the other image can be restored through the three steps described in Algorithm 3. Through Algorithm VMSSS, secret images can be distributed into two shares almost equally, and the distortion can be reduced to ((N − 2)p + 1)/Np. The distortion is thus close to (N − 2)/N when the value of p is high. In addition, the higher the value of p is, the lower the distortion. Without restrictions on the width and height of secret images, more secret images can be encoded simultaneously along with adjustable distortion. Accordingly, our scheme demonstrates high flexibility not only in theory but also in practice. Author Contributions: All authors discussed the main idea and scientific contribution. J.J.-Y.C. conceived the presented idea and provided the main algorithm. B.-Y.H. contributed in performing the experiments and drafting the manuscript. J.S.-T.J. analyzed the results and supervised the whole project. Funding: The authors would like to thank the Ministry of Science and Technology of the Republic of China for financially supporting this research under Contract No. MOST 106-2221-E-260-009. Acknowledgments: The authors would like to thank the anonymous reviewers for their valuable comments and suggestions to improve the quality of the paper. Conflicts of Interest: The authors declare no conflicts of interest
References 1. 2. 3. 4. 5. 6.
7.
8. 9. 10.
Kafri, O.; Keren, E. Encryption of pictures and shapes by random grids. Opt. Lett. 1987, 12, 377–379. [CrossRef] [PubMed] Naor, M.; Shamir, A. Visual cryptography. In Proceedings of the Advances in Cryptology (EUROCRYPT’94), Perugia, Italy, 9–12 May 1994; pp. 1–12. Shyu, S.-J. Image encryption by multiple random grids. Pattern Recognit. 2009, 42, 1582–1596. [CrossRef] Chang, C.; Lin, C.; Lin, C.; Chen, Y. A novel secret image sharing scheme in color images using small shadow images. Inform. Sci. 2008, 178, 2433–2447. [CrossRef] Wu, X.; Sun, W. Random grid-based visual secret sharing with abilities of OR and XOR decryptions. J. Vis. Commun. Image Represent. 2013, 24, 48–62. [CrossRef] Chen, T.-H.; Tsao, K.-H.; Wei, K.-C. Multiple-image encryption by rotating random grids. In Proceedings of the Eighth International Conference on Intelligent Systems Design and Applications (ISDA’08), Kaohsiung, Taiwan, 26–28 November 2008; pp. 252–256. Chang, J.J.-Y.; Li, M.-J.; Wang, Y.-C.; Juan, J.S.-T. Two-Image Encryption by Random Grids. In Proceedings of the International Symposium on Communication and Information Technologies, Engineering and Technology (ISCIT2010), Tokyo, Japan, 26–29 October 2010; pp. 458–463. Chen, T.-H.; Taso, K.-H.; Lee, Y.-S. Yet another multiple-image encryption by rotating random grids. Signal Process. 2012, 92, 2229–2237. [CrossRef] Chang, J.J.-Y.; Juan, J.S.-T. Multi-VSS scheme by shifting random grids. In Proceedings of the World Academy of Science, Engineering and Technology, Tokyo, Japan, 29–30 May 2012; pp. 1277–1283. Salehi, S.; Balafar, M.A. Visual multi secret sharing by cylindrical random grid. J. Inform. Secur. Appl. 2014, 19, 245–255. [CrossRef]
Cryptography 2018, 2, 24
11. 12.
11 of 11
Tsao, K.-H.; Shyu, S.-J.; Lin, C.H.; Lee, Y.S.; Chen, T.H. Visual multiple-secret sharing for flexible general access structure by random grids. Displays 2015, 39, 80–92. [CrossRef] Reddy, L.S.; Prasad, M.V.N.K. Extended visual cryptography scheme for multi-secret sharing. In Proceedings of the 3rd International Conference on Advanced Computing, Networking and Informatics (ICACNI 2015), New Delhi, India, 23–25 June 2015; pp. 249–257. © 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).