New video encryption schemes based on chaotic maps

IET Image ProcessingVolume 14, Issue 2 p. 397-406 Research ArticleFree Access New video encryption schemes based on chaotic maps Hassan Elkamchouchi, Hassan Elkamchouchi Department of Electrical Engineering, Faculty of Engineering, Alexandria University, Alexandria, EgyptSearch for more papers by this authorWessam M. Salama, Wessam M. Salama Department of Basic Sciences, Pharos University, Alexandria, EgyptSearch for more papers by this authorYasmine Abouelseoud, Corresponding Author Yasmine Abouelseoud yasmine.abouelseoud@gmail.com Department of Engineering Mathematics, Faculty of Engineering, Alexandria University, Alexandria, EgyptSearch for more papers by this author Hassan Elkamchouchi, Hassan Elkamchouchi Department of Electrical Engineering, Faculty of Engineering, Alexandria University, Alexandria, EgyptSearch for more papers by this authorWessam M. Salama, Wessam M. Salama Department of Basic Sciences, Pharos University, Alexandria, EgyptSearch for more papers by this authorYasmine Abouelseoud, Corresponding Author Yasmine Abouelseoud yasmine.abouelseoud@gmail.com Department of Engineering Mathematics, Faculty of Engineering, Alexandria University, Alexandria, EgyptSearch for more papers by this author First published: 06 January 2020 https://doi.org/10.1049/iet-ipr.2018.5250Citations: 1AboutSectionsPDF ToolsRequest permissionExport citationAdd to favoritesTrack citation ShareShare Give accessShare full text accessShare full-text accessPlease review our Terms and Conditions of Use and check box below to share full-text version of article.I have read and accept the Wiley Online Library Terms and Conditions of UseShareable LinkUse the link below to share a full-text version of this article with your friends and colleagues. Learn more.Copy URL Share a linkShare onFacebookTwitterLinkedInRedditWechat Abstract Two new encryption algorithms for secure video transmission are proposed in this paper. The two algorithms employ different types of chaotic maps to generate the keystream for encrypting the video frames. Both algorithms involve a substitution step and a permutation step to achieve confusion and diffusion requirements. For efficient transmission, the video file is compressed before being encrypted. In the basic implementation of both algorithms, MPEG-2 standard is used for compression. However, the algorithms are shown to be compliant with other compression techniques. In the permutation step, the effect of the block size used in the shuffling process is examined. Smaller blocks result in increasing the processing time, while reducing both the correlation between adjacent pixels and the peak-signal-to noise ratio of an encrypted frame. The use of a Feistel structure is investigated to enhance security and its negative impact on the encryption time is demonstrated. The experimental results of the two proposed schemes confirm that they represent different tradeoffs between security and computational efficiency. Both schemes are sensitive to slight variations in the encryption key as apparent from the obtained differential measures. The conducted comparative study shows the competitiveness of the proposed schemes to existing schemes in literature. 1 Introduction Advances in multimedia technologies have increased the popularity of multimedia applications such as video conferencing, digital TV, video DVDs, Internet telephony and surveillance videos. Video transmission via public transmission channels is susceptible to eavesdropping. Therefore, a trusted and real-time security management system is needed to safeguard the stored and transferred video streams [1, 2]. The high bit rates required for transmitting digital videos make their transmission via network channels an enormous challenge. Two types of redundancies within the video data are removed by using video compression. The first type is spatial redundancy existing among pixels within a frame, while the second one is temporal redundancy between successive frames. There are several temporal compression techniques; block-based motion compensation is one of them. This technique is based on finding similar blocks between any two frames independent of their location. However, this kind of motion estimation technique is time-consuming. Distance diluted search, locality-based search, and multidimensional search space methods are techniques used to speed up the search for motion estimation; although, they all suffer from some loss in the resulting quality [3, 4]. Another challenge is securing video streams. The simplest video encryption algorithm (VEA) is to encrypt the compressed video frames using one of the classical private key encryption schemes such as the Advanced Encryption Standard (AES) [2]. However, it does not meet real-time requirements for multimedia applications. Thus, specific encryption algorithms have been tailored to encipher video streams. Video encryption and compression can be combined in three different ways depending on when the encryption function is applied. The encryption function may be applied before, or within, or after the compression function. If the encryption function is embedded within the compression function, the algorithm is said to belong to the class of joint-compression and encryption algorithms [5, 6]. On the other hand, if it is applied before or after compression, the algorithm then belongs to a compression-independent class of algorithms [7, 8]. The zig-zag permutation algorithm applies the encryption function within the compression function; more specifically, after the quantisation step [9]. The 64 quantised DCT (Discrete Cosine Transform) coefficients for an 8 × 8 pixels block are shuffled based on a random permutation list (secret key). Data Encryption Standard is used to encrypt the DC coefficients [9]. In VEA, a secret key is used to randomly change the sign bits of the DCT coefficients of I-frames only [10]. On the other hand, to improve the security in the modified VEA, the sign bits of the motion vectors in the B-frames and P-frames are also encrypted [11]. Further security enhancements have been included in real-time VEA based on employing a conventional private key encryption scheme [12]. Random Data Encryption Algorithm is a selective VEA [13]. It selects a proportion of the I-blocks in I-, P- and B-frames for encryption based on a pseudo-random sequence whose initial seed serves as the secret key. With a relatively small encryption ratio, it achieves a comparable security level as that of the naïve algorithm. It assumes that the video to be encrypted is coded using H.264 standard. Wu and Kuo presented a novel approach for integrating encryption with multimedia compression that turns entropy coders into encryption ciphers using several statistical models. They applied their approach successfully to the Huffman coder and QM coder [14]. Socek et al. in [15] present an encryption algorithm based on permutations that preserve spatial correlation. Their algorithm can thus be applied before the compression stage of a spatial only video encoder. They considered several modes of operating their scheme to meet the requirements of different applications. Liu and Koenig proposed a compression-independent video encryption scheme that is based on shuffling the blocks of a video frame and then obscuring the shuffled video data by encrypting a small portion of this data using a conventional encryption algorithm. The rest of the partitioned video data is encrypted by XORing each portion with its predecessor [16]. Malladar and Sanjeev Kunte employed chaotic maps in their selective encryption algorithm in [17] suited for video on demand application. The I-frames are encrypted by comparing the entropy values of the macro-blocks with a threshold value. If the entropy value of a macro-block exceeds the threshold value, then it is XORed with a keystream generated using a chaotic map, whose initial value is the secret key of the encryption scheme. In [18], the authors considered encrypting surveillance videos. They presented a light-weight privacy-preserving scheme based on layered cellular automata. Only privacy-sensitive areas of the video data are encrypted to save computations to be suitable for use in resource-constrained devices. In this paper, we propose two new video compression-independent encryption schemes, where the encryption step is preceded by a compression step to eliminate the inherent redundancy in a video file. MPEG-2 compression standard is employed in our implementation of both schemes due to its simplicity and ease of implementation. Though the more complex MPEG-4 compression standard has prevailed, however, MPEG-2 still finds application in digital TV streaming. The compressed video frame-blocks are shuffled based on chaotic maps. We investigate the effect of varying the size of the blocks on the results. Obscuring the shuffled frames is achieved in the first algorithm by XORing the different frames with an encrypted pre-selected frame. Alternatively, in the second scheme, a keystream generated based on a chaotic map is used in the XORing step. Two variants are examined of those basic algorithms to enhance their security and demonstrate the fact that they are applicable independent of the compression algorithm used. The rest of the paper is organised as follows. Section 2 presents an overview of the tools used in the proposed schemes. In Section 3, measures used to assess the durability of a video encryption scheme are listed. The various security attacks are defined in Section 4. The two proposed video encryption schemes are described in Section 5. The performance of the proposed schemes is analysed in Section 6. Section 7 discusses an enhancement to the security of the proposed schemes and the possibility of replacing MPEG-2 compression by a lossless compression technique. In Section 8, a comparative study is made demonstrating some merits of the proposed recent schemes in the literature. Finally, the paper is concluded in Section 9. 2 Background In this section, the main tools used in our proposed schemes are introduced. 2.1 YCbCr colour space Colour image displays are driven by red, green and blue voltage signals. However, there is mutual redundancy between these signals. This redundancy causes wasting storage and transmission bandwidth required. YCbCr is an alternative colour image representation that has been effectively applied in video and digital photography systems [19]. YCbCr representation separates out a luma signal(Y) or light intensity signal to be stored with high resolution and two chroma components (Cb blue-difference and Cr red-difference) that can be sub-sampled, compressed or otherwise treated independently for improved system efficiency. YCbCr is an efficient way of encoding colour information, where the primary colours corresponding roughly to Red, Green and Blue are processed into perceptually meaningful information. The transformation of an image from the RGB colour model to the YCbCr colour space is a linear transformation, which makes its computation fast and suitable for compression used by televisions [20] (1) (2) (3) 2.2 Chaotic maps Chaotic maps have been extensively used in cryptography literature for their capability of generating random-looking sequences that are highly sensitive to the choice of the initial seed point [21, 22]. Several chaotic maps are examined in this paper to develop the two proposed VEAs. 2.2.1 Arnold's cat map The Arnold cat map is a two-dimensional (2D) invertible map that transforms a point (x, y) to another point (x′, y′) using the following linear transformation: (4)where p and q are positive integers and N is the number of rows (or columns) of the square matrix whose elements are to be shuffled. The fact that the determinant of the transformation matrix is unity simplifies the inversion operation. When employed for image or video frame encryption, the Arnold cat map is applied several times to increase security. In this map, after a certain number of times of applying it, the original image re-appears [21]. 2.2.2 Baker's chaotic map The Baker chaotic map is another 2D chaotic map that has been successfully applied to image encryption [23]. It randomises a square matrix of dimension N × N by shuffling the pixel positions based on a secret key. Baker's map is utilised to speed up image encryption while maintaining a high degree of security. It is defined as a bijection to allow for the existence of a unique inverse map on the receiver's side. The secret key includes a vector of k integers, [n1,…, nk], chosen such that each integer ni divides N and set . The pixel located at (x, y) with and is mapped to the location (5)The effect of applying this map is to divide the image array into k vertical rectangles of height N and width ni. The pixels in each rectangle are rearranged in a row. Rectangles are considered from right to left starting from upper rectangles then followed by lower ones. Within each rectangle, the pixels are scanned from the bottom left corner towards upper pixels. 2.2.3 Tinkerbell map Tinkerbell map is a 2D chaotic map involving four control parameters [24], as given in the following two equations: (6) (7)where a, b, c and d are the control parameters that are components of the secret key upon use for encryption; in addition to the initial seed (x0, y0). Common values of its parameters to exhibit chaotic behaviour include . It is clear that the resulting sequence needs rounding before use in mapping the pixels to their new positions. 2.2.4 Hénon's chaotic map Hénon's map [25] iterates the initial seed point (x0, y0) to yield a random-looking sequence according to (8) and (9) (8) (9)The map depends on two parameters a and b, with common values of a = 1.4 and b = 0.3 to yield a complex behaviour with time. In our scheme, this map is used to generate a keystream involved in the substitution step of our second algorithm. 2.3 Compression techniques Video compression is based on eliminating repeated information, thus, making a file smaller without affecting its quality. Spatial redundancy occurs because pixels are often replicated (with minor changes) within a single frame of a video. Temporal redundancy arises when consecutive frames of a video display images of the same scene. It is customary for the content of the scene to remain fixed or to change only slightly between successive frames. MPEG-2 is a lossy compression standard for digital television broadcasting. An MPEG file consists of compressed video data referred to as a video stream. The basic unit of the video stream is a 'Group of Pictures' made up of three types of frames: I-frames, P-frames, and B-frames. The 'I'-frames can be restructured without any reference to other frames. On average, the 'I'-frames can occur once every 10–15 frames of motion pictures. This type of frame contains information only about itself. 'P'-frames can only be predicted by reference to a previous I-frame or P-frame; it is impossible to reconstruct them without any data of another frame. The 'B'-frames are referred to as bi-directional frames because they can be recreated based on forward and backward predictions from the information presented in the nearest preceding and following 'I' or 'P' frame. MPEG-2 compression algorithm involves four basic steps: pre-processing, temporal prediction, motion compensation and quantisation coding. Pre-processing eliminates redundancy in colour representation through conversion to the YCbCr colour space and using a suitable sampling and sub-sampling scheme. The DCT converts these signals into frequency coefficients containing the colour and brightness information. These signals can then be compressed more easily. Temporal redundancy elimination between frames; known as motion estimation step, is usually the most time-consuming part of MPEG encoding [20]. On the other hand, Lempel–Ziv–Welch (LZW) compression algorithm is a lossless algorithm that exploits spatial redundancy to build variable-length codes for colour combinations [26]. 3 Performance measures for evaluating a video encryption scheme Assessing the quality of encryption is crucial as it demonstrates the strength/weakness points in the system. In video encryption techniques, there are special tests performed to judge the quality of the encrypted video [27]. The encrypted video frames should be random-looking and showing sensitivity to small changes in the decryption key, which means obtaining a corrupted frame when decrypted using the wrong key. 3.1 Statistical measures Statistical measures are used to assess the randomness in the encrypted video frames. The correlation (ρ) between two vectors X and Y of adjacent pixels in each frame in the video is computed as (10) (11) (12)An effective video encryption scheme should destroy the correlation among neighbouring pixels along the vertical, horizontal and diagonal directions. Moreover, the colour histogram of an encrypted video frame should be uniform and quite distinct from that of the original one. 3.2 Similarity and differential measures The differential measures show how sensitive the encryption scheme is to slight changes in the plain frame and slight changes in the decryption key. 3.2.1 Mean absolute error (MAE) A successful video encryption scheme should produce frames that are quite distinct from the original video frame before encryption. The average absolute change in intensities between the encrypted video and the source video is computed as follows: (13)where P(i, j) and E(i, j) denote the colour intensities of pixel (i, j) in the plain video frame and encrypted frame, respectively. 3.2.2 Mean squared error (MSE) The MSE between two video frames X and Y is defined as (14)Obviously, the largest similarity is achieved when the MSE approaches 0. 3.2.3 Number of pixels change rate The number of pixels change rate (NPCR) is used to measure the percentage of pixels that are different between two videoframes and is computed as follows [27]: (15) (16)where E1and E2 are the two video frames. This measure can be employed to assess how sensitive a video encryption algorithm is to slight variations in the plain video frame. 3.2.4 Unified average changing intensity (UACI) The average intensity of absolute differences between two frames is determined according to the following equation [27]: (17)Again, E1 and E2 are two video frames. It can be used to assess the sensitivity to slight changes in the plain video or key changes. 3.2.5 Reconstruction quality measure The peak-signal-to-noise-ratio (PSNR) is used as a measure to determine the reconstruction quality. PSNR is essentially identical to MSE. It is the logarithmic representation of MSE. It is calculated as given in (18), where Max is the maximum value of a colour intensity usually set to 255 (18) 4 Security attack models In assessing the security of a video encryption scheme, its resistance to some attacks should be investigated. In what follows, the classical encoder attacks such as known-plaintext and chosen-plaintext attacks (CPAs) to detect the secret parameters of the algorithm are reviewed. Additionally, integrity attacks such as the salt and pepper attack and cropping attack are defined. Known-Plaintext Attack The attacker knows at least one sample pair of both the plaintext and the ciphertext. In this case, the attacker could use this information to break the algorithm. Chosen-Plaintext Attack The attacker can specify a plaintext of its own choice and feeds it into the encryption module to obtain the corresponding ciphertext. It then uses the result to determine the encryption key. Additive Noise and Cropping Attacks An attacker can intercept an encrypted video and modify it. A successful video encryption scheme should enable the recipient to detect that the received video has been modified during transmission. In the additive noise attack, random noise is added to the intercepted video frames by the attacker. The salt and pepper noise is applied in our analysis of the security of the proposed schemes. On the other hand, in the cropping attack, one or more areas of the encrypted video frame are deleted or cropped [28]. 5 Proposed video encryption schemes In this section, the two proposed video encryption schemes are described and their security is analysed. The main theme of the proposed schemes is to be simple and flexible making them suitable for real-time applications while being able to provide an appropriate level of security. In our description, it is assumed that the input video file is not compressed, for example, a video file with AVI extension. If the video file is already compressed, then proceed with the remaining steps of the algorithms directly. The communicating parties may share the keys over a public channel using a suitable key agreement protocol [29] or they can be hardwired on a tamper-resistant card. 5.1 VCMAB video encryption algorithm The encryption key components are: The index (i) of a frame designated as a pre-selected frame in our algorithm description (Fi). The parameters p and q of the Arnold map, as well as the number of times of applying it (R) and the number of times for the original frame to reappear (C). A vector of k integers which divide (N), where N is the number of columns of the video frame. A 2-bit key component to indicate how the RGB colour channels are interchanged. On the sender's side, first, a swapping operation of the RGB colour channels is applied to each frame. Next, the resulting file is compressed based on MPEG-2 scheme. The pre-selected compressed frame (Fi) is then scrambled based on the Arnold map. Next, Baker's map is used to shuffle the blocks of the compressed frames other than the frame Fi. Finally, a substitution step, in which the values of the blocks are replaced by the result of XORing them with the blocks of the encrypted pre-selected frame, is applied. Baker's chaotic map is employed to scramble the blocks in each compressed frame to produce uncorrelated random-looking frames. Encrypting the pre-selected frame and swapping the RGB colour channels enlarge the keyspace and improve the security of the algorithm. The bitwise exclusive-OR operation is carried out between the frames resulting from Baker's chaotic map and the pre-selected frame to produce more uniform histograms for the encrypted frames. 5.1.1 VCMAB video encryption steps The steps performed on the sender's side to encrypt a video file are summarised below. Read the video file to be stored as a group of images called frames. Apply keyed RGB colour channel swapping. Apply the MPEG-2 compression technique. Apply the Arnold map iteratively to scramble the blocks of the pre-selected frame (Fi) according to the pre-shared key. Encrypt the rest of the frames using Baker's chaotic map. The frames resulting from the previous step are XORed with the encrypted pre-selected frame (Fi). 5.1.2 VCMAB video decryption steps On the receiver's side, the steps are applied in reverse order and are listed below. Identify the encrypted pre-selected frame (Fi). Perform a bitwise XORing operation between the enciphered pre-selected frame and the remaining frames of the received video file. Apply the Arnold map (C – R) times to decrypt the pre-selected frame. Apply the inverse of Baker's map to decrypt the rest of the video frames. Apply the MPEG-2 decompression algorithm to restore the original video file. Apply the inverse swapping map of the RGB colour channels. 5.2 VCMTH video encryption algorithm Another proposal for a secure VEA is presented in this section, which begins again by swapping the RGB colour channels and then MPEG-2 compression is applied. This algorithm is more computationally efficient. It also involves two steps: a permutation step based on Tinkerbell map and a substitution step based on Hénon's chaotic map. Tinker bell map is used to shuffle the blocks of a compressed frame according to the rounded values of the 2D sequence produced by it. Hénon's 2D chaotic map generates a pseudo-random sequence of real numbers (xn). These numbers are used to generate a keystream to encrypt a video frame according to the following steps: (19) (20) (21)By XORing a byte of the plain frame (Pn) with the key (kn), the encrypted byte (Cn) can be obtained. The encryption key components are: The four control parameters of the Tinker bell map as well as its initial seed 2D point. The two parameters of the Hénon map as well as its initial seed 2D point. A 2-bit key component to indicate how the RGB colour channels are interchanged. It is noteworthy that if not enough bandwidth is available for communicating all these parameters, only the initial seeds of the two chaotic maps are kept secret. In this case, the control parameters of the two maps can be system-wide common parameters. 5.2.1 VCMTH video encryption steps On the transmitter's side, the following steps are applied to encrypt a video file. Read the video file to be stored as a group of images. Apply keyed RGB colour channel swapping. Apply the MPEG-2 compression technique. Tinkerbell chaotic map is applied to each frame to shuffle its components. Hénon's map is used to generate the keystream according to (19)–(21). The frames resulting from step (d) are XORed with the generated keystream. 5.2.2 VCMTH video decryption steps On the receiver's side, the recipient restores the original video by applying the following steps. Hénon's map is used to generate the keystream according to (19)–(21). The received frames are XORed with the keystream. Apply the inverse Tinkerbell chaotic map to restore the blocks to their original positions. Apply decompression. Apply the inverse swapping scheme to the RGB colour channels to obtain the original video file. 5.3 Key space analysis In what follows, we demonstrate that the keyspace is large enough to combat exhaustive search attacks mounted on any of our proposed schemes. For our VCMAB VEA, the associated keyspace is large enough based on the following arguments: Assume the index of the pre-selected frame is restricted to the first w frames. Clearly, the larger the value of w, the security is enhanced. The Arnold map parameters p and q cannot exceed N as well as the parameter R providing the number of applications of the map. The parameters of Baker's map are restricted to permutations of a subset of size k of the divisors of N with repetitions of divisors being allowed. It is noteworthy that k itself is a component of the shared secret key to improve the security of the scheme. 2-bits for the RGB colour channels swapping scheme. Now, let us consider the following numerical example. Let N equal 256. N has ∼1063 possible subsets of divisors, which is large enough to combat brute-force attacks against the security of the scheme. The whole keyspace size is O(2563 × 1063). The role of the substitution step is not restricted to enlarging the keyspace size, but it is essential to obtain a uniform histogram for the encrypted frames, which cannot be otherwise achieved. The proposed VCMTH algorithm keyspace size is mainly dependent on the precision used in representing the Tinkerbell map parameters and initial seed. For precision of 10−10, the keyspace size is (1010)6 which is again large enough to withstand exhaustive search attacks. This is in addition to the initial seed and parameters of the Hénon map. 5.4 Resistance to known plaintext attack Assume that the attacker knows the original video file P and the corresponding encrypted video file C. Regarding the VCMAB algorithm, before mounting any attack, it must essentially know the RGB colour channels swapping scheme to successfully decompress the encrypted video file and start any comparisons between the original and encrypted frames. The swapping scheme is obscured through employing the chaotic maps while encrypting the video frames. Similar arguments for our VCMTH scheme hold. 5.5 Resistance to chosen plaintext attack Assume the attacker chooses all zero compressed video frames P and observes the encrypted video file C. Such a file cannot reveal any information about the VCMAB algorithm, and may reveal the keystream generated by the Hénon map for the VCMTH algorithm. Consequently, such a video file should be rejected by the system decoder to achieve the desired security. 5.6 Computational time complexity The three key steps in the first proposed encryption process are: iterative application of the Arnold map, pixels permutations of each frame in a video using Baker's chaotic map and bitwise XOR operation with a pre-selected encrypted frame. The Arnold map is applied R times to the pre-selected frame-blocks and therefore this step is O (N2). Baker's chaotic map for shuffling the blocks of each frame is also O(N2). Thus, the whole algorithm is O (cN2), where c is the number of frames of the compressed video file. Similar arguments can be made for the second proposed algorithm. 6 Simulation results and security assessment We applied our proposed algorithms to a sample of standard videos including Foreman, Xylophone, Balcony and Aircrash. The performance of the proposed schemes is evaluated using the measures mentioned in Section 3. 6.1 Visual testing As apparent in Figs. 1 and 2, the histograms of the encrypted frames using both algorithms are flat with all colour levels being equally likely. They are quite distinct from the histograms of the original frames. Moreover, both algorithms sho