[go: up one dir, main page]

CN108174207A - H.264 Entropy Coding Video Encryption Method Based on ZUC Algorithm - Google Patents

H.264 Entropy Coding Video Encryption Method Based on ZUC Algorithm Download PDF

Info

Publication number
CN108174207A
CN108174207A CN201711478565.0A CN201711478565A CN108174207A CN 108174207 A CN108174207 A CN 108174207A CN 201711478565 A CN201711478565 A CN 201711478565A CN 108174207 A CN108174207 A CN 108174207A
Authority
CN
China
Prior art keywords
encoding
code stream
zero coefficient
coefficient
trailing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711478565.0A
Other languages
Chinese (zh)
Inventor
曾浩
纪磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN201711478565.0A priority Critical patent/CN108174207A/en
Publication of CN108174207A publication Critical patent/CN108174207A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/002Countermeasures against attacks on cryptographic mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving video stream encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4408Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream encryption, e.g. re-encrypting a decrypted video stream for redistribution in a home network

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本发明涉及一种基于ZUC算法的H.264熵编码视频加密方法,属于移动通信技术领域。该方法为:在H.264视频压缩编码的CAVLC编码过程中,采用ZUC算法生成随机密钥流,与非零系数个数、拖尾系数个数、拖尾系数符号、最后一个非零系数前零的个数、每个非零系数前零的个数编码后的码流相异或,得到新的码流,然后与其余非零系数幅值编码后的码流合并输出,实现加密;本发明增加了加密参数的数量,提高了安全性;与索引得到的明文相异或,复杂度低,并未增加太多的开销;采用ZUC算法,运算速度快,易于实现,性能上可以替代现有加密方法中所用的国外加密算法,实现了加密算法的国产化。

The invention relates to an H.264 entropy coding video encryption method based on a ZUC algorithm, and belongs to the technical field of mobile communication. The method is as follows: in the CAVLC encoding process of H.264 video compression encoding, the ZUC algorithm is used to generate a random key stream, and the number of non-zero coefficients, the number of trailing coefficients, the sign of trailing coefficients, and the last non-zero coefficient The code stream encoded by the number of zeros and the number of zeros before each non-zero coefficient is XORed to obtain a new code stream, and then combined with the code stream encoded by the amplitude of other non-zero coefficients to realize encryption; The invention increases the number of encryption parameters and improves security; it is different from the plaintext obtained by the index, the complexity is low, and does not increase too much overhead; the ZUC algorithm is used, the calculation speed is fast, easy to implement, and can replace the existing There are foreign encryption algorithms used in the encryption method, which realizes the localization of the encryption algorithm.

Description

基于ZUC算法的H.264熵编码视频加密方法H.264 Entropy Coding Video Encryption Method Based on ZUC Algorithm

技术领域technical field

本发明属于移动通信技术领域,涉及基于ZUC算法的H.264熵编码视频加密方法。The invention belongs to the technical field of mobile communication, and relates to an H.264 entropy coding video encryption method based on a ZUC algorithm.

背景技术Background technique

①H.264是新一代视频编码标准,它着重于解决压缩的高效率和传输的高可靠性,其优异的压缩性能及良好的网络性能使其在视频实时通信、网络流媒体等各个领域广泛应用。熵编码是无损压缩编码方法,普遍应用于H.264及其他视频压缩标准。②对熵编码加密方法已有一定的研究。Wen等人提出了直接置乱编码码表或加密码字序号的加密方法。Tosun和Feng提出了基于前向纠错编码的加密方法。李晓举等提出基于CAVLC熵编码的可分级视频加密方案,提高了加密算法的灵活性。①H.264 is a new generation of video coding standard. It focuses on high efficiency of compression and high reliability of transmission. Its excellent compression performance and good network performance make it widely used in various fields such as video real-time communication and network streaming media. . Entropy coding is a lossless compression coding method commonly used in H.264 and other video compression standards. ② There has been some research on the entropy coding encryption method. Wen et al proposed an encryption method that directly scrambles the code table or encrypts the code word sequence number. Tosun and Feng proposed an encryption method based on forward error correction coding. Li Xiaoju et al. proposed a scalable video encryption scheme based on CAVLC entropy coding, which improved the flexibility of the encryption algorithm.

③目前,对H.264熵编码进行加密的构想已经有了一定的研究与实现,主要可分为加密码字索引和直接加密明文。对于加密码字索引,要对加密后的索引号是否落在有效区域进行判断,增大了计算开销;对于加密明文,现有的加密方案较少,不同方案间的差异多为加密算法的变更,且加密算法多为国外加密算法,尚无国密算法应用于H.264熵编码加密过程的研究。③At present, the idea of encrypting H.264 entropy coding has been researched and realized to a certain extent, which can be mainly divided into encrypted password index and directly encrypted plaintext. For the encrypted password index, it is necessary to judge whether the encrypted index number falls in the valid area, which increases the calculation overhead; for the encrypted plaintext, there are few existing encryption schemes, and the difference between different schemes is mostly the change of the encryption algorithm , and the encryption algorithms are mostly foreign encryption algorithms, and there is no research on the application of national secret algorithms to the encryption process of H.264 entropy coding.

④H.264熵编码采用CAVLC方法,根据CAVLC编码特点和国密算法中的ZUC算法,设计一种新的基于ZUC算法的H.264熵编码视频加密方法是本发明要解决的技术问题。4. H.264 entropy encoding adopts the CAVLC method, according to the ZUC algorithm in the CAVLC encoding characteristics and the national secret algorithm, designing a new H.264 entropy encoding video encryption method based on the ZUC algorithm is the technical problem to be solved by the present invention.

图1为H.264视频压缩编码流程图。Figure 1 is a flow chart of H.264 video compression encoding.

H.264熵编码提供了两种编码方法,分别为基于上下文自适应的可变长编码(CAVLC)和基于上下文自适应的二进制算术编码(CABAC)。其中,CAVLC易于实现,计算简单,主要应用于视频会议、可视电话和无线通信等对实时性要求高的通信中,H.264编解码标准的四个档次均包含此编码方法。CABAC具有很高的编码效率,但编码过程复杂,主要应用于多媒体数字通信。本发明仅针对应用广泛的CAVLC进行研究,而较为复杂的CABAC暂不考虑。H.264 entropy coding provides two coding methods, which are Context Adaptive Variable Length Coding (CAVLC) and Context Adaptive Binary Arithmetic Coding (CABAC). Among them, CAVLC is easy to implement and simple to calculate. It is mainly used in communications with high real-time requirements such as video conferences, videophones, and wireless communications. All four grades of the H.264 codec standard include this coding method. CABAC has high coding efficiency, but the coding process is complicated, and it is mainly used in multimedia digital communication. The present invention only studies the widely used CAVLC, and the more complex CABAC is not considered for the time being.

H.264视频压缩编码中,CAVLC编码过程中的参数有六个,为非零系数个数、拖尾系数个数、拖尾系数符号、其余非零系数幅值、最后一个非零系数前零的个数、每个非零系数前零的个数。每个参数都有相关编码码表,根据编码索引查表输出码流。In H.264 video compression encoding, there are six parameters in the CAVLC encoding process, which are the number of non-zero coefficients, the number of trailing coefficients, the sign of trailing coefficients, the amplitude of other non-zero coefficients, and the zero before the last non-zero coefficient The number of , the number of zeros before each non-zero coefficient. Each parameter has a related encoding code table, and the code stream is output according to the encoding index look-up table.

发明内容Contents of the invention

有鉴于此,本发明的目的在于提供一种基于ZUC算法的H.264熵编码视频加密方法,将对非零系数个数、拖尾系数个数、拖尾系数符号、最后一个非零系数前零的个数、每个非零系数前零的个数五个参数进行加密,其余非零系数幅值的编码涉及前缀编码和后缀编码,有一定的复杂度,所以不对此部分进行加密。In view of this, the object of the present invention is to provide a kind of H.264 entropy coding video encryption method based on ZUC algorithm, will be to the number of non-zero coefficients, the number of trailing coefficients, the sign of trailing coefficients, the last non-zero coefficient before The five parameters of the number of zeros and the number of zeros before each non-zero coefficient are encrypted, and the encoding of the amplitude of the remaining non-zero coefficients involves prefix encoding and suffix encoding, which has a certain complexity, so this part is not encrypted.

为达到上述目的,本发明提供如下技术方案:To achieve the above object, the present invention provides the following technical solutions:

基于ZUC算法的H.264熵编码视频加密方法,该方法为:在H.264视频压缩编码的CAVLC编码过程中,采用ZUC算法生成随机密钥流,与非零系数个数、拖尾系数个数、拖尾系数符号、最后一个非零系数前零的个数、每个非零系数前零的个数编码后的码流相异或,得到新的码流,然后与其余非零系数幅值编码后的码流合并输出,实现加密;The H.264 entropy coding video encryption method based on the ZUC algorithm, the method is: in the CAVLC coding process of the H.264 video compression coding, the ZUC algorithm is used to generate a random key stream, and the number of non-zero coefficients and the number of trailing coefficients number, trailing coefficient sign, number of zeros before the last non-zero coefficient, and number of zeros before each non-zero coefficient. The code stream after value encoding is combined and output to realize encryption;

具体步骤为:The specific steps are:

S1:在H.264视频压缩编码的CAVLC编码过程中,对参数进行编码,得到原码流;S1: During the CAVLC encoding process of H.264 video compression encoding, encode the parameters to obtain the original code stream;

S2:根据ZUC序列密码算法产生密钥流并分发;S2: Generate and distribute the key stream according to the ZUC sequence cipher algorithm;

S3:利用密钥流加密重要参数编码后的原码流,得到密文码流;S3: Use the key stream to encrypt the original code stream encoded by important parameters to obtain the ciphertext code stream;

S4:将密文码流与未进行加密的原码流合并、输出。S4: Merge and output the ciphertext code stream and the unencrypted original code stream.

进一步,所述对参数进行编码包括对非零系数个数Total Coeffs编码、对拖尾系数个数Trailing Ones编码、对拖尾系数符号T1_Signs编码、对其余非零系数幅值Levels编码、对最后一个非零系数前零的个数Total Zeros编码和对每个非零系数前零的个数RunBefore编码。Further, the encoding of the parameters includes encoding the number of non-zero coefficients Total Coeffs, encoding the number of trailing coefficients Trailing Ones, encoding the symbols of trailing coefficients T1_Signs, encoding the remaining non-zero coefficient amplitude Levels, and encoding the last Total Zeros encoding of the number of zeros before non-zero coefficients and RunBefore encoding of the number of zeros before each non-zero coefficient.

进一步,所述重要参数编码后的原码流包括非零系数个数、拖尾系数个数、拖尾系数符号、最后一个非零系数前零的个数和每个非零系数前零的个数五个参数编码后的码流。Further, the original code stream after encoding the important parameters includes the number of non-zero coefficients, the number of trailing coefficients, the sign of trailing coefficients, the number of zeros before the last non-zero coefficient, and the number of zeros before each non-zero coefficient Count the code stream encoded by five parameters.

进一步,所述未进行加密的原码流为其余非零系数幅值编码后的码流。Further, the unencrypted original code stream is a code stream encoded with other non-zero coefficient amplitudes.

本发明的有益效果在于:本发明是一种针对CAVLC方法,基于ZUC算法的H.264熵编码视频加密方法。在H.264压缩编码的CAVLC过程中,采用ZUC算法产生密钥流,与非零系数个数、拖尾系数个数、拖尾系数符号、最后一个非零系数前零的个数、每个非零系数前零的个数编码后的码流相异或得到新的码流,然后与其余非零系数幅值编码后的码流合并输出,实现加密。The beneficial effect of the present invention is that: the present invention is an H.264 entropy coding video encryption method based on the ZUC algorithm for the CAVLC method. In the CAVLC process of H.264 compression coding, the ZUC algorithm is used to generate the key stream, and the number of non-zero coefficients, the number of trailing coefficients, the sign of trailing coefficients, the number of zeros before the last non-zero coefficient, each The code stream encoded by the number of zeros before the non-zero coefficient is different or a new code stream is obtained, and then combined with the code stream encoded by the amplitude of the other non-zero coefficients to realize encryption.

(1)与现有加密方法相比,本发明增加了加密参数的数量,提高了安全性;与索引得到的明文相异或,复杂度低,并未增加太多的开销;采用ZUC算法,运算速度快,易于实现,性能上可以替代现有加密方法中所用的国外加密算法,实现了加密算法的国产化。(1) Compared with the existing encryption method, the present invention increases the quantity of encryption parameters and improves security; it is different or different from the plaintext obtained by the index, the complexity is low, and too much overhead is not increased; the ZUC algorithm is adopted, The calculation speed is fast, easy to implement, and the performance can replace the foreign encryption algorithm used in the existing encryption method, and the localization of the encryption algorithm is realized.

(2)在安全性方面,本发明加密了非零系数个数、拖尾系数个数、拖尾系数符号、最后一个非零系数前零的个数、每个非零系数前零的个数。这些参数主要集中在低频位置,在块中占有极大的比重,且没有明显统计特征,不容易被破译。相较于现有方案中只加密拖尾系数符号、其余非零系数幅值、每个非零系数前零的个数,增大了加密数据量大,提高了安全性。ZUC算法在逻辑上采用三层结构设计,极大地增强了抗攻击的能力,安全性高。(2) In terms of security, the present invention has encrypted the number of non-zero coefficients, the number of trailing coefficients, the number of trailing coefficients, the number of zeros before the last non-zero coefficient, and the number of zeros before each non-zero coefficient . These parameters are mainly concentrated in low-frequency positions, occupy a large proportion in the block, and have no obvious statistical characteristics, so they are not easy to be deciphered. Compared with the existing scheme, only the trailing coefficient symbols, the amplitudes of the remaining non-zero coefficients, and the number of leading zeros of each non-zero coefficient are encrypted, which increases the amount of encrypted data and improves the security. The ZUC algorithm logically adopts a three-layer structure design, which greatly enhances the ability to resist attacks and has high security.

(3)在复杂度方面,相较于加密码字索引的方法,本发明采用密钥流直接加密明文的方法,码流与密钥流逐位异或,省去了对加密后的索引号是否落在有效区域进行判断的时间,操作简单,对整个编码过程所需的时间影响很小,复杂度主要由序列密码所决定。而ZUC算法每次产生的密钥流为32bit,运算速度快,密钥流生成和分发所需的时间少。所以本方法的计算开销很小。(3) In terms of complexity, compared with the method of encrypting the password index, the present invention adopts the method of directly encrypting the plaintext with the key stream, and the code stream and the key stream are XORed bit by bit, which saves the index number after encryption The time for judging whether it falls in the effective area is simple to operate, and has little impact on the time required for the entire encoding process, and the complexity is mainly determined by the sequence code. However, the key stream generated by the ZUC algorithm is 32 bits each time, the operation speed is fast, and the time required for key stream generation and distribution is less. Therefore, the calculation overhead of this method is very small.

(4)在加密算法的选择方面,ZUC算法由我国自主研发,结构简单,易于软硬件实现,加解密速度快。同时因ZUC在结构上采用的一些特殊设计,提高了它的抗攻击能力,具有可靠的高安全性能和低复杂度,目前已被批准为第4代移动通信加密标准。因此采用ZUC算法对视频图像进行加密,既可以很好地保证安全性,又能实现加密算法的国产化,进一步推动我国密码算法的发展和应用。(4) In terms of the choice of encryption algorithm, the ZUC algorithm is independently developed by our country. It has a simple structure, is easy to realize by software and hardware, and has a fast encryption and decryption speed. At the same time, due to some special designs adopted in the structure of ZUC, its anti-attack ability has been improved, and it has reliable high security performance and low complexity. It has been approved as the fourth-generation mobile communication encryption standard. Therefore, using the ZUC algorithm to encrypt video images can not only ensure the security well, but also realize the localization of encryption algorithms, and further promote the development and application of encryption algorithms in our country.

附图说明Description of drawings

为了使本发明的目的、技术方案和有益效果更加清楚,本发明提供如下附图进行说明:In order to make the purpose, technical scheme and beneficial effect of the present invention clearer, the present invention provides the following drawings for illustration:

图1为H.264视频压缩编码流程图;Fig. 1 is H.264 video compression coding flowchart;

图2为CAVLC编码流程图;Fig. 2 is a flow chart of CAVLC encoding;

图3为本发明加密流程图。Fig. 3 is the encryption flow chart of the present invention.

具体实施方式Detailed ways

下面将结合附图,对本发明的优选实施例进行详细的描述。The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

H.264视频压缩编码的过程如图1所示,视频经过帧内和帧间预测、变换、量化、熵编码实现压缩编码。图2为CAVLC编码流程图;图3为本发明加密流程图。The process of H.264 video compression coding is shown in Figure 1. The video is compressed and coded through intra-frame and inter-frame prediction, transformation, quantization, and entropy coding. Fig. 2 is a flow chart of CAVLC encoding; Fig. 3 is a flow chart of encryption in the present invention.

H.264的CAVLC编码过程主要为:(1)对非零系数个数(TotalCoeffs)和拖尾系数个数(TrailingOnes)进行编码;(2)对拖尾系数符号(T1_Signs)进行编码;(3)对其余非零系数幅值(Levels)进行编码;(4)对最后一个非零系数前零的个数(TotalZeros)进行编码;(5)对每个非零系数前零的个数(RunBefore)进行编码。The CAVLC encoding process of H.264 mainly includes: (1) encoding the number of non-zero coefficients (TotalCoeffs) and the number of trailing coefficients (TrailingOnes); (2) encoding the trailing coefficient symbols (T1_Signs); (3 ) encode the remaining non-zero coefficient amplitudes (Levels); (4) encode the number of zeros before the last non-zero coefficient (TotalZeros); (5) encode the number of zeros before each non-zero coefficient (RunBefore ) to encode.

在H.264视频压缩编码的CAVLC编码过程中,采用ZUC算法生成随机密钥流,与非零系数个数、拖尾系数个数、拖尾系数符号、最后一个非零系数前零的个数、每个非零系数前零的个数编码后的码流相异或,得到新的码流,然后与其余非零系数幅值编码后的码流合并输出,实现加密。In the CAVLC encoding process of H.264 video compression encoding, the ZUC algorithm is used to generate a random key stream, which is related to the number of non-zero coefficients, the number of trailing coefficients, the sign of trailing coefficients, and the number of zeros before the last non-zero coefficient 1. Exclusive OR the code stream encoded by the number of zeros before each non-zero coefficient to obtain a new code stream, and then merge and output it with the code stream encoded by the magnitude of the other non-zero coefficients to realize encryption.

在步骤2中,ZUC序列密码算法产生密钥流,主要可分为三个步骤:初始密钥的加载,初始化阶段和工作阶段。主要处理为初始秘钥的加载,在128bit种子密钥和128bit初始向量的控制下,可产生32bit的密钥流。In step 2, the ZUC sequence cipher algorithm generates the key stream, which can be mainly divided into three steps: initial key loading, initialization phase and working phase. The main processing is the loading of the initial secret key. Under the control of the 128bit seed key and the 128bit initial vector, a 32bit key stream can be generated.

将上述产生的密钥流分发入需要加密的码流中,用密钥流与码流进行异或操作,实现加密。Distribute the key stream generated above into the code stream that needs to be encrypted, and use the key stream and the code stream to perform XOR operation to realize encryption.

结合实例对本加密方法进行说明:This encryption method is illustrated with an example:

假设4*4块数据为:Suppose 4*4 blocks of data are:

00 00 -1-1 00 55 22 00 00 33 00 00 00 11 00 00 00

经过数据重排序,Zigzag扫描系数输入为:0,0,5,3,2,-1,0,0,0,1,……After data reordering, the Zigzag scanning coefficient input is: 0, 0, 5, 3, 2, -1, 0, 0, 0, 1, ...

经过编码得到CAVLC编码输出的的码流:0000101100010010101010111。设加密本块数据的密钥流为0,0,1,1,,1,0,0,1,……After encoding, the code stream output by CAVLC encoding is obtained: 0000101100010010101010111. Let the key stream of encrypted block data be 0, 0, 1, 1,, 1, 0, 0, 1, ...

加密过程:Encryption process:

由加密过程可见,对非零系数个数(TotalCoeffs)和拖尾系数个数(TrailingOnes)、拖尾系数符号(T1_Signs)、最后一个非零系数前零的个数(TotalZeros)、每个非零系数前零的个数(RunBefore)编码后的原码流进行异或操作,得到密文码流,与其余非零系数幅值(Levels)编码后的码流合并输出,实现加密。最终的密文码流为0000101100010010010101110。It can be seen from the encryption process that for the number of non-zero coefficients (TotalCoeffs) and the number of trailing coefficients (TrailingOnes), the sign of trailing coefficients (T1_Signs), the number of zeros before the last non-zero coefficient (TotalZeros), each non-zero The original code stream encoded by the number of zeros before the coefficient (RunBefore) is subjected to an XOR operation to obtain a ciphertext code stream, which is combined and output with the code stream encoded by the remaining non-zero coefficient amplitudes (Levels) to realize encryption. The final ciphertext code stream is 0000101100010010010101110.

最后说明的是,以上优选实施例仅用以说明本发明的技术方案而非限制,尽管通过上述优选实施例已经对本发明进行了详细的描述,但本领域技术人员应当理解,可以在形式上和细节上对其作出各种各样的改变,而不偏离本发明权利要求书所限定的范围。Finally, it should be noted that the above preferred embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that it can be described in terms of form and Various changes may be made in the details without departing from the scope of the invention defined by the claims.

Claims (4)

1.基于ZUC算法的H.264熵编码视频加密方法,其特征在于:该方法为:在H.264视频压缩编码的CAVLC编码过程中,采用ZUC算法生成随机密钥流,与非零系数个数、拖尾系数个数、拖尾系数符号、最后一个非零系数前零的个数、每个非零系数前零的个数编码后的码流相异或,得到新的码流,然后与其余非零系数幅值编码后的码流合并输出,实现加密;1. The H.264 entropy coding video encryption method based on the ZUC algorithm is characterized in that: the method is: in the CAVLC coding process of the H.264 video compression coding, the ZUC algorithm is used to generate a random key stream, and the number of non-zero coefficients number, the number of trailing coefficients, the sign of trailing coefficients, the number of zeros before the last non-zero coefficient, and the number of zeros before each non-zero coefficient. Merge and output code streams encoded with other non-zero coefficient amplitudes to realize encryption; 具体步骤为:The specific steps are: S1:在H.264视频压缩编码的CAVLC编码过程中,对参数进行编码,得到原码流;S1: During the CAVLC encoding process of H.264 video compression encoding, encode the parameters to obtain the original code stream; S2:根据ZUC序列密码算法产生密钥流并分发;S2: Generate and distribute the key stream according to the ZUC sequence cipher algorithm; S3:利用密钥流加密重要参数编码后的原码流,得到密文码流;S3: Use the key stream to encrypt the original code stream encoded by important parameters to obtain the ciphertext code stream; S4:将密文码流与未进行加密的原码流合并、输出。S4: Merge and output the ciphertext code stream and the unencrypted original code stream. 2.根据权利要求1所述的基于ZUC算法的H.264熵编码视频加密方法,其特征在于:所述对参数进行编码包括对非零系数个数Total Coeffs编码、对拖尾系数个数Trailing Ones编码、对拖尾系数符号T1_Signs编码、对其余非零系数幅值Levels编码、对最后一个非零系数前零的个数Total Zeros编码和对每个非零系数前零的个数Run Before编码。2. the H.264 entropy coded video encryption method based on ZUC algorithm according to claim 1, is characterized in that: described parameter is encoded and comprises nonzero coefficient number Total Coeffs encoding, trailing coefficient number Trailing Ones encoding, encoding the trailing coefficient symbol T1_Signs, encoding the remaining non-zero coefficient amplitude Levels, encoding the number of zeros before the last non-zero coefficient Total Zeros and encoding the number of zeros before each non-zero coefficient Run Before . 3.根据权利要求1所述的基于ZUC算法的H.264熵编码视频加密方法,其特征在于:所述重要参数编码后的原码流包括非零系数个数、拖尾系数个数、拖尾系数符号、最后一个非零系数前零的个数和每个非零系数前零的个数五个参数编码后的码流。3. the H.264 entropy coding video encryption method based on ZUC algorithm according to claim 1, is characterized in that: the original code stream after described important parameter encoding comprises non-zero coefficient number, trailing coefficient number, dragging The code stream encoded by five parameters including the sign of the tail coefficient, the number of zeros before the last non-zero coefficient, and the number of zeros before each non-zero coefficient. 4.根据权利要求1所述的基于ZUC算法的H.264熵编码视频加密方法,其特征在于:所述未进行加密的原码流为其余非零系数幅值编码后的码流。4. The H.264 entropy coding video encryption method based on ZUC algorithm according to claim 1, characterized in that: the original code stream that is not encrypted is the code stream after encoding the remaining non-zero coefficient amplitudes.
CN201711478565.0A 2017-12-29 2017-12-29 H.264 Entropy Coding Video Encryption Method Based on ZUC Algorithm Pending CN108174207A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711478565.0A CN108174207A (en) 2017-12-29 2017-12-29 H.264 Entropy Coding Video Encryption Method Based on ZUC Algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711478565.0A CN108174207A (en) 2017-12-29 2017-12-29 H.264 Entropy Coding Video Encryption Method Based on ZUC Algorithm

Publications (1)

Publication Number Publication Date
CN108174207A true CN108174207A (en) 2018-06-15

Family

ID=62520065

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711478565.0A Pending CN108174207A (en) 2017-12-29 2017-12-29 H.264 Entropy Coding Video Encryption Method Based on ZUC Algorithm

Country Status (1)

Country Link
CN (1) CN108174207A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108900849A (en) * 2018-07-26 2018-11-27 苏州科达科技股份有限公司 Video data encryption method, system, equipment and storage medium
CN109274857A (en) * 2018-09-17 2019-01-25 长安大学 Security verification method for encryption algorithm based on JPEG encrypted image
CN109740362A (en) * 2019-01-03 2019-05-10 中国科学院软件研究所 A method and system for generating and retrieving ciphertext index based on entropy coding
CN112019322A (en) * 2019-05-30 2020-12-01 华为技术有限公司 Cipher stream generating method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442676A (en) * 2008-12-26 2009-05-27 北京工业大学 Method for enciphering H.264 video based on CAVLC encode
CN102377996A (en) * 2010-08-05 2012-03-14 华为技术有限公司 Context-adaptive variable-length coding method and apparatus thereof
CN102547260A (en) * 2010-12-22 2012-07-04 联芯科技有限公司 Decoding method of adaptive variable length coding based on context and system thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442676A (en) * 2008-12-26 2009-05-27 北京工业大学 Method for enciphering H.264 video based on CAVLC encode
CN102377996A (en) * 2010-08-05 2012-03-14 华为技术有限公司 Context-adaptive variable-length coding method and apparatus thereof
CN102547260A (en) * 2010-12-22 2012-07-04 联芯科技有限公司 Decoding method of adaptive variable length coding based on context and system thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郭雨等: "适用于移动通信视频点播的感知加密算法", 《计算机应用》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108900849A (en) * 2018-07-26 2018-11-27 苏州科达科技股份有限公司 Video data encryption method, system, equipment and storage medium
CN108900849B (en) * 2018-07-26 2021-07-27 苏州科达科技股份有限公司 Video data encryption method, system, device and storage medium
CN109274857A (en) * 2018-09-17 2019-01-25 长安大学 Security verification method for encryption algorithm based on JPEG encrypted image
CN109274857B (en) * 2018-09-17 2020-01-10 长安大学 Encryption algorithm security verification method based on JPEG encrypted image
CN109740362A (en) * 2019-01-03 2019-05-10 中国科学院软件研究所 A method and system for generating and retrieving ciphertext index based on entropy coding
CN112019322A (en) * 2019-05-30 2020-12-01 华为技术有限公司 Cipher stream generating method and device
CN112019322B (en) * 2019-05-30 2022-03-25 华为技术有限公司 Cipher stream generating method and device

Similar Documents

Publication Publication Date Title
WO2018153317A1 (en) Chaotic map-based digital chaotic encryption method
CN103826128B (en) Encryption domain H.264/AVC video reversible data hiding method
JP5615273B2 (en) Method and apparatus for selective data encryption
CN108174207A (en) H.264 Entropy Coding Video Encryption Method Based on ZUC Algorithm
CN110677694B (en) Video encryption method for resisting contour attack
Xu et al. An improved scheme for data hiding in encrypted H. 264/AVC videos
CN104093029B (en) A kind of Video Encryption Algorithm based on new Spatiotemporal Chaotic Systems
Zhang et al. Chaos-based partial encryption of SPIHT coded color images
CN104468097A (en) Security data communication achieving method based on quantum key distribution
CN106230578B (en) A Binary Secure Arithmetic Coding Method Based on 3D Lorenz Map Control Based on Weighted Processing
CN101247520B (en) Video data enciphering/deciphering method
CN103856786A (en) Streaming media video encryption method and device based on H.264
CN110149200A (en) A kind of color image encrypting method based on dynamic DNA and 4D chaos
CN108833924A (en) A Multi-level Security Video Encryption Algorithm Based on H.265
CN112911290A (en) Ciphertext image reversible data hiding method based on predictive difference compression coding
CN108322750B (en) Encrypted domain HEVC video data hiding method based on residual coefficient modulation
CN105933107B (en) An Error Correction Encryption Method Based on LDPC Transcoding Technology
CN110098937B (en) Data block associated encryption algorithm based on timestamp
CN105357537B (en) A kind of multistage tree set partitioning coded image encryption method based on chaos
Liu et al. Blockchain privacy data protection method based on HEVC video steganography
CN112533001B (en) AVS2 entropy coding video information source encryption and decryption system and method based on block encryption
CN107507254B (en) Compression of images encryption method based on arithmetic coding
Mathur et al. Paradigms of image compression and encryption: A review
CN103107859B (en) Based on combined signal source and the information security coding and decoding method of CCSDS IDC and SMS4
Xingyuan et al. Cracking and improvement of an image encryption algorithm based on bit-level permutation and chaotic system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180615