A Proposed Algorithm for Encrypted Data Hiding in Video Stream Based on Frame Random Distribution

The science of information security has become a concern of many researchers, whose efforts are trying to come up with solutions and technologies that ensure the transfer of information in a more secure manner through the network, especially the Internet, without any penetration of that information, given the risk of digital data being sent between the two parties through an insecure channel. This paper includes two data protection techniques. The first technique is cryptography by using Menezes Vanstone elliptic curve ciphering system, which depends on public key technologies. Then, the encoded data is randomly included in the frame, depending on the seed used. The experimental results, using a PSNR within average of 65 and MSE within average of 85, indicate that the proposed method has proven successful in its ability to efficiently embedding data.


Introduction
Since the year 2000, data and information began to increase due to the emergence of many applications and multimedia that represent different sources such as social media, webcams and videos. Therefore, it is necessary to provide security for that data in an integrated manner, and this is considered one of the difficult problems [1]. In addition, since the process of transferring data became
Iraqi Journal of Science, 2021, Vol. 62, No. 9, pp: 3243-3254 3246 easy and fast using the Internet in addition to the widespread use of social media technologies and means, many problems related to data emerged, especially with regard to the security threat, such as stealing confidential data, modifying and deleting it, and many other problems [2]. Therefore, the topic of data confidentiality has taken a wide area in the work of researchers, because it is the main factor that needs attention during the process of data transmission, in addition to the huge increase in the rate of data transmission of various types. Unfortunately, many of the algorithms that are used to maintain security suffer from significant vulnerability in many aspects, including security, limited capacity, lack of clarity, and the ability against a large number of attacks [3]. Secret information should be well secured in order to transfer it; therefore, information security became very important factor to complete the transfer successfully without hacking it. There are many techniques used for this purpose such as Cryptography, Information hiding (Steganography and digital watermarking) to improve the security features in information transfers over the internet [2,3]. Cryptography is the analysis of mathematical methods to conceal knowledge. The main objective of cryptography is to assist two participants, or more, who use a relatively an unreliable channel so that what is being told could not be known and/or exploited by an attacker. This channel might be a line telephone, computer system, or wireless gateway. Based on the existence of the keys utilized, cryptographic methods could be split into two major groups: asymmetric and symmetric methods [3,4]. Steganography is a method of embedding secret details in such a manner that no one recognizes the presence of the letter in the cover file other than the sender and planned receiver [5]. It aims to hide secret information into a digital cover file (image, audio, video, etc.) without being dubious. The most common means of hiding data are images. They can be treated as a binary matrix with positive and true values in which data can be included and easy to retrieve from them. Color images are usually relied upon because they are a mixture of several colors. The hiding process does not affect them much. Therefore, we use in this research a video that consists of a group of images that can cover more data than a single image [6]. The most common way to encrypt data is the public key, which allows two parties to encrypt with public keys and decrypt with private key of each party without being identified by others. Elliptic curves are one of the types of public key-dependent encryption. It was first applied in 1985. In Elliptic-curve cryptography (ECC), 160-bit keys are provided, which reduces the computational cost of the coding process, especially if the data is very long, and also reduces processing time. This paper deals with encoding data using ECC as a new method for generating public and private keys, as each sender is allowed to produce his/her own private key without sharing it through internet channels that do not have security [7]. The research includes several parts. The first part deals with previous works within the field of our research. As for the second part, it describes the topics covered by the research and the proposed method, followed by the results and discussion.

Related works
This section reviews in brief some of the previously proposed methods related video Steganography.
Aagarsana et al. [8] provided a combined method between hiding and encryption at the same time. They encoded the audio signal using AES algorithm and then it was hidden in color image using circular LSB algorithm.
Singh et al. [9] proposed a robust video steganography based on frequency domain. The embedding position is the redundant coefficient. The authors applied DWT on the video file. Then, using LSB process, the hidden data was embedded in the lowest plane. In this approach, to increase the robustness of the design, redundancy is used. In addition, the key used to improve the embedding and extraction operations is also used to increase the layer of the security.
Saurabh et al. [10] introduced a method for hiding the image within the video using the LSB algorithm, for each pixel in the video frames includes in the odd frames. They used this technique as a safe hiding method because it is difficult to analyze multiple frames for a video, especially as the video size increases.
Kelash et al. [11] provided a method for hiding the image within the video. They divided each pixel inside the frames into two parts. The number of bits which will be embedded in the right part are counted in the left part of the pixel. It involves hiding a large amount of data where the hiding was random.

Methodology
The proposed method includes two parts, which are encrypting confidential data to increase its security and hiding the data after encrypting it inside a video.

Menezes-Vanstone Elliptic Curve Cryptosystem (MVECC)
MVECC system introduced by Menezes and Vanstone in 1993. Actually it has no analogue for ECDLP, this means that it does not depend on discrete logarithm problem like ElGamal cryptosystems. Therefore, sender does not need to embed the plaintext on the EC but only mask it. In MVECC no needs for mapping but only replacing each character with an ordered pair that is not required to be a point on an EC and this makes MVECC more efficient than ElGamal technique [14,15].
where this type of encryption algorithm does not depend on the difficulty of solving the ECDLP. According to our encoding method, first the data is divided into blocks containing only two numbers, these two numbers allow us to express the message as a point. Thus, it is not necessary to send the knowledge of each character's point to the recipient [16].

.3 Embedding Secret Data Encrypted
After the data sent is encrypted using the above algorithm, it is included within the video frames non-sequentially depending on the seed and according to the following algorithm: Step One: Read video and Encryption data.
Step Two: Convert the encrypted data to binary with bit test.
Step Three: Calculate the total number of bits of the message resulting from the previous step.
Step Four: Calculate the number frames in video.
Step Five: The third step compared with the fourth step. If the third step is more, then not hidden.
Step Six: If the fourth step is more, the (image, or audio) will be hidden inside the video.
Step Seven: If the seed (According to the agreement between the sender and the recipient, it can be a date, name, symbols and random numbers. Here the date of transmission was used day, month and year) value is odd, it will be hidden in odd pixel, not even, and vice versa.
Step Eight: If the seed values are within the sequence of frames, we will include them in that frame, and if they are not within the sequence, we will make a mode for the value, Hide is done on odd sites only and from bottom to top.
Step Nine: Performance of the PSNR and MSE and UACI measure between the original and the original frame after hidden.

End •
Extracting Secret Data Process The steps below include a mechanism to extract the encrypted data from the hiding video: Step 1: Choosing the hidden video.
Step 2: divide the video into many frames.
Step 3: Choosing the hidden frame with same embedding way.
Step 4: Extracting the encrypted data from the selected hidden frame. The Figures-2 and 3 illustrate the work of the proposed method. The Figure-2 shows the process of hiding the encrypted image within the video, as well as the Figure-

Performance evaluation
Through the performance measures, we notice the amount of change in the hand of the original video and the video after hiding, so here we use two measures:

Mean Square Error (MSE):
The average of the squares of the "errors" measured by the mean squared error of an estimator i.e. the difference between the estimator and what estimated. The contrast happens due to randomness or because of the estimator does not calculate information that could result in a better accurate estimate. The PSNR differ inversely with the MSE. The MSE can be found from the following [17,18]:

Peak signal to noise ratio:
The ratio between the power of corrupting noise and the most possible power of a signal that influences the sincerity of its representation is PSNR [19]: 3. Unified average changing intensity ( ) It is one of the measures used to measure the strength of a coding. It is based on a comparison between the encrypted data and the original data. The lower the value of this scale, the stronger the encryption and the image deterioration, the more it cannot be easily recovered [20].
∑ ∑ ( ( ) ( )) ⁄ Where represents origin image and represent encrypted image, n and m rows, columns of image.

Result and Discussion
This part includes several axes, embedding the encryption and concealment mechanism and their results. In addition, metrics are used to measure the efficiency of the proposed method. In this paper, we used two types of data, image and audio, as the transmitted data are varied. The Figures-6 and 7 below illustrate the encryption process for image and sound using the proposed algorithm:

Video1
Video2 Figure 8-Video frames to hide the data.
1. To illustrate the embedding process, which consists of an image with a size of 200 * 220 and videos of different frame size, as shown in the table, the image is first encoded using the MVECC algorithm. 2. A random seed is chosen (words, letters, numbers, symbols, anything else) agreed upon by the sender and the receiver, which is the basis for choosing the inclusion frames.
3. The seed is converted into numbers, and then every number in the seed is tested if it represents one of the frames, then it is hidden in that frame with a sequence similar to the seed number, and if it is not the same, then a mode of the value is made to be within the number of frames. 4. Not all pixels of the frame are included, but rather only at the odd locations of each pixel, starting from the bottom up, so that it is difficult to identify which pixels contain the data. 5. After that, efficiency measures are applied between the frame in which it was included and the original frame to see the extent of the difference between them. The above table shows the results of the embedding in the video. Note the overall average for the MSR is between 70 and 100, while the PSNR scale ranges between 60 for all the frames that were included in it. The PSNR value is calculated for each frame separately, then the values are combined and divided by the number of frames that have been hidden in order to have one result for these measures.

Conclusion
In this paper, a method proposed that uses encryption and steganography techniques to provide greater protection for data sent over insecure channels. The encryption method based on MVECC gave good results, Through the results of the UACI scale computes the number of averaged changed intensity between ciphertext images, which was used to measure the strength of a encryption, where results were below 50, which increased the strength of the encryption, as unauthorized people could not know the key without knowing the random seeds that generated using this algorithm. The embedding of even and single-layer frames also makes the video look natural and uninterrupted. The experimental results of this method showed that the inclusion was of high quality and the metric values were close to the ideal value. This indicates that this method fulfills the lack of feeling of the inclusion in the video.