Steganography Based on Data Mapping and LSB Substitution With RSS Key Generation

To avoid unauthorised third parties, variety of security solutions have been created to secure the confidentiality of messages or information, one of which is steganography. This study proposes key generation technique in the steganography process. In general, steganography uses a symmetric key concept, where this method requires a third party in the secret key distribution process. The solution to this problem the authors propose a new method by combining secret key generation using RSS on a wireless network with steganography for hiding messages. To test performance, our proposed system is used in both static and dynamic condition. In the key generation process, an average time of 110.52 seconds was obtained to generate keys. In the embedding process, the average computation time for 65,536 characters is 6.38 seconds to produce a stego image. In the extraction process, an average computation time of 0.63 seconds is obtained to get a secret message.


INTRODUCTION
Confidentiality and security are important aspects needed in the process of exchanging messages or information via the internet. To avoid unauthorised third parties, a variety of security solutions have been created to secure the confidentiality of messages or information, one of which is steganography. The science of steganography is in line with cryptography, but the two have differences. Steganography aims to hide secret messages through a medium. Meanwhile, cryptography disguises a secret message but does not hide it. In steganography, information is hidden in digital media so that no one can see whether digital media has information in it or not (El-Dairi & House, 2020).
Steganography techniques have been employed in a variety of digital media in recent years, namely, images, audio, and video, to achieve secret communication. Likewise, in a variety of applications, it is used in paper (Liu et al., 2018) using steganography to share secrets and authentication. Steganography is used to send data from the phone to the cloud and vice versa in paper (Xiang et al., 2015). Paper (Tondwalkar & Vinayakray-Jani, 2016) uses a steganography process to secure node localisation in a wireless network.
In steganography, in increasing security against steganalysis, a key is needed that can be used to determine the position of the cover-image pixel to hide secret data. Key-based cryptographic techniques can be divided into symmetrical and asymmetrical. Symmetric cryptography has low computation but has problems with key distribution and key management (Yassein et al., 2017). So there is a risk when the key distribution, third parties, can tapping into the transmission process. The asymmetric cryptography scheme uses two keys to communicate, namely, the public key and the private key. The public key can be seen by anyone on the network, which will be used for encryption. Meanwhile, the private key will be used to perform the decryption process. In asymmetric cryptographic schemes, the computation process takes longer when compared to symmetric cryptography schemes.
Currently, the physical layer of a wireless channel can be utilised to enhance conventional security (Yuliana et al., 2019b). This can be done by taking advantage of the wireless channel's randomness and uncertainty. The benefit of extracting a shared symmetric key using physical layer information from a wireless channel is that it eliminates the need for a fixed key distribution infrastructure between two wireless devices within the transmission range. The Secret Key Generation (SKG) scheme is an alternative to symmetric cryptography that can be applied to wireless communication devices. Such schemes take advantage of the exchange, randomness, and uniqueness of wireless channels by extracting bit streams through information which may result in a high correlation between sender and receiver.
In paper (Dewi et al., 2020) (Sudarsono et al., 2019) (Wei et al., 2013) states that the SKG scheme consists of four stages which includes exchanging channel information between users to obtain RSS measurements via the channel probing stage, as well as converting the obtained RSS into binary bit form via the quantization stage, using an error correction scheme, the information reconciliation stage corrects the binary bit sequence obtained in the previous stage, and the privacy amplification stage increases the protection of the hidden key bit sequence to prevent it from being predicted by third parties.
Previous researchers merged other approaches with the Least Significant Bit (LSB) technique to increase the embedding potential even further. For example, research (Hussain et al., 2018) proposes using the Pixel Value Difference (PVD) a technique for increasing embedding ability based on LSB. High-value and low-value texture blocks are distinguished by the difference in the mean of the four-pixel blocks. The hidden message is then inserted using k-bit and an LSB substitution. In paper (Khodaei et al., 2016) with the PVD process and Modification Prediction Error (MPE), a recursive hybrid LSB approach was suggested (MPE). First, define an image's lower and higher textures, then use the substitution LSB and PVD methods to replace them. Recursively use the PVD shift and MPE to increase embedding capability. This approach offers more capacity while maintaining a reasonable PSNR. The embedding method can use up to four LSBs. As well as, paper (Bai et al., 2017) introducing adaptive LSB by utilising the characteristics of PVD. The cover-image is divided into two-pixel blocks, and the difference between the two pixels' values is calculated using this process. The difference is used to calculate the number of hidden bits. The hidden bits are then embedded in the selected pixel block using an adaptive LSB scheme. This approach also includes a readjustment step to keep the pixels within their ranges, resulting in increased embedding capability while preserving visual quality. During the embedding process, however, the maximum number of LSBs used is four.
Bit inversion is another LSB-based technique that aims to improve the PSNR value. The LSB cover-image of a single pixel is modified in this inversion technique if it matches a specific pattern. As a consequence, while the visual quality improves, the embedding capability decreases. Another texture-adaptive LSB approach was recently suggested (Bai et al., 2017). Pixels in the cover-image are divided into edge and non-edge areas using this form. The 3 Most Significant Bit (MSB) of the cover pixel evaluate edge information, while the remaining 5 LSBs are used adaptively through LSB substitution. By maintaining a reasonable visual quality, this method achieves a high embedding capability. The embedding method, however, uses a maximum of 5 LSBs. This paper proposes a key generation technique in the steganography process. In general, steganography uses a symmetric key concept, where this method requires a third party in the secret key distribution process. To overcome this, the authors propose a new method by combining a secret key generator using RSS on a wireless network with steganography in hiding messages. Broadly speaking, the system is divided into two: SKG and steganography. SKG is divided into four stages, namely channel probing, quantization, information reconciliation, and privacy amplification. Meanwhile, steganography has two stages, namely embedding and extraction. By combining secret key generation techniques with steganography, it is hoped that the secret message will be sent more safely.
In this research, we'll talk about steganography technique with image media using the mapping-based Least Significant Bit (LSB) method to keep sensitive information hidden (Zakaria et al., 2018). In addition, this study uses Received Signal Strength (RSS) as a secret key generation (Sumadi et al., 2020). By combining these two methods, it can be a new method of information security.

SYSTEM DESIGN
We will outline the proposed system in this section. Alice (sender) and Bob (receiver) will be the two entities communicating. First, Alice and Bob each measure the RSS of their communication opponents. RSS collection is obtained by utilising requests and responses between communication opponents via the Internet Control Message Protocol (ICMP) protocol. After both of them have their respective RSS, then the SKG process is carried out. The output from the SKG process generates a secret key that will be used for the steganography process. In the steganography process, Alice inserts a secret message using a secret key into the coverimage to produce a stego-image. The resulting stego image through the steganography process is then sent to Bob as the recipient. Bob, who has received the stego image, then extracts it using a secret key so that he gets the secret message sent by Alice. Show the proposed system scenario in Figure 1. This system has six stages in total, with four stages for SKG and two stages for steganography. The stages for the SKG process include channel probing, quantization, information reconciliation and privacy amplification. In contrast, the stages for the steganography process are embedding and extraction. Proposed system mechanism show in Figure 2.

Channel Probing
By utilising the ping command that uses the Internet Control Message Protocol (ICMP) protocol, we can record and measure the signal strength generated between the two communicating users (Alice and Bob). To calculate the interval time used between two communicating users, it depends on the coherence time (Tc). Based on (Yuliana et al., 2019a), Tc = where maximum droppler frequency. Meanwhile, where v denotes the speed at which legal users travel (i.e 1.1 m/s). = , c is the speed of light, and fc denotes carrier frequency of the channel. We using carrier frequency 2,4 GHz in our system, = .
= 0.125 m. As a consequence, Tc (coherence time) is 113.6 milliseconds. In our best estimation, the ping interval time was set to 110 milliseconds. In a semi-indoor environment, the experiment was carried out in both static and dynamic conditions.

Quantization
The result of the probing channel will get a series of strong signals in dBm. The signal strength obtained was then quantization. At this stage, a series of strong signals will be converted into bits (binary numbers). The strong signal row will be denoted T with T=[t1, t2 …, tn] where n is the number of signal strengths. Calculate the value of the mode, max, and min of T. Mode is a value that occurs frequently. After obtaining the value, then calculate the value q + and q -. T will be set to 0 if it is less than or equal to q -. If T is more than q + , it will be set to 1. T will be discarded if it is not inside the q + and qrange. The quantization algorithm is shown in Algorithm 1 (Sumadi et al., 2020).

Information Reconciliation
The communication between the two legitimate users (transmitter and receiver) is a halfduplex communication as a result of the channel probes that occur unable to be carried out a similar time. As a result, transmitter and receiver channel information is inconsistent. In addition, random disturbances that occur by the environment also affect the channel of information obtained. The channel data is gathered using both devices during the quantization stage, and the output is generated in the shape of a stream of bits. As a result, unequal bits are allowed in the bit streams received by the two devices. We use a cascade information reconciliation protocol (Brassard & Salvail, 1994) to detect dissimilar bits to eliminate bit differences between the two devices.

Privacy Amplification
The reconciliation information allows Eve to get a series of bits exchanged between two user. To avoid this, the set of bits is enhanced by using a universal hash (Brassard & Salvail, 1994). This research, it was using a key with a length of 256 bits, resulting in more than one key. Some of the keys that are generated are then carried out by NIST test to determine which key is the best. After the best key is obtained from both users, the hashing process is carried out. Using SHA-256 will generate a key digest. This digest will be matched between the two users. If it matches, then the key will be used; if not, then reset the key is performed from the probing channel.

Stego Embedding
The secret key that has been generated from the SKG process is then used for the embedding process in steganography. Alice enters the secret message into the cover-image using the secret key. This is the stage of the embedding process.
a. Convert K (stego key) into Sum value using formula shown in Equation (1) = ∑ ( × ) mod 256 ( 1) b. Compute SM (secret message) value using formula shown in Equation (2) For 1 ≤ i ≤ n, c. Embedding SM to cover-image The secret key is used to determine the insertion position of the message bits into the pixels on the cover-image. The algorithm works by mapping the secret message to the cover-image, where the records of the mapping are managed by using LSB substitution on the cover-image (Zakaria et al., 2018). In the process of embedding, secret messages are divided into groups, namely SM1 (11), SM2 (01), SM3 (00), ... SMn as shown in Figure 3. Likewise, the bits on the cover-image are also divided into groups. For example, the CI Left Group and CI Right Group is shown in Figure 3. CI Left Group is the 1st and 2nd bit on each pixel on the coverimage. Thus the CI Right Group is the 3rd and 4th bit on each pixel on the cover-image. CI Left Group and CI Right Group will be matched with the secret message group (SM). Left bits are the 7th bit, and Right bits are the 8th bit in each pixel on the cover-image. Left bits and Right bits are used as an indicator of insertion. The process of mapping secret bits to the cover-image follows the following rule: If the first group of bits (i.e., SM1) matches the CI Left Group of the cover-image pixels, then the Left bits are replaced with '1' if not replaced with '0'. If the second group of bits (i.e., SM2) matches the CI Right Group of the cover-image pixels, then the Right bits are replaced with '1'; otherwise, they are replaced by '0'. If either Left bits or Right bits are '0' then the 2 LSB for each cover-image pixel is then replaced by the secret message group value that did not match the previous one (i.e., SM1 or SM2). If both Left bits and Right bits have a value of '0', this indicates that no secret message group is inserted in the cover-image pixel. For example, in Figure 3. The 1st pixel has a value of CIL,1 = 01, CIR,1 = 01, LB,1 = 1, RB,1 = 0 and SM1 = 11, SM2 = 01. By following the applicable rules, SM1 ≠ CIL,1 so that the value of LB,1 is replaced by 0. Likewise, by following the rule of SM2 = CIR,2 so that the value of RB,1 is replaced by 1. Because the value of LB,1 = 0, the value of left bit and right bit for the next pixel is SM1 (11). The same process is repeated by following the mapping rule so that the entire secret bits group is all inserted, for example, in Figure 3. The 1st pixel has a value of CIL,1 = 01, CIR,1 = 01, LB,1 = 1, RB,1 = 0 and SM1 = 11, SM2 = 01. By following the applicable rules, SM1 ≠ CIL,1 so that the value of LB,1 is replaced by 0. Likewise, by following the rule of SM2 = CIR,2 so that the value of RB,1 is replaced by 1. Because the value of LB,1 = 0, the value of left bit and right bit for the next pixel is SM1 (11). The same process is repeated by following the mapping rule so that the entire secret bits group is all inserted.

Stego Extraction
Similarly to the embedding procedure, the bits in a Stego Image (SI) are divided into SI Left (bit 1 and 2), SI Right (bit 3 and 4), Left bit (bit 7) and Right bit (bit 8) (Zakaria et al., 2018). In the secret bit extraction process in the stego image, follow the following rules: If LB,1 = 1 and RB,1 = 0, then SIL,1 is SM1, and the last 2 bits in the next pixel are SM2. If LB,1 = 0 and RB,1 = 1 then SIR,1 is SM2 and the last 2 bits in the next pixel are SM1. If LB,1 = 1 and RB,1 = 1 then SIL,1 is SM1 and SIR,1 is SM2. If LB,1 = 0 and RB,1 = 0 then there is no secret message at this pixel. For example, as shown in Figure 4, the bit value in the first pixel of the stego image is (010101101). LB,1 = 0 and RB,1 = 1 then the bit value in SIR,1 = 01 is as SM2. Then the 2-LSB of the next pixel is SM1. For the 3rd pixel stego image, SIL,3 = 0 and SIR,3 = 0, which means that there is no secret bit in this block. The same process is repeated for the stego image to get the entire secret message.

EXPERIMENT AND ANALYSIS
The proposed system is described in this section. We have implemented using Intel(R) Core(TM) i5-7200u 2.50 GHz CPU 2 cores and 4 threads with 8 GB RAM. Experiments were conducted at the D4 Politeknik Elektronika Negeri Surabaya building. The wifi module used is a standard TL-WN722N wireless adapter with a frequency of 2.4 GHz. There are two scenarios used, namely the static scenario and the dynamic scenario shown in Figure 5. Alice is on the 1st floor in this scenario, while Bob and Eve are on the 2nd floor with the initial distance between Bob and Eve 1 meter. In static conditions, the three entities do not move, while in dynamic conditions, Bob moves in the hallway as far as 4 meters. The image used for this paper uses a standard test image (The Standard Test Image Frequent Use in Literature, n.d.) with a grayscale base colour as the cover-image, i.e., cameraman, Lena, jetplane, and living room, shown in Figure 6.

Channel Probing Result
The results of the measurement of signal strength used in this research are 1400 RSS for static conditions and dynamic conditions shown in the Table 1. The signal strength obtained is in the range of -28 to -83 for static conditions, while in dynamic conditions, it is in the range of -25 to -80. 100 RSS data displayed in the graphical form shown in Figure 7. It can be observed that in dynamic conditions, the shape of the graph fluctuates when compared to static conditions due to moving Bob's measurement.  (Sumadi et al., 2020). The percentage of key inequalities generated between the two users (Alice and Bob) is known as the KDR. The number of mismatched bits between the two devices is denoted by Mbits, and the total number of RSS obtained is denoted by Rbits. The KDR formula shown in Equation (3). KGR is a calculation of the number of bits generated in seconds. The number of RSS sent and received between 2 users is denoted by Rbits, and the computation processing time is denoted by T. The KGR formula shown in Equation (4).

= x 100
(3) = (4) In static conditions, the KDR value is 20.07%, while in dynamic conditions, the KDR value is 17.86%. In static conditions, the KGR value was obtained 12.73, while in dynamic conditions, the KGR value was 10.45. The number of keys generated in static and dynamic conditions is four keys, with a length of each key is 256 bits. As shown in Table 2.
The total keys obtained were then performed a randomness test using the NIST test. The standard of randomness that must be passed is 0.01 tested with the seven parameters shown in the Table 3. The key with the highest approximate entropy is selected and used as a steganography key. The results of the NIST test are shown in Table 3. The key used in static conditions is Key 2, with an approximate entropy value of 0.96. The key used in dynamic conditions is Key 3, with an approximate entropy value of 0.79.

Performance Steganography
In this section, steganography performance is calculated using Mean Square Error (MSE), Root Mean Square Error (RMSE), Peak Signal to Noise Ratio (PSNR), and computation time. PSNR is used to assess how good is the visual distortion or the quality value of the cover-image that has been inserted with secret data. The PSNR formula shown in Equation (5). The higher the resulting PSNR value, the lower the image distortion level. Conversely, if the lower PSNR value is generated, the cover-image and stego image will have large distortion.
= √ MSE is the difference in average size squared from the pixel intensity of cover-image and stego image. The MSE formula shown in Equation (6), where p'i dan p is the pixel value in the coverimage and the stego image, respectively. W is the width of the grayscale image and h is the height of the grayscale image. The image quality improves as the MSE value decreases, while a high MSE value causes image distortion. The MSE value is inversely proportional to the PSNR value, meaning that the higher the PSNR value, the lower the MSE value. RMSE is the square root of the mean of all the errors squared, RMSE formula shown in Equation (7). In Table 4. shows the MSE and RMSE obtained on cover-image and stego image. As a result, a higher PSNR is regarded as desirable or indicative of low image distortion. In Figure 8 shows the PSNR results from images of Cameraman, Lena, Jetplane, and Livingroom by inserting 2,097,152 bits of messages or 262,144 characters. From the experiments conducted on four different images, it was obtained an average PSNR with a value of 43.07 dB.  Table 5. In the embedding process, the greater the size of the inserted message, the longer the computation time. In the key generation process, an average time of 110.52 seconds was obtained to generate keys. In the embedding process, the average computation time for 65,536 characters is 6.38 seconds, for 131,072 characters, it is 21.32 seconds, for 196,608 characters, it is 40.29 seconds, and for 262,144 characters, it is 58.70 seconds to produce a stego image. In the extraction process, an average computation time of 0.63 seconds is obtained to get secret message. By using a 512x512 image in grayscale, it can insert messages up to 2,097,152 bits.

CONCLUSION
In this research, we propose a key generation technique in the steganography process by utilising RSS in wireless communication.
The key generation uses 1400 RSS data obtained on the probing channel so that it is able to generate four keys. From the four keys, the best one is obtained with an approximate entropy value of 0.96 for static conditions and 0.79 for dynamic conditions. In the key generation process, an average time of 110.52 seconds was obtained to generate keys. In the embedding process, the average computation time for 65,536 characters is 6.38 seconds to produce a stego image. In the extraction process, an average computation time of 0.63 seconds is obtained to get a secret message. By using a 512x512 image size, it can insert messages up to 2,097,152 bits. For future research, we plan to implement the system into IoT devices with the aim of securing the sensor data that is sent.