# An Efficient Video Encryption Algorithm Based on the Pseudorandom Number Generator of Zipf Distribution

Authors: Chen Chen; Xingjun Wang; Guanze Huang; Guining Liu
Journal: Security and Communication Networks
 (2022)

---

## Abstract

In this study, a pioneer selective video encryption (PSVE) algorithm is proposed based on the pseudorandom number generator (PRNG) of the Zipf distribution (Z-PRNG). It is a general algorithm with high efficiency and security. The encryption process is completely separable from the video coding process. In the PSVE algorithm, Z-PRNG is designed based on the 3D SCL-HMC hyperchaotic map. Firstly, encapsulated byte sequence payloads (EBSPs) are extracted from the video bitstream. Secondly, random numbers of the Zipf distribution are generated by Z-PRNG, and they are used to randomly select encrypted data from each EBSP. Lastly, the extracted data are encrypted by AES-CTR to obtain the encrypted video. Compared with existing algorithms, the encryption position is more flexible, and the key space is further enhanced. The high efficiency video coding (HEVC) video and the advanced video coding (AVC) video are taken as examples to test the PSVE algorithm. The analysis results show that the proposed scheme can effectively resist common attacks, and its time complexity is much less than most existing algorithms.


---

## Body

## 1. Introduction

With the development of network technology and the availability of multimedia applications, video has become the most prevalent information carrier in visualized communication. Statistics show that video accounts for about 80% of data traffic. Therefore, the security and efficiency of video communication have been widely noted in medicine, education, military, and other fields.At present, many video encryption algorithms (VEAs) have been proposed based on video coding standards, such as H.264/AVC [1] and H.265/HEVC [2]. Video compression coding can greatly reduce data redundancy. Therefore, compared with VEAs before compression coding, VEAs based on compression coding are more efficient and more appropriate for real-time video protection. These VEAs are roughly divided into two categories: (1) encryption through video coding [3–23] and (2) encryption after video coding [24–32]. Category (1) is embedded into one of the steps of the video coding standard, mostly before entropy coding. Although these algorithms prove their effectiveness, they must modify the structure of the video coding standard. Therefore, category (1) is not applicable to existing standard codecs. In contrast, category (2) has more flexibility and is implemented separately from video coding, so it is more suitable for encrypting encoded video bitstream. However, the encryption position can be more flexible and the encryption efficiency can be further improved.Chaos plays a significant role in cryptography in that chaotic signals present randomness, high complexity, and sensitivity to initial conditions. Sallam et al. proposed an efficient HEVC selective stream encryption algorithm based on the logistic chaotic map [10]. Nevertheless, one-dimensional chaotic map is relatively simple in structure and the system parameter μ is easily estimated. Liu et al. designed a video encryption scheme based on the integer dynamic coupling tent map [17]. The improved tent map is more effective at encrypting video, but the improvement is shown to be limited. Therefore, the random performance of chaotic systems for video encryption can be further enhanced.A pioneer selective video encryption (PSVE) algorithm is proposed in this study. It is completely separable from video coding and the encryption position extends to the encapsulated byte sequence payloads (EBSPs) of the video bitstream. In the PSVE algorithm, a pseudorandom number generator (PRNG) of Zipf distribution, namely, Z-PRNG, is generated based on the 3D SCL-HMC hyperchaotic map. It determines the encryption position in the EBSPs and the corresponding data are extracted. The traditional encryption algorithm AES-CTR is used to encrypt the extracted data. Different from existing VEAs, the key structure of the proposed algorithm has two parts: (1) the initial key of the 3D SCL-HMCkey1 and (2) the initial key of AES-CTR key2. The encryption position varies with the initial key of the 3D SCL-HMC map key1. High efficiency video coding (HEVC) and advanced video coding (AVC) are two common video coding standards, and they are used to test the proposed PSVE algorithm. Security analysis results show that it can resist common attacks. Encryption efficiency analysis results show that the time complexity is much less than most existing VEAs. The main contributions of this study are as follows:(i)
A novel PRNG is designed based on the 3D SCL-HMC hyperchaotic map, namely, Z-PRNG. It is in Zipf distribution. Compared with random numbers of uniform distribution, the proposed Z-PRNG is more applicable in video encryption.(ii)
A PSVE scheme is proposed using Z-PRNG. It applies to H.265/HEVC bitstream and H.264/AVC bitstream. The performance analysis demonstrates that the proposed PSVE scheme has high efficiency and it is highly capable of resisting attacks.(iii)
The performance of the proposed PSVE scheme is compared with other existing schemes. The results show that the PSVE scheme causes significant improvements in key space, resistance to chosen-plaintext attack, and separability while meeting the compression ratio and real-time requirements.The rest of this study is organized as follows. The related work of video encryption based on compression coding is introduced in Section2. In Section 3, data extraction based on Z-PRNG is presented. In Section 4, the PSVE scheme is proposed. In Section 5, the performance of the PSVE algorithm is analyzed. Finally, the conclusion and future directions are discussed in Section 6.


## 2. Related Work

Most existing VEAs are inseparable from video coding. Neda et al. encrypted DCT coefficients after the zigzag scanning in the AVC standard [8], unaffecting the bitstream compliance and compression ratio. Peng et al. encrypted multiple syntax elements before the entropy coding process in the HEVC standard, and coefficient scrambling is utilized to further improve the security [14]. However, these algorithms must modify the structure of the video coding standard to a specific codec including the encryption process. Thus, they are not applicable to existing standard codecs and are not compatible with other video coding formats. Moreover, the cipher stream of their algorithms has no correlation with the original video sequence, thus failing to resistchosen-plaintext attack. Compared with encryption algorithms through video coding, existing VEAs after video coding are more flexible to encrypt the encoded video bitstream. Yang et al. partly decoded the HEVC bitstream, and then, four syntax elements in bypass mode are extracted to encrypt [24]. Li et al. encrypted the most significant bits for video reconstruction without changing the structure of the H.264 standard codec [26]. In the two schemes, the compression and encryption processes were carried out separately. However, they only selected the syntax elements encoded by fixed length, such as the suffix of Exp-Golomb code and truncated rice code. These VEAs ensure the format compatibility of encrypted videos. Nevertheless, the encryption position is shown to be limited. In video encryption, format compatibility is dispensable in some practical applications. Taking video secure storage as an example, encrypted video content is unnecessary to maintain format compatibility. In addition, partial decoding is indispensable in these algorithms, consuming most of the decryption time. Then, some VEAs are based on the bitstream of network abstract layer unit (NALU) data, breaking the format compatibility. Lee and Jang encrypted the HEVC bitstream using the NALU Header [29], whereas the NALU header records the content characteristics of NALU, and it ensures the fault tolerance of online video information transmission. Therefore, NALU header is not suitable for encryption. Hao et al. selected VPS, SPS, and PPS to encrypt private videos [30]. However, the extracted data are orderly and many video sequences have identical parameter set information. Therefore, VPS, SPS, and PPS are also not appropriate for video encryption. Ting et al. utilized the bitstream of video coding layer (VCL) data [31]. The NALU bodies of I slices are encrypted by the AES block cipher and those of B/P slices are encrypted with the CBC-mode XOR algorithm. The algorithm is capable of resisting chosen-plaintext attack. However, the position information of encrypted videos is still public and can be directly obtained without the initial key. Meanwhile, the encryption efficiency remains to be further improved.To solve the above problems in the existing VEAs, the PSVE algorithm is proposed using the 3D SCL-HMC and Z-PRNG.


## 3. Data Extraction Based on Z-PRNG

### 3.1. Data Extraction in Video Bitstream

NALU is the encapsulation for the H.265/HEVC and H.264/AVC standard. The video bitstream is transmitted over the network in the form of NALUs. The NALU has two categories, including (1) VCL NALU and (2) non-VCL NALU. Every NALU consists of NALU header and an EBSP.The most sensitive data are expected to be extracted from the video bitstream. As shown in Figure1, the EBSPs in VCL NALU are extracted. In the H.265/HEVC or H.264/AVC standards, different EBSPs are encoded and decoded independently. As the video bitstream is highly compressed, the data in the same EBSP are highly correlated. If the front data of one EBSP are encrypted, it will have a significant impact on the following data in the same EBSP. By Z-PRNG, more front data in EBSPs are extracted and then encrypted, so the video stream will undergo distortion propagated from the encrypted data. The specific process of generating Z-PRNG is introduced in 4.1.Figure 1
Data extraction in the video bitstream.


### 3.2. The 3D SCL-HMC Chaotic Map

#### 3.2.1. The Definition of 3D SCL-HMC

In this section, a novel three-dimensional chaotic map, namely, 3D SCL-HMC, is proposed based on the hybrid modulation coupling (HMC) pattern [33]. The seed maps of 3D SCL-HMC are Sine map, Chebyshev map, and a simple linear map, and then, the 3D SCL-HMC is defined as follows:(1)xi+1=ksinacosbarccosxizi+c,yi+1=ksinacosbarccosyixi+1+c,zi+1=ksinacosbarccosziyi+1+c,where x, y, and z are the state variables of the 3D SCL-HMC map, k, a, b, and c are the system parameters, x,y,z∈−1,1, k∈0,1, a,b∈0,+∞, and c∈−∞,+∞. k and a are the system parameters of Sine chaotic map. b and c are the system parameters of Chebyshev chaotic map and the simple linear map, respectively. In the 3D SCL-HMC chaotic map, parameter k controls amplitude. Parameters a and b are perturbation frequencies. Parameter c controls offset degree. We set k=1,a=2π,b=π,c=8; the attractor of the 3D SCL-HMC map is shown in Figure 2. With three state variables and four system parameters, its distribution is more random than its seed chaotic maps.Figure 2
Attractor of the 3D SCL-HMC chaotic mapk=1,a=2π,b=π,andc=8.


#### 3.2.2. Performance Evaluation of the 3D SCL-HMC

The Lyapunov exponent (LE) spectrum and permutation entropy (PE) complexity are used to analyze the dynamical properties of the 3D SCL-HMC map. The LE spectrum is a significant indicator for analyzing dynamics of chaotic maps. Figure3 shows the LE spectrum versus parameters k,a,b, and c. λ1, λ2, and λ3 are LEs. A positive LE means that the adjacent trajectories in this direction are exponentially separated, and it indicates that the system is chaotic. If there exist two or more positive LEs, the system is hyperchaotic. From Figure 3, the 3D SCL-HMC map has three stable positive LEs, verifying that it is hyperchaotic.Figure 3
Lyapunov exponent spectrum of 3D SCL-HMC. (a)a=2π,b=π,c=8; (b) k=1,b=π,c=8; (c) k=1,a=2π,c=8; (d) k=1,a=2π,b=π.
(a)(b)(c)(d)PE complexity is an effective way to evaluate the predictability and randomness of chaotic maps. Figure4 analyzes the PE complexity of the 3D SCL-HMC map. Compared with three existing chaotic maps [33, 34], it has a larger and more stable PE complexity value. Therefore, the 3D SCL-HMC hyperchaotic map has higher complexity and more stable dynamical behaviors, which is feasible for video encryption.Figure 4
PE complexity of different 3D chaotic maps.


## 3.1. Data Extraction in Video Bitstream

NALU is the encapsulation for the H.265/HEVC and H.264/AVC standard. The video bitstream is transmitted over the network in the form of NALUs. The NALU has two categories, including (1) VCL NALU and (2) non-VCL NALU. Every NALU consists of NALU header and an EBSP.The most sensitive data are expected to be extracted from the video bitstream. As shown in Figure1, the EBSPs in VCL NALU are extracted. In the H.265/HEVC or H.264/AVC standards, different EBSPs are encoded and decoded independently. As the video bitstream is highly compressed, the data in the same EBSP are highly correlated. If the front data of one EBSP are encrypted, it will have a significant impact on the following data in the same EBSP. By Z-PRNG, more front data in EBSPs are extracted and then encrypted, so the video stream will undergo distortion propagated from the encrypted data. The specific process of generating Z-PRNG is introduced in 4.1.Figure 1
Data extraction in the video bitstream.


## 3.2. The 3D SCL-HMC Chaotic Map

### 3.2.1. The Definition of 3D SCL-HMC

In this section, a novel three-dimensional chaotic map, namely, 3D SCL-HMC, is proposed based on the hybrid modulation coupling (HMC) pattern [33]. The seed maps of 3D SCL-HMC are Sine map, Chebyshev map, and a simple linear map, and then, the 3D SCL-HMC is defined as follows:(1)xi+1=ksinacosbarccosxizi+c,yi+1=ksinacosbarccosyixi+1+c,zi+1=ksinacosbarccosziyi+1+c,where x, y, and z are the state variables of the 3D SCL-HMC map, k, a, b, and c are the system parameters, x,y,z∈−1,1, k∈0,1, a,b∈0,+∞, and c∈−∞,+∞. k and a are the system parameters of Sine chaotic map. b and c are the system parameters of Chebyshev chaotic map and the simple linear map, respectively. In the 3D SCL-HMC chaotic map, parameter k controls amplitude. Parameters a and b are perturbation frequencies. Parameter c controls offset degree. We set k=1,a=2π,b=π,c=8; the attractor of the 3D SCL-HMC map is shown in Figure 2. With three state variables and four system parameters, its distribution is more random than its seed chaotic maps.Figure 2
Attractor of the 3D SCL-HMC chaotic mapk=1,a=2π,b=π,andc=8.


### 3.2.2. Performance Evaluation of the 3D SCL-HMC

The Lyapunov exponent (LE) spectrum and permutation entropy (PE) complexity are used to analyze the dynamical properties of the 3D SCL-HMC map. The LE spectrum is a significant indicator for analyzing dynamics of chaotic maps. Figure3 shows the LE spectrum versus parameters k,a,b, and c. λ1, λ2, and λ3 are LEs. A positive LE means that the adjacent trajectories in this direction are exponentially separated, and it indicates that the system is chaotic. If there exist two or more positive LEs, the system is hyperchaotic. From Figure 3, the 3D SCL-HMC map has three stable positive LEs, verifying that it is hyperchaotic.Figure 3
Lyapunov exponent spectrum of 3D SCL-HMC. (a)a=2π,b=π,c=8; (b) k=1,b=π,c=8; (c) k=1,a=2π,c=8; (d) k=1,a=2π,b=π.
(a)(b)(c)(d)PE complexity is an effective way to evaluate the predictability and randomness of chaotic maps. Figure4 analyzes the PE complexity of the 3D SCL-HMC map. Compared with three existing chaotic maps [33, 34], it has a larger and more stable PE complexity value. Therefore, the 3D SCL-HMC hyperchaotic map has higher complexity and more stable dynamical behaviors, which is feasible for video encryption.Figure 4
PE complexity of different 3D chaotic maps.


## 3.2.1. The Definition of 3D SCL-HMC

In this section, a novel three-dimensional chaotic map, namely, 3D SCL-HMC, is proposed based on the hybrid modulation coupling (HMC) pattern [33]. The seed maps of 3D SCL-HMC are Sine map, Chebyshev map, and a simple linear map, and then, the 3D SCL-HMC is defined as follows:(1)xi+1=ksinacosbarccosxizi+c,yi+1=ksinacosbarccosyixi+1+c,zi+1=ksinacosbarccosziyi+1+c,where x, y, and z are the state variables of the 3D SCL-HMC map, k, a, b, and c are the system parameters, x,y,z∈−1,1, k∈0,1, a,b∈0,+∞, and c∈−∞,+∞. k and a are the system parameters of Sine chaotic map. b and c are the system parameters of Chebyshev chaotic map and the simple linear map, respectively. In the 3D SCL-HMC chaotic map, parameter k controls amplitude. Parameters a and b are perturbation frequencies. Parameter c controls offset degree. We set k=1,a=2π,b=π,c=8; the attractor of the 3D SCL-HMC map is shown in Figure 2. With three state variables and four system parameters, its distribution is more random than its seed chaotic maps.Figure 2
Attractor of the 3D SCL-HMC chaotic mapk=1,a=2π,b=π,andc=8.


## 3.2.2. Performance Evaluation of the 3D SCL-HMC

The Lyapunov exponent (LE) spectrum and permutation entropy (PE) complexity are used to analyze the dynamical properties of the 3D SCL-HMC map. The LE spectrum is a significant indicator for analyzing dynamics of chaotic maps. Figure3 shows the LE spectrum versus parameters k,a,b, and c. λ1, λ2, and λ3 are LEs. A positive LE means that the adjacent trajectories in this direction are exponentially separated, and it indicates that the system is chaotic. If there exist two or more positive LEs, the system is hyperchaotic. From Figure 3, the 3D SCL-HMC map has three stable positive LEs, verifying that it is hyperchaotic.Figure 3
Lyapunov exponent spectrum of 3D SCL-HMC. (a)a=2π,b=π,c=8; (b) k=1,b=π,c=8; (c) k=1,a=2π,c=8; (d) k=1,a=2π,b=π.
(a)(b)(c)(d)PE complexity is an effective way to evaluate the predictability and randomness of chaotic maps. Figure4 analyzes the PE complexity of the 3D SCL-HMC map. Compared with three existing chaotic maps [33, 34], it has a larger and more stable PE complexity value. Therefore, the 3D SCL-HMC hyperchaotic map has higher complexity and more stable dynamical behaviors, which is feasible for video encryption.Figure 4
PE complexity of different 3D chaotic maps.


## 4. The Proposed PSVE Scheme

### 4.1. The Generation of Z-PRNG

Based on the 3D SCL-HMC map, the random numberR is generated by(2)Ri=modxi+yi+zi,1.Figure5 shows the frequency distribution of R. It produces an almost uniform distribution at the interval (0, 1), which has good randomness for Z-PRNG. Subsequently, using the inverse transformation, Z-PRNG Zp is designed as(3)Zpi=ceileRi×lnNEBSP,where ceil• denotes the minimal integer that is not less than • and NEBSP is the total number of bytes in each EBSP. Ri∈0,1; thus, Zpi∈1,NEBSP. For every iteration, Zpi is generated by equation (3). Then, the Zpith byte in EBSP is extracted based on Z-PRNG Zp. Zpi is also recorded simultaneously, and it determines encryption position. As shown in Figure 6, when the random number Zpi is equal to 1, the first byte in EBSP is extracted. Based on the recorded value Zpi, the encrypted byte can be put back into the original EBSP. As Zp is a PRNG of Zipf distribution, more front bytes in EBSPs are extracted.Figure 5
Frequency distribution ofR.Figure 6
Byte extraction in EBSP based on Z-PRNG.Here, a comparative experiment is carried out to verify the validity of Z-PRNG. Taking the RaceHorses video sequence as an example, 10 bytes are extracted from the first frame. In Figure7(b), the bytes are randomly extracted; thus, each byte has the same probability to be extracted. In Figure 7(c), Z-PRNG is used and more front bytes in each EBSP are extracted. Obviously, Figure 7(c) has higher perceived security. Hence, Z-PRNG is more suitable for video encryption.Figure 7
Video encryption with two comparative extraction methods. (a) original frame #1; (b) encrypted frame #1 by randomly extraction; (c) encrypted frame #1 by Z-PRNG.
(a)(b)(c)Moreover, the encryption position is fixed in the existing VEAs. The position information of encrypted videos is public and can be obtained without the initial key. In the proposed algorithm, the encryption position varies with the initial key of the 3D SCL-HMC mapkey1. Both position information and encryption data information are indispensable to decrypt video. Therefore, compared with existing VEAs, the proposed algorithm based on Z-PRNG has a high level of difficulty to be penetrated.


### 4.2. Video Encryption Algorithm

As shown in Figure8, the encryption process is independent of the video coding process. After video coding, the specific encryption algorithm is introduced as follows.Figure 8
The encryption process.


#### 4.2.1. Data Extraction

Step 1.
based on the video bitstream, we extract the EBSPs in VCL NALU, namely,DEBSP.Step 2.
we set the initial key of the 3D SCL-HMC chaotic mapkey1 and then design Z-PRNG Zp by equation (3).Step 3.
for each EBSP inDEBSP, we generate nEBSP random numbers based on Z-PRNG Zp. nEBSP is the number of extracted bytes in each EBSP, which is defined as follows:(4)nEBSP=2,β×NEBSP<=2,β×NEBSP,β×NEBSP>2,where β is the extraction ratio. By (4), at least 2 bytes are extracted from each EBSP in DEBSP.Step 4.
based on the random numbersZp1,Zp2,…, ZpnEBSP, we extract the Zp1th byte, Zp2th byte,…, ZpnEBSPth byte from each EBSP in DEBSP. By this way, the extracted data Dori are obtained in DEBSP.Step 5.
we record the valueZpi corresponding to each extracted byte, which determines the encryption position.


#### 4.2.2. Data Encryption

Step 6.
we set the initial keykey2 of AES-CTR, and we then encrypt the extracted data Dori by AES-CTR. Thus, the encrypted data Den are obtained.Step 7.
we putDen back into the original video bitstream based on the encryption position information Zpi. Then, the encrypted video bitstream Ven is obtained.


### 4.3. Video Decryption Algorithm

As shown in Figure9, the video decryption algorithm is the inverse of the encryption algorithm. Similarly, by the initial key key1, an identical Z-PRNG Zp is generated, and it is used to extract Den from Ven. Using the initial key key2, Den is decrypted into Dori by AES-CTR. Putting Dori back into Ven based on Z-PRNG Zp, the decrypted video bitstream Vde is obtained.Figure 9
The decryption process.


## 4.1. The Generation of Z-PRNG

Based on the 3D SCL-HMC map, the random numberR is generated by(2)Ri=modxi+yi+zi,1.Figure5 shows the frequency distribution of R. It produces an almost uniform distribution at the interval (0, 1), which has good randomness for Z-PRNG. Subsequently, using the inverse transformation, Z-PRNG Zp is designed as(3)Zpi=ceileRi×lnNEBSP,where ceil• denotes the minimal integer that is not less than • and NEBSP is the total number of bytes in each EBSP. Ri∈0,1; thus, Zpi∈1,NEBSP. For every iteration, Zpi is generated by equation (3). Then, the Zpith byte in EBSP is extracted based on Z-PRNG Zp. Zpi is also recorded simultaneously, and it determines encryption position. As shown in Figure 6, when the random number Zpi is equal to 1, the first byte in EBSP is extracted. Based on the recorded value Zpi, the encrypted byte can be put back into the original EBSP. As Zp is a PRNG of Zipf distribution, more front bytes in EBSPs are extracted.Figure 5
Frequency distribution ofR.Figure 6
Byte extraction in EBSP based on Z-PRNG.Here, a comparative experiment is carried out to verify the validity of Z-PRNG. Taking the RaceHorses video sequence as an example, 10 bytes are extracted from the first frame. In Figure7(b), the bytes are randomly extracted; thus, each byte has the same probability to be extracted. In Figure 7(c), Z-PRNG is used and more front bytes in each EBSP are extracted. Obviously, Figure 7(c) has higher perceived security. Hence, Z-PRNG is more suitable for video encryption.Figure 7
Video encryption with two comparative extraction methods. (a) original frame #1; (b) encrypted frame #1 by randomly extraction; (c) encrypted frame #1 by Z-PRNG.
(a)(b)(c)Moreover, the encryption position is fixed in the existing VEAs. The position information of encrypted videos is public and can be obtained without the initial key. In the proposed algorithm, the encryption position varies with the initial key of the 3D SCL-HMC mapkey1. Both position information and encryption data information are indispensable to decrypt video. Therefore, compared with existing VEAs, the proposed algorithm based on Z-PRNG has a high level of difficulty to be penetrated.


## 4.2. Video Encryption Algorithm

As shown in Figure8, the encryption process is independent of the video coding process. After video coding, the specific encryption algorithm is introduced as follows.Figure 8
The encryption process.


### 4.2.1. Data Extraction

Step 1.
based on the video bitstream, we extract the EBSPs in VCL NALU, namely,DEBSP.Step 2.
we set the initial key of the 3D SCL-HMC chaotic mapkey1 and then design Z-PRNG Zp by equation (3).Step 3.
for each EBSP inDEBSP, we generate nEBSP random numbers based on Z-PRNG Zp. nEBSP is the number of extracted bytes in each EBSP, which is defined as follows:(4)nEBSP=2,β×NEBSP<=2,β×NEBSP,β×NEBSP>2,where β is the extraction ratio. By (4), at least 2 bytes are extracted from each EBSP in DEBSP.Step 4.
based on the random numbersZp1,Zp2,…, ZpnEBSP, we extract the Zp1th byte, Zp2th byte,…, ZpnEBSPth byte from each EBSP in DEBSP. By this way, the extracted data Dori are obtained in DEBSP.Step 5.
we record the valueZpi corresponding to each extracted byte, which determines the encryption position.


### 4.2.2. Data Encryption

Step 6.
we set the initial keykey2 of AES-CTR, and we then encrypt the extracted data Dori by AES-CTR. Thus, the encrypted data Den are obtained.Step 7.
we putDen back into the original video bitstream based on the encryption position information Zpi. Then, the encrypted video bitstream Ven is obtained.


## 4.2.1. Data Extraction

Step 1.
based on the video bitstream, we extract the EBSPs in VCL NALU, namely,DEBSP.Step 2.
we set the initial key of the 3D SCL-HMC chaotic mapkey1 and then design Z-PRNG Zp by equation (3).Step 3.
for each EBSP inDEBSP, we generate nEBSP random numbers based on Z-PRNG Zp. nEBSP is the number of extracted bytes in each EBSP, which is defined as follows:(4)nEBSP=2,β×NEBSP<=2,β×NEBSP,β×NEBSP>2,where β is the extraction ratio. By (4), at least 2 bytes are extracted from each EBSP in DEBSP.Step 4.
based on the random numbersZp1,Zp2,…, ZpnEBSP, we extract the Zp1th byte, Zp2th byte,…, ZpnEBSPth byte from each EBSP in DEBSP. By this way, the extracted data Dori are obtained in DEBSP.Step 5.
we record the valueZpi corresponding to each extracted byte, which determines the encryption position.


## 4.2.2. Data Encryption

Step 6.
we set the initial keykey2 of AES-CTR, and we then encrypt the extracted data Dori by AES-CTR. Thus, the encrypted data Den are obtained.Step 7.
we putDen back into the original video bitstream based on the encryption position information Zpi. Then, the encrypted video bitstream Ven is obtained.


## 4.3. Video Decryption Algorithm

As shown in Figure9, the video decryption algorithm is the inverse of the encryption algorithm. Similarly, by the initial key key1, an identical Z-PRNG Zp is generated, and it is used to extract Den from Ven. Using the initial key key2, Den is decrypted into Dori by AES-CTR. Putting Dori back into Ven based on Z-PRNG Zp, the decrypted video bitstream Vde is obtained.Figure 9
The decryption process.


## 5. Experimental Results and Performance Analysis

Two experiments are carried out to test the PSVE algorithm. The first one is based on HEVC bitstream and the second one is applied to AVC bitstream.


### 5.1. HEVC Bitstream

In this section, twelve benchmark video sequences are used to analyze the proposed scheme. Table1 defines these video sequences. These video sequences have different resolutions, motions, colors, objects, and frame rates. They are compressed into the video bitstream by H.265 encoder HM-16.9 and are decoded based on the FFmpeg library. The proposed PSVE scheme is applied to the twelve benchmark video sequences for low delay mode.Table 1
Twelve benchmark video sequences.
Video sequenceResolutionFrame rateMobile352×28830Foreman352×28830RaceHorses416×24030BlowingBubbles416×24050PartyScene832×48050BasketballDrillText832×48060FourPeople1280×72060Johnny1280×72060ChinaSpeed1024×76830BQTerrace1920×108060Traffic2560×160030PeopleOnStreet2560×160030


#### 5.1.1. Experimental Results

The extraction ratioβ is set to 0.001, and QP is set to 24. Figure 10 shows the encryption results of some sample frames. By encrypting only about 0.1% of the video bitstream, the decoded frames after encryption have obvious visual degradation, indicating that the proposed PSVE algorithm is effective.Figure 10
The encryption results for H.265/HEVC (Mobile, RaceHorses, PartyScene, FourPeople, ChinaSpeed, and BQTerrace). (a), (e), (i), (m), (q), and (u) are the original frame #1. (b), (f), (j), (n), (r), and (v) are the encrypted frame #1; (c), (g), (k), (o), (s), and (w) are the original frame #30. (d), (h), (l), (p), (t), and (x) are the encrypted frame #30.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)


#### 5.1.2. Key Space Analysis

The key security can be satisfied when the key space is more than2128. The key structure of the proposed PSVE algorithm has two parts: (1) the initial key of the 3D SCL-HMC chaotic map key1 and (2) the initial key of AES-CTR algorithm key2. key1 determines the encryption position and key2 is used to decrypt the encrypted bytes. The 3D SCL-HMC chaotic map has three initial values and four system parameters x0,y0,z0,k,a,b,c. From Figure 3(a), since the hyperchaotic state of parameter k is only stable in the range of [0.7 1], k is set as constant 1 in the proposed PSVE scheme. Then, the key structure of key1 is shown in Figure 11. From Figures 2 and 3(b)–3(d), the 3D SCL-HMC can be ensured in hyperchaotic state when x0,y0,z0∈0,1 and a,b,c∈4,14. If stored in a double-precision decimal based on IEEE 754 standard, the 52-bit fraction can be traversed for x0,y0,z0,a,b, and c. Thereby, the key space Sk1>2526=2312. The key length of key2 is 256 bits; thus, the key space Sk2=2256. Therefore, the key space of the proposed PSVE algorithm Sk=Sk1×Sk2>2312×2256>2568>2128, indicating that brute-force attack can be effectively resisted in the proposed algorithm.Figure 11
Key structure ofkey1 in the PSVE scheme.


#### 5.1.3. Key Sensitivity Analysis

To ensure key validity, key sensitivity is used to evaluate cryptosystems. Taking Foreman as an example,key1 is set as {0.1, 0.2, 0.3, 4, 4, 4}, and key2 is set as {0xA0, 0x7F, 0xA5, 0xAE, 0x2C, 0x26, 0xCB, 0xAB, 0xEA, 0xA6, 0x18, 0x3D, 0x59, 0x5C, 0x22, 0x27, 0x31, 0x85, 0xEB, 0x0E, 0x88, 0xFF, 0x00, 0xCF, 0x67, 0x60, 0x4A, 0x7E, 0xDE, 0x46, 0x76, and 0xCF}. key2 is slightly changed by only 1 bit to obtain key2∗, and key2∗ is defined as {0xB0, 0x7F, 0xA5, 0xAE, 0x2C, 0x26, 0xCB, 0xAB, 0xEA, 0xA6, 0x18, 0x3D, 0x59, 0x5C, 0x22, 0x27, 0x31, 0x85, 0xEB, 0x0E, 0x88, 0xFF, 0x00, 0xCF, 0x67, 0x60, 0x4A, 0x7E, 0xDE, 0x46, 0x76, 0xCF}. The test results are displayed in Figure 12. When key1 or key2 is slightly changed, the encrypted frame has an obvious difference. In the decryption process, the video information of decrypted frame is still obscured when a slight disturbance is applied to the key. Therefore, the PSVE scheme has key sensitivity.Figure 12
Key sensitivity analysis for the Foreman video. (a) Encrypted frame #1. (b) Encrypted frame #1 withx0+10−15. (c) Encrypted frame #1 with a+10−15. (d) Encrypted frame #1 with key2∗. (e) Decrypted frame #1. (f) Decrypted frame #1 with x0+10−15. (g) Decrypted frame #1 with a+10−15. (h) Decrypted frame #1 with key2∗.
(a)(b)(c)(d)(e)(f)(g)(h)Peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM) are two objective indicators to evaluate the quality of the encrypted frames. The PSNR is described as follows:(5)PSNR=10lg255×2551/MH×NV∑i=1MH∑j=1NVXi,j−Yi,j2,where MH×NV is the size of the video frame. X and Y represent the original frame and the encrypted frame, respectively. Generally, when PSNR<15, the encrypted frame provides little information about the original frame. The SSIM is defined as follows:(6)SSIM=2μXμY+k1L22σXY+k2L2μX2+μY2+k1L2σX2+σY2+k2L2,where μX, μY, σX, σY, and σXY are the average, variance, and covariance values of the original frame X and the encrypted frame Y. In (6), L = 255, k1 = 0.01, k2 = 0.03, and SSIM ∈0,1. A smaller value of SSIM implies a higher level of distortion.Table2 shows the results without encryption and with the PSVE scheme for different QPs. The average PSNR without encryption is greater than 40. Using the PSVE scheme, the average PSNR is reduced to below 10. The PSNR value has a significant distortion, indicating that the proposed PSVE scheme has a remarkable effect on the quality of the video sequences. The average SSIM without encryption is greater than 0.95. The video content of the decoded frames can be clearly and objectively recognized. By contrast, the average SSIM is down to roughly 0.2 based on the PSVE scheme. Hence, the texture and color information of video frames have been greatly protected.Table 2
PSNR, SSIM, and EDR for different video sequences.
Video sequenceQPNo encryptionPSVEPSNRSSIMEDRPSNRSSIMEDRMobile1249.10330.99750.01008.65210.13100.91412438.90490.98530.03718.74310.07050.90363628.57050.91870.14379.33510.08840.9182Foreman1248.94490.99400.02058.53770.21550.94562439.93760.96020.07038.77820.22910.95063632.48650.87430.25118.73350.22370.9375RaceHorses1248.88250.99600.01628.18420.16300.93162439.37170.97620.052411.28730.21940.92673630.15910.85240.199110.58630.14290.9184BlowingBubbles1248.96630.99630.021810.62310.14330.91592438.35670.96120.074812.03700.23100.91163629.77030.81990.27698.04570.07540.9419PartyScene1248.95960.99750.01838.65710.12640.90892438.16910.97250.05827.48540.11230.91403628.57900.84660.22917.63650.12440.9293BasketballDrillText1248.92370.99410.025610.43500.22400.92882439.53320.95290.08499.25930.20290.94043632.33200.84690.26557.43850.29960.9349FourPeople1248.67200.99180.02378.87820.11390.94962441.53360.96790.07847.78860.23760.93943634.80050.92650.27437.96170.21170.9303Johnny1248.52090.98980.04689.61300.31820.94902441.84920.96220.15967.32560.34010.95333636.47570.92500.41707.71620.33260.9522ChinaSpeed1251.90600.99620.01498.62460.22750.96672444.32730.98720.04817.19390.14010.94033634.98000.94150.15668.64340.15740.9341BQTerrace1249.36480.99610.02067.40700.27120.94822439.61370.96240.06267.16800.21140.92343631.06480.87080.21837.61530.24470.9414Traffic1248.80090.99320.024611.14360.39120.92882440.83770.96890.085610.52170.34020.92653633.64540.89530.29698.12360.35510.9204PeopleOnStreet1249.04320.99430.01879.01490.34560.94312440.68940.96920.06558.20830.28450.94403633.36170.88960.23908.70740.35340.9505Average—40.53990.95100.11418.78080.21940.9337


#### 5.1.4. Edge Detection Attack Analysis

Edge detection is a significant indicator for evaluating the similarity of video frames before and after encryption. Human visual cells are particularly sensitive to the edges of objects. Provided that an encryption algorithm fails to resist edge detection attacks, some edge information will be detected in the encrypted video frames, thereby obtaining the outline and texture features of the original video frames. Here, the Laplace edge detection method is used to analyze the edge difference between the original and the encrypted video frames. Figure13 shows the edge information for the RaceHorses video and FourPeople video. The results indicate that the structural information is heavily distorted in the encrypted video frames.Figure 13
Edge detection for RaceHorses and FourPeople. (a) and (c) are the original frame #1; (b) and (d) are the encrypted frame #1.
(a)(b)(c)(d)


#### 5.1.5. Chosen-Plaintext Attack Analysis

The chosen-plaintext attack is a common classical cipher attack. In this case, different plaintexts are chosen and the corresponding ciphertexts can be obtained by attackers. To decrypt the PSVE algorithm, two steps are carried out for attackers to obtain the video information: (1) determining the encryption position and (2) decrypting the encrypted bytes. Here, the twelve benchmark video sequences are encrypted using the identicalkey1 and key2. Although key1 and key2 are fixed, NEBSP remains different for different NALUs. Table 3 lists the first four encryption position Zpi for two NALUs in different video sequences. It indicates that the encryption position Zpi still varies with different NALUs. Therefore, with identical key1 and key2, provided that a video sequence and its corresponding encrypted video sequence are obtained by attackers, the encryption position and encryption bytes in other video sequences are still unable to be inferred. Thus, the chosen-plaintext attack is effectively resisted in the proposed PSVE algorithm.Table 3
Zpi with identical key1 and key2 for different video sequences.
Video sequenceNALU 1NALU 2Zp1Zp2Zp3Zp4Zp1Zp2Zp3Zp4Mobile5134361482219308839113Foreman4477286169107131BlowingBubbles489051191938621825132RaceHorses48334115191802424755207PartyScene6418772703393311161283BasketballDrillText51808417325730221337FourPeople510956133212614122-Johnny514311153233599921ChinaSpeed51780017225177962314BQTerrace711060545045291987144337486Traffic712368547747777574334372751PeopleOnStreet71261694824711296017218843


#### 5.1.6. Replacement Attack Analysis

To further analyze the security of the PSVE algorithm, a replacement attack is introduced. In this case, the encrypted data is replaced with arbitrary data to obtain plaintext information. Constant 0, constant 1, and the most likely values by statistical analysis are three common data to measure the replacement attack. For example, Xu et al. replaced the encrypted data with constant values 0 and 1 [5]; Liu et al. substituted the encrypted elements with the most likely values [17]. In the PSVE algorithm, the encrypted bytes have no statistical characteristics, which means they are unable to be statistically analyzed. Therefore, constant 0, constant 1 and a random sequence are used to replace the encrypted bytes. Figure 14 shows the results of Mobile video under replacement attack. The encrypted frame #1 and frame #30 in Mobile video are still not intelligible, verifying the effectiveness against the replacement attack.Figure 14
Replacement attack results for Mobile. (a) encrypted frame #1 substituted by constant 0. (b) Encrypted frame #30 substituted by constant 0. (c) Encrypted frame #1 substituted by constant 1. (d) Encrypted frame #30 substituted by constant 1. (e) Encrypted frame #1 substituted by a random sequence. (f) Encrypted frame #30 substituted by a random sequence.
(a)(b)(c)(d)(e)(f)To further analyze the resistance of the proposed PSVE algorithm to edge detection attack, the edge difference ratio (EDR) is introduced and it is defined as follows:(7)EDR=∑i=1MH∑j=1NVX^i,j−Y^i,j∑i=1MH∑j=1NVX^i,j+Y^i,j,where MH×NV is the size of video frames and X^i,j and Y^i,j represent the edge detection pixel value of the original video frames and the encrypted video frames, respectively. The maximum EDR is 1, and a higher EDR indicates that the structural information is more distorted. The EDR results for different video sequences are listed in Table 2. When directly decoding the video bitstream without encryption, the average EDR of the twelve video sequences is around 0.1. In this case, the decoded video frames can be clearly and objectively recognized by human eyes. After encryption, the average value is about 0.93. The video structural information has been severely confused, indicating that the proposed PSVE algorithm has high credibility to resist edge detection attack.


#### 5.1.7. Encryption Efficiency Analysis

Besides security, encryption efficiency is also an essential indicator. The experimental environment is Visual Studio 2013 with an Intel Core i5-10400 CPU @ 2.90 GHz and 16.0 GB RAM on the Windows 10 OS. QP is set to 24. Table4 shows the execution time of different video sequences. The ratio of encryption time to compression time TPSVE/THEVC measures the computational overhead difference between video coding with and without encryption. The average value of TPSVE/THEVC is about 0.004%, and it indicates that the encryption time TPSVE is negligible compared with the compression encoding time THEVC. Table 5 shows the average ratio of encryption time to compression time for some existing schemes with format compatibility [7, 11, 17, 20, 24]. The experimental results show that the ratio TPSVE/THEVC is much less than other existing VEAs. Furthermore, Table 4 also shows the running time TALL of directly encrypting the entire HEVC video bitstream using AES-CTR. The ratio TPSVE/TALL is about 52.427%. Obviously, the execution time of the PSVE algorithm TPSVE is much less than that of encrypting the entire HEVC video bitstream TALL. It indicates that the encryption efficiency is greatly improved by the PSVE algorithm. Therefore, the proposed PSVE algorithm is highly efficient for HEVC video encryption.Table 4
Execution time of different video sequences (sec).
Video sequenceFrameTPSVETHEVCTALLTPSVE/THEVCTPSVE/TALLMobile1000.1321902.3230.2426.939×10−554.545%Foreman1000.0351533.3190.0712.283×10−549.296%RaceHorses1000.0981947.0930.1895.033×10−551.852%BlowingBubbles1000.0631660.6250.1273.793×10−549.606%PartyScene1000.3747176.0220.7165.212×10−552.235%BasketballDrillText1000.1545968.5800.2812.580×10−554.804%FourPeople1000.0658527.2830.1247.622×10−652.419%Johnny1000.0688630.6620.1307.879×10−652.308%ChinaSpeed1000.35710276.2390.6833.474×10−552.269%BQTerrace1001.04030276.7181.9713.435×10−552.765%Traffic1000.87051304.7551.6511.696×10−552.695%PeopleOnStreet1002.26970375.5984.1763.224×10−554.334%Average————0.004%52.427%Table 5
Comparisons of computational overhead increment.
Encryption schemesAverage overhead increment (%)Scheme in [7]3.1Scheme in [11]2.3Scheme in [17]1.2Scheme in [20]3.1Scheme in [24]2.5The PSVE scheme0.004


#### 5.1.8. Compression Ratio and Separability Analysis

Compression ratio and separability are also two significant indicators for VEAs. The compression ratio measures the variation of video size between the original video and the encrypted video. Most existing VEAs are performed after the binarization process in entropy coding. However, the arithmetic coding process may have a slight impact on the compression ratio [17]. In the PSVE algorithm, the video bitstream is encrypted after compression coding, so the video size remains unchanged. As shown in Table 6, the proportion is 0% for different video sequences, verifying that the proposed PSVE scheme has no effect on video compression efficiency. Separability measures the independence between the video compression coding process and the video encryption process. If a VEA is embedded into the compression coding process, the structure of the video coding standard is modified to a specific codec including the encryption scheme, which is thus not applicable to existing standard codecs and not compatible with other video coding formats. The PSVE algorithm is completely independent of the video compression process. Thereby, it has separability. With satisfactory performance of compression ratio and separability, the proposed algorithm is suitable for practical applications.Table 6
Compression ratio for different video sequences (byte).
Video sequenceOriginalEncryptedProportion (%)Mobile6201996201990Foreman1547321547320RaceHorses4750154750150BlowingBubbles3406983406980PartyScene181098818109880BasketballDrillText6354036354030FourPeople3125643125640Johnny2442762442760ChinaSpeed170901617090160BQTerrace508721750872170Traffic374799637479960PeopleOnStree11057432110574320


### 5.2. AVC Bitstream

The AVC bitstream was selected as another example to certify the effectiveness of the proposed PSVE algorithm. The videos are encoded into video bitstreams by the H.264 encoder JM-19.0 and are decoded by the FFmpeg library. We setβ=0.001. Mobile, PartyScene, and ChinaSpeed are used to analyze subjective vision of the PSVE scheme on H.264/AVC. Figure 15 shows the original video frames and the encrypted video frames. When approximately 0.1% of the video bitstream is encrypted, the encrypted frames have obvious distortion compared with the original decoded frames. To further analyze the visual degradation, Figure 16 presents the objective indicators for six test video sequences of different resolutions. Both PSNR and SSIM values show a significant degradation, verifying the validity of the PSVE algorithm.Figure 15
The decoded results for H.264/AVC (Mobile, PartyScene, and ChinaSpeed). (a), (c), and (e) are the original frame #1; (b), (d), and (f) are the encrypted frame #1.
(a)(b)(c)(d)(e)(f)Figure 16
The RSNR and SSIM for H.264/AVC. (a) PSNR and (b) SSIM.
(a)(b)


### 5.3. Comparative Analysis

Here, the performance of the proposed PSVE algorithm is compared with several existing encryption schemes. Table7 shows the comparison results concerning key space, chosen-plaintext attack, compression ratio, separability and time complexity. From Table 7, existing VEAs are sufficient to satisfy real-time requirements, and some VEAs also have a constant compression ratio. Nevertheless, the encryption position in most existing VEAs is public, and the key space is only determined by the cipher technique used in their VEAs. Additionally, most SEAs fail to resist chosen-plaintext attack, and they are embedded into video coding without separability properties. In contrast, the key structure of the proposed PSVE algorithm consists of key1 and key2. key1 determines the encryption position and key2 is the initial key of cipher technique AES-CTR. Therefore, the PSVE scheme has a large key space. Besides, since the encryption position is closely related to NEBSP and the encryption process is completely separable from the video coding process, the proposed PSVE scheme is highly capable of resisting chosen-plaintext attack and satisfies the separability requirement. Therefore, it is more reliable in practical applications.Table 7
Performance comparation (PC1: key space; PC2: resistible to chosen-plaintext attack; PC3: unchanged compression ratio; PC4: separability; PC5: low time complexity).
AlgorithmsEncryption positionCipher techniquePC1PC2PC3PC4PC5[3]IPM, MVD, and QTCRC42128NoNoNoYes[4]IPM, MVD, and QTCAES2128NoNoNoYes[7]QTCLogistic chaotic map2128NoYesNoYes[8]QTCScrambling5×2128NoYesNoYes[10]MVD and QTCLogistic chaotic map2256NoYesNoYes[11]IPM, MVD, and QTCAES-CTR2128NoNoNoYes[13]MVD, QTC, and QPAES-CTR2128NoYesNoYes[14]IPM, MVD, QTC, QP, SAO, MVPIdx, MergeIndex, and RefFrmIdxAES-CTR2256NoNoNoYes[15]MVD and QTCRC62128NoYesNoYes[17]MVD, QTC, QP, SAO, part_mode, MergeIndex, and RefFrmIdxInteger dynamic coupling tent mapping2256NoYesNoYes[21]IPM, MVD, and QTCRabbit or RC42128NoNoNoYes[23]IPM, MVD, QTC,QP, MV ref idx, MV merge idx, MVP idx, and SAOAES-CTR2128NoNoNoYes[26]IPM, MVD, and QTCAES2297NoYesYesYes[29]NALU headerAES-ECB2128NoYesYesYesPSVEVCL NALU body3D SCL-HMC chaotic map and AES-CTR2568YesYesYesYes


## 5.1. HEVC Bitstream

In this section, twelve benchmark video sequences are used to analyze the proposed scheme. Table1 defines these video sequences. These video sequences have different resolutions, motions, colors, objects, and frame rates. They are compressed into the video bitstream by H.265 encoder HM-16.9 and are decoded based on the FFmpeg library. The proposed PSVE scheme is applied to the twelve benchmark video sequences for low delay mode.Table 1
Twelve benchmark video sequences.
Video sequenceResolutionFrame rateMobile352×28830Foreman352×28830RaceHorses416×24030BlowingBubbles416×24050PartyScene832×48050BasketballDrillText832×48060FourPeople1280×72060Johnny1280×72060ChinaSpeed1024×76830BQTerrace1920×108060Traffic2560×160030PeopleOnStreet2560×160030


### 5.1.1. Experimental Results

The extraction ratioβ is set to 0.001, and QP is set to 24. Figure 10 shows the encryption results of some sample frames. By encrypting only about 0.1% of the video bitstream, the decoded frames after encryption have obvious visual degradation, indicating that the proposed PSVE algorithm is effective.Figure 10
The encryption results for H.265/HEVC (Mobile, RaceHorses, PartyScene, FourPeople, ChinaSpeed, and BQTerrace). (a), (e), (i), (m), (q), and (u) are the original frame #1. (b), (f), (j), (n), (r), and (v) are the encrypted frame #1; (c), (g), (k), (o), (s), and (w) are the original frame #30. (d), (h), (l), (p), (t), and (x) are the encrypted frame #30.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)


### 5.1.2. Key Space Analysis

The key security can be satisfied when the key space is more than2128. The key structure of the proposed PSVE algorithm has two parts: (1) the initial key of the 3D SCL-HMC chaotic map key1 and (2) the initial key of AES-CTR algorithm key2. key1 determines the encryption position and key2 is used to decrypt the encrypted bytes. The 3D SCL-HMC chaotic map has three initial values and four system parameters x0,y0,z0,k,a,b,c. From Figure 3(a), since the hyperchaotic state of parameter k is only stable in the range of [0.7 1], k is set as constant 1 in the proposed PSVE scheme. Then, the key structure of key1 is shown in Figure 11. From Figures 2 and 3(b)–3(d), the 3D SCL-HMC can be ensured in hyperchaotic state when x0,y0,z0∈0,1 and a,b,c∈4,14. If stored in a double-precision decimal based on IEEE 754 standard, the 52-bit fraction can be traversed for x0,y0,z0,a,b, and c. Thereby, the key space Sk1>2526=2312. The key length of key2 is 256 bits; thus, the key space Sk2=2256. Therefore, the key space of the proposed PSVE algorithm Sk=Sk1×Sk2>2312×2256>2568>2128, indicating that brute-force attack can be effectively resisted in the proposed algorithm.Figure 11
Key structure ofkey1 in the PSVE scheme.


### 5.1.3. Key Sensitivity Analysis

To ensure key validity, key sensitivity is used to evaluate cryptosystems. Taking Foreman as an example,key1 is set as {0.1, 0.2, 0.3, 4, 4, 4}, and key2 is set as {0xA0, 0x7F, 0xA5, 0xAE, 0x2C, 0x26, 0xCB, 0xAB, 0xEA, 0xA6, 0x18, 0x3D, 0x59, 0x5C, 0x22, 0x27, 0x31, 0x85, 0xEB, 0x0E, 0x88, 0xFF, 0x00, 0xCF, 0x67, 0x60, 0x4A, 0x7E, 0xDE, 0x46, 0x76, and 0xCF}. key2 is slightly changed by only 1 bit to obtain key2∗, and key2∗ is defined as {0xB0, 0x7F, 0xA5, 0xAE, 0x2C, 0x26, 0xCB, 0xAB, 0xEA, 0xA6, 0x18, 0x3D, 0x59, 0x5C, 0x22, 0x27, 0x31, 0x85, 0xEB, 0x0E, 0x88, 0xFF, 0x00, 0xCF, 0x67, 0x60, 0x4A, 0x7E, 0xDE, 0x46, 0x76, 0xCF}. The test results are displayed in Figure 12. When key1 or key2 is slightly changed, the encrypted frame has an obvious difference. In the decryption process, the video information of decrypted frame is still obscured when a slight disturbance is applied to the key. Therefore, the PSVE scheme has key sensitivity.Figure 12
Key sensitivity analysis for the Foreman video. (a) Encrypted frame #1. (b) Encrypted frame #1 withx0+10−15. (c) Encrypted frame #1 with a+10−15. (d) Encrypted frame #1 with key2∗. (e) Decrypted frame #1. (f) Decrypted frame #1 with x0+10−15. (g) Decrypted frame #1 with a+10−15. (h) Decrypted frame #1 with key2∗.
(a)(b)(c)(d)(e)(f)(g)(h)Peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM) are two objective indicators to evaluate the quality of the encrypted frames. The PSNR is described as follows:(5)PSNR=10lg255×2551/MH×NV∑i=1MH∑j=1NVXi,j−Yi,j2,where MH×NV is the size of the video frame. X and Y represent the original frame and the encrypted frame, respectively. Generally, when PSNR<15, the encrypted frame provides little information about the original frame. The SSIM is defined as follows:(6)SSIM=2μXμY+k1L22σXY+k2L2μX2+μY2+k1L2σX2+σY2+k2L2,where μX, μY, σX, σY, and σXY are the average, variance, and covariance values of the original frame X and the encrypted frame Y. In (6), L = 255, k1 = 0.01, k2 = 0.03, and SSIM ∈0,1. A smaller value of SSIM implies a higher level of distortion.Table2 shows the results without encryption and with the PSVE scheme for different QPs. The average PSNR without encryption is greater than 40. Using the PSVE scheme, the average PSNR is reduced to below 10. The PSNR value has a significant distortion, indicating that the proposed PSVE scheme has a remarkable effect on the quality of the video sequences. The average SSIM without encryption is greater than 0.95. The video content of the decoded frames can be clearly and objectively recognized. By contrast, the average SSIM is down to roughly 0.2 based on the PSVE scheme. Hence, the texture and color information of video frames have been greatly protected.Table 2
PSNR, SSIM, and EDR for different video sequences.
Video sequenceQPNo encryptionPSVEPSNRSSIMEDRPSNRSSIMEDRMobile1249.10330.99750.01008.65210.13100.91412438.90490.98530.03718.74310.07050.90363628.57050.91870.14379.33510.08840.9182Foreman1248.94490.99400.02058.53770.21550.94562439.93760.96020.07038.77820.22910.95063632.48650.87430.25118.73350.22370.9375RaceHorses1248.88250.99600.01628.18420.16300.93162439.37170.97620.052411.28730.21940.92673630.15910.85240.199110.58630.14290.9184BlowingBubbles1248.96630.99630.021810.62310.14330.91592438.35670.96120.074812.03700.23100.91163629.77030.81990.27698.04570.07540.9419PartyScene1248.95960.99750.01838.65710.12640.90892438.16910.97250.05827.48540.11230.91403628.57900.84660.22917.63650.12440.9293BasketballDrillText1248.92370.99410.025610.43500.22400.92882439.53320.95290.08499.25930.20290.94043632.33200.84690.26557.43850.29960.9349FourPeople1248.67200.99180.02378.87820.11390.94962441.53360.96790.07847.78860.23760.93943634.80050.92650.27437.96170.21170.9303Johnny1248.52090.98980.04689.61300.31820.94902441.84920.96220.15967.32560.34010.95333636.47570.92500.41707.71620.33260.9522ChinaSpeed1251.90600.99620.01498.62460.22750.96672444.32730.98720.04817.19390.14010.94033634.98000.94150.15668.64340.15740.9341BQTerrace1249.36480.99610.02067.40700.27120.94822439.61370.96240.06267.16800.21140.92343631.06480.87080.21837.61530.24470.9414Traffic1248.80090.99320.024611.14360.39120.92882440.83770.96890.085610.52170.34020.92653633.64540.89530.29698.12360.35510.9204PeopleOnStreet1249.04320.99430.01879.01490.34560.94312440.68940.96920.06558.20830.28450.94403633.36170.88960.23908.70740.35340.9505Average—40.53990.95100.11418.78080.21940.9337


### 5.1.4. Edge Detection Attack Analysis

Edge detection is a significant indicator for evaluating the similarity of video frames before and after encryption. Human visual cells are particularly sensitive to the edges of objects. Provided that an encryption algorithm fails to resist edge detection attacks, some edge information will be detected in the encrypted video frames, thereby obtaining the outline and texture features of the original video frames. Here, the Laplace edge detection method is used to analyze the edge difference between the original and the encrypted video frames. Figure13 shows the edge information for the RaceHorses video and FourPeople video. The results indicate that the structural information is heavily distorted in the encrypted video frames.Figure 13
Edge detection for RaceHorses and FourPeople. (a) and (c) are the original frame #1; (b) and (d) are the encrypted frame #1.
(a)(b)(c)(d)


### 5.1.5. Chosen-Plaintext Attack Analysis

The chosen-plaintext attack is a common classical cipher attack. In this case, different plaintexts are chosen and the corresponding ciphertexts can be obtained by attackers. To decrypt the PSVE algorithm, two steps are carried out for attackers to obtain the video information: (1) determining the encryption position and (2) decrypting the encrypted bytes. Here, the twelve benchmark video sequences are encrypted using the identicalkey1 and key2. Although key1 and key2 are fixed, NEBSP remains different for different NALUs. Table 3 lists the first four encryption position Zpi for two NALUs in different video sequences. It indicates that the encryption position Zpi still varies with different NALUs. Therefore, with identical key1 and key2, provided that a video sequence and its corresponding encrypted video sequence are obtained by attackers, the encryption position and encryption bytes in other video sequences are still unable to be inferred. Thus, the chosen-plaintext attack is effectively resisted in the proposed PSVE algorithm.Table 3
Zpi with identical key1 and key2 for different video sequences.
Video sequenceNALU 1NALU 2Zp1Zp2Zp3Zp4Zp1Zp2Zp3Zp4Mobile5134361482219308839113Foreman4477286169107131BlowingBubbles489051191938621825132RaceHorses48334115191802424755207PartyScene6418772703393311161283BasketballDrillText51808417325730221337FourPeople510956133212614122-Johnny514311153233599921ChinaSpeed51780017225177962314BQTerrace711060545045291987144337486Traffic712368547747777574334372751PeopleOnStreet71261694824711296017218843


### 5.1.6. Replacement Attack Analysis

To further analyze the security of the PSVE algorithm, a replacement attack is introduced. In this case, the encrypted data is replaced with arbitrary data to obtain plaintext information. Constant 0, constant 1, and the most likely values by statistical analysis are three common data to measure the replacement attack. For example, Xu et al. replaced the encrypted data with constant values 0 and 1 [5]; Liu et al. substituted the encrypted elements with the most likely values [17]. In the PSVE algorithm, the encrypted bytes have no statistical characteristics, which means they are unable to be statistically analyzed. Therefore, constant 0, constant 1 and a random sequence are used to replace the encrypted bytes. Figure 14 shows the results of Mobile video under replacement attack. The encrypted frame #1 and frame #30 in Mobile video are still not intelligible, verifying the effectiveness against the replacement attack.Figure 14
Replacement attack results for Mobile. (a) encrypted frame #1 substituted by constant 0. (b) Encrypted frame #30 substituted by constant 0. (c) Encrypted frame #1 substituted by constant 1. (d) Encrypted frame #30 substituted by constant 1. (e) Encrypted frame #1 substituted by a random sequence. (f) Encrypted frame #30 substituted by a random sequence.
(a)(b)(c)(d)(e)(f)To further analyze the resistance of the proposed PSVE algorithm to edge detection attack, the edge difference ratio (EDR) is introduced and it is defined as follows:(7)EDR=∑i=1MH∑j=1NVX^i,j−Y^i,j∑i=1MH∑j=1NVX^i,j+Y^i,j,where MH×NV is the size of video frames and X^i,j and Y^i,j represent the edge detection pixel value of the original video frames and the encrypted video frames, respectively. The maximum EDR is 1, and a higher EDR indicates that the structural information is more distorted. The EDR results for different video sequences are listed in Table 2. When directly decoding the video bitstream without encryption, the average EDR of the twelve video sequences is around 0.1. In this case, the decoded video frames can be clearly and objectively recognized by human eyes. After encryption, the average value is about 0.93. The video structural information has been severely confused, indicating that the proposed PSVE algorithm has high credibility to resist edge detection attack.


### 5.1.7. Encryption Efficiency Analysis

Besides security, encryption efficiency is also an essential indicator. The experimental environment is Visual Studio 2013 with an Intel Core i5-10400 CPU @ 2.90 GHz and 16.0 GB RAM on the Windows 10 OS. QP is set to 24. Table4 shows the execution time of different video sequences. The ratio of encryption time to compression time TPSVE/THEVC measures the computational overhead difference between video coding with and without encryption. The average value of TPSVE/THEVC is about 0.004%, and it indicates that the encryption time TPSVE is negligible compared with the compression encoding time THEVC. Table 5 shows the average ratio of encryption time to compression time for some existing schemes with format compatibility [7, 11, 17, 20, 24]. The experimental results show that the ratio TPSVE/THEVC is much less than other existing VEAs. Furthermore, Table 4 also shows the running time TALL of directly encrypting the entire HEVC video bitstream using AES-CTR. The ratio TPSVE/TALL is about 52.427%. Obviously, the execution time of the PSVE algorithm TPSVE is much less than that of encrypting the entire HEVC video bitstream TALL. It indicates that the encryption efficiency is greatly improved by the PSVE algorithm. Therefore, the proposed PSVE algorithm is highly efficient for HEVC video encryption.Table 4
Execution time of different video sequences (sec).
Video sequenceFrameTPSVETHEVCTALLTPSVE/THEVCTPSVE/TALLMobile1000.1321902.3230.2426.939×10−554.545%Foreman1000.0351533.3190.0712.283×10−549.296%RaceHorses1000.0981947.0930.1895.033×10−551.852%BlowingBubbles1000.0631660.6250.1273.793×10−549.606%PartyScene1000.3747176.0220.7165.212×10−552.235%BasketballDrillText1000.1545968.5800.2812.580×10−554.804%FourPeople1000.0658527.2830.1247.622×10−652.419%Johnny1000.0688630.6620.1307.879×10−652.308%ChinaSpeed1000.35710276.2390.6833.474×10−552.269%BQTerrace1001.04030276.7181.9713.435×10−552.765%Traffic1000.87051304.7551.6511.696×10−552.695%PeopleOnStreet1002.26970375.5984.1763.224×10−554.334%Average————0.004%52.427%Table 5
Comparisons of computational overhead increment.
Encryption schemesAverage overhead increment (%)Scheme in [7]3.1Scheme in [11]2.3Scheme in [17]1.2Scheme in [20]3.1Scheme in [24]2.5The PSVE scheme0.004


### 5.1.8. Compression Ratio and Separability Analysis

Compression ratio and separability are also two significant indicators for VEAs. The compression ratio measures the variation of video size between the original video and the encrypted video. Most existing VEAs are performed after the binarization process in entropy coding. However, the arithmetic coding process may have a slight impact on the compression ratio [17]. In the PSVE algorithm, the video bitstream is encrypted after compression coding, so the video size remains unchanged. As shown in Table 6, the proportion is 0% for different video sequences, verifying that the proposed PSVE scheme has no effect on video compression efficiency. Separability measures the independence between the video compression coding process and the video encryption process. If a VEA is embedded into the compression coding process, the structure of the video coding standard is modified to a specific codec including the encryption scheme, which is thus not applicable to existing standard codecs and not compatible with other video coding formats. The PSVE algorithm is completely independent of the video compression process. Thereby, it has separability. With satisfactory performance of compression ratio and separability, the proposed algorithm is suitable for practical applications.Table 6
Compression ratio for different video sequences (byte).
Video sequenceOriginalEncryptedProportion (%)Mobile6201996201990Foreman1547321547320RaceHorses4750154750150BlowingBubbles3406983406980PartyScene181098818109880BasketballDrillText6354036354030FourPeople3125643125640Johnny2442762442760ChinaSpeed170901617090160BQTerrace508721750872170Traffic374799637479960PeopleOnStree11057432110574320


## 5.1.1. Experimental Results

The extraction ratioβ is set to 0.001, and QP is set to 24. Figure 10 shows the encryption results of some sample frames. By encrypting only about 0.1% of the video bitstream, the decoded frames after encryption have obvious visual degradation, indicating that the proposed PSVE algorithm is effective.Figure 10
The encryption results for H.265/HEVC (Mobile, RaceHorses, PartyScene, FourPeople, ChinaSpeed, and BQTerrace). (a), (e), (i), (m), (q), and (u) are the original frame #1. (b), (f), (j), (n), (r), and (v) are the encrypted frame #1; (c), (g), (k), (o), (s), and (w) are the original frame #30. (d), (h), (l), (p), (t), and (x) are the encrypted frame #30.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)


## 5.1.2. Key Space Analysis

The key security can be satisfied when the key space is more than2128. The key structure of the proposed PSVE algorithm has two parts: (1) the initial key of the 3D SCL-HMC chaotic map key1 and (2) the initial key of AES-CTR algorithm key2. key1 determines the encryption position and key2 is used to decrypt the encrypted bytes. The 3D SCL-HMC chaotic map has three initial values and four system parameters x0,y0,z0,k,a,b,c. From Figure 3(a), since the hyperchaotic state of parameter k is only stable in the range of [0.7 1], k is set as constant 1 in the proposed PSVE scheme. Then, the key structure of key1 is shown in Figure 11. From Figures 2 and 3(b)–3(d), the 3D SCL-HMC can be ensured in hyperchaotic state when x0,y0,z0∈0,1 and a,b,c∈4,14. If stored in a double-precision decimal based on IEEE 754 standard, the 52-bit fraction can be traversed for x0,y0,z0,a,b, and c. Thereby, the key space Sk1>2526=2312. The key length of key2 is 256 bits; thus, the key space Sk2=2256. Therefore, the key space of the proposed PSVE algorithm Sk=Sk1×Sk2>2312×2256>2568>2128, indicating that brute-force attack can be effectively resisted in the proposed algorithm.Figure 11
Key structure ofkey1 in the PSVE scheme.


## 5.1.3. Key Sensitivity Analysis

To ensure key validity, key sensitivity is used to evaluate cryptosystems. Taking Foreman as an example,key1 is set as {0.1, 0.2, 0.3, 4, 4, 4}, and key2 is set as {0xA0, 0x7F, 0xA5, 0xAE, 0x2C, 0x26, 0xCB, 0xAB, 0xEA, 0xA6, 0x18, 0x3D, 0x59, 0x5C, 0x22, 0x27, 0x31, 0x85, 0xEB, 0x0E, 0x88, 0xFF, 0x00, 0xCF, 0x67, 0x60, 0x4A, 0x7E, 0xDE, 0x46, 0x76, and 0xCF}. key2 is slightly changed by only 1 bit to obtain key2∗, and key2∗ is defined as {0xB0, 0x7F, 0xA5, 0xAE, 0x2C, 0x26, 0xCB, 0xAB, 0xEA, 0xA6, 0x18, 0x3D, 0x59, 0x5C, 0x22, 0x27, 0x31, 0x85, 0xEB, 0x0E, 0x88, 0xFF, 0x00, 0xCF, 0x67, 0x60, 0x4A, 0x7E, 0xDE, 0x46, 0x76, 0xCF}. The test results are displayed in Figure 12. When key1 or key2 is slightly changed, the encrypted frame has an obvious difference. In the decryption process, the video information of decrypted frame is still obscured when a slight disturbance is applied to the key. Therefore, the PSVE scheme has key sensitivity.Figure 12
Key sensitivity analysis for the Foreman video. (a) Encrypted frame #1. (b) Encrypted frame #1 withx0+10−15. (c) Encrypted frame #1 with a+10−15. (d) Encrypted frame #1 with key2∗. (e) Decrypted frame #1. (f) Decrypted frame #1 with x0+10−15. (g) Decrypted frame #1 with a+10−15. (h) Decrypted frame #1 with key2∗.
(a)(b)(c)(d)(e)(f)(g)(h)Peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM) are two objective indicators to evaluate the quality of the encrypted frames. The PSNR is described as follows:(5)PSNR=10lg255×2551/MH×NV∑i=1MH∑j=1NVXi,j−Yi,j2,where MH×NV is the size of the video frame. X and Y represent the original frame and the encrypted frame, respectively. Generally, when PSNR<15, the encrypted frame provides little information about the original frame. The SSIM is defined as follows:(6)SSIM=2μXμY+k1L22σXY+k2L2μX2+μY2+k1L2σX2+σY2+k2L2,where μX, μY, σX, σY, and σXY are the average, variance, and covariance values of the original frame X and the encrypted frame Y. In (6), L = 255, k1 = 0.01, k2 = 0.03, and SSIM ∈0,1. A smaller value of SSIM implies a higher level of distortion.Table2 shows the results without encryption and with the PSVE scheme for different QPs. The average PSNR without encryption is greater than 40. Using the PSVE scheme, the average PSNR is reduced to below 10. The PSNR value has a significant distortion, indicating that the proposed PSVE scheme has a remarkable effect on the quality of the video sequences. The average SSIM without encryption is greater than 0.95. The video content of the decoded frames can be clearly and objectively recognized. By contrast, the average SSIM is down to roughly 0.2 based on the PSVE scheme. Hence, the texture and color information of video frames have been greatly protected.Table 2
PSNR, SSIM, and EDR for different video sequences.
Video sequenceQPNo encryptionPSVEPSNRSSIMEDRPSNRSSIMEDRMobile1249.10330.99750.01008.65210.13100.91412438.90490.98530.03718.74310.07050.90363628.57050.91870.14379.33510.08840.9182Foreman1248.94490.99400.02058.53770.21550.94562439.93760.96020.07038.77820.22910.95063632.48650.87430.25118.73350.22370.9375RaceHorses1248.88250.99600.01628.18420.16300.93162439.37170.97620.052411.28730.21940.92673630.15910.85240.199110.58630.14290.9184BlowingBubbles1248.96630.99630.021810.62310.14330.91592438.35670.96120.074812.03700.23100.91163629.77030.81990.27698.04570.07540.9419PartyScene1248.95960.99750.01838.65710.12640.90892438.16910.97250.05827.48540.11230.91403628.57900.84660.22917.63650.12440.9293BasketballDrillText1248.92370.99410.025610.43500.22400.92882439.53320.95290.08499.25930.20290.94043632.33200.84690.26557.43850.29960.9349FourPeople1248.67200.99180.02378.87820.11390.94962441.53360.96790.07847.78860.23760.93943634.80050.92650.27437.96170.21170.9303Johnny1248.52090.98980.04689.61300.31820.94902441.84920.96220.15967.32560.34010.95333636.47570.92500.41707.71620.33260.9522ChinaSpeed1251.90600.99620.01498.62460.22750.96672444.32730.98720.04817.19390.14010.94033634.98000.94150.15668.64340.15740.9341BQTerrace1249.36480.99610.02067.40700.27120.94822439.61370.96240.06267.16800.21140.92343631.06480.87080.21837.61530.24470.9414Traffic1248.80090.99320.024611.14360.39120.92882440.83770.96890.085610.52170.34020.92653633.64540.89530.29698.12360.35510.9204PeopleOnStreet1249.04320.99430.01879.01490.34560.94312440.68940.96920.06558.20830.28450.94403633.36170.88960.23908.70740.35340.9505Average—40.53990.95100.11418.78080.21940.9337


## 5.1.4. Edge Detection Attack Analysis

Edge detection is a significant indicator for evaluating the similarity of video frames before and after encryption. Human visual cells are particularly sensitive to the edges of objects. Provided that an encryption algorithm fails to resist edge detection attacks, some edge information will be detected in the encrypted video frames, thereby obtaining the outline and texture features of the original video frames. Here, the Laplace edge detection method is used to analyze the edge difference between the original and the encrypted video frames. Figure13 shows the edge information for the RaceHorses video and FourPeople video. The results indicate that the structural information is heavily distorted in the encrypted video frames.Figure 13
Edge detection for RaceHorses and FourPeople. (a) and (c) are the original frame #1; (b) and (d) are the encrypted frame #1.
(a)(b)(c)(d)


## 5.1.5. Chosen-Plaintext Attack Analysis

The chosen-plaintext attack is a common classical cipher attack. In this case, different plaintexts are chosen and the corresponding ciphertexts can be obtained by attackers. To decrypt the PSVE algorithm, two steps are carried out for attackers to obtain the video information: (1) determining the encryption position and (2) decrypting the encrypted bytes. Here, the twelve benchmark video sequences are encrypted using the identicalkey1 and key2. Although key1 and key2 are fixed, NEBSP remains different for different NALUs. Table 3 lists the first four encryption position Zpi for two NALUs in different video sequences. It indicates that the encryption position Zpi still varies with different NALUs. Therefore, with identical key1 and key2, provided that a video sequence and its corresponding encrypted video sequence are obtained by attackers, the encryption position and encryption bytes in other video sequences are still unable to be inferred. Thus, the chosen-plaintext attack is effectively resisted in the proposed PSVE algorithm.Table 3
Zpi with identical key1 and key2 for different video sequences.
Video sequenceNALU 1NALU 2Zp1Zp2Zp3Zp4Zp1Zp2Zp3Zp4Mobile5134361482219308839113Foreman4477286169107131BlowingBubbles489051191938621825132RaceHorses48334115191802424755207PartyScene6418772703393311161283BasketballDrillText51808417325730221337FourPeople510956133212614122-Johnny514311153233599921ChinaSpeed51780017225177962314BQTerrace711060545045291987144337486Traffic712368547747777574334372751PeopleOnStreet71261694824711296017218843


## 5.1.6. Replacement Attack Analysis

To further analyze the security of the PSVE algorithm, a replacement attack is introduced. In this case, the encrypted data is replaced with arbitrary data to obtain plaintext information. Constant 0, constant 1, and the most likely values by statistical analysis are three common data to measure the replacement attack. For example, Xu et al. replaced the encrypted data with constant values 0 and 1 [5]; Liu et al. substituted the encrypted elements with the most likely values [17]. In the PSVE algorithm, the encrypted bytes have no statistical characteristics, which means they are unable to be statistically analyzed. Therefore, constant 0, constant 1 and a random sequence are used to replace the encrypted bytes. Figure 14 shows the results of Mobile video under replacement attack. The encrypted frame #1 and frame #30 in Mobile video are still not intelligible, verifying the effectiveness against the replacement attack.Figure 14
Replacement attack results for Mobile. (a) encrypted frame #1 substituted by constant 0. (b) Encrypted frame #30 substituted by constant 0. (c) Encrypted frame #1 substituted by constant 1. (d) Encrypted frame #30 substituted by constant 1. (e) Encrypted frame #1 substituted by a random sequence. (f) Encrypted frame #30 substituted by a random sequence.
(a)(b)(c)(d)(e)(f)To further analyze the resistance of the proposed PSVE algorithm to edge detection attack, the edge difference ratio (EDR) is introduced and it is defined as follows:(7)EDR=∑i=1MH∑j=1NVX^i,j−Y^i,j∑i=1MH∑j=1NVX^i,j+Y^i,j,where MH×NV is the size of video frames and X^i,j and Y^i,j represent the edge detection pixel value of the original video frames and the encrypted video frames, respectively. The maximum EDR is 1, and a higher EDR indicates that the structural information is more distorted. The EDR results for different video sequences are listed in Table 2. When directly decoding the video bitstream without encryption, the average EDR of the twelve video sequences is around 0.1. In this case, the decoded video frames can be clearly and objectively recognized by human eyes. After encryption, the average value is about 0.93. The video structural information has been severely confused, indicating that the proposed PSVE algorithm has high credibility to resist edge detection attack.


## 5.1.7. Encryption Efficiency Analysis

Besides security, encryption efficiency is also an essential indicator. The experimental environment is Visual Studio 2013 with an Intel Core i5-10400 CPU @ 2.90 GHz and 16.0 GB RAM on the Windows 10 OS. QP is set to 24. Table4 shows the execution time of different video sequences. The ratio of encryption time to compression time TPSVE/THEVC measures the computational overhead difference between video coding with and without encryption. The average value of TPSVE/THEVC is about 0.004%, and it indicates that the encryption time TPSVE is negligible compared with the compression encoding time THEVC. Table 5 shows the average ratio of encryption time to compression time for some existing schemes with format compatibility [7, 11, 17, 20, 24]. The experimental results show that the ratio TPSVE/THEVC is much less than other existing VEAs. Furthermore, Table 4 also shows the running time TALL of directly encrypting the entire HEVC video bitstream using AES-CTR. The ratio TPSVE/TALL is about 52.427%. Obviously, the execution time of the PSVE algorithm TPSVE is much less than that of encrypting the entire HEVC video bitstream TALL. It indicates that the encryption efficiency is greatly improved by the PSVE algorithm. Therefore, the proposed PSVE algorithm is highly efficient for HEVC video encryption.Table 4
Execution time of different video sequences (sec).
Video sequenceFrameTPSVETHEVCTALLTPSVE/THEVCTPSVE/TALLMobile1000.1321902.3230.2426.939×10−554.545%Foreman1000.0351533.3190.0712.283×10−549.296%RaceHorses1000.0981947.0930.1895.033×10−551.852%BlowingBubbles1000.0631660.6250.1273.793×10−549.606%PartyScene1000.3747176.0220.7165.212×10−552.235%BasketballDrillText1000.1545968.5800.2812.580×10−554.804%FourPeople1000.0658527.2830.1247.622×10−652.419%Johnny1000.0688630.6620.1307.879×10−652.308%ChinaSpeed1000.35710276.2390.6833.474×10−552.269%BQTerrace1001.04030276.7181.9713.435×10−552.765%Traffic1000.87051304.7551.6511.696×10−552.695%PeopleOnStreet1002.26970375.5984.1763.224×10−554.334%Average————0.004%52.427%Table 5
Comparisons of computational overhead increment.
Encryption schemesAverage overhead increment (%)Scheme in [7]3.1Scheme in [11]2.3Scheme in [17]1.2Scheme in [20]3.1Scheme in [24]2.5The PSVE scheme0.004


## 5.1.8. Compression Ratio and Separability Analysis

Compression ratio and separability are also two significant indicators for VEAs. The compression ratio measures the variation of video size between the original video and the encrypted video. Most existing VEAs are performed after the binarization process in entropy coding. However, the arithmetic coding process may have a slight impact on the compression ratio [17]. In the PSVE algorithm, the video bitstream is encrypted after compression coding, so the video size remains unchanged. As shown in Table 6, the proportion is 0% for different video sequences, verifying that the proposed PSVE scheme has no effect on video compression efficiency. Separability measures the independence between the video compression coding process and the video encryption process. If a VEA is embedded into the compression coding process, the structure of the video coding standard is modified to a specific codec including the encryption scheme, which is thus not applicable to existing standard codecs and not compatible with other video coding formats. The PSVE algorithm is completely independent of the video compression process. Thereby, it has separability. With satisfactory performance of compression ratio and separability, the proposed algorithm is suitable for practical applications.Table 6
Compression ratio for different video sequences (byte).
Video sequenceOriginalEncryptedProportion (%)Mobile6201996201990Foreman1547321547320RaceHorses4750154750150BlowingBubbles3406983406980PartyScene181098818109880BasketballDrillText6354036354030FourPeople3125643125640Johnny2442762442760ChinaSpeed170901617090160BQTerrace508721750872170Traffic374799637479960PeopleOnStree11057432110574320


## 5.2. AVC Bitstream

The AVC bitstream was selected as another example to certify the effectiveness of the proposed PSVE algorithm. The videos are encoded into video bitstreams by the H.264 encoder JM-19.0 and are decoded by the FFmpeg library. We setβ=0.001. Mobile, PartyScene, and ChinaSpeed are used to analyze subjective vision of the PSVE scheme on H.264/AVC. Figure 15 shows the original video frames and the encrypted video frames. When approximately 0.1% of the video bitstream is encrypted, the encrypted frames have obvious distortion compared with the original decoded frames. To further analyze the visual degradation, Figure 16 presents the objective indicators for six test video sequences of different resolutions. Both PSNR and SSIM values show a significant degradation, verifying the validity of the PSVE algorithm.Figure 15
The decoded results for H.264/AVC (Mobile, PartyScene, and ChinaSpeed). (a), (c), and (e) are the original frame #1; (b), (d), and (f) are the encrypted frame #1.
(a)(b)(c)(d)(e)(f)Figure 16
The RSNR and SSIM for H.264/AVC. (a) PSNR and (b) SSIM.
(a)(b)


## 5.3. Comparative Analysis

Here, the performance of the proposed PSVE algorithm is compared with several existing encryption schemes. Table7 shows the comparison results concerning key space, chosen-plaintext attack, compression ratio, separability and time complexity. From Table 7, existing VEAs are sufficient to satisfy real-time requirements, and some VEAs also have a constant compression ratio. Nevertheless, the encryption position in most existing VEAs is public, and the key space is only determined by the cipher technique used in their VEAs. Additionally, most SEAs fail to resist chosen-plaintext attack, and they are embedded into video coding without separability properties. In contrast, the key structure of the proposed PSVE algorithm consists of key1 and key2. key1 determines the encryption position and key2 is the initial key of cipher technique AES-CTR. Therefore, the PSVE scheme has a large key space. Besides, since the encryption position is closely related to NEBSP and the encryption process is completely separable from the video coding process, the proposed PSVE scheme is highly capable of resisting chosen-plaintext attack and satisfies the separability requirement. Therefore, it is more reliable in practical applications.Table 7
Performance comparation (PC1: key space; PC2: resistible to chosen-plaintext attack; PC3: unchanged compression ratio; PC4: separability; PC5: low time complexity).
AlgorithmsEncryption positionCipher techniquePC1PC2PC3PC4PC5[3]IPM, MVD, and QTCRC42128NoNoNoYes[4]IPM, MVD, and QTCAES2128NoNoNoYes[7]QTCLogistic chaotic map2128NoYesNoYes[8]QTCScrambling5×2128NoYesNoYes[10]MVD and QTCLogistic chaotic map2256NoYesNoYes[11]IPM, MVD, and QTCAES-CTR2128NoNoNoYes[13]MVD, QTC, and QPAES-CTR2128NoYesNoYes[14]IPM, MVD, QTC, QP, SAO, MVPIdx, MergeIndex, and RefFrmIdxAES-CTR2256NoNoNoYes[15]MVD and QTCRC62128NoYesNoYes[17]MVD, QTC, QP, SAO, part_mode, MergeIndex, and RefFrmIdxInteger dynamic coupling tent mapping2256NoYesNoYes[21]IPM, MVD, and QTCRabbit or RC42128NoNoNoYes[23]IPM, MVD, QTC,QP, MV ref idx, MV merge idx, MVP idx, and SAOAES-CTR2128NoNoNoYes[26]IPM, MVD, and QTCAES2297NoYesYesYes[29]NALU headerAES-ECB2128NoYesYesYesPSVEVCL NALU body3D SCL-HMC chaotic map and AES-CTR2568YesYesYesYes


## 6. Conclusion

In this study, a novel video encryption is proposed based on Z-PRNG. It provides visual protection for HEVC video and AVC video. Based on the 3D SCL-HMC hyperchaotic map, Z-PRNG is designed, and it is used to determine the encryption position in the video bitstream. Subsequently, AES-CTR algorithm is introduced to encrypt the extracted bytes. The performance is analyzed by key space, key sensitivity, edge detection attack, chosen-plaintext attack, replacement attack, encryption efficiency, compression ratio, and separability. The results show that it has a large key space and high security to resist common attacks. With a lower proportion of encrypted bytes, the time complexity is much less than existing VEAs. Furthermore, the proposed algorithm has an unchanged compression ratio, and it is completely independent of video coding. Therefore, the PSVE algorithm lays a foundation for the development of video VEAs and is applicable in video security. In the future, the proposed encryption algorithm will be applied to other information carriers, such as text, image, and audio.



---

*Source: 1415505-2022-11-17.xml*