Chapter 1 Introduction
1.4. Thesis Organization
In the remainder of this thesis, a review of related works about techniques of image data hiding, file authentication, information sharing, and the PNG standard is given in Chapter 2. In Chapter 3, the proposed method for image authentication by adjusting some selected values of the red, green and blue channels is described. In Chapter 4, the proposed method for image sharing by solving three equations is described. In Chapter 5, the proposed method for data hiding is described. Finally, conclusions and some suggestions for future works are made in Chapter 6.
Chapter 2
Review of Related Works and Standards
2.1 Introduction
More and more data hiding techniques have been developed. Because of the differences between distinct document formats, different data hiding techniques have been developed to hide data in documents of different formats. So in this chapter we will make a review of data hiding techniques as well as some related techniques for image authentication and secret sharing, which have been developed in recent years.
In addition, because the data hiding techniques and their applications proposed in this study are implemented on the PNG format, we will also make a review of the PNG image standard subsequently.
2.2 Previous of Studies on File
Authentication Techniques via Digital Images
Many authentication methods have been proposed [1-6] in the past. Wang and Tsai [1] proposed a method to verify the fidelity and integrity of PDF files by embedding authentication signals in them. Weng and Tsai [2] proposed two methods for authentication of grayscale documents. One of them can authenticate grayscale document images by a semi-fragile watermarking technique against print-and-scan attacks. The other method can authenticate grayscale document images by using edge direction histograms with circular interpretation. Huang and Tsai [3] proposed a scheme for authentication by embedding visible watermarks and authentication
signals into grayscale images. Chiu and Tsai [4] proposed a method for image authentication in color images without the use of signatures.
2.3 Previous of Studies on Secret Sharing Techniques
Secret sharing is one of the data hiding techniques for use in covert communication. Many secret sharing techniques have been proposed [7-10]. When a pre-defined group of shares is collected, the secret data distributed in them can be recovered. Shamir [7] proposed first the concept of secret sharing in his (k, n)-threshold method. In this method, a secret is divided into n shares which are given to n participants for custody. At least k shares must be collected to recover the secret.
However, if k − 1 or fewer shares are collected, the secret cannot be recovered. On the contrary, if less than n − k shares are stolen, the secret can still be recovered. Blakley [8] transformed the secret sharing problem into a geometric one by considering the secret as a point of the intersection of n hyperplanes in an n-dimensional space where n > 2. Lin and Tsai [9] proposed an effective scheme for secret multimedia information sharing with steganogrphic effects. They created n shares from n − 1 cover images by using simple logic operations. Additionally, the operation can recover the secret from n shares very quickly.
2.4 Previous of Studies on Information Hiding Techniques via Digital
Images
A lot of approaches to hiding data into images have been proposed [11-17]. Lee and Tsai [11] proposed a new method for data hiding in grayscale images based on a
human vision model with distortion-minimizing capabilities. Lai and Tsai [12]
proposed a method to hide data in PNG images. They piled a PNG image on a gray-level one and hid secret data in its LSBs. And a calculation was made to determine how many bits in each byte of the gray-level image can be used for hiding for the sake of reducing the resulting distortion. Ni, et al. proposed [13] a novel reversible data hiding algorithm, which can recover the original image without any distortion from the marked image after the hidden data have been extracted.
2.5 Review of PNG Standard
In this study, all the proposed information hiding, authentication, and image sharing techniques employ PNG images as carrier media for hiding information. We give a brief review of the PNG standard in this section. In Section 2.5.1, the usages of PNG images will be described. And in Section 2.5.2, some properties of PNG images will be described.
2.5.1 Usages of PNG Images
In this section, we will describe the usages of PNG images. PNG is the abbreviation of Portable Network Graphics. The PNG format was created to replace and improve upon the GIF (Graphics Interchange Format) format at the beginning. It is a bitmapped image format that employs the LZW (Lempel-Ziv-Welch) lossless data compression technique. As the name suggests, it was designed for transferring images on the Internet, not for professional graphics. And except the RGB color space, the PNG format does not support other color spaces, such as CMYK.
PNGs have some advantages over GIFs: the alpha channel, the gamma correction option, and the two-dimensional interlacing progressive display capability. Though GIFs also have alpha channels, they only support alpha channels with single-level
transparency. In other words, the GIF image can only be fully transparent or opaque.
Instead, PNGs that have alpha channels are of variable transparency.
As we mentioned previously, the PNG was designed for transferring images on the Internet. If a user downloads a GIF image and a PNG image through the Internet simultaneously, he/she will get the complete PNG image earlier than the GIF image.
In the next section, we will describe the properties of PNG images.
2.5.2 Properties of PNG Images
Each PNG image consists of several ‘chunks’ substantially. In other words, with the exception of the first 8 bytes in each file, a PNG image comprises nothing but chunks. In the PNG format, two categories of chunks are included. One is named critical chunk which is a group of chunks that a decoder must be able to interpret in order to read and render a PNG file. This group consists of 4 chunks which are IHDR, IDAT, IEND, and PLTE. After the introduction to these critical chunks, we will introduce the other group of chunks, named ancillary chunk.
In general, a PNG image is at least composed with three types of chunks: IHDR, IDAT, and IEND. The IHDR is the image header chunk; the IDAT is the image data chunk; the IEND is the end-of-image chunk. An IHDR must be the first chunk in a chunks; if so, they all appear consecutively with no intermediate chunks. Each IDAT contains at most two gigabytes of compressed data. An IEND is the simplest chunk. It points out the end of a PNG image, and it contains no data. The previously-mentioned
three chunks can make up a PNG image, with or without an alpha channel. But if it is an image with a palette, it should contain another type of chunk, PLTE, the palette chunk. A PLTE has 256 palette entries and each entry is a 24-bits color in the RGB color space.
As we mentioned previously, the IHDR consists of the color information of the image which is named ColorType. If the ColorType equals 0, the image type is gray-level; if the ColorType equals 2, the image type is truecolor without an alpha channel; if the ColorType equals 3, the image type is indexed-color, with a palette; if the ColorType equals 4, the image type is gray-level with an alpha channel; if ColorType equals 6, the image type is truecolor with an alpha channel.
The ancillary chunks are also defined in the International Standard. They are not always necessary for constructing a PNG image. Therefore, these chunks may be ignored by decoders. There are 14 ancillary chunks, and we can classify them into 5 types according to their actions. The first type is about “transparency information”
which includes tRNS chunk; the second type is about “color space information”
which includes cHRM, gAMA, iCCP, sBIT, and sRGB chunks; the third type is about
“textual information” which includes iTXt, tEXt, and zTXt chunks; the forth type is about “miscellaneous information” which includes bKGD, hIST, pHYs chunks, and the last type is about “time information” which only includes the tIME chunk.
Chapter 3
Authentication of PNG Images by Adjusting Selected Pixel Values in Spatial Domain and Its Application to Data Hiding
3.1 Introduction
With more convenience and faster speed on the Internet, exchanges of images are more frequent in recent years. Especially, after the type of PNG image was created for data transferring on the Internet, its uses also become common. Development of the data hiding techniques for PNG images becomes necessary and very important.
In this chapter, we describe the proposed method for authentication of PNG images and its application to data hiding. In Section 3.1.1, several related definitions will be given. In Section 3.1.2, the rough idea of the proposed authentication method for PNG images will be described. The process of embedding authentication signals and the extraction process will be given in Section 3.2. In additional, the proposed data hiding technique which is based on the above-mentioned authentication method is described in Section 3.3. Finally, some experimental results are shown in Section 3.4, and some discussions and summaries are given in Section 3.5.
3.1.1 Problem Definition
Although copyright protection becomes a hot topic recently, most of the existing techniques for this purpose were developed only for some very common file formats which have been used for a long time, such as BMP and JPEG. Due to the
characteristics of the alpha channel, the PNG becomes a popular format in the Internet recently. However proposed data hiding methods for PNG images so far are very rare.
Most of the authentication methods embed authentication signals as a kind of secret data in cover images. The authentication signals and the secret data usually cannot be hidden at the same place. In other words, if we want to hide secret data and authentication signals in the same cover image, the data hiding capacity of the cover image must be bigger than the sum of the capacity of authentication signals and the capacity of secret data. In this study, we will propose a method which can combine the authentication signals and the secret data.
3.1.2 Proposed Ideas
In this section, we briefly describe the proposed method. At first, we divide the cover image into non-overlapping 3×3 blocks, and we select randomly a fixed number of values from the data of the four channels (red, green, blue, and alpha) of each block.
In each block, we add the selected pixel values up to get a sum. Also, we select a random number for use as a divisor. So, in each block, we have a sum and a divisor.
Then, we divide the sum by the divisor to get a remainder. Afterward, we adjust, by adding or subtracting, the previously-selected pixel values in each block to change the remainder to be 0. In this way, the final content of the block is regarded as a kind of authentication signal for use in image authentication.
In addition, we propose a data hiding method which is based on the above-mentioned authentication method. In the previous discussion, we mentioned that we pick up several values in a block. We use these selected pixel values to hide data. First, we count the number of odd numbers and that of even numbers in the selected pixel values in each block. And according to the data which are to be hidden, we adjust these numbers of odd numbers and even numbers to achieve the goal of
hiding data. More details are described in the following sections.
3.2 Proposed Image Authentication And Data Hiding Methods
In this section, the processes for the proposed image authentication method will be described. In Section 3.2.1, the process of embedding authentication signals will be described. In Section 3.2.2, the process of image authentication will be given. And in Section 3.3, the proposed data hiding scheme which is based on the proposed image authentication method will be described.
3.2.1 Authentication Signal Embedding Process
In order to protect the copyright of a PNG image, we propose an image authentication method to achieve the goal. The PNG format includes four channels which are red, green, blue, and alpha channels. In the proposed method, first we divide the cover image into non-overlapping 3×3 blocks. Also, because conceptually we may regard each of the four channels of a PNG image block as a 3×3 gray-level image, we combine the four channels to form a 6×6 gray-level image with 36 pixels, as shown in Fig. 3.1.
Next, we choose two keys to generate two series of distinct random numbers, denoted as Np and Nd, respectively, for each block. The series Np includes distinct numbers in the range of 0 to 35, representing the positions of the pixels in the 6×6 gray-level image mentioned above as shown in Figure 3.1. Also, each number in the series Nd is regarded as a divisor limited to be within the range from 3 to 18.
0 1 2
Fig. 3.1 Combination of four channels of an image block into a larger 6×6 gray-level image and the assigned positions of the 36 pixels. (a) Red channel (b) Green channel (c) Blue channel (d) Alpha channel
Then, for each 3×3 image block, we select randomly 18 pixel values according to Np from the corresponding 6×6 gray-level image and add them up to get a sum, and we divide it by a divisor selected randomly according to Nd to get a remainder. Then we apply a value adjustment process to adjust the selected pixel values to make the corresponding remainder to become 0. In this way, we can get a protected image with authentication signals embedded in the final adjusted image block values.
The details of such authentication signal creation and embedding is described as an algorithm below.
Algorithm 3.1. Authentication signal creation and embedding for a PNG image.
Input: a cover image I in PNG format, two secret keys p and d, and a random number generator f.
Output: a protected image Ip with authentication signals.
Steps.
1. Divide I into non-overlapping 3×3 blocks.
2. Use the two keys, g and h, as seeds for f to generate two series of distinct random numbers, Np and Nd, where the range of Np is limited to be between 0 and 35, and that of Nd is limited to be between 3 and 18.
3. For each 3×3 image block B, perform the following steps.
3.1. Compose a 6×6 gray-level image B′ with 36 pixels using the gray-level image planes of the three color channels and the alpha channel of B (as illustrated by Fig. 3.1).
3.2. Pick up in order 18 values from Np and regard them to represent the positions of 18 randomly selected pixels of B′.
3.3. Add up the gray values of the pixels of B′ located at the 18 positions to get a sum S.
3.4. Divide S by a divisor d selected in order from Nd to get a remainder r.
3.5. Apply the following value adjustment process to change the values of the 18 selected pixels of B′.
a. When r ≥ d/2:
i. if the values of the selected pixels are not all equal to 255, then increase the values of those selected pixels whose values are not equal to 255, each time by one, until the re-computed remainder r becomes equal to d; or
ii. if the values of the selected pixels are all equal to 255, then decrease the values of those selected pixels, each time by one, until the re-computed remainder r, becomes equal to 0.
b. When r < d/2 and r ≠ 0:
i. if the values of the selected pixels are not all equal to 0, then decrease the values of those selected pixels whose values are not equal to 0, each time by one, until the re-computed remainder r becomes equal to 0; or
ii. if the values of the selected pixels are all equal to 0, then increase the values of those selected pixels, each time by one, until the re-computed remainder r becomes equal to d.
c. When r = 0:
do nothing.
4. Take the resulting image as the desire protected image Ip with the adjusted pixel values in B′ being regarded as authentication signals.
In Step 3.5 above, we increase or decrease in order the 18 selected pixel values of B′, each time by one. Sometimes, the selected pixel value in each block can not be increased or decreased, because we can not decrease 0 to be negative and we can not increase 255 to be larger, either. Therefore, if the first round of value increasing or decreasing can not make the re-computed remainder r′ to be 0, we will start the second or more rounds until r′ becomes so.
3.2.2 Image Authentication Process
In this section we will authenticate protected images to see whether they are tampered with or not. We apply the same steps, from Step 1 to Step 3.4, in Algorithm 3.1. That is, we select randomly 18 pixel values according to Np from the corresponding 6×6 gray-level image and add them up; and in each block, we pick up the same divisor as we mentioned in the preceding discussion from the series Nd. Then we divide the sum by a divisor to get a remainder r. After these steps, we extract
the authentication signals to authenticate the image. If r is equal to 0, the corresponding block is decided to be correct, that is, not being tampered with. But if r is not equal to 0, we decide that the block might be modified, and mark it so in the image authentication report.
The detailed algorithm for image authentication is described in Algorithm 3.2 below.
Algorithm 3.2. Authentication of PNG images.
Input: a protected image Ip in PNG format, two secret keys p and d, and a random number generator f.
Output: An authentication report P for Ip. Steps.
1. Divide Ip into non-overlapping 3×3 blocks.
2. Use the two keys, g and h, as seeds for f to generate two series of distinct random numbers, Np and Nd, where the range of Np is limited to be between 0 and 35, and that of Nd is limited to be between 3 and 18.
3. For each 3×3 image block B, perform the following steps.
3.1. Compose a 6×6 gray-level image B′ with 36 pixels using the gray-level image planes of the three color channels and the alpha channel of B (as illustrated by Fig. 3.1).
3.2. Pick up in order 18 values from Np and regard them to represent the positions of 18 randomly selected pixels of B′.
3.3. Add up the gray values of the pixels of B′ located at the 18 positions to get a sum S.
3.4. Divide S by a divisor d selected in order from Nd to get a remainder r.
3.1 Consider the following cases to authenticate Ip.
a. When r = 0:
decide that image block B has been modified and mark it so in P.
b. When r ≠ 0:
decide that image block B has not been modified.
4. Take the final authentication report P as output.
3.3 Proposed Image Hiding Technique Based on Proposed Authentication Method
In this section, we will introduce a data hiding method which is based on the previously-mentioned authentication method. In Section 3.3.1, the secret data embedding process will be given. We will describe the data extraction process in Section 3.3.2.
As mentioned previously, we can apply the two methods to yield a combined image authentication method and data hiding method. The combination process will be described in Section 3.4.
3.3.1 Data Hiding Process
In this study, we propose a data hiding method which is based on the above-mentioned authentication method. And the detailed algorithm will be given.
Because this data hiding method is based the above-mentioned authentication method, the steps are almost the same as those of Algorithm 3.1. In this method, we use a key to generate randomly a series of distinct numbers, denoted as Np. The use of Np is the same as that in the proposed authentication method, representing the positions of a 6×6 gray-level image. We count the number of the odd gray values and that of even gray values located at the pixels at these selected positions in each block.
As to the secret data, we have to transfer every byte of them into binary. We hide secret data, each time by one bit, in each block by adjusting the numbers of odd gray
As to the secret data, we have to transfer every byte of them into binary. We hide secret data, each time by one bit, in each block by adjusting the numbers of odd gray