Keywords

1 Introduction

With the rapid development and increased need of computer and communication technology, more secret information are transmitted through the Internet. Therefore, protecting the secret information from being suspected and decrypted has become critical task. In 1994, a new information security technique called Visual Cryptography (VC) [1] was invented. VC is a cryptographic scheme in which decrypting of hidden images is done using human eyes. No previous knowledge of cryptography or computation is required for decoding which is the advantage of using in this technique along with high security offered using this technique. Visual cryptography scheme (VCS) [2] is a scheme which allows the encryption of a secret image into n shares that is given to n participants. These n participants are called the qualified shares. VC works on binary image only. Images are not only monochrome format but in grayscale and color. For converting a grayscale [3] and a color image to binary image, halftoning techniques are applied. Commonly used halftone techniques for color image encryption are Error diffusion and Direct Binary Search (DBS) which is implemented in this paper.

To explain the basic principle of VC, consider a (k, n) VC scheme which encrypts a secret image into n shares to be distributed among n participants. Each share shows a random noise pattern of black and white and doesn’t disclose any information on the secret image by itself. In a (k, n) VCS, k is the minimum qualifying participants required to decode the secret image. Fewer participants that is k-1 will be forbidden which will not decode the secret image even if infinite computational power is available. Qualifying share will be stacking/superimposed to decrypt the secret image. Researches have developed several methods for VC in literature. An optimal contrast k, n VCS was proposed to analyze the contrast of the reconstructed image for a (k, n)-threshold VCS [4]. Blundo [5] developed VCS with general structure for grayscale images. To generate a halftone share, Hou [6] transformed a gray level image into halftone images and then applied to VC. Extended visual cryptography (EVC) was developed by Ateniese [7] in which shares carry not only secret image information but meaningful images also. Meaningful images have a higher security rather than random noise shares. Hypergraphy color is used in constructing meaningful binary shares. Image quality was improved by Nakajima [8] by extended EVC with natural grayscale images. Halftone methods are used to generate good quality halftone shares in VC [9]. Meaningful Halftone image using threshold array was proposed in [10]. Meaningful images using error diffusion [11] was developed for producing halftone shares. Color Extended Visual Cryptography using error diffusion was developed by Inkoo [12] and Halftone visual cryptography using Direct Binary Search (DBS) [13].

In the above mentioned methods, the shares that are produced have low visibilities. The different types of halftoning methods are point process, neighborhood process and iterative process. Neighborhood processing (Error Diffusion) and iterative process (DBS) of halftoning are implemented and compared. Halftone is applied on both the secret images and cover images.

2 Methodolgy

Encryption In this paper, encryption for a (2, 2) VC scheme is done using EVC using halftoning techniques for color images. A secret image of size m \( \times \) m is taken and halftone is applied. The methods implemented for halftoning are Error diffusion or DBS. In Error diffusion halftoning, the quantization error is distributed to the nearby pixels which are unprocessed. Also the Visual information pixels position is retained. Whereas, in DBS which is a iterative search, a binary image is taken and a template is saved. It is then processed depending on the given iterative value. Each time when the process gets completed, error is calculated and the least error found is selected as a DBS halftoned share. Share images taken for producing meaningful share of size n \(\times \) n has to be double in size in comparison with the secret image. Here also halftone techniques are applied in the same manner as explained above to get two meaningful halftone shares. Encrypted share 1 and share 2 is now generated which carries both secret information and meaningful images. Now the share is ready to be given to the as qualified shares to the participant.

Decryption The qualified participant on stacking/superimposing will recover the original secret image. The stacking/superimposing is executed using the \( \otimes \) the ‘OR’ boolean function.

DBS uses the minimum perceived error obtained by searching for the best possible binary value in the halftone image iterations. This gives DBS much better halftone image quality than error diffusion. This is further verified using various parameters. The parameter metrics used for analyzing the encrypted shares with the original halftoned share are PSNR, Correlation UQI and SSIM. PSNR is a measure to find of quality of recovered images and actual image. Correlation extracts the information of a image, then the encrypted share is compared with the halftoned image. UQI [14] is the ability to measure the information loss occurred during the image degradation process and SSIM [15] measures the similarity between reconstructed images and original image. By considering more parametric measures, a better understanding of the quality of the desired image can be achieved.

3 Result and Discussion

In this section, a 2-out of-2 Halftone VC is constructed using error diffusion and DBS. The secret image to be encoded is Lena. Two color images Earth and Baboon are taken as meaningful images. The size of the share is 256 \(\times \) 256 and the size of the secret image is 128 \(\times \) 128.

Fig. 1
figure 1

Illustrative results of visual cryptography using Error Diffusion. a Original secret image lena, b halfone lena c and e original cover share image respectively, d halftoned earth, f halftoned baboon, g encrypted share 1, h encrypted share 2, i decrypted image

In Fig. 1, Fig. 1a is the original secret image which has to be encoded. Figure 1c and d are original cover images. Figure 1b, d, f are halftoned images using error diffusion. Encrypted shares generated are shown in Fig. 1g and h. Figure 1i shows the reconstructed image when encrypted shares 1 and 2 are stacked together using OR operation.

Fig. 2
figure 2

Illustrative results of visual cryptography using direct binary search. a Original secret image lena, b halfoned lena c and e original cover share image respectively, d halftoned earth, f halftoned baboon, g encrypted share 1, h encrypted share 2, i decrypted image

In Fig. 2, Fig. 2a is the original secret image which has to be encoded. Figure 2c and d are original cover images. Figure 2b, d, f are halftoned image using DBS. Encrypted shares generated are shown in Fig. 2g and h. Figure 2i shows the reconstructed image when encrypted shares 1 and 2 are stacked.

Table 1 shows PSNR, Correlation, UQI and SSIM of Encrypted Share 1 for 10 color secret images. The average value using Error Diffusion of PSNR is 51.41, Correlation is 0.3105, UQI is 0.1315 and SSIM is 0.0408. Using DBS, the average value of PSNR is 51.646, Correlation is 0.3027, UQI is 0.1331 and SSIM is 0.0843.

Table 1 Encrypted share 1
Table 2 Encrypted Share 2

Table 2 shows PSNR, Correlation, UQI and SSIM of Encrypted Share 2 for 10 color secret images. The average value using Error Diffusion of PSNR is 51.291, Correlation is 0.2609, UQI is 0.0693 and SSIM is 0.0398. Using DBS, the average value of PSNR is 51.482, Correlation is 0.2788, UQI is 0.1066 and SSIM is 0.0647.

4 Conclusion

Visual Cryptography provides one of the secure ways to transfer images on the Internet. Images in color have been encoded and decoded using both Error diffusion and Direct Binary Search. Various parameters have been taken like PSNR, Correlation, UQI and SSIM. The proposed UQI model performs well without any Human Visual System model. Also algorithm supports not only monochrome images but grayscale and color images, even pixel expansion have been minimized. Correlation value is decreased in Encrypted share 1 but in the case of share 2, all the parameter measured value of DBS is better than Error Diffusion. The percentage of variation in PSNR, Correlation and UQI among these two methods is very small whereas improvement in SSIM is 50 percent in case of DBS. Visually also direct binary search gives us better results than Error Diffusion.