CN105763887A - Blowfish algorithm-based H.264 video coding method and transmission encryption system - Google Patents

Blowfish algorithm-based H.264 video coding method and transmission encryption system Download PDF

Info

Publication number
CN105763887A
CN105763887A CN201510953725.7A CN201510953725A CN105763887A CN 105763887 A CN105763887 A CN 105763887A CN 201510953725 A CN201510953725 A CN 201510953725A CN 105763887 A CN105763887 A CN 105763887A
Authority
CN
China
Prior art keywords
video
key
module
sequence
blowfish
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
CN201510953725.7A
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.)
BEIJING HUADIAN TIANYI INFORMATION TECHNOLOGY Co Ltd
State Grid Corp of China SGCC
Beijing Kedong Electric Power Control System Co Ltd
State Grid Beijing Electric Power Co Ltd
Original Assignee
BEIJING HUADIAN TIANYI INFORMATION TECHNOLOGY Co Ltd
State Grid Corp of China SGCC
Beijing Kedong Electric Power Control System Co Ltd
State Grid Beijing Electric Power Co Ltd
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 BEIJING HUADIAN TIANYI INFORMATION TECHNOLOGY Co Ltd, State Grid Corp of China SGCC, Beijing Kedong Electric Power Control System Co Ltd, State Grid Beijing Electric Power Co Ltd filed Critical BEIJING HUADIAN TIANYI INFORMATION TECHNOLOGY Co Ltd
Priority to CN201510953725.7A priority Critical patent/CN105763887A/en
Publication of CN105763887A publication Critical patent/CN105763887A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]
    • 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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/254Management at additional data server, e.g. shopping server, rights management server
    • H04N21/2541Rights Management

Landscapes

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

Abstract

The invention discloses a Blowfish algorithm-based H.264 video transmission encryption method, which is characterized by comprising a terminal module, an RTSP agent module, and a video source registration and data server module, wherein the terminal module is used for acquiring a video and transmitting the video to a video server, acquiring a video file from a video database and online playing the video file; the RTSP agent module is used for authenticating the terminal and forwarding a video stream and shielding the video source server; the video source database module is used for storing information of all video acquisition terminals and using an RTSP agent to acquire the information of the terminals via the database; and the video source registration server module is used for being in charge of online registration for the video acquisition terminals. The method of the invention has the beneficial effects that the method is based on the H.264 video coding method and based on the Blowfish algorithm, good compromise between safety and encryption efficiency is acquired in a condition of not reducing the algorithm security, a video encryption transmission model is built, and the feasibility of the method is verified.

Description

A kind of H.264 method for video coding based on Blowfish algorithm and transmission encrypting system
Technical field
The present invention relates to a kind of H.264 method for video coding based on Blowfish algorithm and transmission encrypting system, belong to technical field of data security.
Background technology
Along with the fast development of computer technology and network technology, network multimedia service becomes application new in network service.But opening and the anonymity due to network so that the content of multimedia of transmission over networks is easily subject to attack.And traditional Video Encryption Algorithm can not meet the requirement of heterogeneous networks multimedia service, how to design the Video Encryption Algorithm meeting different application demand, particularly significant with the safety protecting video content.H.264 it is one of current most popular video encoding standard, compared with traditional video encoding standard, H.264 can obtain less code check when equivalent video quality, but with the computation complexity that is significantly increased for cost.Some characteristics (as big in data volume, requirement of real-time is high, storage format is various) due to video itself, video flowing is encrypted inefficient with DES algorithm, and the encryption performance of Blowfish algorithm is better than DES algorithm, it has, and enciphering rate is fast, compact, key length is variable, can the free feature such as use.
H.264 being currently up-to-date video encoding standard, it, because having good network characteristic and efficient code efficiency, is used widely in various Network Video Transmission.Chinese scholars has done substantial amounts of research work for H.264 video-encryption field, and wherein Choice encryption algorithm has become the main direction of studying of video-encryption.This kind of algorithm requires that ciphering process combines with the form of video data, and can according to the difference of security requirement, the sensitive data that Choice encryption is different, this kind of algorithm is generally of relatively low computation complexity, there is stronger data interoperability, be suitable for wider application.
It is fast that symmetric key cryptosystem has encryption/decryption speed, the advantage that degree of safety is high.Stream cipher passes through united application combinational network and other sequence method, produces more complicated network, and in the hope of realizing more complicated sequence, stream cipher compares difficult control theoretically, and great majority need to be realized by hardware, and speed there is not the fast of symmetric key.Blowfish grows up for 1994, also referred to as Fugu ocellatus algorithm, is a kind of symmetric block cipher algorithm, and key length is variable, and its safety is significantly high, there is presently no and is cracked.This algorithm only used some simple calculations: based on 32 add, XOR with table look-up, and algorithm runs only needs the many internal memories of 4K even less.Code length is comparatively short, and the demand of ROM is also little.This algorithm has that enciphering rate is fast, compact, key length is variable, can the free feature such as use.Several groups on WSN experiments show that, relative to other several symmetric encipherment algorithms, Blowfish has superiority on encryption and decryption time and output.
Summary of the invention
For solving the deficiencies in the prior art, it is an object of the invention to provide a kind of H.264 transmission of video encryption method based on Blowfish algorithm, carry out encryption and decryption with Blowfish algorithm to based on the video H.264 encoded, reach transmission of video apply in real time, safety demand.
In order to realize above-mentioned target, the present invention adopts the following technical scheme that:
A kind of based on Blowfish algorithm H.264 method for video coding, it is characterised in that to include key pretreatment and information two processes of encryption, specific as follows:
1.1 key pretreatment
Sub-key is calculated by Blowfish and gets, and step is as follows:
1. P array and S box is initialized by the hexadecimal string of π;
2. first 32 XOR of P1 and key, P2 and second, by that analogy;Key rotation uses, until whole P array is all replaced;
3. encrypting full 0 string with Blowfish, sub-key is the sub-key described in the 2nd step;
4. P1 and P2 is replaced in the 3rd step output;
5. encrypting the 3rd step output with Blowfish, sub-key is after amendment;
6. P3 and P4 is replaced in the 5th step output;
7. repeat this process, until P array is completely replaced, then exports result order with the Blowfish of continuous transformation and replace S box;
1.2 information encryptions
Information encryption BlowfishEncipher () realizes;First, with 2n byte sequence a1,a2,…,a2nRepresent an I frame, then this sequence is divided into two parts a1,a3,…,a2n-1And a2,a4,…,a2n, one is odd sequence, and one is even sequence;The two n byte sequence is carried out XOR and obtains sequence C=c1,c2,…,cn;At this moment BlowfishEncipher () is used, odd sequence is encrypted, it it is one group by odd sequence every 64 of order from left to right, each group of sequence is divided into two halves, XL and XR is respectively 32bit, and ciphering process is the Feistel net of 16 layers, and the plaintext encrypting 64 needs iteration 16 times, the process of iteration uses sub-key key_pbox [i] generated above, generates the ciphertext of 64;Finally the odd sequence after encryption and sequence C are spliced.
A kind of H.264 transmission of video encryption method based on Blowfish algorithm, is characterized in that, including terminal module, RTSP proxy module, video source registration and data server module;
Described terminal module, for gathering video and being transferred to video server, can obtain video file from video database and play online simultaneously;
Described RTSP proxy module is for authenticating to terminal and forward video flowing, mute video source server;
Described video source data library module is for storing the information of all video acquisition terminals, and makes RTSP agency be obtained the information of terminal by this data base;Described video source registration server module is for being responsible for the registration of reaching the standard grade of video acquisition terminal
Aforesaid a kind of H.264 transmission of video encryption method based on Blowfish algorithm, is characterized in that, described terminal module is divided into two major functions, and first function, for gathering video and being transferred on video server, is play online for all terminals;Second function can obtain video file from video database and play online.
Aforesaid a kind of H.264 transmission of video encryption method based on Blowfish algorithm, it is characterized in that, described RTSP proxy module is for verifying whether each terminal has the right of access system, and be responsible for forwarding video flowing between terminal and video source server, terminal is shielded video source server, to ensure the safety of video data.
Aforesaid a kind of H.264 transmission of video encryption method based on Blowfish algorithm, it is characterized in that, described video source data library module comprises two aspects, on the one hand for storing the video information that all terminals gather, on the other hand, terminal obtains video data information by RTSP agency to video source data storehouse, thus realizing online playing function;Described video source registration server module is for being responsible for the registration of reaching the standard grade of video acquisition terminal.
The beneficial effect that the present invention reaches: native system is based on data mining technology, based on C4.5 algorithm, accurately extracts the feature of flood attack from substantial amounts of network traffics, sets up flood attack detection model, improve the accuracy of flood attack detection.
Accompanying drawing explanation
Fig. 1 is the video-encryption flow chart of the present invention
Fig. 2 is the system structure schematic diagram of the present invention.
Detailed description of the invention
Below in conjunction with accompanying drawing, the invention will be further described.Following example are only for clearly illustrating technical scheme, and can not limit the scope of the invention with this.
This method is based on H.264 Video coding mode, based on Blowfish algorithm, obtains the better trade-off between safety and encryption efficiency when not reducing algorithm security, sets up video-encryption mode, the feasibility of checking the method.
Blowfish algorithm is the block encryption algorithm of a kind of symmetry, and this algorithm has core encryption function a: BF_En (), and the input of this function is 64 cleartext informations, through computing, exports with the form of 64 cipher-text information.By Blowfish algorithm for encryption information, it is necessary to two processes: key pretreatment and information encryption.It is described in detail as follows.
Key pretreatment: sub-key is calculated by Blowfish and gets: 1. initialized P array and S box by the hexadecimal string of π;2. first 32 XOR of P1 and key, P2 and second, by that analogy.Key rotation uses, until whole P array is all replaced;3. # encrypts full 0 string with Blowfish, and sub-key is the sub-key described in the 2nd step;4. P1 and P2 is replaced in the 3rd step output;5. encrypting the 3rd step output with Blowfish, sub-key is after amendment;6. P3 and P4 is replaced in the 5th step output;7. repeat this process, until P array is completely replaced, then exports result order with the Blowfish of continuous transformation and replace S box.The sub-key of Blowfish algorithm and S box are all generated by algorithm itself, and key distribution is highly difficult.
Information encryption flow is as shown in Figure 1.Information encryption realizes with BlowfishEncipher () in a program.First, with 2n byte sequence a1,a2,…,a2nRepresent an I frame, then this sequence is divided into two parts a1,a3,…,a2n-1And a2,a4,…,a2n, one is odd sequence, and one is even sequence.The two n byte sequence is carried out XOR and obtains sequence C=c1,c2,…,cn.At this moment BlowfishEncipher () is used, odd sequence is encrypted, it it is one group by odd sequence every 64 of order from left to right, each group of sequence is divided into two halves, XL and XR is respectively 32bit, and ciphering process is the Feistel net of 16 layers, and the plaintext encrypting 64 needs iteration 16 times, the process of iteration uses sub-key key_pbox [i] generated above, generates the ciphertext of 64.Finally the odd sequence after encryption and sequence C are spliced.This algorithm only need to encrypt the data volume of I frame half.
Video-encryption mode concrete structure is as in figure 2 it is shown, include terminal module, RTSP proxy module, video source registration and data server module.
Wherein, terminal module, for gathering video and being transferred to video server, can obtain video file from video database and play online simultaneously;RTSP proxy module is for authenticating to terminal and forward video flowing, mute video source server;Video source data library module is for storing the information of all video acquisition terminals, and makes RTSP agency be obtained the information of terminal by this data base;Video source registration server module is for being responsible for the registration of reaching the standard grade of video acquisition terminal.
Terminal module is divided into two major functions, and first function, for gathering video and being transferred on video server, is play online for all terminals;Second function can obtain video file from video database and play online.
RTSP proxy module is for verifying whether each terminal has the right of access system, and is responsible for forwarding video flowing between terminal and video source server, terminal is shielded video source server, to ensure the safety of video data.
Video source data library module comprises two aspects, and on the one hand for storing the video information that all terminals gather, on the other hand, terminal obtains video data information by RTSP agency to video source data storehouse, thus realizing online playing function;Video source registration server module is for being responsible for the registration of reaching the standard grade of video acquisition terminal.
Build a test platform below and carry out actual video transmission encryption experiment.Test platform is using common PC as experiment porch, and PC is configured that, IntelCOREi7 processor, 8GB internal memory, and operating system is Windows8.1.We utilize the official's reference software 10.2 in H.264 to realize the algorithm above design, utilize VS2013 to complete the debugging to JM code and compiling.
Using news and the hall_monitor of CIF form as experiment video sequence in experiment, it is encoded cryptographic operation by encryption method mentioned above.In encoder-side, set coding parameter as: with IPPP ... P mode is encoded, I frame refresh rate is 10, and frame per second is that 30 frames are per second, uses self-defined FMO pattern to be encoded.In an encoding process, pay close attention to the code stream parameter of encoder output, the performance of encryption is analyzed;In decoder end, because adopting herein, fixed length syntactic element being encrypted operation, maintaining the semantic compatibility of video, use decoder can be made directly decoding, obtain the image after encryption is upset.
Safety analysis: the safety of encryption rear video includes two aspects, Video security after encryption and the safety of AES itself.The all or part of information of Video security and video is hidden so that the video after encryption can not by the correct perception of people.
Performance evaluation: from ciphering process it can be seen that follow-up entropy code process is had no effect by algorithm herein substantially, therefore, this method is only small on the impact of video compression ratio.It is as shown in table 1 that algorithm realizes result:
Table 1: encryption front-and rear-view frequency sequence size (respectively 100 frame)
Video sequence Encryption preceding document size (byte) File size (byte) after encryption
news 125,181 125,328
hall_monitor 125,009 125,613

Claims (2)

1. one kind based on Blowfish algorithm H.264 method for video coding, it is characterised in that include key pretreatment and information two processes of encryption, specific as follows:
1.1 key pretreatment
Sub-key is calculated by Blowfish and gets, and step is as follows:
1. P array and S box is initialized by the hexadecimal string of π;
2. first 32 XOR of P1 and key, P2 and second, by that analogy;Key rotation uses, until whole P array is all replaced;
3. encrypting full 0 string with Blowfish, sub-key is the sub-key described in the 2nd step;
4. P1 and P2 is replaced in the 3rd step output;
5. encrypting the 3rd step output with Blowfish, sub-key is after amendment;
6. P3 and P4 is replaced in the 5th step output;
7. repeat this process, until P array is completely replaced, then exports result order with the Blowfish of continuous transformation and replace S box;
1.2 information encryptions
Information encryption BlowfishEncipher () realizes;First, with 2n byte sequence a1,a2,…,a2nRepresent an I frame, then this sequence is divided into two parts a1,a3,…,a2n-1And a2,a4,…,a2n, one is odd sequence, and one is even sequence;The two n byte sequence is carried out XOR and obtains sequence C=c1,c2,…,cn;At this moment BlowfishEncipher () is used, odd sequence is encrypted, it it is one group by odd sequence every 64 of order from left to right, each group of sequence is divided into two halves, XL and XR is respectively 32bit, and ciphering process is the Feistel net of 16 layers, and the plaintext encrypting 64 needs iteration 16 times, the process of iteration uses sub-key key_pbox [i] generated above, generates the ciphertext of 64;Finally the odd sequence after encryption and sequence C are spliced.
2., based on a H.264 video transmission encrypting system for Blowfish algorithm, described system includes terminal module, RTSP proxy module, video source registration server module and video source data library module;It is characterized in that:
Described terminal module, for gathering video and being transferred to video server, obtains video file simultaneously from video source data library module and plays online;
Described RTSP proxy module is for authenticating to terminal and forward video flowing, mute video source server;
Described video source data library module is for storing the information of all video acquisition terminals, and makes RTSP agency be obtained the information of terminal by this data base;
Described video source registration server module is for being responsible for the registration of reaching the standard grade of video acquisition terminal.
CN201510953725.7A 2015-12-17 2015-12-17 Blowfish algorithm-based H.264 video coding method and transmission encryption system Pending CN105763887A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510953725.7A CN105763887A (en) 2015-12-17 2015-12-17 Blowfish algorithm-based H.264 video coding method and transmission encryption system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510953725.7A CN105763887A (en) 2015-12-17 2015-12-17 Blowfish algorithm-based H.264 video coding method and transmission encryption system

Publications (1)

Publication Number Publication Date
CN105763887A true CN105763887A (en) 2016-07-13

Family

ID=56342178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510953725.7A Pending CN105763887A (en) 2015-12-17 2015-12-17 Blowfish algorithm-based H.264 video coding method and transmission encryption system

Country Status (1)

Country Link
CN (1) CN105763887A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108307149A (en) * 2017-12-29 2018-07-20 上海顶竹通讯技术有限公司 A kind of video proxy system and monitoring method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013044800A1 (en) * 2011-09-28 2013-04-04 中国移动通信集团公司 Video frame stream processing method, video server and terminal equipment
CN103269329A (en) * 2013-04-14 2013-08-28 江苏省广电有线信息网络股份有限公司 Household video monitoring system based on digital television set-top box and IMS (Information Management System)
CN104581201A (en) * 2014-12-31 2015-04-29 乐视网信息技术(北京)股份有限公司 Video encryption method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013044800A1 (en) * 2011-09-28 2013-04-04 中国移动通信集团公司 Video frame stream processing method, video server and terminal equipment
CN103269329A (en) * 2013-04-14 2013-08-28 江苏省广电有线信息网络股份有限公司 Household video monitoring system based on digital television set-top box and IMS (Information Management System)
CN104581201A (en) * 2014-12-31 2015-04-29 乐视网信息技术(北京)股份有限公司 Video encryption method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
刘永平: "保密传真机Blowfish加解密算法的实现", 《信息与电脑》 *
陈勇,沙爱军: "AES在MPEG-4视频加密中的应用", 《电力系统通信》 *
韩东东: "基于MINA框架的RTSP移动流媒体代理服务器设计与实现", 《电脑知识与技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108307149A (en) * 2017-12-29 2018-07-20 上海顶竹通讯技术有限公司 A kind of video proxy system and monitoring method
CN108307149B (en) * 2017-12-29 2020-08-25 上海顶竹通讯技术有限公司 Video proxy system and monitoring method

Similar Documents

Publication Publication Date Title
CN104468090B (en) Character cipher coding method based on image pixel coordinates
RU2638639C1 (en) Encoder, decoder and method for encoding and encrypting input data
KR20070074562A (en) Method of providing conditional access
EP2122903A1 (en) Key distribution for securing broadcast transmission to groups of users in wireless networks
WO2016091394A1 (en) Secure media player
CN108199824A (en) Video encryption method and video flowing method for safety monitoring based on AES-CTR and chaos algorithm
CN106453391A (en) Long repeating data encryption and transmission method and system
CN110120871A (en) A kind of broadcast encryption method and system of private key and ciphertext length fixation
CN115022102B (en) Transmission line monitoring data transmission method and device, computer equipment and storage medium
CN101697511B (en) Method and system for receiving mobile streaming media conditions
Wang et al. Preserving scheme for user’s confidential information in smart grid based on digital watermark and asymmetric encryption
Fang et al. Toward secure and lightweight data transmission for cloud-edge-terminal collaboration in artificial intelligence of things
Lu et al. Research on information steganography based on network data stream
CN105763887A (en) Blowfish algorithm-based H.264 video coding method and transmission encryption system
CN102694819B (en) Streaming media transmission method based on broadcast encryption
Zhou et al. A survey of security aggregation
CN103327363B (en) Realize the system and the method thereof that carry out video information control extension based on semantic granularity
CN108270771A (en) A kind of shellcode encoding and decoding deformation method
CN103873270B (en) Intelligent meter infrastructure network system and its message broadcasting method
Huang et al. Research of H. 264 video transmission encryption technology based on blowfish algorithm
CN101938487B (en) Method for realizing network credible service
Huang et al. Real-time mode hopping of block cipher algorithms for mobile streaming
US8774408B2 (en) Traceable method and system for broadcasting digital data
CN112752122B (en) Video encryption transmission method of intelligent camera and computer readable storage medium
JP5557707B2 (en) Encrypted information generating device and program thereof, secret key generating device and program thereof, distribution content generating device and program thereof, content decrypting device and program thereof, and user specifying device and program thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160713