Indiscernibility Mask Key for Image Steganography

: Our concern in this paper is to explore the possibility of using rough inclusions for image steganography. We present our initial research using indiscernibility relation as a steganographic key for hiding information into the stego carrier by means of a ﬁxed mask. The information can be embedded into the stego-carrier in a semi-random way, whereas the reconstruction is performed in a deterministic way. The information shall be placed in selected bytes, which are indiscernible with the mask to a ﬁxed degree. The bits indiscernible with other ratios (smaller or greater) form random gaps that lead to somehow unpredictable hiding of information presence. We assume that in our technique it can modify bits, the change of which does not cause a visual modiﬁcation detectable by human sight, so we do not limit ourselves to the least signiﬁcant bit. The only assumption is that we do not use the position when the mask we deﬁne uses it. For simplicity’s sake, in this work we present its operation, features, using the Least Signiﬁcant Bit (LSB) method. In the experimental part, we have implemented our method in the context of hiding image into the image. The LSB technique in its simplest form is not resistant to stegoanalisys, so we used the well-known LSB matching method to mask the presence of our steganographic key usage. To verify the resistance to stegoanalisys we have conducted and discussed Chi-square and LSB enhancement test. The positive features of our method include its simplicity and speed, to decode a message we need to hide, or pass to another channel, a several-bit mask, degree of indiscernibility and size of the hidden ﬁle. We hope that our method will ﬁnd application in the art of creating steganographic keys.


Introduction
In the introduction we will present two separate parts-discuss the background of the steganographic techniques and start to introduce the key to the surrounding theory. Let us start with a brief introduction to steganography. Steganographic techniques are sophisticated methods the idea of which is to hide the data inside the other to move them unnoticed [1]. Steganography is really an old field of science, its origins go back thousands of years. Digital Data steganography has currently been under development-it provides, among others, tools for transferring information into digital carriers-like pictures, audio, network protocols or videos. There exist a massive number of key based steganographic techniques, we will quote some of the most interesting ones. The application of steganography to secure stored data elements in the cloud was proposed by Yesilyurt et al. [2]. The method for secret sharing and authorisation was proposed by Liu et al. [3]. The technique of transferring data to the cloud from mobile devices was proposed by Xiang et al. [4]. The method of

Image Steganography
Considering the human eye vision limits one can modify the shades of colors in the picture obtaining the same appearance of the pictures. And this is basically the only reason why we can use steganographic techniques in images.

Digital Representation of the Image
A digital image can be simply represented by binary numbers of pixel colour saturation in the relevant system. Greyscale image pixels are represented by single Bytes that take decimal values from 0 to 255. In binary format from 00000001 to 11111111. Sample change 01101011 ⇒ 01101010 would not be noticeable to the human eye and in that way we could exploit that shortcoming of a human eye to hide data. RGB image pixels are represented by triples of Bytes, which take decimal values from 0 to 255. For example, white color in decimal form is represented by (255,255,255) and in binary form by (11111111,11111111,11111111). Data in digital systems are often shown in hexadecimal form for reading convenience. The white color is (FF, FF, FF) where F is the letter of the hexadecimal system alphabet to which a decimal value of 15 is assigned.

Basic LSB Technique
There are plenty techniques exploiting the limitations of the human eye while looking at the computer image-one of them is using the least significant bit (LSB) method [23,24]. To mask the presence of information transformations are often used-see Reference [17,25]. The LSB method consists in modifying the least significant bit of pixel bytes-the change of which is invisible due to human sight limitations. Let us move on to the demonstration of the use of the technique in an RGB form of image. We want to the letter B in pixel bytes with the following representation. The capital letter B in the ASCII array has the decimal value 65-in binary form it is 01000001. Each decimal value of the ASCII module is written in one Byte, so we complete the received binary value getting 01000001. In this form we can start hiding data. The expected number of changes we make at the end of the random data is about 50 percent.
The LSB method can be detected by statistical analysis of the typical occurrence of values 1 and 0 at the end of Bytes. Hence, steganographic keys are used to protect information in stego carrier. In doing so embedding an image into a cover picture may can not be noticed to the human eye and, what is more, resistant to statistical tests (like chi-square test) and not to be discovered by an unauthorised person.

Limitations on the Use of Image Steganography
It is clear that the use of image steganography is detectable in one hundred percent if the attacker has a cover with the same resolution as the stego-carrier. What is attempted to achieve in image steganography is to embed information in such a way that its presence cannot be detected in a stego carrier. This means that the statistics of pixel values in the image do not deviate from the typical ones. One method of such verification is the Chi square test. Our algorithm has successfully passed the test on the examined images, however, statistical tests are not enough to verify effective data embedding. Visualizations based on the last beat of the Pixel Bytes allow to discover a visual trace of the hidden message. An exemplary result of such visualization is presented in Figure 5. It is clear that by embedding a message only in a specific area of the cover, you can see a sign of this data. To avoid this, you can spread the data evenly over the entire image, or use higher bytes to hide the higher bits of Bytes-using the limitations of RGB recognition by the human eye. Of course, in the context of images, the basis for the use of steganography is the application of changes in pixel shades that are not recorded by the human eye. The human eye is only able to recognize from 30 to 50 shades of grey out of 255. The sensitivity of the human eye to color shades varies-see Reference [26]. The human eye can only recognize about 10 million different colors. For example, using RGB, 24 bits per pixel, we have 16,777,216 colors available. This is a huge field for image steganography. Another basic limitation to the use of steganography is interference resulting from scaling, rotation of images. The use of steganography directly with the whole spectrum of colour shades is completely immune to error detection. Because changing one bit leads to a different hue that belongs to a domain. The solution to this problem is to use numeric codes in which the bytes of the message are converted to code words. The main assumption is to get such a set of hue representatives that Hamming's minimum distance is as large as possible. The minimum distance is simply the smallest Hamming distance (the number of differences on individual bits) among all code word pairs representing pixels. It is well known that when considering the minimal Hamming distance of a set of code words (C) representing pixels-denoting by d(C). You can recognize the [d(C) − 1] errors, and and fix [d(C)−1] 2 errors. The longer the code words the longer the distance can be, the limitation is of course the number of bits available in the cover. By notation [x], we denote a feature of a number (its integer part).
To show the limit of use of the least significant bits of RGB bytes, we performed an additional test. We perform an experiment to replace selected bits of RGB bytes with zero values. The effect can be observed in Figures 1-3, for R, G and B, respectively.
Using the LSB method, it is very easy to destroy a message, simply by resetting the last bits of the message. So it is basically the weakest steganographic technique in images. We used this technique by its simplicity to present our new steganographic key.

Stegoanalysis
There is a number of Stegoanalisys techniques which of course are developed along with the evolution of new steganography methods. An interesting review can be found in References [27][28][29]. We can list the various options: Stego-only attack, Known-cover attack, Known-message attack, Chosen-steganography attack, Chosen-message attack, Known-steganography attack, Statistical analysis, Structural analysis and Signature analysis. In order to study the description of these techniques the reader can consult [27][28][29] and. One of the most popular stegoanalisys techniques is chi-square attack [13], it is a simple and well-known method to test the security system against the attacks-see Section 3.2. The method is based on the analysis of the frequency of occurrence of colour saturation in pairs and detects summary disturbances associated with this distribution. An interesting, simple attack to discover the existence of embedded information is LSB enhancement. The method is described in Section 3.1. Let us present a description of selected stegoanalisys techniques, two of which we implemented for the purpose of the work.

Stegoanalisys-LSB Enhancement Attack
The technique consists of assigning to bytes of a given colour which contain, in the least significant bit, the value 1, value 11111111. If the last bit is zero, we leave the byte unchanged. In this technique, by enhancing the colours of pixels that have non-zero last bits, we visualize a potentially hidden message. Now, allow us to present the technique in a pseudo-code.
The effect of the method can be seen in the Figures 4 and 5. In particular, in Figure 5 we have a demonstration of how the method makes the embedded information visible in the steganographic carrier. Where in Figure 4 we have its operation shown in the picture without the message embedded.

Stegoanalisys-Chi Square Attack
The test is used to detect a deviation from the expected statistical dependence of frequency, colour pairs in a fixed size of image blocks. Let us move on to a more detailed introduction with an example. We will start by describing the preparation of a series of data from the image for analysis.
One should consider the color saturation in the range <0-255>, where we have in binary form: Please consider the following colour pairs, the frequencies of which we will calculate.
Let us calculate an example of the observed and expected value for the selected pair. Considering (i DEC , j DEC ), where color i DEC frequency in the block of data is f req(i DEC ) = 50, and frequency of j DEC is equal f req(j DEC ) = 20. The expected value for this pair is equal In our example it is 35.
In our example it is 15. So, we get the first pair of values that will feed the Chi square test. It is (observed_value((i DEC , j DEC ), expected_value(i DEC , j DEC )) = (15,30) The rest of the values for the remaining colour saturation pairs are calculated analogously. The test for all pairs is repeated iteratively on a fixed block size, for example, 64, 128, 256 Bytes. After calculating 128 pairs for a given block, we calculate p-value for the Chi square test.
χ 2 summarizes the difference between our data and our independence hypothesis. For a test to be valuable, the data must meet the following assumptions.
(1) independent observations, To find p-value we need two values: χ 2 and the number of the degrees of freedom (df).
In our case numb_o f _rows = 128, numb_o f _cols = 2, thus d f = 127, and p-value can be found in 1 − tailed significance test table.
According to Reference [30], when some data like encrypted image is embedded into another image the LSB values of the original data change in a way that the number of these pairs become nearly equal while they differ so much when there is no embedding.

Protection against Stegoanalisys
Naturally, with the development of stegoanalisys techniques, there are methods of defense against them, in this section we will focus on the protection against Chi-square and LSB enhancement attacks. In order to protect the embedded information from detection, we cannot allow the cover image to be made available, because the attacker will detect the embedded information regardless of which technique has been used. The second important step, especially against LSB Enhancement, is the equal distribution of messages throughout the stego-carrier (see in Figure 6). Another simple step to make it easier to protect data against detection is to match a cover to the data, for example, by using images with a specific colour saturation spectrum. Greyscale images are a great place to embed data as the shades change gradually between palette entries. An interesting way, computationally absorptive, but minimizing the number of changes in the cover, is to use data blocks and match data to them. The basic step to hide the presence of information is to use pseudo-random distribution of information-for example, using the RC4 algorithm-see Reference [31]. Another technique to protect data against detection is the widely tested LSB substitution method-see References [1, [6][7][8][9][10]18]. Another technique worth mentioning is Data Masking-see Reference [32] (Masking changes the illumination in the masked areas) and filtering-see Reference [33]. Minimize the statistical difference between the cover and the image with the message embedded, for example, the frequency of color saturation pairs. This technique protects against a Chi-square attack-see References [18,34,35]. Let us move on to discussing our technique of creating a steganographic key. We'll start by introducing the necessary theory.

Theoretical Background for Indiscernibility in Degree
A theoretical explanation of the topic of rough inclusions can be found in Pawlak et al. [36], Polkowski [21,22,37,38], a very detailed overview is available in Reference [39]. Let us give the basic information needed to define our technique.
Considering the objects ob 1 , ob 2 belonging to the decision system defined as the triple (Universe, Attr, dec), where Universe is a set of objects, Attr a set of conditional attributes, and dec a decision attribute. A rough inclusion is defined as follows µ(ob 2 , ob 1 , radius) ⇔ |IND(ob 1 , ob 2 )| |Attr| ≥ radius.
Example 1. if we chose the mask of the length 2, like: _____00_ (two 00 on the sixth and seventh position of the bites consecutively), chose the radius equal to r = 1/2 and put the mask on byte 00110011 we could see that the difference was on one position out of two (00 versus 01)-that is why we would hide a message bit in LSB in that case. If an exemplary byte was 00110001 the radius would be equal to 1 (different from 1/2) and in that case the byte would be skipped. Similarly for 00110111 and the radius equal to 0 the byte would be skipped.
In our work we used rough inclusion as a steganographic key.

Usage of Our Steganographic Key-the Use of Rough Inclusion to Cover Up Information
Let us describe how we use our steganographic key in LSB technique. Considering the set of RGB pixels, p 1 , p 2 , ..., p k , where each pixel is defined as: with the assumption that bits of Bytes and mask bits are compared in the same positions in Byte. Note, that the length of a mask must be not greater than 8-we can use maximum seven positions in a Byte to place the mask upon, whereas the last bit is used for encoding the information in case the mask fits. In case one uses the methodology proposed above-there are 2 7 different mask that can be used (from the length 1 up to the length 7). By means of a given (fixed) mask the bits of a message can be embedded. It was mentioned before that in doing so we obtain a kind of pseudo-randomness because even starting from the beginning in the cover picture not every byte fits to the mask (which means the least significant bit is not changed) and if it fits the mask with a given ratio the least significant bit might be changed but might be also left unchanged. Let us assume again that our original bits are as follows: Even if these two changes can be notices it is not clear which other Bytes were chosen to hide the message.
In our experiments we considered using different masks for RGB colour.

Research Experiments
The diagram showing the general outline of the test we have conducted is in Figure 7, a detailed scheme is shown in Figure 8.   We have used the bitmap library.hpp, see Reference [40]. As a stego carrier we used a picture of 3024 by 4032 pixels from Figure 9. So we have a 3024 * 4032 * 3 = 36,578,304 least significant bits available in the stego carrier. Now allow us to present the characteristics of our method using a sample mask, with sample data. The image we hide in the first experiment is 453 by 500 pixels-see Figure 10, after breaking down into bits we have 5,436,048 bits to hide, including 48 containing the size of the image. If we use mask = 00 or mask = 11 as the last two bits and assume a degree of indiscernibility of 0.5 we get a 6,233,077 empty slots after embedding the image. The mask itself never changes any bit in the stego carrier but with it we have made 2,715,254 changes during image insertion. If we use a 01 or 10 mask we get 4,720,805 indiscernible Bytes with 2,718,786 changes in the stego carrier. Let us proceed with the third tests for another image to hide from Figure 11. Its size is 500 × 560 pixels so we have 6,720,048 bits to hide also taking into account three Bytes containing the size of the picture. If we use mask = 10 or mask = 01 as the last penultimate two bits and assume a degree of indiscernibility of 0.5 we get a 5,891,420 empty slots after embedding the image. The mask itself never changes any bit in the stego carrier but with it we have made 3,360,889 changes during image insertion. Figure 11. Information to be hidden- [42].
The fourth test for another image is to hide Figure 12. Its size is 500 × 332 pixels so we have 3,984,048 bits to hide also taking into account three Bytes containing the size of the picture. If we use mask = 10 or mask = 01 as the last penultimate two bits and assume a degree of indiscernibility of 0.5 we get a 3,388,417 empty slots after embedding the image. The mask itself never changes any bit in the stego carrier but with it we have made 1,990,405 changes during image insertion. In order to hide the image size into the stego carrier we used two first Bytes at the edge. The pixels are in 24 bits RGB format thus numbering Bytes of the pixels as B 1 , B 2 , ..., B 6 the size of hidden image can be computed as The DEC means that the Bytes are used in decimal form. Thus in a detailed way: 451 = 255 * 1 + 196 produces 11111111 00000001 11000100 500 = 255 * 1 + 245 produces 11111111 00000001 11110101.
Even if the size of the embedded picture is somehow discovered there is a great difficulty to find which Bytes contain the hidden pictures because of indiscernibility mask application. The size of the picture could be alternatively hidden using indiscernibility mask. What is to be know in order to recover the message? One needs to know which indiscernibility mask has been used.
In order to verify the effectiveness of our information embedding method, we performed a Chi-square and LSB enhancement attack test [30] using the algorithms versions described in Sections 3.1 and 3.2.
Tests of resistance to detection of the use of LSB, with the help of LSB enhancement were carried out on 35 images from the collection [41]-the sample is in the Figure 13.
It turned out that our technique using the LSB matching method, also using the second least significant bit is resistant to Chi-square attack and LSB enhancement (see examples in Figures 13 and 14). However, assuming that we use images with a variety of colours. In case of a small number of colours with a high frequency, the LSB enhancement method easily discovers the use of our key. That is to say, we assume that our technique works when we deal with the distribution of Chi-square colour saturation frequency. Figure 13. Stegoanalisys-LSB enhancement in a stego-carrier. The data is protected against detection by using the LSB Matching method (i.e., we also put the information in the second bit). In the example we used a 00 mask, and a 1 indistinguishability level. During embedding the information. In our experiment, we used pixels with a saturation range of [0, 120] to distribute the uniform pixels. Figure 14. Stegoanalisys-LSB enhancement in a stego-carrier. The data is protected against detection by using the LSB Matching method (i.e., we also put the information in the second bit). In the example we used a 00 mask, and a 1 indistinguishability level. During embedding the information, 24,319,784 empty slots were created, 1,273,791 least significant bits were changed. In our experiment, we used pixels with a saturation range of [0, 120] to distribute the uniform pixels. Figure 15. Stegoanalisys-LSB enhancement in a stego-carrier. The data is protected against detection by using the LSB Matching method (i.e., we also put the information in the second bit). In the example we used a 100 mask for R, 010 mask for G, 001 mask for B, and a 1 indistinguishability level. During embedding the information, 3,213,4402 empty slots were created, 1,295,702 least significant bits were changed. In our experiment, we used pixels with a saturation range of [0, 200] to distribute the uniform pixels.
Please proceed to the presentation of sample data feeding the Chi-square test from a 128 byte data block-considering stego-carrier from Figure 9. We assume that we are considering 3000 line of stego-carrier and file with embedded information.

Conclusions
In this article we have applied rough inclusions to form the steganographic key. The use of rough inclusions and an additional mask to indicate the bytes in which the information is embedded allows the data to be hidden in a semi-random way, which-with evenly distributed in the stego carrier-hides their presence. We have conducted experiments which present our technique and its features. For demonstration purposes we used selected masks and indiscernibility levels. Using our method when embedding information a large number of random gaps are created in which the data is not hidden. For the simplicity of presentation we chose the LSB method as a base to demonstrate our key. We used a simple LSB matching technique to hide embedded data by using our steganographic key. The hiding method proved to be resistant to Chi Square attack and LSB enhancement-assuming that the images we use contain the entire color palette. In images where we have a small number of distinguishable colors, it is difficult to hide the presence of the contained information against an LSB enhancement attack. Another problem is the use of an indiscernible mask with a certain tolerance, if we apply the LSB enhancement tolerance it can expose the presence of the message. From our preliminary results we can see that precise indication of the degree of indiscernibility works effectively.
Another research topic will be the use of methods to protect the embedded information from damage, among other things, we plan to use selected codes to increase the Hamming distance of the embedded data bytes. We treat our results as preliminary, in future works we plan to test the whole spectrum of possible masks and techniques of hiding the presence embedded with our information key. This work is the starting point for a series of studies on the application of out granular computing tools in steganography.