[go: up one dir, main page]

CN105791853B - H.264 a kind of embedded video Development of Chaotic Secure Communication Method encrypted after coding - Google Patents

H.264 a kind of embedded video Development of Chaotic Secure Communication Method encrypted after coding Download PDF

Info

Publication number
CN105791853B
CN105791853B CN201610126090.8A CN201610126090A CN105791853B CN 105791853 B CN105791853 B CN 105791853B CN 201610126090 A CN201610126090 A CN 201610126090A CN 105791853 B CN105791853 B CN 105791853B
Authority
CN
China
Prior art keywords
mrow
mtd
msub
video
mtr
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.)
Active
Application number
CN201610126090.8A
Other languages
Chinese (zh)
Other versions
CN105791853A (en
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.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201610126090.8A priority Critical patent/CN105791853B/en
Publication of CN105791853A publication Critical patent/CN105791853A/en
Application granted granted Critical
Publication of CN105791853B publication Critical patent/CN105791853B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/46Embedding additional information in the video signal during the compression process
    • 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/4405Processing 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 decryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses the embedded video Development of Chaotic Secure Communication Method encrypted after a kind of H.264 coding, comprise the following steps:S1, in transmitting terminal, video data is carried out H.264 hardware encoding, chaos stream cipher encrypting, the Chaotic Scrambling encryption of location of pixels, network send, wide area network transmission;S2, in receiving terminal, enciphered video data is received by network, the chaos for completing location of pixels inverts disorderly decryption and chaos stream cipher decryption, under conditions of cipher key match, realize that H.264 hardware decodes, under key mismatch condition, H.264 stop the communication between transmitting terminal and receiving terminal after hardware decoding failure.This method is provided with chaos stream cipher encrypting and chaos position scrambling encryption this two re-encryption, two re-encryptions do not destroy the correlation of original video after H.264 coding compression, improve the efficiency of coding, reduce the redundancy of data, encryption system real-time and safe.

Description

一种H.264编码后加密的嵌入式视频混沌保密通信方法An embedded video chaos security communication method encrypted after H.264 encoding

技术领域technical field

本发明涉及到多媒体通信中的视频保密通信技术,具体而言,涉及到一种H.264编码后加密的嵌入式视频混沌保密通信方法。The invention relates to video security communication technology in multimedia communication, in particular to an embedded video chaos security communication method encrypted after H.264 encoding.

背景技术Background technique

在视频混沌保密通信中,目前人们广泛使用的混沌加密方式有以下两种:In video chaotic secure communication, there are currently two chaotic encryption methods widely used by people:

第一种方式是先加密然后再进行H.264或HEVC编码压缩,这种加密方式的特点是技术层面上的处理较为方便,但存在以下几方面的不足之处:The first way is to encrypt first and then perform H.264 or HEVC encoding and compression. The characteristic of this encryption method is that it is more convenient to deal with at the technical level, but it has the following shortcomings:

1、混沌加密之后打乱了原始视频的相关性,导致H.264的编码压缩效率大大降低,编码后的视频数据量很大,无论是采用H.264硬件编码或软件编码,加密后的视频通过以太网传输的速率不够高;RGB格式图像数据量远比H.264压缩之后的I帧或者P帧的数据量大,比如640×240大小的RGB格式图像数据量为MB量级,H.264压缩之后为KB量级。加密的数据量大,加密的耗时长;1. After chaotic encryption, the correlation of the original video is disrupted, resulting in a greatly reduced encoding and compression efficiency of H.264, and the amount of encoded video data is large. Whether H.264 hardware encoding or software encoding is used, the encrypted video The transmission rate via Ethernet is not high enough; the image data volume in RGB format is much larger than the I frame or P frame data volume after H.264 compression. 264 compression to the order of KB. The amount of encrypted data is large, and the encryption takes a long time;

2、编码效率低,H.264编码器依赖于图像空间相关性进行压缩得到I帧,依赖帧间的时间相关性压缩得到P帧。但加密后的RGB图像像素时空相关性被打乱,严重影响编码器效率,体现为编码压缩率大大降低;2. The encoding efficiency is low. The H.264 encoder relies on image spatial correlation to compress to obtain I frames, and relies on inter-frame temporal correlation to compress to obtain P frames. However, the spatial-temporal correlation of the encrypted RGB image pixels is disrupted, which seriously affects the efficiency of the encoder, which is reflected in the greatly reduced encoding compression rate;

3、传输效率低。H.264压缩效率低导致H.264视频信号数据量大,在网络发送带宽一定情况下,发送的帧率下降;3. Low transmission efficiency. The low compression efficiency of H.264 leads to a large amount of data in the H.264 video signal. When the network transmission bandwidth is constant, the transmission frame rate decreases;

4、只能采用位置置乱的加密方式,不能对视频像素的大小进行加密操作,否则因H.264中的量化原因,会导致接收端即便是密钥匹配的条件下也无法正确地解密出原始视频,而仅是位置置乱的加密方式,统计特性不好,安全性能不高。4. Only the encryption method of position scrambling can be used, and the size of video pixels cannot be encrypted. Otherwise, due to the quantization in H.264, the receiving end will not be able to decrypt correctly even if the key matches. The original video is only encrypted by position scrambling, which has poor statistical properties and low security performance.

第二种方式是基于H.264软件编码压缩的选择性混沌加密,具体指的是对H.264编码过程中的部分变量进行流密码加密,包括加密帧内预测模式,帧间运动矢量残差,量化参数残差,DCT系数符号,残差数据的DC分量。该方案只针对编码过程少部分变量进行加密,加密数据量小,不破坏编码格式,因而优点是保持H.264视频格式兼容性,同时编码器的压缩效率和编码时间影响不大。但其缺点是:The second method is selective chaotic encryption based on H.264 software encoding compression, which specifically refers to stream cipher encryption for some variables in the H.264 encoding process, including encrypted intra-frame prediction mode and inter-frame motion vector residual , the quantization parameter residual, the DCT coefficient sign, and the DC component of the residual data. This scheme only encrypts a small number of variables in the encoding process, the amount of encrypted data is small, and the encoding format is not damaged. Therefore, the advantage is to maintain the compatibility of the H.264 video format, and at the same time, the compression efficiency of the encoder and the encoding time have little impact. But its disadvantages are:

1、加密效果差。加密图像为马赛克状而非雪花点状,人眼能偶尔辨识视频中的部分场景;1. Poor encryption effect. The encrypted image is mosaic-like rather than snowflake-like, and the human eye can occasionally recognize some scenes in the video;

2、运行效率低。H.264存在软件编解码和硬件编解码两种形态,软件编解码通过编译开源代码得到,由CPU负责编解码功能;硬件编解码通过专用电路的形态固定在芯片中,由硬件电路负责编解码功能。软件执行速度远远小于硬件执行速度,因而运行效率低。选择性加密方案只能基于H.264编解码开源代码移植加密算法,而不能基于硬件编解码电路移植加密算法,因而该方案既无法利用芯片中的硬件资源,而且编码运行效率低。2. Low operating efficiency. H.264 has two forms of software encoding and decoding and hardware encoding and decoding. Software encoding and decoding is obtained by compiling open source code, and the CPU is responsible for encoding and decoding functions; hardware encoding and decoding is fixed in the chip through the form of a dedicated circuit, and the hardware circuit is responsible for encoding and decoding. Function. The execution speed of software is much lower than that of hardware, so the operating efficiency is low. The selective encryption scheme can only transplant the encryption algorithm based on the H.264 encoding and decoding open source code, but not based on the hardware encoding and decoding circuit. Therefore, this scheme can not use the hardware resources in the chip, and the encoding operation efficiency is low.

3、设计难度大。H.264编码过程复杂,变量多,分支多,要准确加密对应的变量并且准确解密,难度相当大;3. The design is difficult. The H.264 encoding process is complicated, with many variables and branches. It is quite difficult to accurately encrypt the corresponding variables and decrypt them accurately;

4、目前手机等移动终端等设备主要采用的是H.264硬件编码压缩,而在H.264硬件编码的基础上完成选择性混沌加密,从技术实现层面上看,目前仍然具有较大的难度。4. At present, mobile phones and other mobile terminals mainly use H.264 hardware encoding and compression, but it is still difficult to complete selective chaotic encryption on the basis of H.264 hardware encoding. .

为了从根本上改善和提高混沌加密视频信号通过以太网的传输速率,本发明拟提出一种H.264编码后加密的嵌入式视频混沌保密通信方法,在ARMLinux嵌入式实时视频通信系统上,对H.264编码压缩之后的视频数据流进行混沌自同步流密码加密和混沌映射位置置乱加密两重加密,结合了流密码加密和置乱加密以及H.264视频流的特点。对H.264视频流加密具有以下难点:In order to fundamentally improve and increase the transmission rate of the chaotic encrypted video signal through Ethernet, the present invention intends to propose an embedded video chaotic secure communication method encrypted after H.264 encoding. On the ARMLinux embedded real-time video communication system, the The video data stream after H.264 encoding and compression is double-encrypted by chaotic self-synchronized stream cipher encryption and chaotic map position scrambling encryption, which combines the characteristics of stream cipher encryption, scrambling encryption and H.264 video stream. Encrypting the H.264 video stream has the following difficulties:

1、H.264压缩之后的每一帧视频流数据大小多变,难以用一组置乱参数进行置乱加密,却又不能使用无数多组置乱参数加密;1. The data size of each frame of video stream after H.264 compression is variable, so it is difficult to use a set of scrambling parameters for scrambling encryption, but it is impossible to use countless sets of scrambling parameters for encryption;

2、每一帧H.264视频流大小必须符合以3个字节为单位延展为一个规整的m×n阶矩阵的要求,才符合置乱加密的条件,而H.264压缩得到的视频流长度无法保证符合这个要求;2. The size of each frame of H.264 video stream must meet the requirements of extending into a regular m×n order matrix in units of 3 bytes, so as to meet the conditions of scrambling and encryption, and the video stream obtained by H.264 compression The length cannot be guaranteed to meet this requirement;

3、流密码加密在自同步过程会破坏H.264视频流部分数据,因H.264语法严密,甚至一个bit的数据损坏都会引起解码失败而中断视频正常通信。3. Stream cipher encryption will destroy part of the data in the H.264 video stream during the self-synchronization process. Because of the strict syntax of H.264, even one bit of data damage will cause decoding failure and interrupt the normal video communication.

在ARMLinux嵌入式实时视频通信系统上,对H.264编码压缩之后的视频数据流进行混沌自同步流密码加密和混沌猫映射位置置乱加密两重加密,必须解决的关键问题是:On the ARMLinux embedded real-time video communication system, the video data stream after H.264 encoding and compression is double-encrypted with chaotic self-synchronized stream cipher encryption and chaotic cat mapping position scrambling encryption. The key issues that must be solved are:

1、仅以有限个置乱参数,以及对应置乱参数的有限个内存块,解决H.264视频流大小多变的问题;1. Solve the problem of variable size of H.264 video stream with only a limited number of scrambling parameters and a limited number of memory blocks corresponding to the scrambling parameters;

2、构造每一帧H.264视频流为特定长度,以符合置乱加密的m×n阶矩阵的条件;2. Construct each frame of H.264 video stream as a specific length to meet the conditions of scrambling encrypted m×n order matrix;

3、为H.264视频流构造额外的保护数据防止有效数据被破坏。3. Construct additional protection data for the H.264 video stream to prevent valid data from being destroyed.

从目前公开的专利文献来看,视频混沌保密通信系统主要存在几种情况:基于matlab的算法研究,基于Windows操作系统的PC平台上的实验验证,基于FPGA芯片实现混沌加密模块融合到更大的保密通信系统中,以及基于ARM运行Linux操作系统的嵌入式方式实现视频保密通信。其中基于嵌入式ARMLinux实现混沌保密通信系统的方法常见为先加密后编码,而非先编码后加密。先加密后编码存在安全性和效率上的不足。Judging from the currently published patent literature, there are mainly several situations in the video chaos security communication system: algorithm research based on matlab, experimental verification on the PC platform based on the Windows operating system, and integration of chaotic encryption modules into a larger system based on FPGA chips. In the secure communication system, and the embedded method based on ARM running Linux operating system realizes video secure communication. Among them, the method of implementing a chaotic secure communication system based on embedded ARMLinux is usually to encrypt first and then encode, rather than first encode and then encrypt. There are security and efficiency deficiencies in encrypting first and then encoding.

发明内容Contents of the invention

为了从根本上提高混沌加密视频信号通过以太网的传输速率,本发明采用了一种H.264编码后加密的嵌入式视频混沌保密通信方法,该方法设有混沌流密码加密和混沌位置置乱加密这两重加密,两重加密均在H.264编码压缩之后,不破坏原始视频的相关性,提高了编码的效率,减少了数据的冗余度,加密系统实时性和安全性高。In order to fundamentally improve the transmission rate of the chaotic encrypted video signal through the Ethernet, the present invention adopts an embedded video chaotic secure communication method encrypted after H.264 encoding, which is provided with chaotic stream cipher encryption and chaotic position scrambling Encrypt these two encryptions, the two encryptions are all after H.264 encoding and compression, without destroying the correlation of the original video, improving the efficiency of encoding, reducing the redundancy of data, and the encryption system has high real-time and security.

本发明采用如下技术方案来实现:H.264编码后加密的嵌入式视频混沌保密通信方法,包括以下步骤:S1、在发送端,对视频数据进行H.264硬件编码、混沌流密码加密、像素位置的混沌置乱加密、网络发送、广域网传输;S2、在接收端,通过网络接收加密视频数据,完成像素位置的混沌反置乱解密和混沌流密码解密,在密钥匹配的条件下,实现H.264硬件解码,在密钥失配条件下,H.264硬件解码失败后停止发送端与接收端之间的通信。The present invention adopts following technical scheme to realize: H.264 encoded post-encrypted embedded video chaos security communication method, comprising the following steps: S1, at the sending end, video data is carried out H.264 hardware encoding, chaotic stream cipher encryption, pixel Chaotic scrambling encryption of positions, network transmission, and wide area network transmission; S2. At the receiving end, receive encrypted video data through the network, and complete the chaotic anti-scrambling decryption of pixel positions and the decryption of chaotic stream ciphers. Under the condition of key matching, realize H.264 hardware decoding, under the condition of key mismatch, stop the communication between the sending end and the receiving end after the H.264 hardware decoding fails.

优选地,步骤S1所述的混沌流密码加密为:在视频数据前面增加全0的保护字节。Preferably, the encryption of the chaotic stream cipher described in step S1 is: adding a protection byte of all 0s in front of the video data.

优选地,步骤S1所述的混沌置乱加密为:根据H.264硬件编码之后输出的视频数据的I帧和P帧的大小,分别采用三种不同的内存容量分配方式,采用补0的方法将视频数据的字节数扩展为3×m×n个,满足混沌置乱和反置乱所要求的字节数。其中,所述三种不同的内存容量根据视频数据的最大I帧和最小P帧来确定。Preferably, the chaos scrambling encryption described in step S1 is: according to the size of the I frame and the P frame of the video data output after the H.264 hardware encoding, three different memory capacity allocation methods are respectively adopted, and the method of supplementing 0 is adopted The number of bytes of video data is expanded to 3×m×n, which meets the number of bytes required by chaos scrambling and anti-scrambling. Wherein, the three different memory capacities are determined according to the largest I frame and the smallest P frame of video data.

优选地,步骤S1在对视频数据进行H.264硬件编码之前还包括以下步骤:摄像头摄取视频、视频图像的JPEG解码、RGB格式到YUV420格式的转换;步骤S2在实现H.264硬件解码之后还包括以下步骤:将YUV420格式转换为RGB格式、解密后的视频显示。Preferably, step S1 also includes the following steps before carrying out H.264 hardware encoding to video data: the JPEG decoding of camera capture video, video image, the conversion of RGB format to YUV420 format; Step S2 also includes after realizing H.264 hardware decoding The method comprises the following steps: converting the YUV420 format into an RGB format, and displaying the decrypted video.

由上可知,本发明技术方案中,设计的两重加密是在H.264编码压缩之后加密,而非在其之前加密。在发送端,采用四核四线程的运行方式,按照先进行H.264硬件编码、然后进行混沌加密的顺序,在接收端,采用二核二线程的运行方式,按照先进行混沌解密、然后进行H.264硬件解码的顺序,不破坏原始视频的相关性,提高H.264编码效率,降低编码时间和编码后的视频数据量,减少冗余度,增大唯一解距离,提高整个系统的实时性和安全性。与现有技术相比,本发明具有如下优点及有益效果:It can be seen from the above that in the technical solution of the present invention, the designed double encryption is encrypted after the H.264 code compression, not before. At the sending end, the operation mode of four cores and four threads is adopted, and the order of H.264 hardware encoding is performed first, and then chaotic encryption is performed. The order of H.264 hardware decoding does not destroy the correlation of the original video, improves H.264 encoding efficiency, reduces encoding time and the amount of encoded video data, reduces redundancy, increases the unique solution distance, and improves the real-time performance of the entire system sex and safety. Compared with the prior art, the present invention has the following advantages and beneficial effects:

1、提高加密安全性;1. Improve encryption security;

从增加唯一解距离分析第1个优点:根据公式U=H/R,其中U表示唯一解距离,H表示密钥熵值,R表示数据冗余度。当H一定的条件下,R越小,U越大,则保密性更好。因为H.264视频信号数据量比RGB格式数据量小,当H.264视频流经过编码压缩以后,冗余度R比原始视频数据大大减小,所以编码后加密比编码前加密安全性更高。此外,H.264压缩视频信号具有严格的语法,其中1个bit的数据损坏,会导致解码器解码失败而退出应用程序,导致视频通信的终止,因而解密过程如果不能严格精确解密,则无法正常显示视频。Analyze the first advantage from increasing the unique solution distance: According to the formula U=H/R, where U represents the unique solution distance, H represents the key entropy value, and R represents the data redundancy. Under certain conditions of H, the smaller R is, the larger U is, and the secrecy is better. Because the amount of H.264 video signal data is smaller than that of RGB format, when the H.264 video stream is encoded and compressed, the redundancy R is greatly reduced compared with the original video data, so encryption after encoding is more secure than encryption before encoding . In addition, the H.264 compressed video signal has strict syntax, and one bit of data corruption will cause the decoder to fail to decode and exit the application program, resulting in the termination of video communication. Therefore, if the decryption process cannot be decrypted strictly and accurately, it will not work normally. Show video.

2、提高加密效率、运行效率;2. Improve encryption efficiency and operating efficiency;

从H.264编码前后数据量大小来分析第2点优点:编码前一帧图像大小为MB量级,而编码后的H.264视频流为KB量级甚至更小,可知编码后数据比编码前数据更小,加密速度更快。Analyze the advantages of the second point from the size of data before and after H.264 encoding: the image size of the previous frame before encoding is on the order of MB, while the size of the encoded H.264 video stream is on the order of KB or even smaller. The front data is smaller and the encryption speed is faster.

因为加密的压缩视频信号数据量达到了最小,加密操作耗时少;H.264编解码器采用硬件电路形态实现,执行速度快;一帧压缩视频信号的数据量小,网络发送的帧率高。Because the data volume of the encrypted compressed video signal reaches the minimum, the encryption operation takes less time; the H.264 codec is implemented in the form of a hardware circuit, and the execution speed is fast; the data volume of a compressed video signal is small, and the frame rate sent by the network is high. .

3、保持原有的视频编码效率。3. Maintain the original video coding efficiency.

从图像时空相关性来分析第3点优点:H.264编码之后加密的方案完全没影响到编码操作,保持了H.264的编码效率,而在H.264编码之前加密则打乱了时空的相关性,严重降低H.264的编码效率。Analyze the third advantage from the temporal-spatial correlation of images: the encryption scheme after H.264 encoding does not affect the encoding operation at all, and maintains the encoding efficiency of H.264, while the encryption before H.264 encoding disrupts the temporal-spatial relationship. Correlation seriously reduces the coding efficiency of H.264.

附图说明Description of drawings

图1为本发明一种H.264编码后加密的嵌入式视频混沌保密通信方法硬件实现总框图;Fig. 1 is a kind of H.264 coded post-encryption embedded video chaos secret communication method hardware realization general block diagram of the present invention;

图2为图1中的发送端两级混沌加密实现框图;Fig. 2 is the implementation block diagram of two-level chaotic encryption at the sending end in Fig. 1;

图3为图1中的接收端两级混沌解密实现框图;Fig. 3 is the realization block diagram of two-stage chaotic decryption at the receiving end in Fig. 1;

图4为图1中的多核多线程工作原理框图;Fig. 4 is the working principle block diagram of multi-core multi-thread in Fig. 1;

图5为图1中的多核多线程同步机制工作原理框图;Fig. 5 is a working principle block diagram of the multi-core multi-thread synchronization mechanism in Fig. 1;

图6为图1中的发送端四核四线程实现框图;FIG. 6 is a block diagram of four cores and four threads at the sending end in FIG. 1;

图7为图1中的接收端两核两线程实现框图;FIG. 7 is a block diagram of the implementation of two cores and two threads at the receiving end in FIG. 1;

具体实施方式detailed description

下面将结合实施例及说明书附图,对本发明作进一步详细的描述,但本发明的实施方式不限于此。The present invention will be further described in detail below with reference to the embodiments and the accompanying drawings, but the embodiments of the present invention are not limited thereto.

实施例Example

参见图1,本发明方法包括以下步骤:摄像头摄取视频、视频图像的JPEG解码、RGB格式到YUV420格式的转换、H.264硬件编码、混沌流密码加密、像素位置的混沌置乱加密、网络发送、广域网传输、网络接收、像素位置的混沌反置乱解密、混沌流密码解密、密钥匹配条件下H.264硬件的成功解码、YUV420格式到RGB格式的转换、解密后的视频显示、密钥失配条件下H.264硬件解码失败后停止发送端与接收端之间的通信,无法解密出原始视频信号。Referring to Fig. 1, the method of the present invention comprises the following steps: camera captures video, JPEG decoding of video images, conversion of RGB format to YUV420 format, H.264 hardware encoding, chaotic stream cipher encryption, chaotic scrambling encryption of pixel positions, network transmission , WAN transmission, network reception, chaotic anti-scrambling decryption of pixel position, chaotic stream cipher decryption, successful decoding of H.264 hardware under key matching conditions, conversion from YUV420 format to RGB format, decrypted video display, key Under the condition of mismatch, the communication between the sending end and the receiving end stops after the H.264 hardware decoding fails, and the original video signal cannot be decrypted.

1、在发送端,采用四核四线程的运行方式,按照先进行H.264硬件编码、然后进行混沌加密的顺序。发送端的具体操作步骤为:摄像头摄取视频,将视频图像的JPEG解码得到RGB格式,从RGB格式到YUV420格式的转换,完成H.264硬件编码,然后进行混沌流密码加密和像素位置的混沌置乱加密,加密视频通过网络发送和广域网传输。1. At the sending end, the operation mode of four cores and four threads is adopted, and the sequence of H.264 hardware encoding and chaotic encryption is followed. The specific operation steps at the sending end are: the camera captures the video, decodes the JPEG of the video image to obtain the RGB format, converts from the RGB format to the YUV420 format, completes H.264 hardware encoding, and then performs chaotic stream cipher encryption and chaotic scrambling of pixel positions Encryption, encrypted video is sent over the network and transmitted over the WAN.

如图6,发送端四个线程循环执行以下流程:线程1循环采集JPEG图像,线程2读取JPEG图像后解压为RGB图像;线程3读取RGB图像显示在LCD显示器上;线程4读取RGB图像之后转换格式,做H.264编码压缩,对H.264视频流进行流密码加密,位置置乱加密,发送两重加密数据,两级混沌加密的流程如图2所示。As shown in Figure 6, the four threads at the sending end execute the following process cyclically: thread 1 cyclically collects JPEG images, thread 2 reads JPEG images and decompresses them into RGB images; thread 3 reads RGB images and displays them on the LCD display; thread 4 reads RGB After the image is converted, H.264 encoding and compression is performed, stream cipher encryption is performed on the H.264 video stream, position scrambling is encrypted, and double-encrypted data is sent. The process of two-level chaotic encryption is shown in Figure 2.

第一级加密为混沌流密码加密,在H.264视频数据前面增加20个全0的保护字节,在发送端和接收端的初始值不同但密钥匹配的条件下,实现发送端混沌流密码对视频数据的加密与接收端混沌流密码对视频数据的解密两者之间的精确同步,在接收端恢复混沌加密前的H.264正确格式,完成H.264的解码并正确解密出原始视频信号;在发送端和接收端的初始值不同并且密钥失配的条件下,无法实现发送端混沌流密码对视频数据的加密与接收端混沌流密码对视频数据的解密两者之间的精确同步,接收端无法恢复混沌加密前的H.264正确格式,不能完成H.264的解码,接收端无法解密出原始视频信号;在H.264视频数据前面增加20个全0的保护字节,以确保通过混沌流密码的加密和解密之后,能够正确地还原出H.264的全部正确格式,由于H.264语法十分严密,其中任何一个bit的数据损坏都会引起H.264的解码失败,从而中断发送端与接收端之间的正常通信。The first level of encryption is chaotic stream cipher encryption, which adds 20 all-0 protection bytes in front of the H.264 video data, and realizes the chaotic stream cipher at the sending end under the condition that the initial values of the sending end and the receiving end are different but the keys match. Accurate synchronization between the encryption of video data and the decryption of video data by chaotic stream cipher at the receiving end, restore the correct format of H.264 before chaotic encryption at the receiving end, complete the decoding of H.264 and correctly decrypt the original video signal; under the condition that the initial values of the sending end and the receiving end are different and the keys do not match, it is impossible to realize the precise synchronization between the encryption of the video data by the chaotic stream cipher on the sending end and the decryption of the video data by the chaotic stream cipher on the receiving end. , the receiving end cannot recover the correct format of H.264 before the chaotic encryption, cannot complete the decoding of H.264, and the receiving end cannot decrypt the original video signal; add 20 all-0 protection bytes in front of the H.264 video data to Ensure that after encryption and decryption of the chaotic stream cipher, all the correct formats of H.264 can be correctly restored. Since the syntax of H.264 is very strict, any bit of data damage will cause the decoding of H.264 to fail, thereby interrupting Normal communication between sender and receiver.

第二级加密为视频数据的混沌位置置乱,根据H.264输出的I帧和P帧的大小,分别采用内存容量为24300字节、10800字节、2400字节三种不同大小的内存分配方式;针对H.264压缩之后的每一帧视频数据大小不同,采用补0的方法扩展字节数,将字节数扩展为3×m×n个,满足混沌位置置乱和反置乱所要求的字节数;根据H.264输出的I帧和P帧的大小采用三种不同的内存容量可显著减小混沌加密和解密的时间,实现混沌加密视频信号经以太网传输的速率达到每秒27帧。The second level encryption scrambles the chaotic position of the video data. According to the size of the I frame and P frame output by H.264, three memory allocations with a memory capacity of 24300 bytes, 10800 bytes and 2400 bytes are used respectively. Method: In view of the different size of each frame of video data after H.264 compression, the number of bytes is expanded by adding 0, and the number of bytes is expanded to 3×m×n, which meets the requirements of chaotic position scrambling and anti-scrambling The number of bytes required; according to the size of the I frame and P frame output by H.264, three different memory capacities can be used to significantly reduce the time of chaotic encryption and decryption, and the transmission rate of chaotic encrypted video signals via Ethernet can reach every 27 frames per second.

2、在接收端,采用二核二线程的运行方式,按先混沌解密后进行H.264硬件解码的顺序。当接收端和发送端的初始值不同但密钥匹配时,在接收端完成H.264的解码过程并正确解密出原始视频信号;当接收端和发送端的初始值不同并且密钥失配时,接收端H.264的解码过程无法完成,发出解码失败信号并中断发送端与接收端之间的正常通信,接收端无法解密出原视频信号。接收端两级混沌解密的流程如图3所示。2. At the receiving end, the operation mode of two cores and two threads is adopted, and the order of H.264 hardware decoding is followed by chaotic decryption. When the initial values of the receiving end and the sending end are different but the keys match, the decoding process of H.264 is completed at the receiving end and the original video signal is correctly decrypted; when the initial values of the receiving end and the sending end are different and the keys do not match, the receiving end The decoding process of H.264 at the end cannot be completed, and a decoding failure signal is sent and the normal communication between the sending end and the receiving end is interrupted, and the receiving end cannot decrypt the original video signal. The process of two-stage chaotic decryption at the receiving end is shown in Figure 3.

接收端的具体操作步骤为:网络接收加密视频,完成像素位置的混沌反置乱解密和混沌流密码解密,在密钥匹配的条件下,实现H.264硬件的成功解码,将YUV420格式转换为RGB格式、解密后的视频显示,在密钥失配条件下H.264硬件解码失败后停止发送端与接收端之间的通信,无法解密出原始视频信号。The specific operation steps of the receiving end are as follows: the network receives encrypted video, completes the decryption of chaotic anti-scrambling at the pixel position and the decryption of chaotic stream cipher, and realizes the successful decoding of H.264 hardware under the condition of key matching, and converts the YUV420 format into RGB The format and the decrypted video show that the communication between the sending end and the receiving end stops after the H.264 hardware decoding fails under the key mismatch condition, and the original video signal cannot be decrypted.

如图7,接收端的两个线程循环执行以下流程:线程1循环接收表征H.264视频流大小的变量值和两重加密的H.264视频流数据;进行位置置乱解密,流密码解密,H.264解码解压,转换格式为RGB格式;线程2读取RGB格式数据显示到LCD显示器上。As shown in Figure 7, the two threads at the receiving end execute the following process cyclically: Thread 1 cyclically receives the variable value representing the size of the H.264 video stream and the double-encrypted H.264 video stream data; performs position scrambling and decryption, and stream cipher decryption. H.264 decodes and decompresses, and converts the format to RGB format; thread 2 reads the data in RGB format and displays it on the LCD display.

ARMLinux嵌入式实时视频通信系统分为发送端开发板和接收端开发板,本发明选用两个具有四个ARM核和H.264编解码硬件加速引擎芯片的嵌入式开发板,作为发送端和接收端,两端分别通过VGA接口连接LCD显示器,两端以及PC通过以太网接口RJ45和路由器的LAN接口连接,分配好IP地址选择为:192.168.1.100、192.168.1.101和192.168.1.102形成局域网连接。发送端连接USB摄像头。发送端与接收端以以太网方式接入路由,以TCP/IP协议传输两重加密后的视频流数据。The ARMLinux embedded real-time video communication system is divided into a sending end development board and a receiving end development board. The present invention selects two embedded development boards with four ARM cores and H.264 encoding and decoding hardware acceleration engine chips as the sending end and the receiving end development board. The two ends are respectively connected to the LCD display through the VGA interface, and the two ends and the PC are connected to the LAN interface of the router through the Ethernet interface RJ45. The assigned IP addresses are: 192.168.1.100, 192.168.1.101 and 192.168.1.102 to form a LAN connection. Connect the USB camera to the sending end. The sending end and the receiving end are connected to the router through Ethernet, and the double-encrypted video stream data is transmitted through the TCP/IP protocol.

建立软件开发环境。PC机安装VMware10虚拟机,安装Ubuntu12.04PC版Linux操作系统,安装开发板厂家提供的ARM-Linux-gcc编译器用于交叉编译。两端开发板运行厂家提供的Linux操作系统,建立开发板与PC的NFS连接,PC上的应用程序所在目录挂接到开发板上的/mnt目录下。建立PC与两端开发板的SSH连接,PC能够通过以太网远程登录操控开发板。Set up a software development environment. Install the VMware10 virtual machine on the PC, install the Ubuntu12.04 PC version of the Linux operating system, and install the ARM-Linux-gcc compiler provided by the development board manufacturer for cross-compilation. The development boards at both ends run the Linux operating system provided by the manufacturer, establish an NFS connection between the development board and the PC, and mount the directory of the application program on the PC to the /mnt directory on the development board. Establish an SSH connection between the PC and the development boards at both ends, and the PC can remotely log in to control the development board through Ethernet.

确定流密码加密的内存大小:流密码加密的内存块用于存放压缩视频信号数据(I帧和P帧),要求略大于I帧即可,故内存的设计为30KB。H.264编码器输出的每一帧H.264视频流数据以字节Byte为单位,从第一个30KB内存块的0x0015地址(第21Byte地址)开始存入,0x0000~0x0014内存空间和0xyyyy~0x7800未填满的内存空间按默认值补充0x00字节,其中0x0015~0xyyyy为H.264视频流有效数据空间,0xyyyy地址随着H.264视频流有效数据大小而改变。30K内存预留最前面20保护字节是为了防止H.264压缩视频数据在自同步过程中被破坏,导致解码器无法正确解码H.264压缩视频信号。方程10次迭代能恢复同步,因而预留20个保护字节用于自同步过程的加密和解密,从第21个字节之后的H.264压缩视频信号数据能保证处于同步状态下进行加密和解密,因而保证数据不被破坏。Determine the memory size encrypted by the stream cipher: the memory block encrypted by the stream cipher is used to store compressed video signal data (I frame and P frame), and it is required to be slightly larger than the I frame, so the design of the memory is 30KB. Each frame of H.264 video stream data output by the H.264 encoder is stored in bytes from the address 0x0015 (address 21Byte) of the first 30KB memory block, 0x0000~0x0014 memory space and 0xyyyy~ The unfilled memory space of 0x7800 is supplemented with 0x00 bytes by default, among which 0x0015~0xyyyy is the effective data space of H.264 video stream, and the address of 0xyyyy changes with the effective data size of H.264 video stream. The 30K memory reserves the first 20 protection bytes to prevent the H.264 compressed video data from being destroyed during the self-synchronization process, resulting in the decoder being unable to correctly decode the H.264 compressed video signal. 10 iterations of the equation can restore synchronization, so 20 protection bytes are reserved for encryption and decryption in the self-synchronization process, and the H.264 compressed video signal data after the 21st byte can be encrypted and decrypted in a synchronized state. Decryption, thus ensuring that the data is not corrupted.

流密码加密与解密的过程如下:发送端流密码的加密方程为The process of stream cipher encryption and decryption is as follows: the encryption equation of the stream cipher at the sending end is

式中In the formula

其中X,Y,Z为系统状态变量,aij(i,j=1,2,3)为密钥参数,变量X取整数按mod(256)得到一个字节的变量x,方程迭代一次,x更新一次。O为反馈的加密变量。从30KB流密码加密内存1的0x0000地址取一个字节与x按位异或,运算结果O存入30KB流密码加密内存2的0x0000中,并反馈回方程中参与下一次迭代;接着取30KB流密码加密内存1的0x0001地址的一个字节与更新后的x同样按位异或,运算结果O存入30KB流密码加密内存2的0x0001中,按地址依次循环操作直至0xyyyy地址计算完成,0xyyyy之后的数据不需要参与异或运算。Among them, X, Y, and Z are system state variables, a ij (i, j=1, 2, 3) are key parameters, variable X takes an integer and obtains a byte variable x according to mod (256), and the equation is iterated once, x is updated once. O is the encrypted variable of the feedback. Take a byte from address 0x0000 of the 30KB stream cipher encrypted memory 1 and XOR with x, and the operation result O is stored in 0x0000 of the 30KB stream cipher encrypted memory 2, and fed back to the equation to participate in the next iteration; then fetch the 30KB stream One byte of address 0x0001 of password encrypted memory 1 is bitwise XORed with the updated x, and the operation result O is stored in 0x0001 of 30KB stream cipher encrypted memory 2, and the operation is performed in turn according to the address until the calculation of address 0xyyyy is completed, and after 0xyyyy The data does not need to participate in the XOR operation.

接收端流密码解密方程的结构与参数大小和加密方程相同,解密是加密的逆过程,与加密类似,变量X取整数按mod(256)得到一个字节的变量x,方程迭代一次,x更新一次。从30KB流密码解密内存1的0x0000地址取一个字节与x按位异或,运算结果O存入30KB流密码解密内存2的0x0000中,并反馈回方程中参与下一次迭代;接着取30KB流密码解密内存1的0x0001地址的一个字节与更新后的x同样按位异或,运算结果O存入30KB流密码解密内存2的0x0001中,按地址顺序依次循环以上的操作过程直到30KB的内存地址0xyyyy完成操作为止。最后30KB内存空间0x0000~0xyyyy保存了原始的视频数据,其中0x0000~0x0014均保存一个字节00值,0x0015~0xyyyy保存原始未加密的H.264视频流数据。最后,去掉H.264数据之前20个字节和去掉H.264数据之后的所有字节,余下的则是所有的H.264压缩数据,送去H.264解码。The structure of the stream cipher decryption equation at the receiving end is the same as the parameter size and the encryption equation. Decryption is the inverse process of encryption, which is similar to encryption. The variable X is an integer and mod (256) to obtain a variable x of one byte. The equation is iterated once, and x is updated. once. Take a byte from the 0x0000 address of the 30KB stream cipher decryption memory 1 and XOR it with x, and store the operation result O in the 0x0000 of the 30KB stream cipher decryption memory 2, and feed it back to the equation to participate in the next iteration; then take the 30KB stream One byte of the 0x0001 address of the password decryption memory 1 is bitwise XORed with the updated x, and the operation result O is stored in the 0x0001 of the 30KB stream cipher decryption memory 2, and the above operation process is repeated in order of addresses until the 30KB memory Address 0xyyyy until the operation is completed. The last 30KB memory space 0x0000~0xyyyy saves the original video data, among which 0x0000~0x0014 saves a byte 00 value, and 0x0015~0xyyyy saves the original unencrypted H.264 video stream data. Finally, the 20 bytes before the H.264 data and all the bytes after the H.264 data are removed, and the rest is all H.264 compressed data, which is sent to H.264 decoding.

根据最大I帧和最小P帧来确定置乱和反置乱内存1~3的大小:根据实时视频编码方式的不同,H.264压缩视频信号分为IDR帧、I帧和P帧。IDR帧编码本质和I帧相同,通过帧内预测消除图像空间冗余度;P帧通过帧间预测消除图像时间上的冗余度。I帧压缩率远比P帧小,因而I帧一定比P帧大。Determine the size of scrambling and anti-scrambling memory 1 to 3 according to the largest I frame and the smallest P frame: According to different real-time video encoding methods, H.264 compressed video signals are divided into IDR frames, I frames and P frames. The coding essence of IDR frame is the same as that of I frame, and eliminates image space redundancy through intra-frame prediction; P frame eliminates image temporal redundancy through inter-frame prediction. The compression rate of the I frame is much smaller than that of the P frame, so the I frame must be larger than the P frame.

编码输出模式既可以设置为每一个I帧之后跟若干个P帧,也可以设置为自行判断场景变化激烈程度决定输出I帧或者P帧。本发明采用前者,设置为每1个I帧之后跟9个P帧的输出模式。将H.264压缩视频数据保存为H264文件,借助Elecardstreameyetools软件分析H264文件,能验证设置的输出结果。The encoding output mode can be set to each I frame followed by several P frames, or it can be set to judge the severity of the scene change to output I frames or P frames. The present invention adopts the former, and is set as an output mode in which every I frame is followed by 9 P frames. Save the H.264 compressed video data as an H264 file, analyze the H264 file with the help of Elecardstreameyetools software, and verify the output results of the settings.

通过实验找出在VGA视频格式(图像长宽640×480)下的最大I帧和最小P帧。影响压缩视频数据大小因素,除了编码器的参数设置,还包括拍摄场景光线的明暗,场景复杂度,物体运动的激烈程度。在VGA格式和编码器默认设置条件下,调暗光线,丰富场景内容,加剧物体运动,能增大每一帧压缩视频数据的数据量。相反,调亮光线,减少场景细节,保持物体静止,能减小每一帧压缩视频的数据量。应用程序每调用一次H.264编码器编码一帧图像的API函数,得到一个函数返回值,表征一帧压缩视频信号数据的大小。通过改变实验条件并且比较返回值,能够获得最大的I帧和最小P帧的大小。Find out the maximum I frame and the minimum P frame under the VGA video format (image length and width 640×480) through experiments. Factors that affect the size of compressed video data, in addition to the parameter settings of the encoder, also include the light and shade of the shooting scene, the complexity of the scene, and the intensity of object movement. Under the VGA format and the default setting of the encoder, dimming the light, enriching the content of the scene, and intensifying the movement of the object can increase the data volume of each frame of compressed video data. Conversely, brightening the light, reducing scene detail, and keeping objects still reduces the amount of data per frame of compressed video. Every time the application calls the API function of the H.264 encoder to encode a frame of image, a function return value is obtained, representing the size of a frame of compressed video signal data. By changing the experimental conditions and comparing the returned values, the size of the largest I frame and the smallest P frame can be obtained.

置乱加密内存用于存储流密码加密以后的有效数据,并对这些有效数据进行置乱加密。内存大小必须符合首要条件:整个内存空间刚好能够以3个字节为单位延展为m×n阶矩阵。在首要条件下,根据最大I帧和P帧,选择置乱加密内存的大小和数量。The scrambling encryption memory is used to store the valid data encrypted by the stream cipher, and perform scrambling encryption on these valid data. The memory size must meet the first condition: the entire memory space can just be extended into an m×n order matrix in units of 3 bytes. In the first condition, the size and number of scrambled encrypted memory are selected according to the largest I-frame and P-frame.

为了使存储最大I帧时不溢出,最大的置乱加密内存块必须比I帧还大,因为未填满的置乱加密内存块空间全部补0x00,0x00为冗余数据,为了减少冗余数据,在比I帧大和能够延展为m×n阶矩阵的条件下,尽量减小内存空间。以相同的原则继续设计置乱加密内存块用于存储P帧。In order not to overflow when storing the largest I frame, the largest scrambled encrypted memory block must be larger than the I frame, because the unfilled scrambled encrypted memory block space is all filled with 0x00, 0x00 is redundant data, in order to reduce redundant data , under the condition that it is larger than the I frame and can be extended to an m×n order matrix, the memory space should be reduced as much as possible. Continue to design the scrambled encrypted memory block for storing P frames with the same principle.

内存块的数量越多,层次越细化,内存块与P帧的大小匹配的越好,冗余的数据减小,置乱加密处理效率提高,但每一帧P帧存放到大小最匹配的内存块的判断次数增加,影响运行性能;相反,内存块数量越少,层次越粗放,内存块与P帧的匹配越差,冗余数据增加,置乱加密处理效率降低,但每一帧P帧存放到大小最匹配的内存块的判断次数减小,运行性能提升。The larger the number of memory blocks, the finer the level, the better the size of the memory block and the P frame match, the redundant data is reduced, and the efficiency of scrambling and encryption processing is improved, but each frame of P frame is stored in the most matching size The number of memory block judgments increases, which affects operating performance; on the contrary, the fewer the number of memory blocks, the more extensive the level, the worse the matching between memory blocks and P frames, the increase of redundant data, and the reduction of scrambling encryption processing efficiency, but each frame P The number of judgments to save the frame to the memory block with the most matching size is reduced, and the running performance is improved.

内存块的数量根据具体情况选取,本发明选取3个内存块,最大的内存块用于存放I帧,在符合首要条件下比I帧略大,为24300字节,其他两个内存块按梯度递减,用于存放P帧,分别为10800字节和4800字节。The quantity of memory block is selected according to specific circumstances, and the present invention selects 3 memory blocks, and the largest memory block is used to deposit I frame, is slightly larger than I frame under meeting primary condition, is 24300 bytes, and other two memory blocks are by gradient Decrement, used to store P frames, respectively 10800 bytes and 4800 bytes.

混沌置乱与反置乱:根据图像大小,开辟用于置乱加密和反置乱解密的3个内存,在图2和图3中分别为置乱内存1~3,反置乱内存1~3。要求3个内存大小按梯度递减,并且要求内存空间以3个字节为单位,能延展为规整的m×n阶矩阵。利用位置置乱和反置乱的混沌映射方程:Chaotic scrambling and anti-scrambling: according to the size of the image, open up 3 memories for scrambling encryption and anti-scrambling decryption. 3. Three memory sizes are required to decrease in gradient, and the memory space is required to be in units of 3 bytes, which can be extended to a regular m×n order matrix. Chaotic mapping equations using positional scrambling and anti-scrambling:

计算出3组置乱加密参数b11,b12,b21,b22。对于字节数为24300的置乱和反置乱内存1,以3字节为单位延展为90×90阶矩阵,加密参数为89,75,70,59;对于字节数为10800的置乱和反置乱内存2,同样以3字节为单位延展为60×60阶矩阵,加密参数为48,35,37,27;对于字节数为4800的置乱和反置乱内存3,同样以3字节为单位延展为40×40阶矩阵,加密参数为24,11,37,17。Three sets of scrambling encryption parameters b 11 , b 12 , b 21 , b 22 are calculated. For the scrambling and anti-scrambling memory 1 with 24300 bytes, extend it into a 90×90 order matrix in units of 3 bytes, and the encryption parameters are 89, 75, 70, 59; for the scrambling with 10800 bytes And anti-scrambling memory 2, also extended to 60×60 order matrix in units of 3 bytes, encryption parameters are 48, 35, 37, 27; for scrambling and anti-scrambling memory 3 with 4800 bytes, the same It is extended into a matrix of order 40×40 in units of 3 bytes, and the encryption parameters are 24, 11, 37, and 17.

在发送端,30KB的流密码加密内存2从0x0000~0xyyyy空间存储经过流密码加密的有效加密数据,有效加密数据与置乱内存1、置乱内存2、置乱内存3比较大小,有效加密数据大小如果在24300字节~10800字节范围内,通过软件控制使切换开关K1和K2接1,将数据存入置乱内存1中;如果在10800字节~4800字节范围内,通过软件控制使切换开关K1和K2接2,将数据存入置乱内存2中;如果在4800字节~0字节范围内,通过软件控制使切换开关K1和K2接3,将数据存入置乱内存3中,置乱内存中的剩余空间均按默认为零值,最后将两重加密的数据通过网络发送和通过以太网传输。在接收端,以同样的方式完成像素位置反置乱的解密,不再详述。At the sending end, the 30KB stream cipher encrypted memory 2 stores the effective encrypted data encrypted by the stream cipher from 0x0000 to 0xyyyy. The effective encrypted data is compared with the scrambled memory 1, scrambled memory 2, and scrambled memory 3. The effective encrypted data If the size is in the range of 24300 bytes to 10800 bytes, connect the switch K1 and K2 to 1 through software control, and store the data in the scrambling memory 1; if it is in the range of 10800 bytes to 4800 bytes, control it through software Connect the switch K1 and K2 to 2, and store the data in the scrambling memory 2; if it is within the range of 4800 bytes to 0 bytes, connect the switch K1 and K2 to 3 through software control, and store the data in the scrambling memory In 3, the remaining space in the scrambled memory is defaulted to zero, and finally the double-encrypted data is sent over the network and transmitted via Ethernet. At the receiving end, the descrambling of the pixel position is descrambled in the same manner, and details will not be described here.

多核多线程及其同步机制的原理:多核多线程本质是将应用程序分割为多个相对独立的小任务,其中每一个小任务分配给一个核心处理器处理,将原本由一个核心处理器串行执行的应用程序,设计为由多个核心处理器并行处理多个小任务,以此来提升系统的执行速度,线程的执行原理框图如图4所示。图5中的线程同步机制的具体实施方式分为以下四步:The principle of multi-core multi-threading and its synchronization mechanism: the essence of multi-core multi-threading is to divide the application program into multiple relatively independent small tasks, each of which is assigned to a core processor for processing, and the serial processing originally performed by a core processor The executed application program is designed to process multiple small tasks in parallel by multiple core processors, so as to improve the execution speed of the system. The block diagram of the execution principle of the thread is shown in Figure 4. The specific implementation of the thread synchronization mechanism in Figure 5 is divided into the following four steps:

(1)线程2读取完一帧JPEG图像之后,调用pthread_cond_wait函数,解锁内存,并且等待线程1的条件变量;(1) After thread 2 reads a frame of JPEG image, it calls the pthread_cond_wait function, unlocks the memory, and waits for the condition variable of thread 1;

(2)处于阻塞状态的线程1恢复就绪,调用pthread_mutex_lock函数加锁内存,写JPEG图像到内存中;(2) Thread 1 in the blocked state is ready, calls the pthread_mutex_lock function to lock the memory, and writes the JPEG image to the memory;

(3)线程1写完JPEG数据到内存之后,调用pthread_cond_broadcast函数发送条件变量,并且调用pthread_mutex_unlock函数解锁内存;(3) After thread 1 writes the JPEG data to the memory, it calls the pthread_cond_broadcast function to send the condition variable, and calls the pthread_mutex_unlock function to unlock the memory;

(4)线程2接收条件变量之后自动加锁内存,读取内存中的JPEG图像。读完数据之后,再次进入第一步,调用pthread_cond_wait函数,解锁内存,如此循环实现线程之间的数据同步操作。(4) Thread 2 automatically locks the memory after receiving the condition variable, and reads the JPEG image in the memory. After reading the data, enter the first step again, call the pthread_cond_wait function, unlock the memory, and realize the data synchronization operation between threads in this way.

发送端四核四线程和接收端二核二线程的具体实施过程:Linux系统下多线程的作用主要是将串行处理的任务进行并行化以提高系统处理任务的速。为了使系统显示帧率高达25fps(FramePerSecond),每一个线程运行时间在40ms以内。The specific implementation process of four cores and four threads at the sending end and two cores and two threads at the receiving end: the function of multithreading under the Linux system is mainly to parallelize serial processing tasks to improve the speed of system processing tasks. In order to make the system display frame rate up to 25fps (FramePerSecond), the running time of each thread is within 40ms.

发送端的系统处理过程包括的任务有:JPEG图像采集,JPEG图像解压成RGB格式,RGB格式图像用于LCD显示,RGB图像转换为NV12格式,NV12格式图像用于H.264编码,编码完成后进行混沌流密码和位置置乱双重加密,然后通过TCP发送。本发明采用四个线程来处理上述的任务内容,每一个线程绑定开发板上的一个CPU核心,根据测量得到的各个部分的运行时间,将各个部分划分进四个线程中。线程1包括JPEG图像的采集;线程2包括将JPEG图像解压成RGB格式;线程3包括RGB原始图像的显示;线程4包括RGB格式图像转换为NV12格式,进行H.264编码,加密和TCP发送。而线程之间的数据共享则通过Linux操作系统提供的互斥锁和条件变量来控制。互斥锁1和条件变量1用于线程1和线程2之间JPEG图像数据的共享;互斥锁2和条件变量2用于线程2和线程3之间RGB图像数据的共享;互斥锁3和条件变量3用于线程2和线程4之间RGB图像数据的共享。The system processing process at the sending end includes the following tasks: JPEG image acquisition, JPEG image decompression into RGB format, RGB format image for LCD display, RGB image conversion into NV12 format, NV12 format image for H.264 encoding, after encoding is completed Double encryption with chaotic stream cipher and position scrambling, then send via TCP. The present invention uses four threads to process the above task content, each thread is bound to a CPU core on the development board, and each part is divided into four threads according to the measured running time of each part. Thread 1 includes the collection of JPEG images; thread 2 includes decompressing JPEG images into RGB format; thread 3 includes displaying RGB original images; thread 4 includes converting RGB format images into NV12 format, performing H.264 encoding, encryption and TCP transmission. The data sharing between threads is controlled by mutual exclusion locks and condition variables provided by the Linux operating system. Mutex 1 and condition variable 1 are used for sharing JPEG image data between threads 1 and 2; mutex 2 and condition variable 2 are used for sharing RGB image data between threads 2 and 3; mutex 3 And condition variable 3 is used for the sharing of RGB image data between thread 2 and thread 4.

接收端的系统处理过程包括的任务有:TCP数据接收,进行位置反置乱和混沌流密码解密,H.264解码得到NV12格式图像,NV12图像转化为RGB格式,RGB图像用于LCD显示。本发明采用两个线程处理上述的任务内容,每一个线程绑定开发板上的一个CPU核心,根据测量得到的各个部分的运行时间,将各个部分划分进两个线程中。线程1包括TCP数据接收,解密,H.264解码和NV12图像到RGB图像的转换;线程2包括RGB图像的显示。采用互斥锁1和条件变量1来控制线程1和线程2之间RGB图像数据的共享。The system processing process at the receiving end includes the following tasks: TCP data reception, position anti-scrambling and chaotic stream cipher decryption, H.264 decoding to obtain NV12 format images, NV12 images are converted to RGB format, and RGB images are used for LCD display. The present invention uses two threads to process the above task content, each thread is bound to a CPU core on the development board, and each part is divided into two threads according to the measured running time of each part. Thread 1 includes TCP data reception, decryption, H.264 decoding and conversion of NV12 image to RGB image; thread 2 includes display of RGB image. Use mutex 1 and condition variable 1 to control the sharing of RGB image data between thread 1 and thread 2.

上述的任务划分保证了每一个线程的平均运行时间最短,互相等待的时间最短,从而可以使得视频显示可以到达比较高的帧率。The above task division ensures that the average running time of each thread is the shortest, and the waiting time for each other is the shortest, so that the video display can reach a relatively high frame rate.

以上所述是本发明的优选实施方式而已,当然不能以此来限定本发明之权利要求的保护范围,应当指出,对于本领域的普通技术人员来说,对本发明的技术方案进行修改或者等同替换,都不脱离本发明权利要求的保护范围。The above description is only a preferred embodiment of the present invention, which certainly cannot limit the scope of protection of the claims of the present invention. It should be pointed out that for those skilled in the art, the technical solutions of the present invention can be modified or equivalently replaced , do not depart from the scope of protection of the claims of the present invention.

Claims (8)

1.一种H.264编码后加密的嵌入式视频混沌保密通信方法,其特征在于,包括以下步骤:1. a kind of H.264 coded post-encrypted embedded video chaos security communication method, it is characterized in that, may further comprise the steps: S1、在发送端,对视频数据进行H.264硬件编码、混沌流密码加密、像素位置的混沌置乱加密、网络发送和广域网传输;S1. At the sending end, H.264 hardware encoding, chaotic stream cipher encryption, chaotic scrambling encryption of pixel positions, network transmission and wide area network transmission are performed on the video data; 其中,所述混沌流密码的加密方程为:Wherein, the encryption equation of the chaotic stream cipher is: <mfenced open = "{" close = ""> <mtable> <mtr> <mtd> <mrow> <mi>X</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <mo>)</mo> </mrow> <mo>=</mo> <msub> <mi>a</mi> <mn>11</mn> </msub> <mi>X</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>a</mi> <mn>12</mn> </msub> <mi>Y</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>a</mi> <mn>13</mn> </msub> <mi>Z</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>)</mo> </mrow> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mi>Y</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <mo>)</mo> </mrow> <mo>=</mo> <msub> <mi>a</mi> <mn>21</mn> </msub> <mi>O</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>a</mi> <mn>22</mn> </msub> <mi>Y</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>a</mi> <mn>23</mn> </msub> <mi>Z</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>)</mo> </mrow> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mi>Z</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>+</mo> <mn>1</mn> <mo>)</mo> </mrow> <mo>=</mo> <msub> <mi>a</mi> <mn>31</mn> </msub> <mi>O</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>a</mi> <mn>32</mn> </msub> <mi>Y</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>a</mi> <mn>33</mn> </msub> <mi>Z</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>+</mo> <mn>3</mn> <mo>&amp;times;</mo> <msup> <mn>10</mn> <mn>8</mn> </msup> <mi>s</mi> <mi>i</mi> <mi>n</mi> <mo>&amp;lsqb;</mo> <mn>2</mn> <mo>&amp;times;</mo> <msup> <mn>10</mn> <mn>5</mn> </msup> <mo>&amp;times;</mo> <mi>O</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>&amp;rsqb;</mo> </mrow> </mtd> </mtr> </mtable> </mfenced> <mfenced open = "{" close = ""><mtable><mtr><mtd><mrow><mi>X</mi><mrow><mo>(</mo><mi>k</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow><mo>=</mo><msub><mi>a</mi><mn>11</mn></msub><mi>X</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow><mo>+</mo><msub><mi>a</mi><mn>12</mn></msub><mi>Y</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow><mo>+</mo><msub><mi>a</mi><mn>13</mn></msub><mi>Z</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow></mrow></mtd></mtr><mtr><mtd><mrow><mi>Y</mi><mrow><mo>(</mo><mi>k</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow><mo>=</mo><msub><mi>a</mi><mn>21</mn></msub><mi>O</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow><mo>+</mo><msub><mi>a</mi><mn>22</mn></msub><mi>Y</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow><mo>+</mo><msub><mi>a</mi><mn>23</mn></msub><mi>Z</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow></mrow></mtd></mtr><mtr><mtd><mrow><mi>Z</mi><mrow><mo>(</mo><mi>k</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow><mo>=</mo><msub><mi>a</mi><mn>31</mn></msub><mi>O</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow><mo>+</mo><msub><mi>a</mi><mn>32</mn></msub><mi>Y</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow><mo>+</mo><msub><mi>a</mi><mn>33</mn></msub><mi>Z</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow><mo>+</mo><mn>3</mn><mo>&amp;times;</mo><msup><mn>10</mn><mn>8</mn></msup><mi>s</mi><mi>i</mi><mi>n</mi><mo>&amp;lsqb;</mo><mn>2</mn><mo>&amp;times;</mo><msup><mn>10</mn><mn>5</mn></msup><mo>&amp;times;</mo><mi>O</mi><mrow><mo>(</mo><mi>k</mi><mo>)</mo></mrow><mo>&amp;rsqb;</mo></mrow></mtd></mtr></mtable></mfenced> 式中:In the formula: <mrow> <mfenced open = "(" close = ")"> <mtable> <mtr> <mtd> <msub> <mi>a</mi> <mn>11</mn> </msub> </mtd> <mtd> <msub> <mi>a</mi> <mn>12</mn> </msub> </mtd> <mtd> <msub> <mi>a</mi> <mn>13</mn> </msub> </mtd> </mtr> <mtr> <mtd> <msub> <mi>a</mi> <mn>21</mn> </msub> </mtd> <mtd> <msub> <mi>a</mi> <mn>22</mn> </msub> </mtd> <mtd> <msub> <mi>a</mi> <mn>23</mn> </msub> </mtd> </mtr> <mtr> <mtd> <msub> <mi>a</mi> <mn>31</mn> </msub> </mtd> <mtd> <msub> <mi>a</mi> <mn>32</mn> </msub> </mtd> <mtd> <msub> <mi>a</mi> <mn>33</mn> </msub> </mtd> </mtr> </mtable> </mfenced> <mo>=</mo> <mfenced open = "(" close = ")"> <mtable> <mtr> <mtd> <mn>0.205</mn> </mtd> <mtd> <mrow> <mo>-</mo> <mn>0.595</mn> </mrow> </mtd> <mtd> <mn>0.265</mn> </mtd> </mtr> <mtr> <mtd> <mrow> <mo>-</mo> <mn>0.265</mn> </mrow> </mtd> <mtd> <mrow> <mo>-</mo> <mn>0.125</mn> </mrow> </mtd> <mtd> <mn>0.595</mn> </mtd> </mtr> <mtr> <mtd> <mn>0.33</mn> </mtd> <mtd> <mrow> <mo>-</mo> <mn>0.33</mn> </mrow> </mtd> <mtd> <mn>0.47</mn> </mtd> </mtr> </mtable> </mfenced> </mrow> <mrow><mfenced open = "(" close = ")"><mtable><mtr><mtd><msub><mi>a</mi><mn>11</mn></msub></mrow>mtd><mtd><msub><mi>a</mi><mn>12</mn></msub></mtd><mtd><msub><mi>a</mi><mn>13</mn></msub></mtd></mtr><mtr><mtd><msub><mi>a</mi><mn>21</mn></msub></mtd><mtd><msub><mi>a</mi><mn>22</mn></msub></mtd><mtd><msub><mi>a</mi><mn>23</mn></msub></mtd></mtr><mtr><mtd><msub><mi>a</mi><mn>31</mn></msub></mtd><mtd><msub><mi>a</mi><mn>32</mn></msub></mtd><mtd><msub><mi>a</mi><mn>33</mn></msub>msub></mtd></mtr></mtable></mfenced><mo>=</mo><mfenced open = "(" close = ")"><mtable><mtr><mtd><mn>0.205</mn></mtd><mtd><mrow><mo>-</mo><mn>0.595</mn></mrow></mtd><mtd><mn>0.265</mn></mtd></mtr><mtr><mtd><mrow><mo>-</mo><mn>0.265</mn></mrow></mtd><mtd><mrow><mo>-</mo><mn>0.125</mn></mrow></mtd><mtd><mn>0.595</mn></mtd></mtr><mtr><mtd><mn>0.33</mn></mtd><mtd><mrow><mo>-</mo><mn>0.33</mn></mrow></mtd><mtd><mn>0.47</mn></mtd></mtr></mtable></mfenced></mrow> 其中X,Y,Z为系统状态变量,aij(i,j=1,2,3)为密钥参数,变量X取整数按mod(256)得到一个字节的变量x,方程迭代一次,x更新一次;O为x与H.264视频数据的异或结果;Among them, X, Y, and Z are system state variables, a ij (i, j=1, 2, 3) are key parameters, variable X takes an integer and obtains a byte variable x according to mod (256), and the equation is iterated once, x is updated once; O is the XOR result of x and H.264 video data; 在进行所述像素位置的混沌置乱加密时,根据H.264硬件编码之后输出的I帧和P帧的大小,分别采用三种不同大小的内存分配方式;针对H.264压缩之后的每一帧视频数据大小不同,采用补0的方法扩展字节数,将字节数扩展为3×m×n个,满足混沌位置置乱和反置乱所要求的字节数,利用位置置乱和反置乱的混沌映射方程When carrying out the chaos scrambling encryption of described pixel position, according to the size of the output I frame and P frame after H.264 hardware coding, adopt three kinds of memory allocation modes of different sizes respectively; The size of the frame video data is different, and the number of bytes is expanded by the method of filling 0, and the number of bytes is expanded to 3×m×n, which meets the number of bytes required by the chaotic position scrambling and anti-scrambling. Anti-scrambling chaotic mapping equation <mfenced open = "{" close = ""> <mtable> <mtr> <mtd> <mrow> <mi>X</mi> <mo>=</mo> <mrow> <mo>(</mo> <mrow> <msub> <mi>b</mi> <mn>11</mn> </msub> <mi>i</mi> <mo>+</mo> <msub> <mi>b</mi> <mn>12</mn> </msub> <mi>j</mi> </mrow> <mo>)</mo> </mrow> </mrow> </mtd> <mtd> <mrow> <mi>%</mi> <mi>m</mi> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mi>Y</mi> <mo>=</mo> <mrow> <mo>(</mo> <mrow> <msub> <mi>b</mi> <mn>21</mn> </msub> <mi>i</mi> <mo>+</mo> <msub> <mi>b</mi> <mn>22</mn> </msub> <mi>j</mi> </mrow> <mo>)</mo> </mrow> </mrow> </mtd> <mtd> <mrow> <mi>%</mi> <mi>n</mi> </mrow> </mtd> </mtr> </mtable> </mfenced> <mfenced open = "{" close = ""><mtable><mtr><mtd><mrow><mi>X</mi><mo>=</mo><mrow><mo>(</mo><mrow><msub><mi>b</mi><mn>11</mn></msub><mi>i</mi><mo>+</mo><msub><mi>b</mi><mn>12</mn></msub><mi>j</mi></mrow><mo>)</mo></mrow></mrow></mtd><mtd><mrow><mi>%</mi><mi>m</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>Y</mi><mo>=</mo><mrow><mo>(</mo><mrow><msub><mi>b</mi><mn>21</mn></msub><mi>i</mi><mo>+</mo><msub><mi>b</mi><mn>22</mn></msub><mi>j</mi></mrow><mo>)</mo></mrow></mrow></mtd><mtd><mrow><mi>%</mi><mi>n</mi></mrow></mtd></mtr></mtable></mfenced> 计算出3组置乱加密参数b11,b12,b21,b22Calculate 3 sets of scrambling encryption parameters b 11 , b 12 , b 21 , b 22 ; S2、在接收端,通过网络接收加密视频数据,完成像素位置的混沌反置乱解密和混沌流密码解密,在密钥匹配的条件下,实现H.264硬件解码,在密钥失配条件下,H.264硬件解码失败后停止发送端与接收端之间的通信。S2. At the receiving end, the encrypted video data is received through the network, and the chaotic anti-scrambling and decryption of the pixel position and the decryption of the chaotic stream cipher are completed. Under the condition of key matching, H.264 hardware decoding is realized. Under the condition of key mismatch , stop the communication between the sending end and the receiving end after the H.264 hardware decoding fails. 2.根据权利要求1所述的嵌入式视频混沌保密通信方法,其特征在于,步骤S1所述的混沌流密码加密为:在视频数据前面增加全0的保护字节。2. The embedded video chaos secure communication method according to claim 1, wherein the encryption of the chaos stream cipher described in step S1 is as follows: adding a protection byte of all 0s in front of the video data. 3.根据权利要求2所述的嵌入式视频混沌保密通信方法,其特征在于,步骤S1所述的混沌流密码加密为:在视频数据前面增加20个全0的保护字节。3. The embedded video chaotic secure communication method according to claim 2, characterized in that the encryption of the chaotic stream cipher in step S1 is as follows: adding 20 all-0 protection bytes in front of the video data. 4.根据权利要求3所述的嵌入式视频混沌保密通信方法,其特征在于,所述三种不同的内存容量根据视频数据的最大I帧和最小P帧来确定。4. embedded video chaos secure communication method according to claim 3, is characterized in that, described three kinds of different memory capacities are determined according to the maximum I frame and the minimum P frame of video data. 5.根据权利要求3所述的嵌入式视频混沌保密通信方法,其特征在于,所述三种不同的内存容量分别为24300字节、10800字节、2400字节。5. The embedded video chaos secure communication method according to claim 3, characterized in that, the three different memory capacities are respectively 24300 bytes, 10800 bytes, and 2400 bytes. 6.根据权利要求1所述的嵌入式视频混沌保密通信方法,其特征在于,步骤S1在对视频数据进行H.264硬件编码之前还包括以下步骤:摄像头摄取视频、视频图像的JPEG解码和RGB格式到YUV420格式的转换;6. The embedded video chaos secure communication method according to claim 1, characterized in that, step S1 also includes the following steps before carrying out H.264 hardware encoding to video data: the JPEG decoding and RGB decoding of video images taken by camera, video images Format to YUV420 format conversion; 步骤S2在实现H.264硬件解码之后还包括以下步骤:将YUV420格式转换为RGB格式和解密后的视频显示。Step S2 further includes the following steps after realizing H.264 hardware decoding: converting YUV420 format to RGB format and displaying the decrypted video. 7.根据权利要求6所述的嵌入式视频混沌保密通信方法,其特征在于,所述步骤S1发送端采用四个线程循环执行以下流程:线程1循环采集视频图像,线程2读取视频图像后解压为RGB图像;线程3读取RGB图像显示在LCD显示器上;线程4读取RGB图像之后转换格式,做H.264编码压缩,对H.264视频流进行混沌流密码加密和混沌置乱加密,发送两重加密后的视频流数据。7. The embedded video chaos secure communication method according to claim 6, characterized in that, the sending end of the step S1 adopts four thread loops to execute the following flow process: thread 1 loops to collect video images, and after thread 2 reads the video images Decompress to RGB image; Thread 3 reads the RGB image and displays it on the LCD monitor; Thread 4 converts the format after reading the RGB image, performs H.264 encoding and compression, and performs chaotic stream cipher encryption and chaotic scrambling encryption on the H.264 video stream , to send double-encrypted video stream data. 8.根据权利要求6所述的嵌入式视频混沌保密通信方法,其特征在于,所述步骤S2接收端采用两个线程循环执行以下流程:线程1循环接收表征H.264视频流大小的变量值和两重加密后的视频流数据,进行混沌置乱解密和混沌流密码解密,H.264解码解压,转换格式为RGB格式;线程2读取RGB格式数据显示到LCD显示器上。8. The embedded video chaos secure communication method according to claim 6, characterized in that, the step S2 receiving end adopts two thread loops to execute the following flow process: thread 1 loop receives the variable value representing the size of the H.264 video stream And double-encrypted video stream data, perform chaotic scrambling decryption and chaotic stream cipher decryption, H.264 decoding and decompression, and convert the format to RGB format; thread 2 reads RGB format data and displays it on the LCD display.
CN201610126090.8A 2016-03-04 2016-03-04 H.264 a kind of embedded video Development of Chaotic Secure Communication Method encrypted after coding Active CN105791853B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610126090.8A CN105791853B (en) 2016-03-04 2016-03-04 H.264 a kind of embedded video Development of Chaotic Secure Communication Method encrypted after coding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610126090.8A CN105791853B (en) 2016-03-04 2016-03-04 H.264 a kind of embedded video Development of Chaotic Secure Communication Method encrypted after coding

Publications (2)

Publication Number Publication Date
CN105791853A CN105791853A (en) 2016-07-20
CN105791853B true CN105791853B (en) 2018-02-09

Family

ID=56386592

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610126090.8A Active CN105791853B (en) 2016-03-04 2016-03-04 H.264 a kind of embedded video Development of Chaotic Secure Communication Method encrypted after coding

Country Status (1)

Country Link
CN (1) CN105791853B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107317670A (en) * 2017-08-08 2017-11-03 广东工业大学 A kind of video chaotic secret communication system and method
CN109788347B (en) * 2019-01-21 2021-09-21 广东工业大学 Video chaotic secret communication device and method
CN109788299A (en) * 2019-03-12 2019-05-21 广东工业大学 A video transmission method, system, device and computer medium between mobile devices
CN110248045A (en) * 2019-06-19 2019-09-17 广东工业大学 A kind of Cat maps image encryption method, decryption method and relevant apparatus
CN110213552A (en) * 2019-06-25 2019-09-06 桂林电子科技大学 A kind of wide-band communication system for transmission of video
CN111737706B (en) * 2020-05-11 2023-01-06 华南理工大学 A front-end portrait encryption and recognition method with biometric privacy protection
CN111585744A (en) * 2020-05-26 2020-08-25 广东工业大学 A kind of video transmission method and system based on hardware codec
CN111970519B (en) * 2020-08-28 2021-06-15 中国人民解放军国防科技大学 Airborne video return method
CN112333540B (en) * 2020-10-26 2022-06-24 浙江大华技术股份有限公司 Method and device for determining video encryption length
CN114143551B (en) * 2021-12-01 2023-03-24 北京邮电大学 Video safe and efficient transmission system applied to video sensor network
CN116405710A (en) * 2023-03-01 2023-07-07 五邑大学 HEVC video ROI encryption and decryption method based on self-synchronizing chaotic stream cipher
CN117610060B (en) * 2024-01-19 2024-03-29 成都理工大学 Multi-core parallel-based multimedia file hybrid encryption and decryption method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355687A (en) * 2008-09-10 2009-01-28 天栢宽带网络科技(上海)有限公司 Apparatus for deciphering and descrambling receiving terminal of ground wireless digital television
CN102843558B (en) * 2012-08-21 2015-12-09 中国电子科技集团公司第三十八研究所 H.264/AVC compressed domain video encryption/decryption device and encrypting/decrypting method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8144781B2 (en) * 2008-01-04 2012-03-27 Broadcom Corporation Video processing system for scrambling layered video streams and methods for use therewith

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355687A (en) * 2008-09-10 2009-01-28 天栢宽带网络科技(上海)有限公司 Apparatus for deciphering and descrambling receiving terminal of ground wireless digital television
CN102843558B (en) * 2012-08-21 2015-12-09 中国电子科技集团公司第三十八研究所 H.264/AVC compressed domain video encryption/decryption device and encrypting/decrypting method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于复合混沌系统的视频加密方案的研究及实现;王俊;《中国优秀硕士学位论文全文数据库》;20111215(第S2期);参见论文第19-20页,第31-33页,第53-56页,图3.1 *

Also Published As

Publication number Publication date
CN105791853A (en) 2016-07-20

Similar Documents

Publication Publication Date Title
CN105791853B (en) H.264 a kind of embedded video Development of Chaotic Secure Communication Method encrypted after coding
US10320557B2 (en) Encoder, decoder and methods employing partial data encryption
CN108924099B (en) Encryption method and device, encryption performance analysis method and device, electronic equipment and readable storage medium
US11012742B2 (en) Video scrambling method and device with adaptive mode selection, network camera and readable storage medium
KR101737299B1 (en) Encoder, decoder and methods
CN109640095B (en) Video encryption system combined with quantum key distribution
CN105871537B (en) A kind of video communication method and device based on chaos encryption
CN114143551B (en) Video safe and efficient transmission system applied to video sensor network
US8189664B2 (en) Methods for encrypting and compressing video
CN104253996B (en) The sending, receiving method and its device and Transmission system of video data
CN103856786A (en) Streaming media video encryption method and device based on H.264
Xu et al. Robust video encryption for h. 264 compressed bitstream based on cross-coupled chaotic cipher
CN107172433A (en) A kind of video encryption method
CN101247520B (en) Video data enciphering/deciphering method
CN108199824A (en) Video encryption method and video flowing method for safety monitoring based on AES-CTR and chaos algorithm
CN109168033A (en) A kind of video private data guard system and method
US10812453B2 (en) Method for transmitting encrypted packet in communication system
CN105187851A (en) Speed-adjustable encryption method oriented to mass coded multimedia data and video processing platform employing speed-adjustable encryption method
WO2021196960A1 (en) Encrypted video call method and apparatus, and device and storage medium
CN110198458B (en) Processing method and device for encrypted audio and video data
CN111585744A (en) A kind of video transmission method and system based on hardware codec
CN115278243B (en) Real-time video encryption method and device for resisting deep learning face attack
CN105721873A (en) Hidden transmission method based on MPEG4/2
TW201501496A (en) Video codec system and video stream transmission method
CN113179404A (en) Image encryption method based on motion vector

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Chen Ping

Inventor after: Zhang Xiaoyang

Inventor after: Yu Simin

Inventor after: Lv Jinhu

Inventor before: Chen Ping

Inventor before: Zhang Xiaoyang

Inventor before: Yu Simin

COR Change of bibliographic data
GR01 Patent grant
GR01 Patent grant