CN104065968B - A kind of video data encryption and decryption method and device - Google Patents

A kind of video data encryption and decryption method and device Download PDF

Info

Publication number
CN104065968B
CN104065968B CN201410313239.4A CN201410313239A CN104065968B CN 104065968 B CN104065968 B CN 104065968B CN 201410313239 A CN201410313239 A CN 201410313239A CN 104065968 B CN104065968 B CN 104065968B
Authority
CN
China
Prior art keywords
data frame
scrambling
information
scrambler
code
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
CN201410313239.4A
Other languages
Chinese (zh)
Other versions
CN104065968A (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.)
HARBIN HAINENGDA TECHNOLOGY Co Ltd
Original Assignee
HARBIN HAINENGDA TECHNOLOGY 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 HARBIN HAINENGDA TECHNOLOGY Co Ltd filed Critical HARBIN HAINENGDA TECHNOLOGY Co Ltd
Priority to CN201410313239.4A priority Critical patent/CN104065968B/en
Publication of CN104065968A publication Critical patent/CN104065968A/en
Application granted granted Critical
Publication of CN104065968B publication Critical patent/CN104065968B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the invention discloses a kind of video data encryption and decryption method and device, wherein encryption method includes:The data frame of encoder output is received, the data frame packet contains condition code;Condition code in data frame is mapped to the data frame after pseudo-characteristic code obtains mapping processing;Scrambling request is sent to system, receives the information in response to the scrambling request that the system is sent;Data frame after being handled using described information the mapping handles to obtain scrambled data frame as scrambling.And decryption method processing procedure is the inversely processing of encryption method;Technical solution of the present invention can improve video data security, and the computational complexity of its encryption and decryption mode is low.

Description

A kind of video data encryption and decryption method and device
Technical field
The present invention relates to mobile communication technology field, more particularly to a kind of video data encryption and decryption method and device.
Background technology
With the development of wireless communication technology, user also turns to more matchmakers to the demand of private network communication from simple speech business Body business, especially video traffic.Video data enciphering/deciphering is compared with common data file encryption and decryption, has encryption and decryption data The features such as amount is big, and data structure is special, therefore, the encipher-decipher method of video data have tighter to computation complexity and security The requirement of lattice, because video data service there are certain requirements to real-time, therefore, encipher-decipher method must in computation complexity and An equalization point is found between the two performances of security.
Security:Security is the primary requirement of data encrypting and deciphering.Security generally comprise two aspect the meaning, one Visual security, that is, by video encrypting/deciphering technology, the information in video image can be carried out effective interference and Hide.Second, the security of system of encryption and decryption, that is, video encrypting/deciphering method can resist common cryptography attack.
Computation complexity:Complicated assess that the encryption and decryption of video operates can be assessed in terms of two, one It is that the complexity one that software is realized is hard-wired complexity.Performance and simplified terminal system in view of coding and decoding video Design, the design of enciphering and deciphering algorithm should not influence the key link of encoding and decoding algorithm, and the data volume of encryption and decryption will be use up It is possible few.
Its higher security of computation complexity of encipher-decipher method is higher, meanwhile, the operational data amount of encryption and decryption can also be got over Greatly, the real-time of video data transmission is caused to be more difficult to realize;It is therefore, existing because requirement of the people to real-time is the most notable Encipher-decipher method be based on matrix variation pattern to video data carry out encryption and decryption processing, this mode computation complexity compared with Low, real-time performance accesses guarantee, but its security has larger hidden danger.
The content of the invention
In order to solve the above-mentioned technical problem, can the invention provides a kind of video data encryption and decryption method and device Meet the low complex degree requirement of the security and computations of video data transmission.
In a first aspect, the invention provides a kind of video data encryption method, methods described includes:
The data frame of encoder output is received, the data frame packet contains condition code;
Condition code in data frame is mapped to the data frame after pseudo-characteristic code obtains mapping processing;
Scrambling request is sent to system, receives the information in response to the scrambling request that the system is sent;
Data frame after being handled using described information the mapping handles to obtain scrambled data frame as scrambling.
Preferably, described to system transmission scrambling request, receive the system transmission scrambles what is asked in response to described Information, including:
The first scrambling is sent using short message service to the system to ask, the first scrambling request is used to ask scrambling Numbering;
The information of response and the described first scrambling request that the system is sent is received, described information includes scrambling code number;
It is then described that the data frame after mapping processing is handled as scrambling using described information to obtain scrambled data frame, wrap Include:
According to the scrambling code number and the mapping table of scrambler to prestore, search corresponding with the scrambling code number in described information Scrambler;
Searched scrambler is utilized to handle the data frame after mapping processing to obtain scrambled data frame as scrambling.
Preferably, described to system transmission scrambling request, receive the system transmission scrambles what is asked in response to described Information, including:
The second scrambling is sent using short message service to the system to ask, the second scrambling request is disturbed for request Code;
The information in response to the described second scrambling request that the system is sent is received, described information includes scrambler;
It is then described that the data frame after mapping processing is handled as scrambling using described information to obtain scrambled data frame, wrap Include:Data frame after being handled using the scrambler in described information the mapping handles to obtain scrambled data frame as scrambling.
Preferably, methods described also includes:
The scrambled data frame is packaged into packet according to the host-host protocol of the system, and added in the packet Add signaling information, so that the system performs operation according to the signaling information.
Second aspect, the invention provides a kind of video data decryption method, methods described includes:
The packet that reception system is sent, the packet include scrambled data frame, pseudo-characteristic are included in the data frame Code;
Descramble requests are sent to the system, receive the information in response to the descramble requests that the system is sent;
Descrambling data frame is obtained as scramble process to the scrambled data frame using described information;
Pseudo-characteristic code in the descrambling data frame is mapped as condition code and obtains ciphertext data frame.
Preferably, it is described to send descramble requests to the system, receive being asked in response to the descrambling for the system transmission The information asked, including:
The first descramble requests are sent to the system using short message service, first descramble requests are used to ask scrambler Numbering;
The information in response to first descramble requests that the system is sent is received, described information includes scrambling code number;
It is then described that descrambling data frame is obtained to scrambled data frame progress scramble process using described information, including:
According to the scrambling code number and the mapping table of scrambler to prestore, search corresponding with the scrambling code number in described information Scrambler;
Searched scrambler is utilized to obtain descrambling data frame as scramble process to the scrambled data frame.
Preferably, it is described to send descramble requests to the system, receive being asked in response to the descrambling for the system transmission The information asked, including:
The second descramble requests are sent to the system using short message service, second descramble requests are disturbed for request Code;
The information in response to second descramble requests that the system is sent is received, described information includes scrambler;
It is then described that descrambling data frame is obtained as scramble process to the scrambled data frame using described information, including:Utilize Scrambler in described information obtains descrambling data frame to the scrambled data frame as scramble process.
The invention provides a kind of video data encryption device, described device to include for the third aspect:
Receiving unit, for receiving the data frame of encoder output, the data frame packet contains condition code;
Map unit, for the condition code in data frame to be mapped into the data frame after pseudo-characteristic code obtains mapping processing;
Scramble request unit, for sending scrambling request to system, receive that the system sends in response to the scrambling The information of request;
Scrambling unit, handle to obtain as scrambling for the data frame after handling the mapping using described information and encrypt number According to frame.
Preferably, the scrambling request unit, including:
First request transmission sub-unit, asked for sending the first scrambling to the system using short message service, it is described First scrambling request is used to ask scrambling code number;
First information receiving subelement, the letter of the response and the described first scrambling request that are sent for receiving the system Breath, described information include scrambling code number;
Then the scrambling unit includes:
Subelement is searched, the scrambling code number and the mapping table of scrambler to be prestored for basis, in lookup and described information Scrambling code number corresponding to scrambler;
Subelement is scrambled, handles to obtain as scrambling for the data frame after utilizing searched scrambler to handle the mapping Scrambled data frame.
Preferably, the scrambling request unit, including:
Second request transmission sub-unit, asked for sending the second scrambling to the system using short message service, it is described Second scrambling request is used to ask scrambler;
Second information receiving subelement, the letter in response to the described second scrambling request sent for receiving the system Breath, described information include scrambler;
Then the scrambling unit is specifically used for utilizing the scrambler in described information to make to the data frame after mapping processing Scrambling handles to obtain scrambled data frame.
Preferably, described device also includes:
Packaged unit, the scrambled data frame is packaged into packet for the host-host protocol according to the system, and Signaling information is added in the packet, so that the system performs operation according to the signaling information.
Fourth aspect, the invention provides a kind of video data to decrypt device, and described device includes:
Receiving unit, the packet sent for reception system, the packet include scrambled data frame, the data frame In include pseudo-characteristic code;
Descramble requests unit, for sending descramble requests to the system, receive that the system sends in response to described The information of descramble requests;
Descrambling unit, for obtaining descrambling data frame as scramble process to the scrambled data frame using described information;
Map unit, ciphertext data frame is obtained for the pseudo-characteristic code in the descrambling data frame to be mapped as into condition code.
Preferably, the descramble requests unit, including:
First request transmission sub-unit, it is described for sending the first descramble requests to the system using short message service First descramble requests are used to ask scrambling code number;
First information receiving subelement, the letter in response to first descramble requests sent for receiving the system Breath, described information include scrambling code number;
Then the Descrambling unit includes:
Subelement is searched, for according to the mapping table between the scrambler and scrambling code number stored in advance, lookup and institute State scrambler corresponding to scrambling code number in information;
Descramble subelement, obtain descrambling number for carrying out the scrambled data frame using the scrambler searched scramble process According to frame.
Preferably, the descramble requests unit, including:
Second request transmission sub-unit, it is described for sending the second descramble requests to the system using short message service Descramble requests are used to ask scrambler;
Second information receiving subelement, the letter in response to second descramble requests sent for receiving the system Breath, described information include scrambler;
Then the scramble process unit is specifically used for utilizing the scrambler in described information to make to descramble to the scrambled data frame Processing obtains descrambling data frame.
By foregoing description, the beneficial effects of the present invention are:
The video data encryption method and device of the embodiment of the present invention, first, the condition code in data frame is mapped Handle the data frame after being mapped.Due to having carried out mapping processing to the condition code in data frame, therefore, even if some are received End illegally intercepts the data frame, can not be also correctly decoded, can not obtain real video data, this processing mode energy Enough improve video data security and the computing mode simple possible.Then, after mapping processing, after also handling mapping Data frame carries out scrambling processing, and used scramble information is to be distributed by system according to request dynamic, for different data The scramble information that frame uses not is changeless, and possibility is identical may also be different, so, even if some receiving terminals are illegally cut Receive scrambled data frame, due to do not know scramble information also can not successful decryption, this dynamic scrambling mode can be further Improve video data security and scrambling processing mode simple possible, computation complexity are low.
In addition, provided in an embodiment of the present invention video data decryption corresponding with video data encryption method and device Method and apparatus, its handling process and encryption process sequence are reciprocal, are carried just because of encryption end using mapping processing, scrambling processing High video data security and processing mode simple possible, and scramble process is first carried out corresponding to corresponding decryption processing, institute Used one shows the correct descrambling of guarantee when the descrambling information of use and encryption, then again to the number after scramble process Mapping processing is carried out according to frame, that is, pseudo-characteristic code is mapped as condition code, is so handled so that encoder correctly decodes it, To ensure that encryption and decryption processing does not influence the processing of encoder, the decryption method simple and being capable of assuring data security.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment Accompanying drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this For the those of ordinary skill of field, on the premise of not paying creative work, it can also be obtained according to these accompanying drawings other Accompanying drawing.
Fig. 1 is the flow chart of the embodiment 1 of the video data encryption method of the embodiment of the present invention;
Fig. 2 is the flow chart of the embodiment 1 of the video data decryption method of the embodiment of the present invention;
Fig. 3 is the structure chart of the embodiment 1 of the video data encryption device of the embodiment of the present invention;
Fig. 4 is the structure chart that the video data of the embodiment of the present invention decrypts the embodiment 1 of device.
Embodiment
In order that those skilled in the art more fully understand the scheme of the embodiment of the present invention, below in conjunction with the accompanying drawings and implement Mode is described in further detail to the embodiment of the present invention.
Referring to Fig. 1, the flow chart of the embodiment 1 of the video data encryption of the embodiment of the present invention is shown, the present embodiment is Described from the angle of video data transmitting terminal, this method may include:
Step 101, the data frame of encoder output is received, the data frame packet contains condition code.
Transmitting terminal initially sets up the video data service between receiving terminal, and then transmitting terminal is to sent video data Handled successively, coded treatment is carried out to video data first, is then encrypted, finally beats scrambled data frame again Sent after bag.Therefore, encryption is that the data frame after coded treatment is encrypted, actually encoder The data frame of output is encrypted.For transmitting terminal, the encoder can be that a hardware unit can also be one Individual software module;Based on this, coding process is simply introduced below.
The purpose of coded treatment is actually to carry out video compress to video data to reduce the capacity of data.In reality During compression, encoder can take various algorithms to reduce the capacity of data, video coding algorithm develops into from MPEG-1, MPEG-2, MPEG-4 and H.264.In order to pursue higher compression efficiency, more focus on removing the temporal redundancy of image sequence.Therefore, at this I frames (intracoded frame), P frames (forward-predictive-coded frames), B frames (bi-directional predictive coding frame), video pressure are introduced in a little algorithms In contracting a static image is represented per frame.
Wherein, I frames are also referred to as key frame, and full frame image information is compressed coding by it, its decode independent of appoint What his frame, only reconstruct complete image with the data can of I frames.I frames are the reference frames of P frames and B frames.
P frames, by fully reduce with image sequence above encoded frame time redundancy information come compressed transmission data The coded image of amount, also referred to as predicts frame.P frame recordings are difference of this frame with former frame (I frames or P frames), due to P frames There is no complete image data, the only other data of image difference with former frame, therefore, during decoding need to utilize the figure cached before Difference as being superimposed with this frame definition, generates final image.
B frames, both considered and sequence of source images before time redundancy information between encoded frame, taken into account again and source images Time redundancy information behind sequence between encoded frame carrys out the coded image of compressed transmission data amount, also referred to as bi-directional predicted Frame.B frame recordings be this frame and front and rear frame difference, therefore, to decode B frames, the cache image before not only obtaining, will also Image after decoding, it is superimposed with this two field picture to obtain final image by front and rear image.
Encoded processing obtains different types of coded frame, and condition code is included in different coded frames, condition code For mark data frame type.This feature code is that the data frame is I frames, P frames or B frames for distinctive mark, so that receiving terminal In decoding according to the type of data frame come using corresponding decoding process.
Step 102, the condition code in data frame is mapped to the data frame after pseudo-characteristic code obtains mapping processing.
The map operation of this step can be handled according to the transmitting terminal mapping mode pre-set with receiving terminal, specifically Process is that the condition code carried in data frame is mapped into pseudo-characteristic code according to default mapping mode, such as:Default mapping Mode is negated processing, if I frame identifications are " 00 ", handles to obtain pseudo-characteristic code " 11 " by mapping;If P frame identifications are " 10 ", handle to obtain pseudo-characteristic code " 01 " by mapping;If B frame identifications are " 01 ", handle to obtain pseudo-characteristic code by mapping “10”。
The map operation of this step can also be that transmitting terminal oneself sets a kind of mapping mode, and the mapping mode is sent Receiving terminal, so that receiving terminal carries out inversely processing according to the mapping mode to the data frame received obtains former condition code;Or by Mapping table between condition code in data frame and pseudo-characteristic code is sent to receiving terminal by transmitting terminal, so that receiving terminal reflects according to this Penetrate relation table and former condition code is obtained to the data frame progress inversely processing received.
Step 103, scrambling request is sent to system, receives the letter in response to the scrambling request that the system is sent Breath.
This step can have following two implementations, and both implementations are explained separately below.The A kind of implementation, it may include:
The first scrambling is sent using short message service to the system to ask, the first scrambling request is used to ask scrambler Numbering;
The information in response to the described first scrambling request that the system is sent is received, described information includes scrambling code number.
Said system refers to not only to support narrow band service but also the private network communication system of support broadband services.For the system Speech, after the first scrambling request of transmitting terminal transmission is received, scrambling code number can be chosen according to certain rule, can also The irregular selection scrambling code number of random milli, is then sent to transmission by selected scrambling code number in the form of short message End.
In order to ensure the normal execution of the first above-mentioned implementation, transmitting terminal pre-sets a scrambler pond, the scrambler Pond includes multigroup scrambler, the corresponding scrambling code number of each group of scrambler, and different scramblers corresponds to different scrambling code numbers.Transmitting terminal The mapping table between scrambling code number and scrambler can be saved in advance, so as to subsequent execution Scrambling Operation.Based on this, Said system is also required to pre-save a scrambling code number pond, and the scrambling code number pond includes disturbing for all scramblers that transmitting terminal is set Code numbering;After said system receives the first scrambling request of transmitting terminal transmission, in the scrambling code number pond pre-saved A scrambling code number is selected, and transmitting terminal is sent it to using short message service, is then protected in advance according to itself by transmitting terminal The mapping table deposited, scrambler corresponding to lookup.
Second of implementation, it may include:
The second scrambling is sent using short message service to the system to ask, the second scrambling request is disturbed for request Code;
The information in response to the described second scrambling request that the system is sent is received, described information includes scrambler.
In order to ensure the normal execution of above-mentioned second of implementation, unlike the first implementation, transmitting terminal In can not have to preserve scrambler, scrambling code number or mapping table etc., still, system must pre-set a scrambler pond, The scrambler pond includes multigroup scrambler;Transmitting terminal directly sends the second scrambling to system and asked, and scrambling request is received in system Afterwards, a scrambler is selected from the scrambler pond pre-saved, and the scrambler is sent to transmitting terminal using short message service, is sent out Sending end just can perform follow-up scrambling according to the scrambler and handle.
Step 104, the data frame after being handled using described information the mapping handles to obtain scrambled data frame as scrambling.
Due to the information that the realization needs of this step obtain according to above-mentioned steps 103, and above-mentioned steps 103 have two kinds of differences Implementation obtain including the information of different content, based on this, this step also has two kinds of implementations.
When step 103 is using the first implementation, this step may be accomplished by, including:
According to the scrambling code number and the mapping table of scrambler to prestore, search corresponding with the scrambling code number in described information Scrambler;
Searched scrambler is utilized to handle the data frame after mapping processing to obtain scrambled data frame as scrambling.
For transmitting terminal, scrambling processing is made to the mapping processing data frame using scrambler, after scrambling is handled Data frame is as scrambled data frame.
When step 103 is using second of implementation, this step specific implementation is:
Data frame after being handled using the scrambler in described information the mapping is carried out scrambling and handles to obtain encryption data Frame.
The encryption to the data frame after coding, this encryption side are achieved that by above-mentioned steps 101~104 Method, it is possible to increase Information Security, and implementation simple possible.Generally, after encryption, transmitting terminal can be by The host-host protocol of lighting system, the scrambled data frame is packaged into packet, by system forwards to receiving terminal, so as to realize video Data service.
Transmitting terminal can send video traffic request, the video traffic please before video data service is initiated to system Ask including:Receiving terminal identity and type of service;Transmitting terminal can initiate man-to-man video traffic, can also initiate a pair More video traffics.It is so-called it is one-to-one refer to an only receiving terminal, it is one-to-many to refer to there are multiple receiving terminals.System receives this and regarded After frequency service request, receiving terminal identity is therefrom learnt, being sent to transmitting terminal allows message;When system receives transmitting terminal After the packet of transmission, receiving terminal is sent it to.
Transmitting terminal can also not have to the identity for informing system receiving terminal, but be adjusted by control centre by schedule information The corresponding relation spent between transmitting terminal and receiving terminal, then when system receives the packet of transmitting terminal transmission, just according to scheduling Information sends it to corresponding receiving terminal.
By the embodiments of the present invention it can be seen that:Using the present invention video encryption method, first to coded treatment after Data frame in condition code carry out mapping and handle to obtain pseudo-characteristic code, after so handling, even if some receiving terminals are illegally cut The data frame is received, can not be also correctly decoded, real video data can not be obtained.Therefore, this method can be improved and regarded After mapping processing, the data frame after also handling mapping scrambles for frequency Information Security and the computing mode simple possible Processing, used scramble information is to be distributed by system according to request dynamic, is believed for the scrambling that different data frames uses Breath is not changeless, and possibility is identical may also be different, so, even if some receiving terminals illegally intercept encryption data Frame, due to not knowing that scramble information can not also realize decryption processing, this dynamic scrambling mode can further improve video Information Security and scrambling processing mode simple possible, computation complexity is low.
Because in existing system, many operations are required for control centre's (dispatching desk), and control centre is believed by dispatching Breath realizes some control functions, than relatively time-consuming, such as when transmitting terminal A is initiated and video call service between receiving terminal B and C, When video data transmission after certain time, transmitting terminal A no longer needs receiving terminal B to participate in this business, it is necessary to pass through scheduling Receiving terminal B is controlled to exit this business centrally through schedule information, or transmitting terminal A wishes that receiving terminal D can participate in this Secondary business, also agree to control by control centre.Based on this problem, the invention provides a kind of preferred scheme, it is not required to Control centre is wanted to can be realized as above-mentioned function.The preferred scheme is specifically on the basis of above-described embodiment 1, by the data Bag is sent to before the system, and methods described also includes:
The scrambled data frame is packaged into packet according to the host-host protocol of the system, and added in the packet Add signaling information, so that the system performs operation according to the signaling information.
When adding signaling information in the packet, then after system receives the packet, according to signaling information Operated corresponding to performing.Such as when signaling information is the video traffic that allows some receiving terminal to exit transmitting terminal initiation, then system Then terminated according to the signaling information to corresponding receiving terminal and send packet, so that the receiving terminal exits this video traffic.Or When signaling information is to allow some receiving terminal to add the video traffic that transmitting terminal is initiated, then system according to the signaling information to corresponding Receiving terminal send packet so that the receiving terminal add video traffic.
, can be by carrying signaling information in the packet, to inform that system performs using the invention described above preferred scheme Corresponding operation, it is no longer necessary to which control centre, which realizes by schedule information, to be controlled, so as to save the operating time.
Corresponding with above-mentioned video data encryption method, the embodiments of the invention provide video data decoding method, ginseng See Fig. 2, show the flow chart of the embodiment 1 of the video data decryption method of the embodiment of the present invention, the present embodiment is from video The angle description of data receiver, this method may include:
Step 201, the packet that reception system is sent, the packet include scrambled data frame, wrapped in the data frame Code containing pseudo-characteristic.
System delivers a packet to corresponding receiving terminal according to the request of transmitting terminal or according to schedule information, due to Data frame includes pseudo-characteristic code after the processing of above-described embodiment encryption method in data frame.
Step 202, descramble requests are sent to the system, receive that the system sends in response to the descramble requests Information.
Receiving terminal receives packet and unpacks packet according to the host-host protocol of the system to obtain encryption data afterwards Frame, then just need the data frame to be decrypted processing, the process of the decryption processing should be the inversely processing of ciphering process, then first Carry out with scrambling the corresponding scramble process of processing, because scramble process needs to use same scrambler can with scrambling processing Correct descrambling, therefore, it is necessary to pass through information corresponding to this step to system acquisition.In actual applications, descrambling procedure is actually Scrambling processing can be regarded as.
This step can be realized by following two modes, and both implementations are explained separately below.
The first implementation, it may include:
The first descramble requests are sent to the system using short message service, first descramble requests are used to ask scrambler Numbering;
The information in response to first descramble requests that the system is sent is received, described information includes scrambling code number.
In order to ensure the normal execution of the first implementation, receiving terminal needs to pre-save between scrambler and scrambling code number Mapping table, and the mapping table preserved with transmitting terminal it is identical.For system, system, which needs to record, to be sent End carries out scrambling code number used by scrambling processing to data frame.Receiving terminal can inform that system is wanted to obtain by descramble requests Scrambling code number used by which data frame, i.e. data frame number is carried in descramble requests;Asked when system receives descrambling After asking, the corresponding scrambling code number recorded will be sent to receiving terminal in the form of short message.
Second of implementation, it may include:
The second descramble requests are sent to the system using short message service, second descramble requests are disturbed for request Code;
The information in response to second descramble requests that the system is sent is received, described information includes scrambler.
In order to ensure the normal execution of second of implementation, except that, receiving terminal can not with first way With anything is preserved, but system needs to pre-set a scrambler pond, and the scrambler pond includes multigroup scrambler;System needs to record Transmitting terminal data is encrypted used scrambler.What receiving terminal informed system it to be obtained by descramble requests is which Scrambler corresponding to individual data frame, i.e., data frame number is carried in descramble requests.After system receives scrambler request, utilize Scrambler corresponding to the data frame is sent to receiving terminal by short message service.
Step 203, descrambling data frame is obtained as scramble process to the scrambled data frame using described information.
Due to the information that the realization needs of this step obtain according to above-mentioned steps 202, and above-mentioned steps 202 have two kinds of differences Implementation obtain including the information of different content, based on this, this step also has two kinds of implementations.
When step 202 is using the first implementation, this step can be accomplished by the following way, including:
According to the scrambling code number and the mapping table of scrambler to prestore, search corresponding with the scrambling code number in described information Scrambler;
Searched scrambler is utilized to obtain descrambling data frame as scramble process to the scrambled data frame.
When step 202 is using second of implementation, this step is specially:
Descrambling data frame is obtained as scramble process to the scrambled data frame using the scrambler in described information.
Step 204, the pseudo-characteristic code in the descrambling data frame is mapped as condition code and obtains ciphertext data frame.
Receiving terminal can preset to realize that the mapping between pseudo-characteristic code and condition code is handled according to transmitting terminal Good mapping mode is handled, and specific implementation process is to reflect the pseudo-characteristic code carried in data frame according to default mapping mode Penetrate into former condition code.
Certainly, if receiving terminal does not have pre-set mapping mode with transmitting terminal, but set alone by transmitting terminal Mapping mode, then transmitting terminal need, in advance by the mapping mode or by the corresponding relation between condition code and pseudo-characteristic code, to lead to Cross short message service and be sent to receiving terminal, so that receiving terminal is handled according to these information to complete mapping, most mapping is handled at last Data frame afterwards is as ciphertext data frame.
By the embodiments of the present invention it can be seen that:Video data decryption method of the present invention, its handling process and encryption Handling process is reciprocal, and video data security and processing side are improved using mapping processing, scrambling processing just because of encryption end Formula simple possible, and scramble process is first carried out corresponding to corresponding decryption processing, when used descrambling information is with encryption Used one shows the correct descrambling of guarantee, then carries out mapping processing to the data frame after scramble process again, that is, will Pseudo-characteristic code is mapped as condition code, so handles so that encoder correctly decodes it, to ensure that encryption and decryption processing does not influence to compile The processing of code device, its implementation is simple and being capable of assuring data security.
Corresponding with embodiments of the present invention video data encryption method, the embodiment of the present invention additionally provides video counts According to encryption device, for existing terminal device, want to realize that video data is sent, it is necessary to data are encrypted place Reason, therefore, the encryption device are commonly applied to send in equipment.
Refering to Fig. 3, the structure chart of the embodiment 1 of the video data encryption device of the embodiment of the present invention shown, the device can Including:
Receiving unit 301, for receiving the data frame of encoder output, the data frame packet contains condition code;
Map unit 302, for the condition code in data frame to be mapped into the data after pseudo-characteristic code obtains mapping processing Frame;
Scrambling request unit 303, for sending scrambling request to system, receive adding in response to described for the system transmission Disturb the information of request;
Scrambling unit 304, handle and added as scrambling for the data frame after being handled using described information the mapping Ciphertext data frame.
Preferably, the scrambling request unit, including:
First request transmission sub-unit, asked for sending the first scrambling to the system using short message service, it is described First scrambling request is used to ask scrambling code number;
First information receiving subelement, the letter of the response and the described first scrambling request that are sent for receiving the system Breath, described information include scrambling code number;
Then the scrambling unit includes:
Subelement is searched, the scrambling code number and the mapping table of scrambler to be prestored for basis, in lookup and described information Scrambling code number corresponding to scrambler;
Subelement is scrambled, handles to obtain as scrambling for the data frame after utilizing searched scrambler to handle the mapping Scrambled data frame.
Preferably, the scrambling request unit, including:
Second request transmission sub-unit, asked for sending the second scrambling to the system using short message service, it is described Second scrambling request is used to ask scrambler;
Second information receiving subelement, the letter in response to the described second scrambling request sent for receiving the system Breath, described information include scrambler;
Then the scrambling unit is specifically used for utilizing the scrambler in described information to make to the data frame after mapping processing Scrambling handles to obtain scrambled data frame.
Preferably, described device also includes:
Packaged unit, the scrambled data frame is packaged into packet for the host-host protocol according to the system, and Signaling information is added in the packet, so that the system performs operation according to the signaling information.
It can be seen from above-described embodiment that it can be handled using encryption device of the present invention by mapping to handle and scramble Into encryption, the two processing modes add decryption difficulty and improve Video security, and its processing mode is simply transported Calculation amount is low, by way of short message service obtains scramble information, realizes that wide and narrow strip combines, further improves video data and pass Defeated security.
Corresponding with embodiments of the present invention video data decryption method, the embodiment of the present invention additionally provides video counts According to decryption device, for existing terminal device, want to realize that video data is properly received, it is necessary to solve data Close processing, therefore, the decryption device are commonly applied in receiving device.
Refering to Fig. 4, the structure chart of the embodiment 1 of video data of the embodiment of the present invention decryption device shown, the device can Including:
Receiving unit 401, the packet sent for reception system, the packet include scrambled data frame, the number According to including pseudo-characteristic code in frame;
Descramble requests unit 402, for sending descramble requests to the system, receive that the system sends in response to institute State the information of descramble requests;
Descrambling unit 403, for obtaining descrambling data frame as scramble process to the scrambled data frame using described information;
Map unit 404, ciphertext data is obtained for the pseudo-characteristic code in the descrambling data frame to be mapped as into condition code Frame.
The descramble requests unit, including:
First request transmission sub-unit, it is described for sending the first descramble requests to the system using short message service First descramble requests are used to ask scrambling code number;
First information receiving subelement, the letter in response to first descramble requests sent for receiving the system Breath, described information include scrambling code number;
The then Descrambling unit, including:
Subelement is searched, for according to the mapping table between the scrambler and scrambling code number stored in advance, lookup and institute State scrambler corresponding to scrambling code number in information;
Descramble subelement, obtain descrambling number for carrying out the scrambled data frame using the scrambler searched scramble process According to frame.
Preferably, the descramble requests unit, including:
Second request transmission sub-unit, it is described for sending the second descramble requests to the system using short message service Second descramble requests are used to ask scrambler;
Second information receiving subelement, the information in response to the descramble requests sent for receiving the system, institute State packet and contain scrambler;
Then the scramble process unit is specifically used for utilizing the scrambler in described information to make to descramble to the scrambled data frame Processing obtains descrambling data frame.
By the embodiments of the present invention it can be seen that:Present invention decryption device workflow and encryption device workflow Inversely processing, by scramble process and mapping processing complete decryption processing, the two processing modes ensure that video data Secure decryption, and its processing mode simple operation amount is low, by way of short message service obtains scramble information, realizes wide and narrow strip With reference to the further security for improving video data transmission.
In actual applications, the terminal for initiating video traffic is referred to as transmitting terminal, the terminal for receiving video traffic is referred to as Receiving terminal, therefore, existing terminal device are also possible to as receiving terminal possible as transmitting terminal, in order to ensure terminal device Encryption can be normally carried out, therefore, terminal device needs to load the encryption device of the present invention and decryption device.
It is some in particular cases, some terminals be only intended to initiate video data service, equally, some terminals also can only For receiving video data, consideration in view of the situation, then terminal can select according to the actual requirements install encryption device or Decrypt device.In actual applications, the terminal device is applied in the terminal device of private network, such as intercom, ride, movement The equipment such as turntable.
It should be noted that such as first and second or the like relational terms are used merely to an entity herein Or operation makes a distinction with another entity or operation, and not necessarily require or imply and exist between these entities or operation Any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant be intended to it is non- It is exclusive to include, so that process, method, article or equipment including a series of elements not only include those key elements, But also the other element including being not expressly set out, or also include solid by this process, method, article or equipment Some key elements.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including Other identical element also be present in the process of the key element, method, article or equipment.
It should be noted that one of ordinary skill in the art will appreciate that realize the whole in above-described embodiment method or portion Split flow, it is that by computer program the hardware of correlation can be instructed to complete, described program can be stored in computer can Read in storage medium, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, it is described to deposit Storage media can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
A kind of video data encryption and decryption method and device provided by the present invention is described in detail above, this Apply specific embodiment in text to be set forth the principle and embodiment of the present invention, the explanation of above example is simply used Understand the method and its core concept of the present invention in help;Meanwhile for those of ordinary skill in the art, according to the present invention's Thought, there will be changes in specific embodiments and applications, in summary, this specification content should not be construed as Limitation of the present invention.

Claims (12)

1. a kind of video data encryption method, it is characterised in that methods described includes:
The data frame of encoder output is received, the data frame packet contains condition code;Described document information is used for mark data frame type;
Condition code in data frame is mapped to the data frame after pseudo-characteristic code obtains mapping processing;
The first scrambling is sent using short message service to system to ask, the first scrambling request is used to ask scrambling numbering;
The information of response and the described first scrambling request that the system is sent is received, described information includes scrambling code number;
According to the scrambling code number and the mapping table of scrambler to prestore, disturb corresponding with the scrambling code number in described information is searched Code;
Searched scrambler is utilized to handle the data frame after mapping processing to obtain scrambled data frame as scrambling.
2. according to the method for claim 1, it is characterised in that methods described also includes:
The scrambled data frame is packaged into packet according to the host-host protocol of the system, and letter is added in the packet Information is made, so that the system performs operation according to the signaling information.
3. a kind of video data encryption method, it is characterised in that methods described includes:
The data frame of encoder output is received, the data frame packet contains condition code;Described document information is used for mark data frame type;
Condition code in data frame is mapped to the data frame after pseudo-characteristic code obtains mapping processing;
The second scrambling is sent using short message service to system to ask, the second scrambling request is used to ask scrambler;
The information in response to the described second scrambling request that the system is sent is received, described information includes scrambler;
Data frame after being handled using the scrambler in described information the mapping handles to obtain scrambled data frame as scrambling.
4. according to the method for claim 3, it is characterised in that methods described also includes:
The scrambled data frame is packaged into packet according to the host-host protocol of the system, and letter is added in the packet Information is made, so that the system performs operation according to the signaling information.
5. a kind of video data decryption method, it is characterised in that methods described includes:
The packet that reception system is sent, the packet include scrambled data frame, pseudo-characteristic code are included in the data frame;Institute State condition code and be used for mark data frame type;
The first descramble requests are sent to the system using short message service, first descramble requests are used to ask scrambler to be compiled Number;
The information in response to first descramble requests that the system is sent is received, described information includes scrambling code number;
According to the scrambling code number and the mapping table of scrambler to prestore, disturb corresponding with the scrambling code number in described information is searched Code;
Searched scrambler is utilized to obtain descrambling data frame as scramble process to the scrambled data frame;
Pseudo-characteristic code in the descrambling data frame is mapped as condition code and obtains ciphertext data frame.
6. a kind of video data decryption method, it is characterised in that methods described includes:
The packet that reception system is sent, the packet include scrambled data frame, pseudo-characteristic code are included in the data frame;Institute State condition code and be used for mark data frame type;
The second descramble requests are sent to the system using short message service, second descramble requests are used to ask scrambler;
The information in response to second descramble requests that the system is sent is received, described information includes scrambler;
Descrambling data frame is obtained as scramble process to the scrambled data frame using the scrambler in described information;
Pseudo-characteristic code in the descrambling data frame is mapped as condition code and obtains ciphertext data frame.
7. a kind of video data encryption device, it is characterised in that described device includes:
Receiving unit, for receiving the data frame of encoder output, the data frame packet contains condition code;Described document information is used to mark Know data frame type;
Map unit, for the condition code in data frame to be mapped into the data frame after pseudo-characteristic code obtains mapping processing;
Request unit is scrambled, including:
First request transmission sub-unit, asked for sending the first scrambling to system using short message service, first scrambling Ask to be used to ask scrambling code number;
First information receiving subelement, the information of the response and the described first scrambling request that are sent for receiving the system, institute State packet and contain scrambling code number;
Scrambling unit, including:
Subelement is searched, for according to the scrambling code number and the mapping table of scrambler to prestore, searching and disturbing in described information Scrambler corresponding to code numbering;
Subelement is scrambled, handles and is encrypted as scrambling for the data frame after utilizing searched scrambler to handle the mapping Data frame.
8. device according to claim 7, it is characterised in that described device includes:
Packaged unit, the scrambled data frame is packaged into packet for the host-host protocol according to the system, and described Signaling information is added in packet, so that the system performs operation according to the signaling information.
9. a kind of video data encryption device, it is characterised in that described device includes:
Receiving unit, for receiving the data frame of encoder output, the data frame packet contains condition code;Described document information is used to mark Know data frame type;
Map unit, for the condition code in data frame to be mapped into the data frame after pseudo-characteristic code obtains mapping processing;
Request unit is scrambled, including:
Second request transmission sub-unit, asked for sending the second scrambling to system using short message service, second scrambling Ask to be used to ask scrambler;
Second information receiving subelement, the information in response to the described second scrambling request sent for receiving the system, institute State packet and contain scrambler;
Scrambling unit, handle and added as scrambling for the data frame after being handled using the scrambler in described information the mapping Ciphertext data frame.
10. device according to claim 9, it is characterised in that described device includes:
Packaged unit, the scrambled data frame is packaged into packet for the host-host protocol according to the system, and described Signaling information is added in packet, so that the system performs operation according to the signaling information.
11. a kind of video data decrypts device, it is characterised in that described device includes:
Receiving unit, the packet sent for reception system, the packet include scrambled data frame, wrapped in the data frame Code containing pseudo-characteristic;Described document information is used for mark data frame type;
Descramble requests unit, including:
First request transmission sub-unit, for using short message service to the system send the first descramble requests, described first Descramble requests are used to ask scrambling code number;
First information receiving subelement, the information in response to first descramble requests sent for receiving the system, institute State packet and contain scrambling code number;
Descrambling unit, including:
Subelement is searched, for according to the mapping table between the scrambler and scrambling code number stored in advance, searching and the letter Scrambler corresponding to scrambling code number in breath;
Descramble subelement, descrambling data is obtained for carrying out scramble process to the scrambled data frame using the scrambler searched Frame;
Map unit, ciphertext data frame is obtained for the pseudo-characteristic code in the descrambling data frame to be mapped as into condition code.
12. a kind of video data decrypts device, it is characterised in that described device includes:
Receiving unit, the packet sent for reception system, the packet include scrambled data frame, wrapped in the data frame Code containing pseudo-characteristic;Described document information is used for mark data frame type;
Descramble requests unit, including:
Second request transmission sub-unit, for sending the second descramble requests, the descrambling to the system using short message service Ask to be used to ask scrambler;
Second information receiving subelement, the information in response to second descramble requests sent for receiving the system, institute State packet and contain scrambler;
Descrambling unit, for obtaining descrambling data as scramble process to the scrambled data frame using the scrambler in described information Frame;
Map unit, ciphertext data frame is obtained for the pseudo-characteristic code in the descrambling data frame to be mapped as into condition code.
CN201410313239.4A 2014-07-02 2014-07-02 A kind of video data encryption and decryption method and device Active CN104065968B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410313239.4A CN104065968B (en) 2014-07-02 2014-07-02 A kind of video data encryption and decryption method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410313239.4A CN104065968B (en) 2014-07-02 2014-07-02 A kind of video data encryption and decryption method and device

Publications (2)

Publication Number Publication Date
CN104065968A CN104065968A (en) 2014-09-24
CN104065968B true CN104065968B (en) 2017-11-24

Family

ID=51553466

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410313239.4A Active CN104065968B (en) 2014-07-02 2014-07-02 A kind of video data encryption and decryption method and device

Country Status (1)

Country Link
CN (1) CN104065968B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104735457A (en) * 2015-03-27 2015-06-24 南京中新赛克科技有限责任公司 Video encryption and decryption method based on H.264 code
CN104811652A (en) * 2015-04-27 2015-07-29 成都腾悦科技有限公司 Conference system based on electronic white board
CN106470100B (en) * 2015-08-14 2019-08-20 启碁科技股份有限公司 Ciphering and deciphering device, encryption method and decryption method
CN110557680B (en) * 2019-07-30 2020-11-27 视联动力信息技术股份有限公司 Audio and video data frame transmission method and system
CN112003859B (en) * 2020-08-21 2023-04-07 江苏徐工工程机械研究院有限公司 Data encryption method and device and data decryption method and device
CN112637246A (en) * 2021-01-14 2021-04-09 山西太钢不锈钢股份有限公司 Method for intelligently encoding and transmitting coal type information of coking coal sampling control system
CN113115113B (en) * 2021-03-17 2023-05-09 Tcl华星光电技术有限公司 Scrambling device and scrambling method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1308463A (en) * 2000-02-09 2001-08-15 德国汤姆森-布兰特有限公司 Encryption and decryption method for protecting data stream and coder and decoder
CN101159500A (en) * 2007-11-09 2008-04-09 北京创毅视讯科技有限公司 Method, system and equipment of protecting mobile multimedia service
CN101969545A (en) * 2010-09-08 2011-02-09 中兴通讯股份有限公司 Encryption method and device of multimedia file
CN103024449A (en) * 2011-09-28 2013-04-03 中国移动通信集团公司 Method for processing video frame stream, video server and terminal equipment
CN103607272A (en) * 2013-11-26 2014-02-26 曙光信息产业股份有限公司 Video encryption method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1308463A (en) * 2000-02-09 2001-08-15 德国汤姆森-布兰特有限公司 Encryption and decryption method for protecting data stream and coder and decoder
CN101159500A (en) * 2007-11-09 2008-04-09 北京创毅视讯科技有限公司 Method, system and equipment of protecting mobile multimedia service
CN101969545A (en) * 2010-09-08 2011-02-09 中兴通讯股份有限公司 Encryption method and device of multimedia file
CN103024449A (en) * 2011-09-28 2013-04-03 中国移动通信集团公司 Method for processing video frame stream, video server and terminal equipment
CN103607272A (en) * 2013-11-26 2014-02-26 曙光信息产业股份有限公司 Video encryption method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于H.264压缩编码标准的视频加密技术;曹蕊;《中国优秀硕士学位论文全文数据库》;20130415(第04期);全文 *

Also Published As

Publication number Publication date
CN104065968A (en) 2014-09-24

Similar Documents

Publication Publication Date Title
CN104065968B (en) A kind of video data encryption and decryption method and device
CN100483992C (en) Encrypting and deencrypting method and apparatus for data flow
CN107086915B (en) Data transmission method, data sending end and data receiving end
US8838954B2 (en) Media processing devices for adaptive delivery of on-demand media, and methods thereof
US10341305B2 (en) Encrypted communications method and communications terminal, and computer storage medium
EP3195519B1 (en) Encoder, decoder and methods employing partial data encryption
CN105009597A (en) Master key encryption functions for transmitter-receiver pairing as countermeasure to thwart key recovery attacks
CN108989324A (en) A kind of enciphered data transmission method
CN104735457A (en) Video encryption and decryption method based on H.264 code
JPH0823330A (en) Safe data communication
CN100426718C (en) A secure transmission method for media content
KR20170097509A (en) Operation method based on white-box cryptography and security apparatus for performing the method
CN109005151A (en) A kind of encryption of information, decryption processing method and processing terminal
CN110149521A (en) Data processing method and system
CN109996025B (en) Quantum communication-based adaptive audio and video communication method, device and system
JP2009505521A (en) Code generation method
CN105827601A (en) Data encryption application method and system of mobile device
CN110730366A (en) Bit operation-based lightweight video stream encryption and decryption method and encryption and decryption mechanism
CN105187912A (en) Ciphertext video player and playing method
WO2016111654A1 (en) Encrypted-bypass webrtc-based voice and/or video communication method
CN106357390A (en) Dynamic encryption method and device
CN107995673A (en) A kind of voice data processing apparatus, method and terminal
Kumar et al. A review and analysis on text data encryption techniques
CN114817970B (en) Data analysis method and system based on data source protection and related equipment
JPH1051778A (en) Coder, decoder, and communication equipment with coder and decoder

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant