Fundamenta Informaticae 70 (2006) 317–331
317
IOS Press
A Novel Color Image Hiding Scheme Using Block Truncation Coding Yu-Chen Hu Department of Computer Science and Information Engineering Providence University Taichung 407, Taiwan 433, R.O.C.
[email protected]
Min-Hui Lin Department of Computer Science and Information Management Providence University Taichung 407, Taiwan 433, R.O.C.
Ji-Han Jiang Department of Computer Science and Information Engineering National Formosa University of Science and Technology 64 Wen-Hwa Road, Hu-Wei, Yun-Lin, Taiwan 63208, R.O.C.
Abstract. In this paper, a novel color image hiding scheme that is capable of hiding two color secret images into a color host image is proposed. The secret images to be embedded are first compressed by the single bit map block truncation coding. DES encryption is then conducted on the compressed message before the secret image is embedded into the rightmost 3, 2, 3 bits of the R, G, B channels of every pixel in the host image. The experimental results show that our scheme provides an average secret image quality of 29.220 dB. In addition to the improved quality of both host images and retrieved secret images, our scheme further strengthens the protection of the secret images by conducting image compression and DES encryption on the secret image in advance. Therefore, our scheme not only extends the hiding capability of host images, but also is practical and secure. Keywords: Steganography, color image hiding, block truncation coding, DES
Address for correspondence: Department of Computer Science and Information Engineering, Providence University, Taichung, Taiwan 433, R.O.C.
318
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
1. Introduction With the expansion of network bandwidth, the Internet has become an increasingly popular means for data transmission, providing an open environment in which anyone can access the transmitting data. Therefore, data transmitted via the Internet must be protected from tampering or interception in order to fully use the Internet’s convenience. Many scholars have proposed various encryption techniques [1, 2, 3, 4, 5] to safeguard the safety of data transmission. These encryption techniques include symmetric cryptography systems (such as DES [1] and IDEA [2, 3]) or asymmetric cryptography systems (such as RSA [4]). Data under encryption has a common characteristic in that it is transformed into a set of meaningless codes. Once interceptors find such codes, they know that they posses something quite valuable. To protect data safety and to prevent exposing the value of data, data hiding technology [6, 7] was thus invented. Information hiding differs from encryption, in that it embeds critical information in a non-critical host message to distract opponents’ attention. Based on the critical information embedded, information hiding schemes can be divided into two classes: the watermark schemes [8, 9, 10, 11] and the steganography schemes [12, 13]. The goal of the watermarking schemes is to protect the copyright of digital media while the steganography schemes aim to embed other information into the host message. Recently, the research towards the steganography techniques are mostly related to images, i.e. hiding one secret image that needs to be protected into another meaningful image, called a host image, and then transmitting the embedded image via the Internet. They are called the image hiding schemes. For example, one can embed a circuit board layout into the portrait of Mona Lisa, transmit the data embedded in the Mona Lisa picture via the Internet. Thus, interceptors will neither find a circuit board layout nor a set of meaningless codes, and they will have no idea that what they want has been embedded into an ordinary picture. In general, most image hiding schemes are designed for certain classes of images such as bi-level images [14, 15], gray-level images [16, 17], and color images [18]. Most of the methods use a gray scale image as the host image, every pixel of which consists of 8 bits. In order not to damage the host image quality, only the rightmost three or four bits of every pixel can be used to hide a secret image, so a gray scale image is very limited in its capacity to hide a secret image. However, every pixel of a color image (which is as large as the gray scale image) consists of three channels (red, green, and blue) and every channel has 8 bits, so every pixel has 24 bits. If the rightmost two bits of every pixel are used to hide the secret image, every pixel can provide 6 bits. Thus, a color image can accommodate much more information than a gray scale image. In this paper we focus on color secret and host images, proposing a novel color image hiding scheme that maintains host image quality and accommodates a large quantity of secret information. The rest of this paper is organized as follows: The methods of calculating the PSNR (Peak-Signal-to-Noise Ratio) as well as Wu and Coll’s single bit-map block truncation coding technique [?] are introduced in Section 2. In Section 3, the concept of secure true color image hiding is presented and its implementation procedure is described in detail; an example is also given. In Section 4, the experimental results illustrate that our scheme protects the quality of the secret and host images well. Lastly, conclusions are given in Section 5.
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
319
2. PSNR Calculations and Wu and Coll’s Scheme 2.1. PSNR Calculation For the explanation given in Section 3, we assume in this paper that there are two color images, S and H. The image size of S and H is w h , and w and h are identical to the power of 2. We refer to image S as the ”secret image”, and image H as the ”host image.” It is under these assumptions that we introduce the PSNR calculation, palette generation, our scheme and the extended application. In this paper, we use PSNR (Peak-Signal-to-Noise Ratio) to measure the degree to which the host image and the retrieved secret image become distorted. The definition of PSNR is
!
"# $ * ( ), *
) * /. "#$ % '& + - + * - & - * . In Eq. (1), n is the number of bits per pixel. In Eq. (2), - and & -
(1)
(2)
represent the original pixel value and the pixel value after substitution of the host image at the location of (i,j), respectively. Basically, the higher the value of PSNR is, the less distortion there is to both the host image and the retrieved secret image.
2.2. Wu and Coll’s Single Bit-map Block Truncation Coding Schemes In 1979, Delp and Mitcell introduced the concept of block truncation coding [19, 21] to compress graylevel images. In this paper, we use two single bit-map block truncation coding, W-plane and M-plane, as proposed by Wu and Coll [?] to decrease the volume of the transmitted data of the secret image. In this subsection, we introduce their basic concepts. Wu and Coll’s idea is to generate a single bit-map instead of three bit-maps for every color channel, deciding which single bit-map should be used to quantize the three planes retrieved from the image based on the minimum MSE approach [?]. In order to find out the W-plane, they let W-plane be weighting the R, G, and B planes, as follows:
0
1 5
Note that , , and
8
21
4365 7 398 :368 ;
(3)
(4)
And then they found that when = = =1/3 the MSE optimized W-plane is:
43 7 ? 3 : ;
(5)
Wu and Coll’s system diagram of MSE-optimized single bit-map BTC of color images is shown in Fig. 1, where a common bit-map is implemented to quantize all three color planes to remove the interplane correlations. The input color planes are first weighted together, using Equation (3), to obtain a
320
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
Figure 1. System Diagram of the MSE-optimized single bit-map BTC for color images
W-plane. Then, BTC is implemented on the W-plane to generate a quantization bit-map. Based on the bit-map, and using Equations (6) and (7), the R, G, and B planes undergo BTC. The resultant quantization data for each block , , , , and go all through post-quantization data compression.
) *
+
) *
+
(6)
(7)
where QBM(i) represents the quantization bit-map, and q is the number of 1’s on the bit-map in one block. This method is referred to as the W-plane in the following sections. Furthermore, Wu and Coll proposed another approach, called bit-map majority rule approach (called M-plane for short), to generate the common bit-map by using majority rule on R, G, and B bit maps. In (i,j), this approach, BTC is first implemented on the R, G, and B planes. The resulting bit-maps are (i,j), and (i,j), where (i,j) specifies the bit-map element address and the bit-map sample is 0,
: "
: "
: "
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
321
1. Let QBM(i,j) represent the common bit map, then
: " 2" : " : " : " : " : " 3 : " : " 3 : " : "
(8)
Based on the single bit-map generated by the Equation (8), they also can encode the color image by calculating , , , , and for every plane of the color image using Equations (6) and (7).
3. The Proposed Scheme 3.1. Basic Concept When we use one color host image to hide one color secret image, we have to achieve the following four goals: (1) cause minimum distortion to the host and the retrieved secret images; (2) minimize extra data volume during image transmission; (3) maximize the difficulty level for the interceptors to extract the secret image from the embedding host image; (4) maximize capacity of the host image for image hiding. To meet the above four goals, we have to determine in advance which positions of every pixel of the host image are to be used to hide the secret image. For example, we can use the rightmost 3, 2, 3 bits of the R, G, B channels in every pixel of the host image. We then set the values of these predetermined bits to be zero, and get a transformed host image. Then, we apply Wu and Coll’s single bit-map approach, W-plane, to compress the color secret image. Afterwards, we use DES to encrypt the bit-map and quantization data of secret image, and the embed the encrypted data of the secret image into pre-determined bit positions (set as zero) in the transformed host image from left to right and from top to bottom. When senders transmit an embedded host image (hiding encrypted bit-map and quantization data of the secret image) to receivers, receivers will then retrieve the embedding data from the pre-determined bit positions (such as the positions in the host image to hide the encrypted bit-map and quantization data of the secret image), and then decrypt the embedded data. After receivers decrypt the bit-map and quantization data of the secret image, they can proceed with the decompression procedure based on the bit-map and the relative quantization data in order to retrieve the color secret image. We compress the secret image into a single bit-map and two quantization data for every color plane so as to reduce the number of bits to be embedded into the host image. The bit-map and relative quantization data of the secret image both need to be encrypted before being hidden. Thus, interceptors have two hurdles in extracting the secret image. First, they have to break up DES; and secondly, they have to know the corresponding relationship between bit-map and quantization data and every set of R, G, and B values. Such hurdles provide more safety for the secret image. In addition, if we partition the secret image into non-overlapped image blocks of 4 4 pixels, and use the rightmost 3, 2, 3 bits of the R, G, B channels in every host pixel to hide the encrypted bit-map and quantization data, then we can hide two color secret images which are the same size as the host image. Thus, the data volume to be transmitted is mainly the data volume of the host image, and no extra data needs to be transmitted.
322
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
Figure 2. Flowchart for embedding two secret images into a host image
3.2. Color Image Hiding Procedure
Following the basic concept given in Section 3.1, we assume that there are three color images that are of 512 512 pixels. The first two images that need to be protected are called secret images and ; and the other image, used to hide the secret images, is called host image H. Each color image consists of RGB channels, and every channel uses 8 bits to represent each pixel. Fig. 2 illustrates the procedure of embedding the secret images and into the host image H. The procedure can be explained in more detail in the following five steps:
3.2.1.
Substitution
When embedding secret images and into host image H, we decide first to use the rightmost 3 bits of R, the rightmost 2 bits of G, and the rightmost 3 bits of B. We set the values of these bits as zero, and we then get a transformed host image , as shown in Fig. 3.
3.2.2.
Blocking
The secret images and are partitioned into non-overlapped 4 4 pixel blocks from left to right and from top to down, individually. Then, secret images and are transformed into and and .
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
Figure 3. Flowchart of transforming H image into
Figure 4. Flowchart of transforming
image into , =1, 2
323
324
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
* From left to right and from top to down, every block from decomposed secret image , i=1, 2, generates its single bit-map and quantization levels , , , , and based on the Wu and Coll’s 3.2.3.
Encoding
system diagram as shown in Fig. 1. After each block goes through the absolute moment block truncation coding (AMBTC) [21] with W-plane encoding (as shown in Fig. 1), a set of codes with identical length (8 bytes) will be generated. These sets of codes will then be assembled from left to right and top to bottom within an area whose width and height are identical to those of image , i=1, 2. Metadata , i =1, 2 (as shown in Fig. 4) is the image ,i=1, 2, after encoding.
3.2.4.
*
*
*
*
Encryption
*
A randomly generated 64-bit encryption key is used for encryption. The metadata , i=1, 2 is cut from left to right and from top to bottom into 64-bit blocks. Then, DES encryption is conducted. Upon encryption, the encrypted blocks of metadata , i=1, 2 are grouped into a set of encrypted data, which is as large as the substituted image . The encryption procedure is shown in Fig. 5.
Figure 5. Flowchart of encrypting metadata , i=1, 2 into encrypted data
3.2.5.
Replacement
Every 8 bits of the encrypted data are put into one group from left to right. Every group is further divided into three subgroups, 3 bits, 2 bits, and 3 bits. These bits in the encrypted data are then used to replace those pre-selected positions in the transformed host image to generate an embedded image E.
3.3. An Example We now illustrate the embedding procedure in Section 3.2 by using Fig. 6 (a) Airplane and (b) Lena as the secret images and Fig. 6 (c) Baboon as the host image. The five steps are explained below: 3.3.1.
Substitution
To embed the secret images (Airplane and Lena) into the host image (Baboon), we first select from Baboon the rightmost 3 bits of R, the rightmost 2 bits of G, and the rightmost 3 bits of B. These bits will
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
(a) Airplane
325
(b) Lena
Figure 6. Original color images of 512
(c) Baboon
512 pixels
be used to hide the information from Airplane and Lena and are set as zero. Thus, a transformed image of Baboon is generated, as shown in Fig. 7.
Figure 7. The transformed image of Baboon
3.3.2.
Substitution
The secret images Airplane and Lena are individually partitioned into non-overlapped 4 from left to right and from top to down. 3.3.3.
4 pixel blocks
Encoding
We use the AMBTC with W-pane method in as described in Subsection 3.2.3 to generate the corresponding bit-map and quantization levels for every block of blocking Airplane and Lena. Since we have two secret images, we have to encode every secret image separately. At the end of this phase, we obtain two different metadata sets using Airplane and Lena, respectively. Each metadata set includes one bit-map, and two quantization levels for each plane.
326
3.3.4.
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
Encryption
For encryption purposes, a 64-bit encryption key is randomly generated. Every metadata is cut from left to right and from top to bottom into 64-bit blocks. Then, DES encryption is conducted. 3.3.5.
Replacement
After the encryption process, the metadata sets of Airplane and Lena are grouped from top to bottom by each of the 8 bits. Every group is further divided into three subgroups, of 3 bits, 2 bits and 3 bits, respectively. These bits are used to replace the rightmost 3 bits of R, the rightmost 2 bits of G, and the rightmost 3 bits of B in every pixel of Baboon (Fig. 6 (c)). After this is done, an embedded image is generated, as shown in Fig. 8.
Figure 8. Embedded image of Baboon
4. Experimental Results In the simulations, a total of eight color images of 512 512 pixels are used. In addition to these three color images as shown in Fig. 6, additional five color images as shown in Fig. 9 are used in the simulations. All of the simulations were executed on a Pentium3-500 personal computer (PC) with 128 MB RAM under the Linux RedHat 7.0 operation system. Table 1 shows the results of the image qualities of the compressed color images by single bit map block truncation coding. Here, absolute moment block truncation coding (AMBTC) [20] is employed because AMBTC requires the less computational cost while achieving good image quality. Two different approaches of generating the single bit map are tested in the simulations. In other words, AMBTC with W-plane and AMBTC with M-plane are simulated. From Table 1, average PSNR of 29.280 dB and 28.296 dB are achieved when the color images are compressed by AMBTC with W-plane and AMBTC with M-plane, respectively. It is obvious that the average PSNR value achieved by BTC with W-plane is much higher than that of AMBTC with M-plane. Even in the worst-case scenario, the image quality of the test image ”Baboon” encoded by W-plane is still 24.864 dB. The results of the compressed color images using BTC with W-plane are shown in Fig. 10.
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
327
(b)
(a) Peppers
House
(c) Sailboat
(d) Splash Figure 9. Original color images of 512
(e) Tiffany 512 pixels
Table 1. Image Qualities of compressed images using block truncation coding
328
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
(a) Airplane
(b) Baboon
(c) House
(e)
(d) Peppers
Lena
(g) Splash Figure 10. Compressed color images by BTC with W-plane
(f) Sailboat
(h) Tiffany
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
329
Table 2. Image qualities of the embedded images that hide two secret images (Airplane and Lena) of the proposed scheme
Experimental results of the image qualities of the embedded images that hide two color images ”Airplane” and ”Lena” are shown in Table 2. The worst PSNR value of the host image is 28.624 dB and the average PSNR value of host image is 39.064 dB. Experimental results of the embedded images are shown in Fig. 11. We find that it is hard to distinguish the difference between the original images and the embedded images. In other words, the embedded images are quite acceptable for the Huffman Visual System.
(a) Baboon
Peppers
House
(e)
(d) Sailboat
(c)
(b)
Splash
(f) Tiffany
Figure 11. The embedded images that hide two secret images of the proposed scheme
330
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
5. Conclusions In this paper, we propose a new image hiding technique, which can be applied to hide not only one color secret image but also two secret images. To reduce the number of bits needed for a color image hiding a color image, the secret images are compressed using AMBTC with W-plane. We then use DES to encrypt two set of metadata before embedding them into the designated bits of the R, G, B channels of the host image. Then the encrypted message is hide into the host image. From the experimental results of Section 4, we find that when we apply our scheme to ”a color image hiding a color image”, the average PSNR value of secret images is 29.280 dB. Compared to the average PSNR value of the secret image, 28.296 dB, using AMBTC with M-plane provides better performance. Even the lowest PSNR value of the secret image after image compression is 24.864 dB, which is quite acceptable for viewing the messages with the naked eye. In addition, when we apply our scheme to a color image hiding two secret images, we find the average PSNR value of host image to be 39.064 dB, which maintains the high quality of host image. In summary, our scheme increases the number of embedded secret images from one to two; and also ensures the quality of both the host image and the retrieved secret image, regardless of whether there are one or two. In addition, the hidden images can be safely protected in this scheme because the DES cryptosystem is employed. Therefore, our scheme not only increases the data transmission performance, but also is very suitable for protecting valuable color images in the current on-line trading environment.
6. Acknowledgment This research was supported by the National Science Council, Taipei, R.O.C. under contract NSC 932213-E-126-005.
References [1] DES Encryption Standard (DES), National Bureau of Standards (U.S.), Federal Information Processing Standards Publication 46, National Technical Information Service, Springfield, VA, April 1997. [2] Lai, X., Massey, J. L. : A Proposal for a New Block Encryption Standard, Eurocrypt ’90, Springer-Verlag, 1991, 389-404. [3] Lai, X., Massey, J. L., Murphy, S.: Markov Ciphers and Differential Cryptanalysis, Eurocrypt ’91, SpringerVerlag, 1992, 17-81. [4] Rivest, R. L., Shamir, A., Adleman, L.: A Method for Obtaining Digital Signatures and Public Key Cryptosystems, Communications of ACM, 21(2), 1978, 120-126. [5] Schneier, B.: A Color Applied Cryptography, John Wiley & Sons, 1996. [6] Bender, W., Gruhl, D., Morimoto, N., Lu, A.: Techniques for Data Hiding, IBM Systems Journal, 35(3&4), 1996, 313-336. [7] Petitcolas, F. A. P., Anderson, R. J., Kuhn, M. G.:Information Hiding - A Survey, Proceedings of the IEEE, 87(7), 1999, 1062-1078. [8] van Schyndel, R. G., Tirkel, A. Z., Osborne, C. F.: A Digital Watermark, Proceedings of the First IEEE International Conference on Image Processing, Austin, Texas, USA, 11, 1994, 86-90.
Y.-Ch. Hu et al. / A Novel Color Image Hiding Scheme Using Block Truncation Coding
331
[9] Swanson, M. D., Zhu, B., Tewfik, A. H.: Multiresolution Scene-Based Video Watermarking Using Perceptual Models, IEEE Journal on Selected Areas in Communications, 6(4), 1998, 540-550. [10] Hwang, M. S., Chang, C. C., Hwang, K. F.:Digital Watermarking of Images Using Neural Networks, Journal of Electronic Imaging, 9(4), 2000, 548-555. [11] Vleeschouwer, C. D., Delaigle, J. F., Macq, B.: Invisibility and Application Functionalities in Perceptual Watermarking An Overview, Proceedings of the IEEE, 90(1), 2002, 64-77. [12] Marvel, L. M., Retter, C. T., Boncelet, C. G. J.: Hiding Information in Images, Proceedings of IEEE ICIP, 2, 1998, 396 -398. [13] Augot, D., Boucqueau, J. M., Delaigle, J. F., Fontaine, C., Goray, E.: Secure Delivery of Images over Open Networks, Proceedings of the IEEE, 87(7), 1999, 1251-1266. [14] Tseng, Y. C., Pan, H. K.: Data Hiding in 2-color images, IEEE Transactions on Computers, 51(7), 2002, 873-878. [15] Tseng, Y. C., Chen, Y. Y., Pan, H. K.: A Secure Data Hiding Scheme for Binary Images, IEEE Transactions on Communications, 50(8), 2002, 1227-1231. [16] Chen, T. S., Chang, C. C.,Hwang, M. S.: A Virtual Image Cryptosystem Based on Vector Quantization, IEEE Transactions on Image Processing, 7(10), 1998, 1485-1488. [17] Chang, C. C., Lin, M. H., Hu, Y. C.: A Fast and Secure Image Hiding Scheme Based on LSB Substitution, International Journal of Pattern Recognition and Artificial Intelligence, 16(4), 2002, 399-416. [18] Lin, M. H., Hu, Y. C., Chang, C. C.: Both Color and Gray Scale Images Hiding in a Color Image, International Journal of Pattern Recognition and Artificial Intelligence, 2002. [19] Delp, E. J., Mitchell, O. R.: Image Coding Using Block Truncation Coding, IEEE Transactions on Communications, 27, 1979, 1335-1342. [20] Lema, M. D., Mitchell, O. R.: Absolute Moment Block Truncation Coding and Its Application to Color Image, IEEE Transactions on Communications, 32, 1984, 1148-1157. [21] Wu, Y., Coll, D. C. : Single Bit-Map Block Truncation Coding of Color Images, IEEE Journal on Selected Areas in Communications, 10(5), 1992, 952-959.