Top Banner
Motion Vectors Signs Encryption for H.264/AVC N. Khlif, T. Damak, F. Kammoun and N. Masmoudi Electrical department, Laboratory of Electronics and Technology of Information (LETI), National School of Engineers of Sfax (ENIS) Sfax, Tunisia [email protected], [email protected], [email protected], [email protected] AbstractCurrently, research is focused on selective encryption to protect movies against attacks transmitted over a public network. This choice is taken to ensure the security of compressed data without adding an important supplemental computational time for the encryption. So the encryption module is inserted into the video compression chain. In this paper we present an encryption method based chaos inserted in the H.264/AVC chain specially for the motion vectors signs. The results will be deducted according to the values of PSNR (Peak Signal to Noise Ratio), SSIM (Structural SIMilarity) and the encryption rate. Motion vectors signs encryption (MVSE) seems being interesting to lose the visual quality of the video for Inter predicted frames since movies are sensible to the motion sign. KeywordsSelective encryption; H.264/AVC; Inter prediction mode; motion vectors I. INTRODUCTION Nowadays, attack algorithms are advanced. So ensuring the security of data transmitted through a public channel becomes more required. Certainly, to transmit fixed images and video, compression is necessary for reducing the amount of data. So, we have to combine cryptography and compression to secure the transmission of such data. Selective encryption is an approach that encrypts only some parts of the data to reduce the computational time and ensure security with maintaining a certain level of compression. Also, for applications where time is a critical factor like satellite programs and telemedicine, the known standard encryption algorithms are not benefic. Contrary, chaotic encryption seems be a good candidate to replace those algorithms. In this paper we present an encryption algorithm based chaos inserted in the H.264/AVC video compression chain. We propose here to encrypt motions vectors signs. In addition, we present metrics to analyze the effect of encryption, such as PSNR, SSIM and the encryption rate which presents the ratio between the number of bits encrypted and the entire bitstream. We present in section II, the state of the art of selective encryption of the H.264/AVC codec with a focus on the method used. In section III, we discuss the experimental results. Finally, in Section IV, we conclude and we give the prospects of our work. II. STATE OF THE ART JVT is a partnership effort between the ITU-T and ISO / IEC known as JVT leading to the video compression chain H.264/AVC [1] known also as MPEG-4 Part10. Fig. 1 describes the principle of the video compression chain H.264/AVC. A video sequence is a set of frames. Each frame is divided into 16×16 macro blocks. Each macro block will be encoded separately. This chain contains many modules. The first one is the module decision that decides which mode Inter or Intra prediction should be used. Then, the residual prediction error will pass to the second module which is the entire transformation. The transformed coefficients are then quantized using a quantization matrix. The final module of the chain is the entropy coding one. In this module, quantized coefficients, after a zigzag scan, will form the bitstream by taking codes using either the Context Adaptive Variable Length Coding CAVLC or the Context Adaptive Binary Arithmetic Coding CABAC. The decoding chain is inserted in the encoding one after quantization module to reconstruct the current block or current frame used to the prediction of the next block or frame. The reconstruction of current frame begins when quantized coefficients passed by the inverse quantization module and the inverse transform after that to obtain the residual error of the decoded prediction. This error will be added to the first prediction error calculated in the prediction module. The result will be put to the deblocking filter to reconstruct the frame and hence the whole video. The encryption on H.264/AVC, should conserve its format compliance [2] that is to say, keep the same syntax for the bitstream. In the literature, frequently, to encrypt data researchers used symmetric encryption like DES (Data Encryption Standard) [3] or AES [4] (Advanced Encryption Standard). There are three manners to encrypt video data. The first method is the encryption before compression e.g. permutation. [5] This method is not suitable because it decreases the compression performances. The second one is to encrypt the whole bitstream after compression. This method, although secure, is not the best one because of the considerable computational time added to the compression one. 1st International Conference on Advanced Technologies for Signal and Image Processing - ATSIP'2014 March 17-19, 2014, Sousse, Tunisia CRY-11 978-1-4799-4889-5/14/$31.00 ©2014 IEEE
6

Motion vectors signs encryption for H.264/AVC

May 03, 2023

Download

Documents

Hajjej Lotfi
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Motion vectors signs encryption for H.264/AVC

Motion Vectors Signs Encryption for H.264/AVC

N. Khlif, T. Damak, F. Kammoun and N. Masmoudi Electrical department, Laboratory of Electronics and Technology of Information (LETI), National School of Engineers of Sfax

(ENIS) Sfax, Tunisia

[email protected], [email protected], [email protected], [email protected]

Abstract— Currently, research is focused on selective encryption to protect movies against attacks transmitted over a public network. This choice is taken to ensure the security of compressed data without adding an important supplemental computational time for the encryption. So the encryption module is inserted into the video compression chain. In this paper we present an encryption method based chaos inserted in the H.264/AVC chain specially for the motion vectors signs. The results will be deducted according to the values of PSNR (Peak Signal to Noise Ratio), SSIM (Structural SIMilarity) and the encryption rate. Motion vectors signs encryption (MVSE) seems being interesting to lose the visual quality of the video for Inter predicted frames since movies are sensible to the motion sign.

Keywords—Selective encryption; H.264/AVC; Inter prediction mode; motion vectors

I. INTRODUCTION Nowadays, attack algorithms are advanced. So ensuring the

security of data transmitted through a public channel becomes more required. Certainly, to transmit fixed images and video, compression is necessary for reducing the amount of data. So, we have to combine cryptography and compression to secure the transmission of such data. Selective encryption is an approach that encrypts only some parts of the data to reduce the computational time and ensure security with maintaining a certain level of compression. Also, for applications where time is a critical factor like satellite programs and telemedicine, the known standard encryption algorithms are not benefic. Contrary, chaotic encryption seems be a good candidate to replace those algorithms. In this paper we present an encryption algorithm based chaos inserted in the H.264/AVC video compression chain. We propose here to encrypt motions vectors signs.

In addition, we present metrics to analyze the effect of encryption, such as PSNR, SSIM and the encryption rate which presents the ratio between the number of bits encrypted and the entire bitstream.

We present in section II, the state of the art of selective encryption of the H.264/AVC codec with a focus on the method used. In section III, we discuss the experimental results. Finally, in Section IV, we conclude and we give the prospects of our work.

II. STATE OF THE ART JVT is a partnership effort between the ITU-T and ISO /

IEC known as JVT leading to the video compression chain H.264/AVC [1] known also as MPEG-4 Part10.

Fig. 1 describes the principle of the video compression chain H.264/AVC. A video sequence is a set of frames. Each frame is divided into 16×16 macro blocks. Each macro block will be encoded separately. This chain contains many modules. The first one is the module decision that decides which mode Inter or Intra prediction should be used. Then, the residual prediction error will pass to the second module which is the entire transformation. The transformed coefficients are then quantized using a quantization matrix. The final module of the chain is the entropy coding one. In this module, quantized coefficients, after a zigzag scan, will form the bitstream by taking codes using either the Context Adaptive Variable Length Coding CAVLC or the Context Adaptive Binary Arithmetic Coding CABAC. The decoding chain is inserted in the encoding one after quantization module to reconstruct the current block or current frame used to the prediction of the next block or frame.

The reconstruction of current frame begins when quantized coefficients passed by the inverse quantization module and the inverse transform after that to obtain the residual error of the decoded prediction. This error will be added to the first prediction error calculated in the prediction module. The result will be put to the deblocking filter to reconstruct the frame and hence the whole video.

The encryption on H.264/AVC, should conserve its format compliance [2] that is to say, keep the same syntax for the bitstream. In the literature, frequently, to encrypt data researchers used symmetric encryption like DES (Data Encryption Standard) [3] or AES [4] (Advanced Encryption Standard).

There are three manners to encrypt video data. The first method is the encryption before compression e.g. permutation. [5] This method is not suitable because it decreases the compression performances. The second one is to encrypt the whole bitstream after compression. This method, although secure, is not the best one because of the considerable computational time added to the compression one.

1st International Conference on Advanced Technologies for Signal and Image Processing - ATSIP'2014 March 17-19, 2014, Sousse, Tunisia CRY-11

978-1-4799-4889-5/14/$31.00 ©2014 IEEE

Page 2: Motion vectors signs encryption for H.264/AVC

Fig. 1. The compression video chain H.264/AVC

The third method is selective encryption which consists of joining encryption and compression. This orientation is taken to reduce computational time. So encryption can be inserted in many positions on the H.264/AVC chain.

The first way is discussed in [6] and [7] respectively for encrypting Intra prediction and Inter prediction mode. The encryption can also affect the motion vectors signs [8] or the suffix code Exp-Golomb used to code differential motion vectors [9]. The order of the scan, after quantization [10] and some parts of codes generated by CABAC or CAVLC entropy coding[11], could be modified to keep an encrypted bitstream.

Known that motion vectors are the first responsible for movies, we chose to work on a method to encrypt them. A simple alteration on signs motion vectors can hide the entire

moving frame. So we developed a chaotic encryption algorithm to modify the motion vectors signs. It consists of generating a chaotic sequence. We have used the chaotic signal defined by the following logistic function (1) [12]

X n+1 = µ X n (1 – X n) (1)

Where: μ is a parameter in the interval [0, 4], X0 is a point in the interval [0, 1]. Chaos sets for μ = 3.57. This sequence will be transformed to a binary sequence while comparing each value to the initial condition X0. According to each bit of the binary sequence, the motion vector will change its sign or not. This method concerns only the inter predicted frame. Here we worked on baseline profile with a choice of 1 GOP where the first frame is intra predicted and the others are inter predicted P.

+

-

+ +

Input video

Entire Transform

Inverse Transform

Inverse Quantization

Quantization Entropy Coding

Deblocking Filter

Intra Prediction

Reconstructed Frame

Motion Compensation

Motion Estimation

Bitstream

Intra/Inter Motion Vector

Control

Page 3: Motion vectors signs encryption for H.264/AVC

III. RESULTS All results are taken for 300 frames .cif sequences

(Foreman and mobile) with a size of 352×288. Our algorithm is developed with the C language (Visual Studio 2010). Results are given in terms of PSNR and SSIM values [11], [13], [14], Encryption Rate (ER) [14] and computational time for different Qp values. The computing time is calculated with an Intel (R) Pentuim (R) 4CPU 3.00GHz machine.

First, we summarize the different characteristics of our H.264/AVC codec given with Foreman.cif sequence in the Table I. This table gives us idea about the quality of our codec. The similarity between original video and decoded video is approximately equal to 1 with a PSNR range between 30 dB and 40 dB.

We present the results for motion vectors signs encryption for different Qp values with Foreman.cif sequence in the Table II. We notice an increase in bit rate because the information is changed. For example at Qp = 28, it increased by 2.91 Kbit/Frame representing 5.67%. On average the bit rate increased from 48.23 Kbit/Frame without encryption to 51.17 Kbit/Frame with MVSE representing an increase by6.09%. A small computing time will be added while encryption (~27ms) and decryption (~4ms). For example at Qp = 28, encryption added 7ms for the encoding time representing 0.7% and decryption added 2ms for the decoding time representing 3.77%.

Those results improve the interest of the choice to insert encryption in the compression chain. This method is beneficial for inter predicted frames since the PSNR values decreases considerably for the three colors components (luma Y and chroma U and V) with almost the same degree and the SSIM which doesn't exceed 0.31. For example at Qp = 28, MVSE decreases PSNR values from 35.92dB, 39.77dB, and 39.60 dB to 10.67 dB, 12.03 dB and 11.83 dB for respectively luma Y, chroma U and chroma V. Seems to PSNR value, SSIM decreases from 0.9968 to 0.2767. The encryption rate is on average 48.52%.

To emphasize the efficiency of our work, we applicated MVSE at different Qp values for the mobile.cif sequence which presents more motions than the Foreman.cif one. We notice that luma PSNR values for the mobile.cif sequence (Fig. 2) are lower than those for the Foreman.cif one. On average it is equal to 8 dB for the mobile.cif sequence versus 10 dB for the Foreman.cif one. This result coincides with SSIM values given for those sequences which is ranging between 0.2 and 0.4 for the Foreman.cif sequence and between -0.1 and 0.1 for the mobile.cif one (Fig. 3). That means the sequence lost its visual quality. Both Fig. 2 and Fig. 3 give us an idea about the interest of the MVSE for sequences which are more eventful. On average at Qp = 32, MVSE decreases PSNR values from 31.65 dB, 35.73 dB, and 34.90 dB to 9.86 dB, 11.46 dB and 11.01 dB for respectively luma Y, chroma U and chroma V. Seems to PSNR values, SSIM decreases from 0.9928 to 0.1779 with an encryption rate equal to 48.982% as shown in Table III.

TABLE I. CHARACTERISTICS OF THE H.264/AVC CODEC FOR DIFFERENT QP VALUES WITH THE FOREMAN.CIF SEQUENCE Qp Time(s)

(Encoding) Bit Rate

(Kbit/Frame) Time(s)

(Decoding) PSNR (dB) SSIM

Y U V 24 1.177 75.51 0.057 38.45 41.41 42.00 0.9982 28 0.994 51.32 0.053 35.92 39.77 39.60 0.9968 32 1.015 36.71 0.050 33.46 38.63 37.99 0.9942 36 1.010 29.38 0.050 31.33 37.43 36.38 0.9904

TABLE II. MOTION VECTORS SIGNS ENCRYPTION FOR DIFFERENT QP VALUES WITH THE FOREMAN.CIF SEQUENCE

TABLE III. COMPARISON OF ER, PSNR AND SSIM WITHOUT AND WITH ENCRYPTION USING MVSE BETWEEN FOREMAN AND MOBILE SEQUENCES AT QP = 32

Qp Time(s) (Encoding + Encryption)

Bit Rate (Kbit/Frame)

Time(s) (Decoding + Decryption)

PSNR (dB) SSIM Encryption Rate (ER)

% Y U V

24 1.183 78.35 0.059 11.26 11.77 11.70 0.3016 49.561 28 1.001 54.23 0.055 10.67 12.03 11.83 0.2767 49.175 32 1.100 39.68 0.059 10.74 11.72 11.79 0.2805 48.324 36 1.020 32.44 0.052 11.18 11.63 11.92 0.2617 47.049

Sequence PSNR (dB) SSIM

Without With

Encryption Rate (ER)

% Y

Without With U

Without With V

Without With Foreman 33.46 10.74 38.63 11.72 37.99 11.79 0.9942 0.2805 48.324 Mobile 29.84 8.99 32.84 11.21 31.81 10.24 0.9915 0.0753 49.640

Page 4: Motion vectors signs encryption for H.264/AVC

Fig. 2. Luma PSNR range for Foreman and Mobile svalues with MVSE

In the Fig. 4, Fig. 5 and Fig. 6 we compavisibility of frames 1, 3 and 100 encryptedvectors signs encryption (MVSE) method frames for the Foreman.cif and the Mobildifferent Qp values. We notice that for the frame 100 we can content. This good result comes from the prebetween blocks and so frames. That is modification in the first inter predicted blockerror to others blocks. This method doesn’t encrypt frame 0, whichthe same thing for blocks intra predicted in thwe should try to find a solution to hide those

Our work has been focused on the encvectors signs for H.264/AVC using a chagenerate a random sequence to mask the bdone by Wang, O’Neill and Kurugollu random bit sequence to flip the motion vmethod presents PSNR and SSIM values found in [13]. That’s why our method sefficient because the content of the videoperceptible.

IV. CONCLUSION This paper presented an encryption

H.264/AVC codec using chaotic cryptographscheme encrypts motion vectors signs. It cona chaotic signal which will be transformsequence. According to the last one the mchange its sign or not. It has a good result wand SSIM values, the encryption rate aencryption and decryption computing time and decoder respectively. This method is bpredicted blocks which will be invisible wintra predicted blocks remains intact which cidea about the content of the video and codecreases the MVSE efficiency. So we wilwork, first, to concentrate on a method to hblocks and second combine it with the MVSE

sequences versus Qp

are respectively the d using the motion

with the original le.cif sequences at

not distinguish its edicted relation

to say, a simple k will translate the

h is intra predicted, he other frames.So sequences parts.

cryption of motion aotic algorithm to bit sign. The work

[13] considers a vector sign. Our lower than those

seems being more o sequence is less

scheme for the hy algorithm. This

nsists of generating med to a binary

motion vector will when seeing PSNR nd the negligible added to encoder

beneficial for inter when encrypted but

can give viewer an onsequently it will ll try in our future hide intra predicted E.

Fig. 3. SSIM range for Foreman andwith M

REFER

[1] Joint Video Team (JVT) o“Draft ITU-T RecommendStandard of Joint Video ISO/IEC 14496-10 AVC)” ,

[2] T. Stuz, A. Uhl, “A SurvIEEE, Transactions on circuVol. 22, No 3, March 2012,

[3] National Institute of StandaStandard (DES) “, FederaPublication (FIPS PUB) 46-

[4] National Institute of StanEncryption Standard(AES)Standards Publication (FIPS

[5] P. Carrillo, H. Kalva, independent object encrypsurveillance, IEEE, ProceeMultimedia & Expo, ICME’

[6] J. Ahn, H.J. Shim, B. Jeon method using intra predictiScience Springer-Verlag, PrInformation Processing, PCDecember 2004, pp. 386–39

[7] Y. Li, L. Liang, Z. Su, analgorithm for H.264“, IEEEConference on InformatProcessing ICICS’05, Dece

[8] N. Thomas, D. Lefol, D. BH.264 transcoder using seleSep 2007, pp. IV-85-IV-88.

[9] S. Lian, Z. Liu, Z. Ren, andand watermarking in viCircuits Syst. Video Tech774-778.

[10] F. Dufaux and T. Ebrahimprivacy protection”, IEEE, Conference on Image ProceOctober 2008, pp. 1688-169

[11] Z. Shahid, M. ChaumonH.264/AVC by Selective Enand P Frames“, IEEE, TranVideo Technology 21, 5(201

[12] Robert M.May, “Simple Complicated Dynamics”, N467.

[13] Y. Wang, M. O’Neill and Encryption of Motion VectEuropean Signal ProcessBucharest, Romania, Augus

[14] L. Dubois, W. Puech, H.264/AVC with ReducedEURASIP, 19th Europe

d Mobile sequences versus Qp values MVSE

RENCES of ISO/IEC MPEG & ITU-T VCEG, dation and Final Draft International

Specification (ITU-T Rec. H.264 | Doc. G050r1, March 2003.

vey of H.264 AVC/SVC Encryption”, uits and systems for video technology, pp. 325-339.

ards and Technology, “Data Encryption al Information Processing Standards -3, 25 October 1999. ndards and Technology, “Advanced

) “, Federal Information Processing S PUB) 197, 26 November 2001. and S. Magliveras, ”Compression

ption for ensuring privacy in video edings of International Conference on ’08, June 2008, pp. 273–27. and I. Choi, “Digital video scrambling on mode”, Lecture Notes in Computer roceedings of Advances in Multimedia

CM’ 04, volume 3333 , Tokyo, Japan, 93. nd J. Jiang, “A new video encryption

E, Proceedings of the Fifth International tion, Communications and Signal

ember 2005, pp. 1121– 1124. Bull, and D. Redmil, “ A novel secure ective encryption “, IEEE , Proc ICIP, d H.Wang, “ Commutative encryption ideo compression “, IEEE, Trans. hnol, vol. 17, no. 6, June 2007, pp.

mi, “ H.264/AVC video scrambling for Proceedings of the IEEE International

essing, ICIP ’08, San Diego, CA, USA, 91. nt, W. Puech, “Fast Protection of ncryption of CAVLC and CABAC for I nsactions on Circuits and Systems for 11) , pp. 565-576.

Mathematical Models with Very ature, vol 261, June 10 , 1976, pp 459-

F. Kurugollu, “The Improved sign bit tors for H.264/AVC “, EURASIP, 20th sing Conference (EUSIPCO 2012), t 27 - 31, 2012, pp. 1752-1756. J. Blanc-Talon, “Fast Protection of

d Selective Encryption of CAVLC“, ean Signal Processing Conference

Page 5: Motion vectors signs encryption for H.264/AVC

(EUSIPCO 2011), Barcelona, Spain, August 29 – September 2, 2011, pp. 2185-2189.

(a)

(a’)

(b)

(c)

(d)

(e)

(b’)

(c’)

(d’)

(e’)

Fig. 4. Comparisons of Frame 1 for respectively Foreman and Mobile sequences ; (a), (a’)The originals; (b), (b’)MVSE at Qp = 24; (c), (c’) MVSE at Qp = 28; (d), (d’) MVSE at Qp = 32; (e),(e’) MVSE at Qp = 36

(a)

(a’)

(b)

(c)

(d)

(e)

(b’)

(c’)

(d’)

(e’)

Fig. 5. Comparisons of Frame 3 for respectively Foreman and Mobile sequences ; (a), (a’)The originals; (b), (b’)MVSE at Qp = 24; (c), (c’) MVSE at Qp = 28; (d), (d’) MVSE at Qp = 32; (e),(e’) MVSE at Qp = 36

Page 6: Motion vectors signs encryption for H.264/AVC

(a)

(a’)

(b)

(c)

(d)

(e)

(b’)

(c’)

(d’)

(e’)

Fig. 6. Comparisons of Frame 100 for respectively Foreman and Mobile sequences ; (a), (a’)The originals; (b), (b’)MVSE at Qp = 24; (c), (c’) MVSE at Qp = 28; (d), (d’) MVSE at Qp = 32; (e),(e’) MVSE at Qp = 36