CN108833924A - It is a kind of based on more security level video encryption algorithms H.265 - Google Patents
It is a kind of based on more security level video encryption algorithms H.265 Download PDFInfo
- Publication number
- CN108833924A CN108833924A CN201810668081.0A CN201810668081A CN108833924A CN 108833924 A CN108833924 A CN 108833924A CN 201810668081 A CN201810668081 A CN 201810668081A CN 108833924 A CN108833924 A CN 108833924A
- Authority
- CN
- China
- Prior art keywords
- encryption
- video
- key
- frame
- symbol
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/46—Embedding additional information in the video signal during the compression process
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/154—Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/61—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The present invention proposes a kind of based on more security level video encryption algorithms H.265, is related to video-encryption technical field.The characteristics of by analyzing video in reality and security requirement, improve traditional single encipherment scheme.Classify first to the video type in network, determines three application scenarios.In scene one, video image quality is fuzzy as it can be seen that such as pay TV;In scene two, video image is invisible to unauthorized user, such as video conference;Scene three is more secret occasion, it is desirable that hides video motion information, such as military exercises.Secondly, selecting encrypted object according to security requirement.Then, propose that efficient key generates scheme.Grading key is obtained using the method that chaos and hash function combine, sub-key is chosen for parameter characteristic, xor operation is taken to realize encryption.Finally encrypted video performance is analyzed.The result shows that the encipherment scheme of the proposition not only meet demand in safety, but also have in terms of efficiency and have great advantage.
Description
Technical field
The invention belongs to video-encryption technical fields, and in particular to a kind of based on more security level video-encryptions H.265
Algorithm.
Background technique
With the fast development of computer technology and Internet technology, the application field of video is more and more extensive, than in full
Word TV, network direct broadcasting, video conference, video monitoring etc..However, video content may meet in the transmission process of video
It is stolen to criminal or vandalism, this will generate very big threat to people's lives and social stability.Therefore, video
Encryption research becomes particularly important.H.264 it is used as now widely used coding standard, application is related to personal lifestyle, warp
Ji, society, politics, military affairs etc..With high definition, the appearance of ultra high-definition and 3D video, existing video encoding standard is sudden and violent
Many problems are revealed.For example, number of macroblocks explosive growth, amount of redundant information is big, compression efficiency is low.2010, Video coding
H.265/HEVC joint group has formulated the video encoding standard of a new generation.In 2013, which was formally issued.H.265 exist
H.264 important breakthrough is realized on the basis of coding standard, not only resolution ratio is improved, but also code rate saves nearly half.H.265/
HEVC is with its powerful advantage, it is considered to be i.e. by popular consensus standard.
In recent years, domestic and foreign scholars propose many video encryption algorithms, and many work have been done in terms of video protection.It is early
Phase, the complete Encryption Algorithm that scholar proposes regard video data as binary data and key stream carry out exclusive or, safety
Height, but encryption data amount is big, and enciphering rate is extremely low, and video format is incompatible.Then, scholar proposes DCT coefficient scramble
Algorithm selects coefficient progress scramble in the macro block after dct transform quantifies to destroy its statistical property, realizes encryption.DCT coefficient
Only scramble is without encrypting coefficient for scrambling algorithm, and safety is low, and compression ratio changes greatly.2005, the selection of video, which encrypts, calculated
Method is suggested, and the parameter of selection is concentrated mainly on quantization parameter QP, intra prediction mode, DCT coefficient, inter prediction reference image
Index, motion vector difference and loop filtering coefficient.Intra prediction mode determines the prediction block of input current block, pre- in encrypted frame
Survey mode can scramble video content, realize Encryption Algorithm, and prediction mode data volume is few, and enciphering rate is fast, and real-time is high.
DCT coefficient refers to residual values of the current block after change quantization.Shi and Bhargava et al. propose encryption non-zero amount for the first time
Change DCT coefficient symbol.Main thought is to extract DCT coefficient symbol and key stream to carry out XOR operation, then by encrypted symbol
It is distributed to former summation about non-zero DCT coefficients, enciphering rate is fast, but safety is not high.The main thought of encryption DCT coefficient value is to extract quantization
Then summation about non-zero DCT coefficients absolute value afterwards carries out xor operation with key stream, the encipherment scheme is highly-safe, but enciphering rate is slow,
Influence compression ratio.Motion vector difference contains the motion information of video, can choose motion vector difference symbol and motion vector difference
It is encrypted.In addition to this, Entropy Encoding and Encryption algorithm is also a main method of video-encryption.H.264 video encoding standard
The coding mode of middle entropy coding have the Variable Length Code CAVLC based on context-adaptive and two based on context-adaptive into
System, which counts, encodes CABAC.Encryption Algorithm based on CAVLC entropy coding is to encrypt codewords indexes using stream cipher arithmetic, according to adding
New index after close finds corresponding new code word in original table and exports as code stream.The algorithm has certain safety, and
Enciphering rate is fast.Encryption Algorithm based on CABAC entropy coding is encryption nonzero coefficient amplitude suffix and sign bit, does not change compression
Than scrambling effect is good.
H.265/HEVC the video encoding standard as a new generation, coding scheme are similar to H.264/AVC framework.It is many to learn
Person will be applied to H.265 video encoding standard based on video-encryption technology H.264.The primary encryption scheme of use is that selection adds
It is close, mainly still concentrate on quantization parameter QP, intra prediction mode, DCT coefficient, inter prediction reference image index, movement arrow
Amount difference and loop filtering coefficient.However, the features such as existing video-encryption research is dedicated to high safety mostly, complexity is low,
Application oriented Encryption Algorithm is seldom.Video is of wide application, from the network order video of daily life to confidentiality
High military exercises video.Single video-encryption scheme is difficult meet the needs of different scenes are to safety.For example, network
Order video attracts user to buy HD video service with low image quality, and military exercises require completely can not to unauthorized user
See.So design adapts to the encipherment scheme that different video requires and has to network resource utilization and network service quality is improved
Important realistic meaning.
Summary of the invention
In view of the deficiencies of the prior art, the present invention proposes a kind of based on more security level video encryption algorithms H.265, reaches
To the demand for adapting to different application scene.
Technical solution of the present invention is as follows:It is a kind of based on more security level video encryption algorithms H.265, be suitable for three peaces
Full rank;
The security level one, corresponding application scenarios are the network order video in daily life.In the scene, fortune
It seeks quotient and attracts user to buy HD video service using the video of low image quality.So the level security is of less demanding.It does not buy
The user of high definition service may be viewed by fuzzy video, and the user for having bought high definition service may be viewed by the video of high definition image quality;
The security level two corresponds to the application scenarios such as video conference.The scene video is in the majority with still picture, institute
To need to hide the content information of video without paying close attention to motion information.Encrypted video is fuzzy to unauthorized user image quality not
As it can be seen that protect privacy of user.
The security level three corresponds to the application scenarios such as monitoring, military exercises.The scene security requirement is higher,
Encrypted video is completely invisible to unauthorized user.Video motion information in this scene is also most important, so should
The content information for hiding video also wants scramble motion information.
Above-mentioned security level one, cryptographic operation require to hide the detailed information of video.Choosing in the Video coding stage influences
The parameter of video details information is equipped with residual error coefficient symbol:
The residual error coefficient symbol, the content information for scramble video.Selection encryption residual error coefficient symbol can be to view
Frequency generates certain scrambling effect, achievees the effect that hiding video details information.Residual error coefficient refers to by predicting within the frame/frames
Afterwards, the difference of actual pixel value and predicted pixel values.Selection residual error coefficient symbol is encrypted, and is changing residual error coefficient symbol just
It is negative, in the anti-forecast period of decoding end, achieve the effect that change decoded pixel value.In addition to this, coefficient symbols value is 0 or 1, is chosen
Random sequence key stream, which carries out exclusive or to symbol, can reach cipher round results.The encipherment scheme complexity is low, and the speed of service is fast, non-
Often it is suitable for network order video.
Above-mentioned security level two, video still picture is in the majority in corresponding scene, and cryptographic operation requires the interior of scramble video
Hold information, encrypted video obscures unauthorized user invisible.Choosing in the Video coding stage influences video texture information
Parameter, on the basis of the fuzzy video content of security level one, also need choose important parameter further increase in video
The scrambling effect of appearance is equipped with residual error coefficient symbol, I frame DC residual error coefficient absolute value, intra prediction mode:
The residual error coefficient symbol, it is consistent with the description in security level one.
The I frame DC residual error coefficient absolute value, selection encrypt I frame DC residual error coefficient absolute value after change quantization and reach
To the effect of scramble and diffusion.Video sequence is grouped first, and Video coding is then carried out as unit of group.One group of image by
One I frame and several P, B frames form, prediction reference frame of the I frame as P frame and B frame, so encryption I frame can be to video-encryption
There is certain diffusion.The data volume of I frame is bigger, necessarily will affect video-encryption speed if encrypted to whole frame information
Therefore degree selects the important information DC coefficient in I frame to be encrypted.DC/AC coefficient is generated in conversion stages, transformation
Main function is that the time-domain information of pixel in image is transformed to frequency domain.DC coefficient is the first row the in two-dimensional array after converting
The data of one column, contain the main information of video.AC coefficient is the other information in addition to DC, and AC coefficient value is mostly after quantization
0 or 1.
The intra prediction mode indicates the reference block locations of intra prediction stage current prediction block.I frame is using in frame
Prediction mode, by encrypting intra prediction mode, can in scramble I frame predicting unit block prediction mode, decoding end is using encryption
Prediction mode afterwards searches out the reference block inconsistent with coding side, will necessarily obtain the reconstruction image of content information confusion.It removes
Except this, P, B frame predict the prediction mode combined, and reference frame of the I frame as P, B frame between using intra frame, can generate
Certain diffusion effect.
Above-mentioned security level three, corresponding scene security requirement is higher, and the not only texture letter of video in the scene
Cease extremely important, and the motion information of video is equally important, such as military exercises.Choosing in the Video coding stage influences
The parameter of video texture information and motion information, on the parameter basis of security level two, also needing to choose influences video motion letter
The parameter of breath further increases the scrambling effect to video, equipped in residual error coefficient symbol, I frame DC residual error coefficient absolute value, frame
Prediction mode, motion vector absolute value of the difference, motion vector difference symbol:
The residual error coefficient symbol, I frame DC residual error coefficient absolute value, in intra prediction mode, with security level two
Description is consistent.
The motion vector absolute value of the difference, the motion information for scramble video.Motion vector difference refers in frame
Between predict during, the difference between the predicted value of motion vector and the real estimated value of motion vector.Encoder swears movement
The symbol and absolute value for measuring difference are encoded separately.Encrypted motion vector absolute value of the difference will affect the compression ratio of video.
The motion vector difference symbol, the motion information for scramble video.Motion vector difference symbol refers to movement arrow
The positive and negative of difference is measured, 0, which represents motion vector difference, represents motion vector difference as positive number, 1 as negative.Pass through random sequence key stream
Exclusive or is carried out with motion vector difference symbol, changes the positive and negative of motion vector difference, to achieve the purpose that change reference block locations, finally
Obtain the reconstruction image of encryption.
It is a kind of based on more security level video encryption algorithms H.265, include the following steps:
Step 1:Input video file and encryption key to be encoded.
The video file format to be encoded is YUV, and yuv format includes the luminance information and color difference letter of video file
Breath.In the yuv video file format, Y indicates brightness, and what U and V were indicated is coloration, wherein U indicates the face for being biased to blue
Colo(u)r bias, V indicate to be biased to red misalignment;
The encryption key is by initial value X0、X1、X2It forms, wherein X0、X1、X2Respectively as the close of three security levels
Key.
Step 2:Chaos sequence is determined using chaos sequence generator;
Step 3:Using the pseudo-random sequence generated in step 2 as the input of hash function, a string of binary system output is obtained;
The chaos sequence is generated by chaos sequence generator.According to three initial values, corresponding three ranks are generated
Chaos sequence.Since each rank selects different parameters, so the output of hash function is split generation sub-key, it is real
Existing parameter encryption.
Step 4:Parameter encryption, detailed process are:
Step 4.1:According to the encryption key of step 1, encryption level is judged.
Step 4.2:If it is security level one, encryption parameter is residual error coefficient symbol, and key stream is by X0It generates.Residual error system
Numerical symbol represents positive number for 0 or 1,0, and 1 represents negative.Due to only one encryption parameter of rank one, so it is close to be not required to segmentation
Key.Symbol encryption is can be realized into sign bit and keystream bitwise exclusive or.
Step 4.3:If it is security level two, encryption parameter is residual error coefficient symbol, intra prediction mode and I frame
DC coefficient amplitude.Residual error coefficient symbol is encrypted using step 4.2.The DC coefficient amplitude of intra prediction mode and I frame is by X1
The random sequence of generation is encrypted.
The intra prediction mode encryption, will affect video compress ratio.In order to reduce compression ratio variation, ciphering process is wanted
Consider the cataloged procedure of video.Intra-prediction process is broadly divided into three steps:Coarseness selection, most possible mode, rate are lost
Sincere calculating.35 kinds of intra prediction modes are compressed in the candidate list containing 3-11 kind mode when rate distortion rate calculates.
Encipherment scheme is:Using encryption key and optimal intra prediction mode exclusive or, then mould removes 35 kinds of intra prediction modes, final to obtain
To encrypted prediction mode.
The I frame DC residual error coefficient absolute value, will affect video compress ratio.There are two types of encryption method is total, fixed length key
Stream encryption and variable length key stream encryption.N fixed length key stream encryption residual error coefficient amplitudes are chosen, scrambling effect is good, but compresses
Than changing greatly;Using variable length key stream encryption, scrambling effect is relatively poor, but compression ratio is held essentially constant.Variable length key
The selection of stream is determined according to the number of bits of encrypted object, it is assumed that the number of bits of encrypted object is length, then
Choose length-1 key streams and encrypted object exclusive or.In conjunction with the advantage and disadvantage of two kinds of Encryption Algorithm, proposes a kind of fixed length and become
The long encipherment scheme combined, i.e., when encrypted object number of bits is less than or equal to n, using fixed length key stream xor operation;
When encrypted object number of bits is greater than n, using variable length key stream xor operation.By many experiments, choosing n is 4;Reason
It is as follows;When using the DC coefficient amplitude of fixed length key encryption I frame, if the key length used is smaller, cipher round results are unknown
It is aobvious;If the key length used is larger, cipher round results are good, but compression ratio variation is very greatly.In order to balance cipher round results and pressure
Contracting is than the encipherment scheme that variation, the present invention are combined using elongated and fixed length.N=4 is chosen, i.e., when the DC coefficient amplitude of I frame is
It is encrypted when 0-31 using fixed length key;When the DC coefficient amplitude of I frame is greater than 31, using amplitude number of bits subtract 1 it is close
Key length is encrypted.
Step 4.4:If it is security level three, for encryption parameter on the basis of step 4.2, there are also motion vector difference symbols
And motion vector difference.Key stream is by X2It generates.
The encipherment scheme of motion vector difference is similar with residual error coefficient amplitude, to change in compression ratio and take on scrambling effect
Obtain a kind of tradeoff.The motion vector absolute value of the difference of code stream is incorporated by many experiments statistics, discovery exceedes 90% data distribution
Between 0-5, so choosing m=2.I.e. when the number of bits of motion vector absolute value of the difference is less than or equal to 2, using two
The key stream of regular length carries out exclusive or;When being greater than 2, encrypted using elongated key stream.Thought is encrypted with the DC of I frame
The encryption method of coefficient amplitude.
The encipherment scheme of motion vector difference symbol is similar with residual error coefficient symbol.By residual error coefficient value of symbol 0 or 1 and key
Exclusive or is flowed, realizes cryptographic operation.
Step 5:Data after compression scrambled are written in video code flow file, compression encryption is completed.
Beneficial effects of the present invention are to provide a kind of application oriented video-encryption scheme, by video in network
Classification of type formulates corresponding encipherment scheme.It efficiently uses Internet resources, obtains between algorithm security and complexity
A kind of balance well, breaches traditional single encipherment scheme.The present invention is under the premise of guaranteeing basic security demand, tool
There are format compatible, encryption efficiency high and compression ratio influences the features such as small.According to demand for security, different encipherment schemes can get,
It can be applied to various video types in network.The present invention provides a kind of based on more security video encipherment schemes H.265, right
Code stream influence it is lesser under the premise of ensure that the safeties of data, also improve network resource utilization, have to network good suitable
Ying Xing.
Detailed description of the invention
Fig. 1 is that the present invention is based on more security level video encryption algorithm keys H.265 to generate figure;
Fig. 2 is that the present invention is based on the algorithm structure figures of more security level video encryption algorithms H.265;
Fig. 3 is the present invention is based on four groups of images of more security level video encryption algorithms H.265 the of (a) original video
30 frame images, (b) the cipher round results figure of rank one, (c) the cipher round results figure of rank two, (d) the cipher round results figure of rank three;
Fig. 4 is that the present invention is based on the stefan_cif.yuv video-encryptions of more security level video encryption algorithms H.265
Image, (a) the 15th frame image, (b) the 17th frame image, (c) the 19th frame image, (d) the 21st frame image;
Fig. 5 is that the present invention is based on stefan_ in two encipherment scheme of rank of more security level video encryption algorithms H.265
Cif.yuv video-encryption image, (a) the 15th frame image, (b) the 17th frame image, (c) the 19th frame image, (d) the 21st frame image;
Fig. 6 is that the present invention is based on stefan_ in three encipherment scheme of rank of more security level video encryption algorithms H.265
Cif.yuv video-encryption image, (a) the 15th frame image, (b) the 17th frame image, (c) the 19th frame image, (d) the 21st frame image.
Specific embodiment
The specific embodiment of the invention is described in detail with reference to the accompanying drawing.
H.265 the video encoding standard as a new generation, has tremendous influence to ultra high-definition Video coding.
H.265 coding scheme is similar to H.264/AVC framework, continues to continue to use the hybrid coding frame of H.264 prediction plus transformation
Frame, mainly comprising modules such as macro block division, intra prediction, inter-prediction, transformation, quantization, entropy codings.Compared to H.264/AVC,
H.265/HEVC it is improved in the key technique of coding, provides more different tools to reduce code rate.H.265 it encodes
The core of coding layer is coding tree unit (Coding Tree Units, CTU) in standard, similar to the macro block in H.264.
H.265 use flexible block partitioning technology, be with the most fundamental difference of previous coding standard, improve coding efficiency, save close
Half code rate.Predictive coding is encoding tool most basic in video compress, and common predictive coding can be divided into intra prediction and frame
Between predict.The purpose of intra prediction is to eliminate spatial redundancy, i.e. intracoded frame (I frame) is separately encoded, pre- using coded block
Survey present encoding block.H.265 intra prediction direction is extended to 35 kinds by coding standard, improves precision of prediction.Inter-prediction
Purpose elimination is time redundancy, i.e., inter-frame encoding frame (P, B frame) is using encoded frame as reference frame.Content becomes between consecutive frame
Change is not too greatly, to predict present frame for encoded frame as reference frame, to achieve the effect that eliminate time redundancy.In entropy coding rank
Duan Caiyong is based on context adaptive binary arithmetic coding (Context Adaptive Binary Arithmetic
Coding,CABAC).To it is H.264 similar, CABAC includes binarization, context modeling and the coding that counts.The weight encrypted herein
Want the absolute value of parameter nonzero coefficient using truncation this code of Lay and the united binarization scheme of Exp-Golomb.In addition to this,
H.265 entropy coder reduces context coding number, since reducing context selection, has increased the handling capacity of coding.
The video encryption method of the present embodiment is for the purpose of application-oriented, it is intended to guarantee cryptography safety and visual security
On the basis of reach the maximization of encryption efficiency as far as possible.It is well known that the safety of video encryption algorithm and complexity are to run counter to
, safety is higher, and algorithm is more complicated, and efficiency is lower.So single Encryption Algorithm is not able to satisfy all videos in reality
Encryption requirements.The application Encryption Algorithm designs corresponding encipherment scheme for different video types, reaches adding for all videos
Close demand.The structure of the application Encryption Algorithm is as shown in Figure 2.
The principle of the present embodiment is:For application scenarios in reality, application oriented more secure encryption schemes of proposition.?
Video coding stage, the parameter for choosing influence video image quality are encrypted, and the encryption requirements of scene are reached.
In the Video coding stage, video is grouped first, by an I frame and several P frame B frame groups in each group
At.Then it realizes that macro block divides with quad-tree structure, carries out intra prediction and inter-prediction.I frame uses intra prediction, as this
The reference frame of PB frame inter-prediction in group so encryption I frame not only has good scrambling effect, but also has certain diffusion to make
With.The difference of predicted value and actual value is denoted as residual error coefficient, and residual values are incorporated into code stream by encoder.Transformation is by residual values by space
Domain is converted into frequency domain, is then quantified, and video information is further compressed.Transformed residual values can be divided into DC, AC coefficient, DC
Coefficient energy is high, contains the main contents of frame, AC coefficient is mostly 0 or 1, contains some detailed information.Finally carry out entropy volume
Code, is incorporated into code stream for video information.The present embodiment is for application scenarios in reality, application oriented more safety encryption sides of proposition
Case.In scene one, encrypted video image quality is fuzzy as it can be seen that such as pay TV, attracts customer with low-quality image quality.This reality
It applies example selection residual error coefficient symbol to be encrypted, by sign bit and key exclusive or, changes the positive and negative of residual values.The encipherment scheme
Scrambling effect is general, but speed is fast, meets the needs of scene one;In scene two, video still picture is in the majority, unauthorized after encryption
User is invisible, such as video conference.The present embodiment is chosen intra prediction mode, the DC coefficient of I frame, residual error coefficient symbol and is added
It is close, the content information of scramble video;In scene three, it is desirable that hide the content and motion track information of video, such as military exercises.Institute
To be encrypted to motion vector difference, motion vector difference symbol, reach the effect of hiding motion profile on the basis of scene two
Fruit.
The present embodiment is used based on more security level video encryption algorithms H.265, is included the following steps:
Step 1:The original video YUV file of encryption to be compressed is inputted, size is 352 × 288 pixels of every frame image,
Pixel depth is 8 bits.
Step 2:It is mapped using Logistic and determines chaos sequence,
It is mapped using Logistic and determines that chaos sequence, formula are as follows:
Xn+1=Xn×μ×(1-Xn)
In formula, Xn+1Indicate XnThe value generated after iteration 1 time, μ indicates control parameter, and meets μ ∈ [0,4], XnIt indicates just
Value X0The value generated after iteration n times, and X0∈[0,1];
Take u=3.999, X0In=0.663489000 the present embodiment, encryption is to take the 3000th later numerical value of value;So
It is inputted afterwards using chaos sequence as hash function, obtains the random key of 160bit.
Step 3:Parameter encryption, detailed process are:
Step 3.1:According to the encryption key of step 1, encryption level is judged.Work as X0≠0、X1=X2It is scene one when=0;
X0≠0、X1≠0、X2It is scene two when=0;X0≠0、X1≠0、X2It is scene three when ≠ 0.
Step 3.2:If it is scene one, encryption parameter is residual error coefficient symbol, and key stream is by X0It generates.Coefficient symbols position
It is indicated with 0 or 1, one and coefficient symbols exclusive or is chosen from key.
Step 3.3:If it is scene two, encryption parameter is the DC system of residual error coefficient symbol, intra prediction mode and I frame
Number amplitude.Residual error coefficient symbol is encrypted using step 4.2.Key stream is by X1It generates.Intra prediction mode and key exclusive or
Modulus realizes encryption.The encipherment scheme of the DC coefficient amplitude of I frame is:If amplitude is 0-8, i.e. number of bits is less than or equal to 3,
Using three keys and amplitude exclusive or;If amplitude is greater than 8, number of bits length, using length-1 and amplitude
Exclusive or.If amplitude is greater than 2, number of bits length, using length-1 and amplitude exclusive or.For example amplitude is 25,
Binary system is 11001, chooses 4 keys, it is assumed that 1010,11001 ⊕ 1010=10011 of key, 25 encrypted values are 19,
Ciphertext number of bits is still 4.The purpose for choosing length-1 keys is to encrypt end and decrypting end and choose identical digit
Key, it is ensured that ciphertext can be decrypted normally.If key is 11111,11001 ⊕ 11111=00110, ciphertext end binary digit
Number is 3, and three can be chosen when choosing key, and encryption and decryption end key is different, causes ciphertext that cannot be decrypted correctly.
Step 3.4:If it is scene three, for encryption parameter on the basis of step 4.2, there are also motion vector difference symbol and fortune
Dynamic vector difference.Key stream is by generating.The encipherment scheme of motion vector difference is similar with residual error coefficient amplitude, to become in compression ratio
Change and obtains a kind of tradeoff on scrambling effect.If amplitude be 0-3, i.e., number of bits be less than or equal to 2, using three keys with
Amplitude exclusive or;If amplitude is greater than 3, using length-1 keys and amplitude exclusive or.The encipherment scheme of motion vector difference symbol
It is similar with residual error coefficient symbol.By motion vector difference symbol 0 or 1 with key stream exclusive or, realize cryptographic operation.
Step 4:Data after compression scrambled are written in video code flow file, compression encryption is completed.
The present embodiment selects the video sequence of tetra- kinds of CIF formats of Akiyo, Hall, Stefan and coastguard to this hair
The validity of bright method is tested and is analyzed, and the video image of use is 352 × 288 pixels.The present embodiment uses
Test environment be CPU be Intel Core2 Quad Q8200 2.33GHz;RAM is 4.0GB, and just encryption is imitated separately below
Rate, compression efficiency and safety are tested and are analyzed:
(1) safety
Video security evaluation method can be divided into two major classes:Subjective assessment and method for objectively evaluating.Visual security is main
See the evaluation essential index of Video security.This experiment is to be divided into three based on H.265 application oriented multilevel security encryption
A rank respectively corresponds three application scenarios.The cif format video that four resolution ratio are 352 × 288 is chosen altogether herein to be surveyed
Examination, first group be original video, second group of realization video details Information hiding, third group realize video content scramble, the 4th group
Video content and motion profile scramble.Original video is as shown in Figure 3 with encrypted video.Subjective observation cipher round results, video rank
More higher, more invisible.
From the figure 3, it may be seen that akiyo_cif.yuv video is mostly still picture, add when being encrypted using rank three with rank two
Cipher round results are essentially identical when close, but the encipherment scheme encryption efficiency of rank three is used to be lower than rank two, so using rank
Two encipherment scheme has fully met encryption requirements.Fig. 4 is stefan video the 15th, 17,19, the original images of 21 frames, by scheming
It is found that containing the trace information played ball in the four frames image.Fig. 5 expression uses the encrypted video after two encipherment scheme of rank,
The motion profile of video can be observed, but three encipherment scheme of rank of Fig. 6 conceals motion profile, more safety completely.
Subjective quality assessment method is most reliable evaluation method, and the encipherment scheme is good in subjective assessment performance.Herein
Closed quality assessment is also carried out using method for objectively evaluating.Currently, the most common method for objectively evaluating is namely based on statistical theory
Y-PSNR (Peak Signal to Noise Ratio, PSNR), the evaluation algorithms complexity is low, and has simple bright
True physical significance.Table 1 lists PSNR of the video of different resolution before and after three different stages encrypt.PSNR is bigger, just
It is fewer to represent distortion.As shown in Table 1, being continuously increased with encryption parameter, encryption intensity enhances therewith, encrypts rear video
PSNR constantly reduces, and illustrates that video distortion rate is continuously improved, objectively more safety.
PSNR comparison before and after 1 video-encryption of table
Since PSNR has limitation, result which obtains and subjective evaluation result there are certain deviation, because
This, but to the structural similarity of multiple video sequences (Structural Similarity Index Measurement,
SSIM it)) is analyzed.Table 2 is the SSIM of test video encryption front and back.SSIM maximum value is 1, and value is bigger, represents two images
Similarity it is higher.As shown in Table 2, with the increase of rank, image similarity is strongly reduced after encryption, and encryption changes video
Structure, scrambling effect is obvious, highly-safe.
SSIM comparison before and after 2 video-encryption of table
(2) compression efficiency
Author is by discussing to compression ratio, computation complexity, influence of the comprehensive analysis Encryption Algorithm to coding efficiency.
Ideal Encryption Algorithm is that encryption front and back compression ratio is constant.The constant algorithm of compression ratio will not change memory space, guarantee transmission
Velocity-stabilization.But video-encryption will also guarantee the characteristics such as safety, complexity be low, it generally cannot be complete so compression ratio is constant
Full up foot.Table 6 lists the compression ratio change rate contributive rate of four test videos.As shown in Table 6, one compression ratio of rank does not become
Change, rank two, three bit numbers increase, but expansion rate all controls within 5%, are obtained with the increase of appropriate bit number for cost
Obtain high security level.
Code rate influences before and after 3 video-encryption of table
(3) encryption efficiency
Video has the characteristics that real-time, if enciphering and deciphering algorithm complexity is high, can bring to the encoding-decoding process of video
Delay, runs counter to video encrypting/deciphering original design intention.So, it should choose the Encryption Algorithm that iteration is rapid, complexity is low.Before encryption
The expansion rate of scramble time is to measure an important indicator of video encryption algorithm complexity afterwards.Different safety levels are listed in table four
Other dilation of time rate, proposed Encryption Algorithm using the simple and quick Logistic chaos sequence generator of iteration with
The mode that hash function combines, process is simple, can't generate excessive time overhead.Judging from the experimental results, new algorithm
A balance well is achieved in performance and cipher round results.
4 video-encryption surrounding time contributive rate of table
Claims (3)
1. a kind of based on more security level video encryption algorithms H.265, which is characterized in that include the following steps:
Step 1:Input video file and encryption key to be encoded;
The video file format to be encoded is YUV, and in the yuv video file format, Y indicates brightness, and U and V are indicated
Be coloration, wherein U indicates that the misalignment for being biased to blue, V indicate to be biased to red misalignment;
The encryption key is by initial value X0、X1、X2It forms, wherein X0、X1、X2Respectively as the key of three security levels;
Step 2:Chaos sequence is determined using chaos sequence generator;
Step 3:Using the pseudo-random sequence generated in step 2 as the input of hash function, a string of binary system output is obtained;
The chaos sequence is generated by chaos sequence generator;According to three initial values, the chaos of corresponding three ranks is generated
Sequence;Different parameters is selected according to each rank, the output of hash function is split generation sub-key, realizes that parameter adds
It is close;
Step 4:Parameter encryption, detailed process are:
Step 4.1:According to the encryption key of step 1, encryption level is judged;
Step 4.2:If it is security level one, encryption parameter is residual error coefficient symbol, and key stream is by X0It generates;Residual error coefficient symbol
Number positive number is represented for 0 or 1,0,1 represents negative;Sign bit and keystream bitwise exclusive or are realized into symbol encryption;
Step 4.3:If it is security level two, encryption parameter is the DC system of residual error coefficient symbol, intra prediction mode and I frame
Number amplitude;Residual error coefficient symbol is encrypted using step 4.2;The DC coefficient amplitude of intra prediction mode and I frame is by X1It generates
Random sequence encrypted;
The intra prediction mode encryption, it is different using the candidate list index where encryption key and optimal intra prediction mode
Or, then mould finally obtains encrypted prediction mode except intra prediction mode number is waited;
The DC coefficient amplitude encryption method of the I frame is in conjunction with fixed length key stream encryption and variable length key stream encryption;When encryption pair
When being less than or equal to n as number of bits, using fixed length key stream xor operation;When encrypted object number of bits is greater than n, adopt
With variable length key stream xor operation;
Step 4.4:If it is security level three, encryption parameter on the basis of step 4.2, further include motion vector difference symbol and
Motion vector difference, key stream is by X2Production;
The encipherment scheme of motion vector difference is to use when the number of bits of motion vector absolute value of the difference is less than or equal to m
The key stream of two regular lengths carries out exclusive or;When being greater than m, encrypted using elongated key stream;The m=2;
The encipherment scheme of motion vector difference symbol is to grasp motion vector difference value of symbol 0 or 1 and key stream exclusive or, realization encryption
Make;
Step 5:Data after compression scrambled are written in video code flow file, compression encryption is completed.
2. according to claim 1 based on more security level video encryption algorithms H.265, which is characterized in that described
Chaos sequence generator maps for Logistic and determines that chaos sequence, formula are as follows:
Xn+1=Xn×μ×(1-Xn)
In formula, Xn+1Indicate XnThe value generated after iteration 1 time, μ indicates control parameter, and meets μ ∈ [0,4], XnIndicate initial value X0
The value generated after iteration n times, and X0∈[0,1];
The hash function is RIPRMD-160 function;Input of the chaos sequence as hash function RIPRMD-160, obtains
One 160 output.
3. according to claim 1 or 2 based on more security level video encryption algorithms H.265, which is characterized in that described
In the DC coefficient amplitude encryption method of I frame, choosing n is 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810668081.0A CN108833924A (en) | 2018-06-22 | 2018-06-22 | It is a kind of based on more security level video encryption algorithms H.265 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810668081.0A CN108833924A (en) | 2018-06-22 | 2018-06-22 | It is a kind of based on more security level video encryption algorithms H.265 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108833924A true CN108833924A (en) | 2018-11-16 |
Family
ID=64138826
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810668081.0A Pending CN108833924A (en) | 2018-06-22 | 2018-06-22 | It is a kind of based on more security level video encryption algorithms H.265 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108833924A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111405292A (en) * | 2020-03-17 | 2020-07-10 | 宁波大学 | Video encryption method based on H.265 video coding standard |
CN112203117A (en) * | 2020-09-15 | 2021-01-08 | 西安工程大学 | Video source tracing and tamper-proof method based on video coder/decoder |
CN113179404A (en) * | 2021-04-28 | 2021-07-27 | 南京邮电大学 | Image encryption method based on motion vector |
CN113473152A (en) * | 2021-06-07 | 2021-10-01 | 东北大学 | Chaos-based H.264 video fast zero-bit-rate expansion encryption method |
CN114205624A (en) * | 2021-11-03 | 2022-03-18 | 成都鼎安华智慧物联网股份有限公司 | Video encryption method |
CN115567320A (en) * | 2022-11-10 | 2023-01-03 | 深圳高新区信息网有限公司 | Internet of things platform data management method based on micro-service architecture |
CN115834926A (en) * | 2022-11-21 | 2023-03-21 | 深圳市超时代软件有限公司 | Video encryption method based on H.265 entropy coding binarization |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101059957A (en) * | 2007-05-24 | 2007-10-24 | 华中科技大学 | An audio coding selective cryptographic method |
CN102395034A (en) * | 2011-12-22 | 2012-03-28 | 东北大学 | MPEG-4video chaotic encryption method based on intra prediction |
-
2018
- 2018-06-22 CN CN201810668081.0A patent/CN108833924A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101059957A (en) * | 2007-05-24 | 2007-10-24 | 华中科技大学 | An audio coding selective cryptographic method |
CN102395034A (en) * | 2011-12-22 | 2012-03-28 | 东北大学 | MPEG-4video chaotic encryption method based on intra prediction |
Non-Patent Citations (3)
Title |
---|
刘洪娟 等: "统一混沌***的混合同步在图像加密中的应用", 《小型微型计算机***》 * |
张伟 等: "基于图像相关性的混沌图像加密算法", 《东北大学学报(自然科学版)》 * |
朱志良 等: "基于Lorenz混沌***的MPEG视频加密算法", 《计算机应用》 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111405292A (en) * | 2020-03-17 | 2020-07-10 | 宁波大学 | Video encryption method based on H.265 video coding standard |
CN111405292B (en) * | 2020-03-17 | 2022-04-15 | 宁波大学 | Video encryption method based on H.265 video coding standard |
CN112203117A (en) * | 2020-09-15 | 2021-01-08 | 西安工程大学 | Video source tracing and tamper-proof method based on video coder/decoder |
CN113179404A (en) * | 2021-04-28 | 2021-07-27 | 南京邮电大学 | Image encryption method based on motion vector |
CN113179404B (en) * | 2021-04-28 | 2023-02-21 | 南京邮电大学 | Image encryption method based on motion vector |
CN113473152A (en) * | 2021-06-07 | 2021-10-01 | 东北大学 | Chaos-based H.264 video fast zero-bit-rate expansion encryption method |
CN113473152B (en) * | 2021-06-07 | 2022-08-30 | 东北大学 | Chaos-based H.264 video fast zero-bit-rate expansion encryption method |
CN114205624A (en) * | 2021-11-03 | 2022-03-18 | 成都鼎安华智慧物联网股份有限公司 | Video encryption method |
CN115567320A (en) * | 2022-11-10 | 2023-01-03 | 深圳高新区信息网有限公司 | Internet of things platform data management method based on micro-service architecture |
CN115567320B (en) * | 2022-11-10 | 2023-03-24 | 深圳高新区信息网有限公司 | Internet of things platform data management method based on micro-service architecture |
CN115834926A (en) * | 2022-11-21 | 2023-03-21 | 深圳市超时代软件有限公司 | Video encryption method based on H.265 entropy coding binarization |
CN115834926B (en) * | 2022-11-21 | 2023-11-21 | 深圳市超时代软件有限公司 | Video encryption method based on H.265 entropy coding binarization |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108833924A (en) | It is a kind of based on more security level video encryption algorithms H.265 | |
Long et al. | Separable reversible data hiding and encryption for HEVC video | |
Xu et al. | An efficient chaos pseudo-random number generator applied to video encryption | |
Li et al. | Joint image encryption and compression schemes based on 16× 16 DCT | |
CN104093029B (en) | A kind of Video Encryption Algorithm based on new Spatiotemporal Chaotic Systems | |
Peng et al. | A selective encryption scheme for protecting H. 264/AVC video in multimedia social network | |
Xu et al. | An improved scheme for data hiding in encrypted H. 264/AVC videos | |
Bao et al. | A secure and robust image encryption algorithm based on compressive sensing and DNA coding | |
CN104144343A (en) | Digital image compressing, encrypting and encoding combined method | |
Zhang et al. | Chaos-based partial encryption of SPIHT coded color images | |
Kulkarni et al. | Proposed video encryption algorithm v/s other existing algorithms: A comparative study | |
CN102843558A (en) | H.264/AVC (Advanced Video Coding) compressed domain video encryption/decryption device and encryption/decryption method thereof | |
Rodrigues et al. | Selective encryption of human skin in JPEG images | |
Lian et al. | On the design of partial encryption scheme for multimedia content | |
Bahrami et al. | Encryption of multimedia content in partial encryption scheme of DCT transform coefficients using a lightweight stream algorithm | |
Zhang et al. | The large capacity embedding algorithm for H. 264/AVC intra-prediction mode video steganography based on linear block code over Z4 | |
El-Mowafy et al. | Chaos based encryption technique for compressed h264/avc videos | |
Jin et al. | H. 264/AVC video encryption algorithm based on integer dynamic cross-coupling tent mapping model | |
Batham et al. | A new video encryption algorithm based on indexed based chaotic sequence | |
Xu et al. | Reversible data hiding in encrypted H. 264/AVC video streams | |
Batham et al. | ICSECV: an efficient approach of video encryption | |
Song et al. | Efficient protection using chaos for context-adaptive binary arithmetic coding in H. 264/advanced video coding | |
Vivek et al. | Video steganography using chaos encryption algorithm with high efficiency video coding for data hiding | |
Ammous et al. | Encryption of lossless coded videos | |
Bahrami et al. | Encryption of video main frames in the field of DCT transform using A5/1 and W7 stream encryption algorithms |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181116 |
|
RJ01 | Rejection of invention patent application after publication |