Message Security Using Rivest-Shamir-Adleman Cryptography and Least Significant Bit Steganography with Video Platform

,


A. Cryptography
Cryptography is a method of encoding messages so that messages from the sender cannot be read by other parties except the receiver (receiver) safely. There are two ways to execute it, namely, Encryption and Decryption, as seen in figure 2. Encryption or enciphering is a method of encoding plaintext into ciphertext. At the same time, Decryption is the opposite of Encryption. Decryption or deciphering is a method that functions to convert ciphertext into plaintext. Cryptography, apart from maintaining the confidentiality of messages, is also used to solve security problems, which include the following two things: 1) User Authentication This point has to do with the authenticity of the sender. This problem can be expressed as a question: "Is it true that the message received is really from the original sender?" 2) Message Authentication This point has to do with the integrity of the message (data integrity). This problem can be expressed as a question: "Is the message received is not subject to modification?" 3) Nonrepudiation The sender cannot escape if he is the one who sent the message [3]. Symmetric cryptography is often called classical cryptography because the method of encryption and description uses the same key. Figure 3 shows how symmetric cryptography works. Asymmetric cryptography is often referred to as public-key cryptography. The keys used for Encryption and Decryption are different. In cryptography, the key asymmetry is divided into 2 (two) parts: 1) A public key is a key that can and can be known by everyone.
2) A private key is a key that only the recipient can know and is confidential [4]. Figure 4 shows that the public key is used to encrypt, and the private key is used to the decryption process. Rivest Shamir Adleman, commonly abbreviated as RSA, is a modern cryptographic method created by three researchers from the Massachusetts Institute of Technology (MIT) in 1976. RSA is said to be difficult to solve due to factoring large numbers into its prime factors. Regarding factoring: Factor n, where n is the product of two or more prime numbers. There are several properties used in the RSA algorithm [3]. The following properties in Algorithm 1 will be used: Algorithm 1 : Rivest-Shamir-Adleman (RSA) 1) p and q are the prime numbers. p and q must not be p = q because the value of n = p 2 .

C. Steganography
Steganography is a security method that functions as the insertion of secret messages into a medium (text, images, sound, or video) so that the message cannot be identified by humans normally. Steganography requires two ingredients for its implementation. Namely, the container media and data that will be hidden [3]. Figure 5 is an example of a cover image that is used to hide data. Figure 6 is the result after the secret information is inserted into Figure 5. At a glance, there is no difference between figure 5 and figure 5. It means the cover image can hide the secret information properly. Steganography recognizes several essential terms in its operation. The following terms will be used: array, there is a byte (1 byte = 8 bits). There are two types of bit classification, namely, the most significant bit (MSB) and the least significant bit (LSB) [3]. Figure 7 shows the differences between LSB and MSB. MSB is located at the first bit of sequence bit. Meanwhile, LSB is located at the end of the sequence bit.

E. Digital Video
Video is a live image produced by recording people and objects using a camera's help and has a second-dimensional function formed from recording in a place. Generally, videos are divided into two types, namely: 1) Analog is a video captured (recording) of the camera lens to an object vertically and horizontally.
2) Digital is a video that represents a matrix in which each element represents an absolute intensity value. Digital video is created from a series of frames. A series of frames is played on the screen at a specific rate, according to the specified frame rate (in frames per second / FPS). When the FPS is high enough, the human eye cannot capture the image or frame in isolation but rather capture it as a continuous series of frames (video) [6].

F. Python
Guido Van Rossum developed the Python programming language from CWI, Amsterdam in 1990, to continue developing the ABC programming language. CWI released its final version in version 1.2. In 1995, Guido moved to CNRI while developing Python. The latest version released at that time was 1.6. In 2000, Guido and the core Python developers moved again to a commercial company called BeOpen.com and formed Be Open Python Labs. The company released its new version in 2.0. When the version was removed, Guido and several Python Labs members moved to Digital Creations. Python Software Foundation is a non-profit organization established for holders of Python intellectual property since version 2.1 so that other chemical companies do not own it. For now, the python distribution is stable version 3.9. [7].

G. Mean Square Error (MSE)
MSE is a widely accepted method of control and quality measurement. This MSE can be calculated utilizing an example object and then compared with the original object. The level of inequality between the sample object and the original can be seen. The MSE can be obtained by equation (1).
(1) Where M, N are the dimensions of the image. I (x, y) is the pixel value of the original image. Meanwhile, I '(x, y) is the pixel value of the stego image [8].

H. Peak Signal Noise Ratio (PSNR)
PSNR is the maximum value between the measured signal and the amount of noise that affects the signal. The unit of measure for the PSNR is decibels (dB). The function of the PSNR is to compare the quality of the cover image and the stego image [9]. Calculate PSNR using equation 2.

I. Histogram
The histogram is a graph depicting the distribution of pixel intensity usage. The histogram also shows that the image can be said to be dark or light. The meaning of dark here is the number of graphs that stand out on the left, while the light is the number of graphs on the right. This test analysis will compare the histogram cover image with the stego image [10].

J. Flowchart Applications
This system analysis describes the flow of the system work process to facilitate implementation: input, process, and output data in Figure 7 and Based on the sender side system flowchart in Figure 8, it can be explained as follows: 1. Start the program from the sender side. 2. The sender enters the message into the program. The message input is a text message. 3. The next process is the encryption process. Each character is converted using the RSA cryptographic method so that the sender gets the ciphertext results in a set of numbers. 4. The sender gets the encrypted text message. Messages appear automatically on the console terminal in the form of numbers. 5. The sender enters the desired video file name. Make sure the video has been included in a directory with the program running. 6. The process of inserting the ciphertext into the video begins using the LSB method.
The message is divided into several parts and then inserted into several video frames until the last part of the message. 7. The sender gets the result of the embedding, which becomes a stego video file in the same directory as the program. 8. Sender side processing is complete.  Based on the receiver side system flowchart in Figure 9 it can be explained as follows: 1. Start programming from the receiving end. 2. The recipient enters the name of the stego video file obtained from the sender. Make sure the files are included in the same directory as the program. 3. The next process is the process of retrieving hidden messages from each frame using the LSB method. The message obtained will be in the form of ciphertext. 4. The recipient gets the message extracted in the form of an encrypted message on the console terminal. 5. Then the ciphertext will be decrypted using the RSA method so that it gets the plaintext. The plaintext will appear in the console terminal. 6. The recipient gets a decrypted message in the form of the original message from the sender. 7. Receiving side processing is complete.

III. RESULT AND DISCUSSION
The following are the stages of a manual count simulation using the help of the Microsoft Office Excel 2019 application and an embedding simulation: 1. p = 17 dan q = 23 2. n = p * q = 391 3. ɸ(n) = (p -1)(q -1) = 352 4. 1 < e < ɸ (n). We choose e = 3. Prove it by counting GCD(e, ɸ (n) ) = 1 as seen as table I.  The MSE test was carried out on a video cover with a resolution of 640 * 360px, has a framerate of 25fps, and is about 10 seconds long. Each message is calculated in search of the MSE value. Where the smaller the MSE value, the better. The frames taken for the test sample in each video are frame 0 and frame 1. Table III explains that the average MSE value of each video. From this table, it can also be concluded that the average MSE value is 0.0355, with the lowest MSE value of 0.0066 on the video output4.mov. In Figure 10, you can see the graph of the MSE results were. The more significant the size of the message inserted, the higher the MSE value. In message four, there is a significant decrease in value, touching the value of 0.0066, and in message 3 there is an increase in the value of 0.0534. It is different from the previous MSE test, where the smaller the MSE value, is better. Meanwhile, the higher the PSNR value is better. Table IV explains that the average PSNR value for each video. From this table, it can also be concluded that the average PSNR value is 146.8078, with the highest PSNR value of 161.0298 on the video output4.mov. In Figure 11, you can see a graph of the PSNR results where the smaller the message size is inserted, the higher the PSNR value. In message three, there was a significant decrease in value, touching the value of 140.1306, and in message 4 there was an increase in the value of 161.0298. This is because the fewer messages that are inserted into the video, the fewer changes that occur in the video. In this test, the histogram method is used, which is a technique of taking the difference in the frequency of color usage between the cover image and the stego image. The results of histogram analysis can be seen in Table V and Table VI below.     Table V explains the frequency of RGB colors from each frame 0 and 1 on the video cover. At first glance, the use of color in the two frames above is similar because they are located next to each other. In comparison, the table of the results of the use of color on stego video for each type of message can be seen in Table VI.   TABLE VI  COVER VIDEO HISTOGRAM RESULT TABLE   No Stego Video Name Histogram   Table VI above explains the RGB color histogram's comparison for each sample frame on the four video message insertions. In the two histogram tables above, there is very little change in the graph's shape if you look at it in detail. In inserting the message, it is inserted into the bits of each pixel so that it changes slightly up and down. The larger the message size is inserted, the more changes the histogram graph will have [11].

IV. CONCLUSION
The implementation of message security can use the Rivest-Shamir-Adleman cryptographic method and Least Significant Bit steganography into video media. From MSE and PSNR, it was found that the video stego which had the other best quality was the output4.mov video with an MSE result of 0.0066 and a PSNR result of 161.03. Because the MSE value on the video is lower and the closest to the value of 0. In comparison, the PSNR on the video has a higher value than others. Whereas the histogram tester can be taken if the larger the message size is inserted, the more changes will be made to the histogram graph. In future studies, it is expected to use the LSB method's modification to reduce the change in the value of the bits at each pixel significantly. Trial scenarios were also carried out with different video resolutions to get better conclusions than this research.