A novel Cosine-Cosine chaotic map-based video encryption scheme

The surge in online activities has led to the increasing popularity of sharing video data across diverse applications, including online education tutorials, social networking, video calling, and OTT platforms. Encryption prevents unauthorized access to the transmitted data over unreliable channels. The well-known features of chaos theory such as random behaviour, unpredictability, and initial parameters dependency facilitate its use in cryptography. Many security issues are faced by chaos-based cryptosystems because of their less complexity. Hence, a new Cosine-Cosine chaotic map characterized by intricate chaotic behaviour is designed in the current study. Additionally, we formulate an original video encryption scheme employing this Cosine-Cosine chaotic map. The encryption process involves five steps, beginning with the segmentation of the original video into frames based on its frame rate. In the second phase, a 384 bits pseudorandom key is generated that is further divided into three subkeys of 128 bits each. The novel Cosine-Cosine chaotic map-based sequence is generated. In the fourth step, red, green, and blue components are encrypted using the pseudorandom key and the chaotic sequence. In the last step, we combine encrypted frames to get cipher video. The security analysis validates that the proposed encryption protects against eavesdropping.


Introduction
With the swift advancements in communication technology, an enormous volume of image and video data is now exchanged through a multitude of applications, including webinars, video conferencing, meetings, online classes, and social media platforms, all facilitated over the Internet.Information security and privacy are the primary concern to avoid unauthorized access to the shared data on these platforms.There are many techniques available to protect the data from the invaders such as watermarking [1], steganography [2], and cryptography [3][4][5].Encryption is considered as finest method to protect video in cryptography.It transfers the video data in an unrecognizable format and protects it from eavesdropping.
The inherent presence of substantial correlation and redundancy among pixels in both video and image data render traditional encryption methods unsuitable for securing such content.Classical techniques not only demand more time but also exhibit slower processing speeds.Consequently, researchers have increasingly turned to chaotic theory [6][7][8][9] as an alternative for video encryption.Chaotic maps, known for producing diverse effects even with minute alterations in initial conditions, have become a focal point in encryption strategies.Primarily, chaos-based encryption approaches involve permutation and diffusion techniques.Permutation means scrambling the data.However, diffusion is the substitution of data [10][11][12].
Chaotic maps are categorized into two types, i.e., single and multi-dimensions [13][14][15][16].A logistic map is a single dimension's chaotic function.Logistic map [17][18][19] is the most common and simplest among all the chaotic maps.The mathematical equation of logistic map is as follows: Here, µ represents the control parameter, and its values lie between 0 and 4. Sine map [20,21] is a one-dimensional chaotic map that contains only one control parameter and generates using the sine function.Mathematically, the sine map can be represented by Eq. ( 2).
where u is the control value of the chaos map and its value is lies between 0 and 1.
Some existing one-dimensional chaotic maps have less complexity, a low level of unpredictability, and a narrow and discontinuous chaotic range with a stable window.Due to these reasons, such maps are not suitable to build strong cryptosystems.Therefore, in this current investigation, a new one-dimensional Cosine-Cosine chaotic map is defined.The map demonstrates high complexity in its chaotic behaviour and offers enhanced unpredictability over a broader and continuous chaotic range, thereby eliminating the stable window problem.Additionally, we employ the Cosine-Cosine chaotic map to formulate a video encryption strategy.The resultant video encryption scheme ensures both security and resilience against diverse types of attacks.

Related work
A number of chaotic maps have been created by researchers [22][23][24][25][26]. Kumar and Dua [27] used two different chaotic maps to encrypt audio using DNA encoding and dynamic diffusion.Erkan et al. [28] used the Schaffer function to introduce a two-dimensional hyperchaotic system.The map was used to design an image encryption scheme.Mansoor and Parah [29] used logistic map and tent to introduce a hybrid adaptive image encryption scheme.The author also integrates DNA computing into the scheme.The experiments validate the security provided by the approach.
Various video and image encryption algorithms based on chaotic maps has been developed in recent years [30][31][32][33][34][35][36].Maolood et al. [37] proposed encryption algorithm using two chaotic maps for video encryption.The ChaCha20 algorithm has been used in the encryption process.An extensive security analysis has been done by the author (1) to validate the performance of the encryption strategy.Tabash and Izhrauddin [38] used the logistic map to encrypt real-time video stream.
Xu et al. [39] introduced an encryption strategy to encrypt H.264 compressed video stream.The encrypt scheme completely disordered the video data and transformed that into an unrecognizable form.Dua et al. [7] proposed a video encryption method using cosine transformed intertwining logistic map.The input video was divided into several frames in the first stage based on the video's duration and frames per second (FPS) value.To provide extra randomness during the encryption process, each frame was rotated 90° counterclockwise.In the last, frames were jumbled using a key.
Chiaraluce et al. [40] designed a novel video encryption strategy.XOR operation was used to encrypt the video data.Qin et al. [41] suggested a multimedia information end-to-end encryption approach that introduced several security mechanisms, such as selective encryption and selective integrity protection.This technique includes major activities such startup authentication and key distribution.
Hafsa et al. [42] developed the diffusion and confusion-based video encryption approach.The Henon chaotic map is used to provide randomness.The chaotic map initial conditions were created using the SHA-3 hash algorithm.
Motivated by these works, we propose a new Cosine-Cosine chaotic map.We further apply the Cosine-Cosine chaotic map to introduce a video encryption scheme.The encryption method mainly takes five steps to produce cipher.The video is converted into frames in the first phase based on the frame rate of the video.We generate a pseudorandom key of 384 bits in the second step.The pseudorandom key is further divided into three sub-keys of 128 bits each.The third phase generates a chaotic sequence.The fourth stage involves dispersing the pixel values in every colour channel of the frame using both the pseudorandom key and the chaotic sequence.In the end, all encrypted frames are merged to form cipher video.The scheme's security is validated using several matrices.
The primary contributions and innovations of this study are as follows: 1.The work designed a new Cosine-Cosine chaotic map, demonstrating complex and unpredictable behaviour.Its chaotic characteristics have been validated through various metrics.The obtained results have been subsequently compared with those of established chaotic maps.2. The created Cosine-Cosine chaotic map has been employed to formulate an innovative video encryption scheme.This strategy utilizes the chaotic values generated by the Cosine-Cosine chaotic map, in conjunction with a 128-bit pseudorandom key, to encrypt every colour component of the frame.

A novel diffusion procedure based on pseudorandom key, value generated using
Cosine-Cosine chaotic map, XOR, and modulus operators has been introduced.4. The proposed video encryption scheme's security has been assessed through diverse parameters, encompassing NPCR (number of pixel change rate), entropy, MSE (mean square error), correlation coefficient, PSNR (peak signal-to-noise ratio), and its resilience against differential and histogram attacks.
The paper is structured into distinct sections as outlined below: the "Cosine-Cosine chaotic map" section delves into the novel Cosine-Cosine chaotic map.The "Proposed encryption scheme" section introduces the proposed encryption technique, while the "Results" section details the experimental setup and evaluates the results.Lastly, the "Discussion" section concludes the study.

Cosine-Cosine chaotic map
A newly introduced chaotic map, termed the Cosine-Cosine map, exhibits remarkably chaotic behaviour.The definition of the proposed Cosine-Cosine map is provided in Eq. ( 4).
where rǫ [3,7] and x n , r represent the initial state and control parameter respectively.

Performance evaluation of Cosine-Cosine map
The Cosine-Cosine chaotic map exhibits good chaotic properties.These properties are analysed by various metrics.

Bifurcation diagram
In an effective chaotic map, these values should exhibit a uniform distribution across the entire range, with no gaps or stable windows in between [43]. Figure 1 displays the bifurcation diagram for several existing maps and the newly proposed Cosine-Cosine chaotic map.Notably, the proposed Cosine-Cosine chaotic map showcases a uniform and continuous bifurcation diagram within the range of 3 to 7.

Lyapunov exponent
The calculations of the maximal Lyapunov exponent give the best indications of predictability.The Lyapunov exponent of a chaotic map should be positive.The Lyapunov exponent of some existing maps and the proposed Cosine-Cosine map is given in Fig. 2. Figure 2d provides positive Lyapunov exponent of Cosine-Cosine chaotic map.

Encryption
The proposed method for encrypting videos involves a series of steps employing the novel Cosine-Cosine chaotic map.The process is outlined below: 1. Divide the original video into frames and determine the number of frames n using the formula n = FPS × video length in seconds, where FPS represents frames per second.2. Generate a 128-bit pseudorandom key. 3. Create a chaotic sequence using the Cosine-Cosine chaotic map specified in Eq. ( 4). 4. Apply operations on the pseudorandom key and the generated chaotic sequence to change frame pixels.5. Unite all the cipher frames to construct the encrypted video. (4) Function 1 represents the pseudocode to encrypt each frame.Function 1 is called in a loop to encrypt the complete video.The following subsections explain the encryption steps in detail.

Pseudorandom key generation
A pseudorandom key of 384 bit is divided into three sub-keys {key1, key2, key3} of 128 bit each to encrypt the three-colour channels (red, green, and blue) of the plain frame.Figure 4 depicts the same.
The 128-bit key and initial value X are used to generate a pseudorandom key using the following equation for each colour component.
Here, the result of the logical OR operation is true if either or both of the input conditions are true and d = count of the number of one's in the following equation: The symbol ⊕ typically represents the bitwise XOR (exclusive OR) operation.Here, the bitwise XOR compares corresponding bits of Key and X and produces a result of 1 for each bit where the operands differ.If the corresponding bits are the same, the result is 0.

Chaotic sequence generation
The novel Cosine-Cosine chaotic map Eq. ( 4) has been used in the encryption process.The randomness and unpredictable nature of a chaotic map generates secure

Diffusion using pseudorandom key and chaotic sequence
We use a 128-bit pseudorandom key, the generated chaotic sequence, XOR, and modulus (% or mod) operator to diffuse the pixels of each colour component in a frame.The following equation is used to modify the pixels of the video frame. where

Results
The experimental setup and performance evaluation of the introduced method are described in this section.

Experimental
To assess the effectiveness of our proposed approach, we utilized four video streams: Rhino.mp4, Train.mp4,Flamingo.mp4,and VipTrain.mp4[44].The implementation of our video encryption method was carried on a Windows 10 system equipped with an Intel Core i5 2370-M processor, 8 GB of RAM, and a 1-TB hard disk.

Security analysis
Various security parameters such as NPCR (number of pixel change rate), entropy, MSE (mean square error), correlation coefficient, PSNR (peak signal-to-noise ratio), and resistant against differential and histogram attacks are analysed in this section.

Entropy
Entropy serves as a metric for assessing the degree of randomness within an image.An entropy value of 8 signifies the utmost level of randomness [5].The entropy of an encrypted frame is represented mathematically by Eq. ( 8): In the provided equation, p i j represents the probability of the occurrence of a symbol i j .Here, G = 2 k , and k = 8 for a grayscale image or a frame.The entropy val- ues of our test videos are documented in Table 1.Additionally, the entropy values for various frames of the rhino video are detailed in Table 2.The values validate the randomness property inherent in our proposed encryption scheme.

Correlation coefficient
The correlation coefficient (CC) gives the relation between two pixels within a video frame, ranging from −1 to 1, where 0 is considered optimal [45,46].The CC can be computed using Eq. ( 9).
where, ( 8) In this context, the CC between adjacent pixels i, j,M is contingent on the number of selected pixels.The CC values for the first video frame of the sample videos are detailed in Table 1.Specifically, for the VipTrain video frame, the CC in the diagonal direction is recorded as −0.0007, indicating a low correlation between pixels.Furthermore, Table 2 presents the CC values for various frames of the Rhino video.

PSNR
Peak signal-to-noise ratio (PSNR) computes the change in the quality of a video frame after encryption.To evaluate PSNR, we refer to the original frame as the signal and errors as noise produced due to encryption.For a good quality-decrypted video frame, the value of PSNR should be high.(12) Table 1 Security analysis of the first frame of video where MAX I represents the maximum value a pixel can have in a video frame or an image.MSE stands for mean square error.For an 8-bit representation of pixels in a frame, the value of MAX I is 255.The PSNR value for the first frame of our sample videos is outlined in Table 1.Additionally, Table 2 provides the PSNR values for various frames of Rhino.mp4.

Differential attack
The resistance against differential attack can be analysed by using metrics NPCR and UACI, which stands for unified averaged change intensity, which are metrics designed to quantify the alterations that take place in a pixel when a single pixel is modified [47,48].It mainly emphasizes the pixels that change after an attack.Equations ( 14)-( 16) give the mathematical formula to evaluate NPCR.The NPCR should be nearly equal to 100 for a good encryption algorithm.
( UACI, on the other hand, computes the average intensity of the changes that occur between two cipher images or video frame (UACI) [49,50], and the formula for the same is as follows: where E(m, n) represents the pixel value located in the m th row and n th column of E and where E1 and E2 denote the encrypted images.The UACI and NPCR values for vari- ous frames of Rhino.mp4 are documented in Table 2.The UACI and NPCR for the first frame of our test video samples are listed in Table 1, indicating a significant alteration in pixel values within the encrypted frame.In the Flamingo video frame, the UACI is 0.501, signifying a minimal difference between neighbouring pixels.

Histogram analysis of rhino video
A uniform histogram pattern indicates a robust encryption method that poses a significant challenge to decryption attempts [51][52][53][54].The analysis in Table 3 illustrates the histograms of five randomly selected frames from the Rhino video.Notably, all the encrypted frames demonstrate a uniform distribution, indicating the efficacy of the proposed approach in handling statistical attacks.

Keyspace analysis
An unauthorized party systematically tests all conceivable combinations of the secret key in an effort to gain access to confidential information.In the proposed scheme, each frame is encrypted using a 384-bit pseudorandom key.As a result, an attacker would be required to explore 2 384 combinations to breach a single encrypted video frame.If the video consists of n frames, the attacker would need to test n × 2 384 combinations to compromise the entire video.

Comparison analysis with different schemes
An encryption method is considered as good if it encrypts the data without any security risk.The size of the frames is a key aspect in determining how time-consuming the suggested strategy is.In comparison to smaller pictures, images with larger dimensions require longer encryption and decryption time.We have compared the results obtained on Rhino.mp4 with the other existing method in Table 4.The value of parameters obtained by our method is more favourable than the other approaches.Moreover, the Cosine-Cosine chaotic map designed in our work has wider chaotic range and more intricate and random features with no stable window problem.The robustness of any (14) encryption scheme depends on the intricate nature of the chaotic map.Consequently, we assert that our encryption scheme offers substantial safeguard against various attacks, surpassing the effectiveness of other existing methods.

Discussion
The research introduces a newly devised chaotic map termed the Cosine-Cosine chaotic map.The chaotic nature of this map has been substantiated through both the bifurcation diagram and the Lyapunov exponent.The bifurcation analysis of the proposed map reveals a more extensive and uniformly distributed range [3,7] as compared to other chaotic maps.The consistently positive Lyapunov exponent across the range [3,7] affirms the randomness and intricate behaviour characteristic of the chaotic map.The study further explores the utilization of this novel map in formulating a video encryption  1) are 99.63625 and 50, respectively, demonstrating the scheme's resistance to differential attacks.A comparative assessment with other existing methods (as detailed in Table 4) substantiates that our proposed scheme surpasses the performance of alternative methods.

Conclusion
In this study, we introduced a new chaotic map named the Cosine-Cosine chaotic map.Using this map, we presented a video encryption scheme.The scheme involves the generation of a unique pseudorandom key and chaotic sequence using the Cosine-Cosine map to encrypt video frames.The resulting chaotic sequence and pseudorandom key alters the pixel values.The analysis of results demonstrates that the proposed video encryption technique is resilient against diverse attacks.

Figure 3
Figure 3 depicts the proposed encryption algorithm.The novel Cosine-Cosine chaotic map and a pseudorandom key are responsible to change original frame into cipher frame.The decryption process follows the reverse order of these steps to retrieve the original video.

Fig. 2
Fig. 2 Lyapunov exponent.a Logistic map.b Tent map.c Sine map.d Proposed Cosine-Cosine map

Figure 5 36 Fig. 5
Figure 5 illustrates the decryption mechanism.The subsequent steps are used to decrypt the video. 1 The encrypted video is converted into encrypted frames. 2 Randomly generate a 128-bit key for each colour component of the frame.3 Iterate the Cosine-Cosine chaotic map to produce a chaotic sequence employed during encryption.4 Reverse the diffusion process by applying the same pseudorandom key and chaotic sequence to regenerate the original frame.5 Finally, concatenate all decrypted frames to reconstruct the original video

Table 2
Encryption analysis of rhino videowhere U (m, n) is defined as follows:

Table 3
Histogram analysis of rhino videostrategy.The calculated average entropy value, representing the randomness in the pixels of the video frame, is 7.99683.This entropy value approximates the ideal value of 8, indicating a high degree of randomness.The value of CC is reduced to −0.0007 in the cipher frame that secures it from statistical attacks.The calculated average PSNR value (as shown in Table1) is 38.00642, suggesting that the encryption scheme introduces randomness, rendering the content indistinguishable from noise.The average NPCR and UACI values (also in Table

Table 4
Comparison with the existing approaches a The "-" values in the table indicate that the respective data is unavailable