Steganographic techniques using modified least significant bit and modification reshape transposition methods

A message is a form of conveying information. Various ways are used to secure the information conveyed in the form of messages either in encrypted form or in the form of applying a password in the message. Messages can also be encrypted and embedded in other media such as images (steganography). This research aimed to insert a message into the form of an image by combining the Modified Least Significant Bit (MLSB) method in encrypting messages and reshape modification technique to determine at which position the message encryption will be embedded in the image. Tests were carried out to obtain the quality of the encryption process using the parameters of Fidelity, mean square error


Introduction
A message is a medium of information sent to another party. Messages can be categorized into 2, general messages and secret messages. Secret messages can be distributed to individuals or can also be distributed to an institution. Secret messages are equipped with a series of encryption treatments to form a message that is not easily read by other irresponsible parties. In today's digitalization era, messages can be distributed in a computerized manner and are very vulnerable to data theft actions. Then the encryption treatment or message encoding must be applied. Many forms of message encoding can be done. Encoding a message can also use the ABE schema and combined with other schemas using the charm library to provide better encryption and decryption capabilities [1]. Apart from using the ABE schema, message encryption can also use Message-Locked Encryption (MLE) where the encryption and decryption keys utilize the message itself. Sample-Extract-Encrypt (SXE) was used to construct the MLE schema [2].
Encryption can also be built using or based on identity-based encryption (IBE) from novel primitives or also known as chameleon encryption. IBE can also be built from One-Time Signature with Encryption (OTSE). OTSE is useful in constructing keys that depend on messages, either a secure public key or a secure private key [3]. The encryption of a message has undergone many updates, one of which is using encryption based on the multi-receiver identity. But this method does not guarantee the safety of the encrypted data. In this research, an anonymous multi-receiver identitybased encryption scheme was applied by adopting a lagrange interpolating polynomial mechanism in the encryption process where the results of this research cannot display the identity of the sender [4].
In addition to encryption using MLE, IBE and OTSE, the encryption or message encryption mechanism also uses the message insertion technique on digital image media. This technique is referred to as steganography. The Modified Least Significant Bit (MLSB) method is one of the methods used for digital image steganography, which is a modification of the Least Significant Bit (LSB) method [4]- [6]. In recent studies, MLSB has been combined with another method (water marking) to hide the message inside images [7]. Another test, the MLSB method is also used in the insertion of messages on digital image media using the BMP file type as the image object [8]. This research uses the MLSB method, where 8-bit ASCII numbers will be converted into 5-bit numbers and an image is inserted using file types of bmp, jpeg, png and tiff.

C. Modified Least Significant Bit
Modified Least Significant Bit (MLSB) or modification of the LSB algorithm is used to encode an identity into the original image. MLSB uses some manipulation of the insertion bits before encoding the message [13]. The Modified Least Significant Bit (MLSB) method is a method based on the development of the existing LSB method. In this MLSB method, the numbers used are the 5-bit numbers converted from the 8-bit numbers used in the LSB method. Then the 5-bit number is inserted into the container image using the LSB method [14]. The process involves converting the image value into binary data (8 bits), then 1 bit of the message is inserted from the rightmost row of each image binary value. The insertion of LSB in a 24-bit image can be seen in Figure 2. How the Modified Least Significant Bit (MLSB) algorithm works is as follows: 1. Normalization with the control symbol table.
Control symbol data that represents message characters to group a data line, as shown in Table 1.

Control Symbol [13] Hex Representation
Operation 1Bh Define small letter 1Ch Define capital letter 1Dh Define space 1Eh Define number 1Fh Define end of text a. 61h -7Ah (Small Letter) If the message characters to be inserted represent lowercase letters, first insert the first 5 bits to 1Bh and continue inserting the results of the 8-bit to 5-bit message conversion thereafter.
b. 41h -5Ah (Capital Letter) If the message character to be inserted represents a capital letter, first insert the first 5 bits into 1Ch and continue to insert the message conversion results from 8 bits to 5 bits thereafter. c. 20h (Space) If the message character to be inserted represents a whitespace character, the whitespace is replaced by the first 5 bits to become 1Dh. d. 30h -39h (Number) If the character of the message to be inserted represents a number, first insert the first 5 bits to 1Eh and continue to insert the message conversion results from 8 bits to 5 bits thereafter. e. End of Text If the inserted message has ended, inserted 5 bits at the end becomes 1Fh.
2. The process of changing the ASCII value to 5 bits. For example, the message to be inserted is a text message "STEGO with 05 bits". a. The message "STEGO with 05 bits", if converted into ASCII binary requires a memory of 18 x 8 bits = 144 bits. b. In this algorithm the message "STEGO with 05 bits" is converted into hexadecimal values: 53h, 54h, 45h, 47h, 4Fh, 20h, 77h, 69h, 74h, 68h, 20h, 30h, 35h, 20h, 62h, 69h, 74h , and 73h. c. Normalize the message with the Control System table and XOR it with the smallest tens value in ASCII.
• Divide the group on the insert message with a white space (20h).
3. The process of returning the original message, namely by XORing back the message bytes according to the group of numbers and removing the Control Symbol value.

D. Message Inserting Process Flow
There are several important steps involved in message insertion. The first stage is a reshaping process, then conversion of text messages into 8-bit binary data followed by the process of encoding 8 message bits into 5 bits using the MLSB method until the last stage, namely message insertion using the LSB method. The flow of the message insertion process can be seen in Figure 3.

E. Reshape Image
The process of reshaping an image aims to transform a 2-dimensional image into a simpler form. Reshaping a twodimensional image can be seen in Figure 4.

F. Spiral Pattern Transposition
The use of the spiral reading method is a combination of two reading methods horizontally and vertically, and the use of the spiral reading method will produce a string of image pixels that makes it more complicated to read compared to using the horizontal or vertical reading method alone [16].
The spiral transposition technique was used to determine which part of the text message image to be inserted. The 4x4 image is divided into several levels with the number of levels depending on the dimensions of the image. Then the levels were arranged lengthwise into a 1x16 vector. The message insertion was carried out on the result of the reshape process, namely the 1xN image vector. The image reshaping process can be seen in Figure 5. After the insertion process was carried out, the re-wrapping process was run. Figure 6 shows the process of converting the dimensions from 1xN to MxN where the length and width of the original image are known.

B. Testing the Quality Aspects (Fidelity)
1. Mean Square Error (MSE) MSE is a measure used to assess how well a method performs reconstruction or restoration of an image relative to the original image [17], [18]. The smaller the MSE value shown in equation (1), the image processing results will be closer to the original image.
2. Peak Signal to Noise Ratio (PSNR) PSNR is a measure of the comparison of the maximum value of the image bit depth measured by the amount of noise that affects the signal shown in equation (2), the noise value is represented by the MSE value [19]. PNSR was used to improve image quality after inserting a message or modifying the image [20], [21] Good, There is some noise, but image quality is still good 40dB Reasonable, there are fine grains or snow-like in the image 30dB Poor picture, there is a lot of noise 20dB Unusable

C. Robustness Testing
Endurance testing was done to see how reliable the message insertion algorithm was on a digital image, in this case an image [23]. The test used 4 24-bit image samples, namely images of bmp, jpeg, png and tiff types with the same dimensions. The image of the attack test results is said to be successful if the message embedded in the resulting image is not damaged after decoding using the MLSB method.

D. Testing Against Comparison of Message Content
Testing was done by comparing the content and size of the message before and after the steganography process. This test can be said to be successful if the original message and the decoded message are exactly the same in terms of both the content and size of the message.

E. Generated Program
A steganography application was produced with the Modified Least Significant Bit (MLSB) method and the spiral pattern reshaping technique in the Python 3.7 programming language.  is a display of software designed to implement the MLSB method and the transposition reshape modification technique in a spiral pattern. The application allows the user to specify an image as a container for text messages in * .txt format and the user can specify the insertion point or point from the starting point, namely A to point D. Figure 9 will be displayed on the command-line interface with information in the form of MLSB process, read and write MLSB bits on RGB values, insert and extraction processing times and MSE and PSNR calculations.

F. Test Result
The test results on two images with different objects were successfully carried out with a PSNR value of more than 40 dB (image without noise), insertion time of 0.169 -0.173 seconds and extraction time of 0.169 -0.175 seconds. The test results on two different images can be seen in Table 4. Test results were for different file types, including bmp, jpeg, png and tiff. In the jpeg type image the test results failed. This is because the jpeg image is a lossy compression image where data is lost during the compressiondecompression process. Specific data damage is on the RGB value where 1 bit of data has been inserted. There will be a change in the LSB value during the compression process and this will affect the MLSB message in it. As a result, the original message and the extracted message are completely incompatible or the data is corrupt. The results of testing different file types can be seen in Table 5. The PSNR value obtained was above 40 dB (image without noise) and the test results on images other than the jpeg type were successfully carried out without any damage (corruption) on the message with insertion time of 0.169 -0.653 seconds and extraction time of 0.171 -0.533 seconds. The test results for different message lengths were successfully carried out without any damage (corruption) on messages with a PSNR value above 40 dB with an insertion time of 0.199 -0.251 seconds and an extraction time of 0.174 -0.688 seconds. The test results based on the message length can be seen in Table 6. The test results of brightness attack by increasing and decreasing the brightness between -5 to +25 failed. As a result, increasing or decreasing in the brightness can spoil the message inside with a PSNR value of less than 40 dB. The results of testing the image resistance to brightness can be seen in Table 7. Tests were also conducted on image resistance to sharpness attacks with a value of 2 (sharp) and 0.05 (blurry). As a result of this attack, it can destroy messages in it with a PSNR value of less than 40 dB. The results of testing image resistance to sharpness can be seen in Table 8. Testing the image resistance to rotational attacks with degrees of 90, 180 and 270 were successfully carried out without any damage (corruption) to the message with the PSNR value not reaching the target of 40 dB. The PSNR value is below 0 because the pixel value in the image does not change but only changes places due to rotation. However, the spiral reading technique makes it possible to determine the angle where the hidden message is located. Angles of degree other than 90, 180 and 270 cannot be reached and it is difficult for the system to perform and also the image dimensions are different from the dimensions of the resulting image, so MSE and PSNR calculations cannot be performed. The results of testing the image resistance to rotation can be seen in Table 9. Testing the resilience of the image to the scale by enlarging the scale on the image pixel fails with the message that the extracted results are completely incorrect or the data is corrupt and also the dimensions of the scale image are different from the dimensions of the resulting image, so the MSE and PSNR calculations cannot be done. The results of testing image resistance to resize (scale) can be seen in Table 10. Comparison of the message before insertion and the extracted message is identical, so the encryption process and message description are said to be successful. The match between the original message and the extracted message can be seen in Figure 10.