CN103313097A - Method and system for encrypting and decrypting encoded file - Google Patents

Method and system for encrypting and decrypting encoded file Download PDF

Info

Publication number
CN103313097A
CN103313097A CN2013102696075A CN201310269607A CN103313097A CN 103313097 A CN103313097 A CN 103313097A CN 2013102696075 A CN2013102696075 A CN 2013102696075A CN 201310269607 A CN201310269607 A CN 201310269607A CN 103313097 A CN103313097 A CN 103313097A
Authority
CN
China
Prior art keywords
coding parameter
file
parameter
coded file
coded
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.)
Granted
Application number
CN2013102696075A
Other languages
Chinese (zh)
Other versions
CN103313097B (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.)
Beijing Kingsoft Internet Security Software Co Ltd
Conew Network Technology Beijing Co Ltd
Shell Internet Beijing Security Technology Co Ltd
Zhuhai Juntian Electronic Technology Co Ltd
Beijing Kingsoft Internet Science and Technology Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Conew Network Technology Beijing Co Ltd
Shell Internet Beijing Security Technology Co Ltd
Zhuhai Juntian Electronic Technology Co Ltd
Beijing Kingsoft Internet Science and 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 Beijing Kingsoft Internet Security Software Co Ltd, Conew Network Technology Beijing Co Ltd, Shell Internet Beijing Security Technology Co Ltd, Zhuhai Juntian Electronic Technology Co Ltd, Beijing Kingsoft Internet Science and Technology Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201310269607.5A priority Critical patent/CN103313097B/en
Publication of CN103313097A publication Critical patent/CN103313097A/en
Priority to PCT/CN2014/081290 priority patent/WO2014206370A1/en
Application granted granted Critical
Publication of CN103313097B publication Critical patent/CN103313097B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving video stream encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • H04N21/2351Processing of additional data, e.g. scrambling of additional data or processing content descriptors involving encryption of additional data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/61Network physical structure; Signal processing
    • H04N21/6106Network physical structure; Signal processing specially adapted to the downstream path of the transmission network
    • H04N21/6125Network physical structure; Signal processing specially adapted to the downstream path of the transmission network involving transmission via Internet

Landscapes

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

Abstract

The encryption scheme of the method and the system for encrypting and decrypting the coded file provided by the embodiment of the invention can analyze the coded file and obtain at least one unencrypted coded parameter from the storage position of the coded parameter in the coded file; encrypting at least one unencrypted coding parameter according to a preset encryption algorithm to generate an encrypted coding parameter; at least one unencrypted encoding parameter is removed from the encoded file and an encrypted encoded file is generated using the encrypted encoding parameter. The invention encrypts the coding parameters, and the encryption process is faster because the data volume of the coding parameters is smaller. Meanwhile, after the coding parameters are encrypted, other equipment cannot open the encrypted coding file, and the encryption effect is good. Meanwhile, the decryption process is faster.

Description

The method and system that coded file is encrypted and deciphers
Technical field
The present invention relates to the encryption and decryption technology field, particularly relate to the method and system that coded file is encrypted and deciphers.
Background technology
Because the video of downloading in the mobile phone may be moved out of this mobile phone and distort, therefore need to the video of downloading be encrypted.
Existing encryption method need to be carried out bulk encryption to video file, because the data volume of video file is larger, causes existing ciphering process need to spend the more time, and ciphering process is slow.Accordingly, when the user need to watch the video after encrypting, need at first be decrypted.Because need to carry out the integral body deciphering to video file equally, therefore existing encryption method also causes decrypting process slow equally, has affected the playing efficiency of video.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of method and system that coded file is encrypted and deciphers, with the purpose that realizes fast coded file being encrypted and deciphering.
For achieving the above object, the embodiment of the invention discloses a kind of method that coded file is encrypted, described method comprises:
Coded file is resolved, and the coding parameter deposit position from described coded file obtains at least a unencryption coding parameter;
According to default cryptographic algorithm described at least a unencryption coding parameter is encrypted, generates the coding parameter after encrypting;
From described coded file, remove described at least a unencryption coding parameter, use coding parameter after the described encryption to generate coded file after encrypting.
Preferably, described coded file is the video file of process coding processing, the audio file through the coding processing, the picture file of processing through encoding or the document files through encoding and processing.
Preferably, when described coded file during for the video file processed through coding, described coding parameter comprises: at least a in coded system, video code rate, video resolution, the video frame rate.
Preferably, described coded file is resolved, the coding parameter deposit position from described coded file obtains at least a unencryption coding parameter and comprises:
Coded file is resolved, obtain at least a unencryption coding parameter from the file header of described coded file and/or the end-of-file of described coded file.
Preferably, describedly from described coded file, remove described at least a unencryption coding parameter, use coding parameter after encrypting to generate coded file after encrypting, comprising:
From described coding parameter deposit position, remove described at least a unencryption coding parameter;
Coding parameter after encrypting is put into the primary importance of the coded file that will be encrypted, generated the coded file after encrypting, wherein, described primary importance is described coding parameter deposit position or is non-described coding parameter deposit position.
Preferably, describedly from described coded file, remove described at least a unencryption coding parameter, use coding parameter after encrypting to generate coded file after encrypting, comprising:
From described coding parameter deposit position, remove described at least a unencryption coding parameter;
Coding parameter after encrypting is put into Parameter File, so that the coded file that will be encrypted becomes the coded file after the encryption.
Preferably, described from described coding parameter deposit position, remove described at least a unencryption coding parameter after, generate the coded file after encrypting before, described method also comprises:
In described coding parameter deposit position, put into random code.
Preferably, be applied in client device or the server, described client device is connected with described server, describedly according to default cryptographic algorithm described at least a unencryption coding parameter is encrypted, and generates the coding parameter after encrypting, and comprising:
Obtain the first default cryptographic algorithm corresponding with described client device;
According to the described first default cryptographic algorithm described at least a unencryption coding parameter is encrypted, generates the coding parameter after encrypting.
Preferably, describedly according to default cryptographic algorithm described at least a unencryption coding parameter is encrypted, generates the coding parameter after encrypting, comprising:
The file identification of the coded file that acquisition will be encrypted;
Obtain the second default cryptographic algorithm corresponding with described file identification;
According to the described second default cryptographic algorithm described at least a coding parameter is encrypted, generates the coding parameter after encrypting.
The embodiment of the invention also provides a kind of method that coded file is decrypted, and comprising:
The coded file of acquisition after the encryption that aforesaid a kind of method that coded file is encrypted generates;
Coding parameter after obtaining to encrypt;
Default decipherment algorithm according to corresponding with the default cryptographic algorithm described in aforesaid a kind of method that coded file is encrypted is decrypted processing to the coding parameter after the described encryption, generates the coding parameter after the deciphering;
Coding parameter after the described deciphering is put into the coding parameter deposit position of the coded file after the described encryption, generated the coded file after the deciphering.
Preferably, the coding parameter after described acquisition is encrypted comprises:
Coding parameter after the primary importance of the coded file after the described encryption obtains to encrypt, wherein, described primary importance is the coding parameter deposit position of the coded file after the described encryption or is the coding parameter deposit position of the coded file after the non-described encryption;
Or, the coding parameter after from Parameter File, obtaining to encrypt.
Preferably, the described coding parameter deposit position of coding parameter after the described deciphering being put into the coded file after the described encryption generates the coded file after the deciphering, comprising:
When having random code in the coding parameter deposit position of the coded file after the described encryption, the random code in the coding parameter deposit position of the coded file after the described encryption is removed;
Coding parameter after the described deciphering is put into described coding parameter deposit position, generate the coded file after deciphering.
The present invention also provides a kind of system that coded file is encrypted, and comprising: coding parameter obtains module, parameter encrypting module and file encryption module,
Described coding parameter obtains module, is used for coded file is resolved, and the coding parameter deposit position from described coded file obtains at least a unencryption coding parameter;
Described parameter encrypting module is used for according to default cryptographic algorithm described at least a unencryption coding parameter being encrypted, and generates the coding parameter after encrypting;
Described file encryption module is used for removing described at least a unencryption coding parameter from described coded file, uses coding parameter after the described encryption to generate coded file after encrypting.
Preferably, described coded file is the video file of process coding processing, the audio file through the coding processing, the picture file of processing through encoding or the document files through encoding and processing.
Preferably, when described coded file during for the video file processed through coding, described coding parameter comprises: at least a in coded system, video code rate, video resolution, the video frame rate.
Preferably, described coding parameter obtains module and comprises: the first parameter submodule, be used for coded file is resolved, and obtain at least a unencryption coding parameter from the file header of described coded file and/or the end-of-file of described coded file.
Preferably, described file encryption module comprises: parameter is removed submodule and the first parameter is put into submodule,
Described parameter is removed submodule, is used for removing described at least a unencryption coding parameter from described coding parameter deposit position;
Described the first parameter is put into submodule, coding parameter after being used for encrypting is put into the primary importance of the coded file that will be encrypted, generate the coded file after encrypting, wherein, described primary importance is described coding parameter deposit position or is non-described coding parameter deposit position.
Preferably, described file encryption module comprises: parameter is removed submodule and the second parameter is put into submodule,
Described parameter is removed submodule, is used for removing described at least a unencryption coding parameter from described coding parameter deposit position;
Described the second parameter is put into submodule, and the coding parameter after being used for encrypting is put into Parameter File, so that the coded file that will be encrypted becomes the coded file after the encryption.
Preferably, described file encryption module comprises that also random code puts into submodule, described random code is put into submodule, be used for described behind the described at least a unencryption coding parameter of described coding parameter deposit position removal, before generating the coded file after encrypting, in described coding parameter deposit position, put into random code.
Preferably, be applied in client device or the server, described client device is connected with described server, and described parameter encrypting module comprises: the first algorithm obtains submodule and the first parameter is encrypted submodule,
Described the first algorithm obtains submodule, is used for obtaining the first default cryptographic algorithm corresponding with described client device;
Described the first parameter is encrypted submodule, is used for according to the described first default cryptographic algorithm described at least a unencryption coding parameter being encrypted, and generates the coding parameter after encrypting.
Preferably, described parameter encrypting module comprises: sign obtains submodule, the second algorithm obtains submodule and the second parameter is encrypted submodule,
Described sign obtains submodule, for the file identification of the coded file that obtains to be encrypted;
Described the second algorithm obtains submodule, is used for obtaining the second default cryptographic algorithm corresponding with described file identification;
Described the second parameter is encrypted submodule, is used for according to the described second default cryptographic algorithm described at least a coding parameter being encrypted, and generates the coding parameter after encrypting.
The present invention also provides a kind of system that coded file is decrypted, and comprising: file obtains module, encryption parameter obtains module, parameter deciphering module and file decryption module,
Described file obtains module, is used for the coded file of acquisition after the encryption that aforementioned a kind of system that coded file is encrypted generates;
Described encryption parameter obtains module, the coding parameter after being used for obtaining to encrypt;
Described parameter deciphering module is used for according to the default decipherment algorithm corresponding with the described default cryptographic algorithm of aforementioned a kind of system that coded file is encrypted the coding parameter after the described encryption being decrypted processing, generates the coding parameter after the deciphering;
Described file decryption module is used for the coding parameter after the described deciphering is put into the coding parameter deposit position of the coded file after the described encryption, generates the coded file after the deciphering.
Preferably, described encryption parameter obtains module and comprises: the first gain of parameter submodule or the second gain of parameter submodule,
Described the first gain of parameter submodule, for the coding parameter after the primary importance acquisition encryption of the coded file after described encryption, wherein, described primary importance is the coding parameter deposit position of the coded file after the described encryption or is the coding parameter deposit position of the coded file after the non-described encryption;
Described the second gain of parameter submodule is for the coding parameter after obtaining to encrypt from Parameter File.
Preferably, described file decryption module comprises: random code is removed submodule and deciphering submodule,
Described random code is removed submodule, when having random code in the coding parameter deposit position of the coded file after the described encryption, is used for the random code removal with the coding parameter deposit position of the coded file after the described encryption;
Described deciphering submodule is used for the coding parameter after the described deciphering is put into described coding parameter deposit position, generates the coded file after deciphering.
Encipherment scheme in the method and system that coded file is encrypted and deciphers that the embodiment of the invention provides can be encrypted coding parameter, because the data volume of coding parameter is less, so ciphering process is very fast.Simultaneously, after coding parameter was encrypted, other equipment can't be opened the coded file after the encryption, and cipher round results is good.Simultaneously, decrypting process is also very fast.Certainly, implement arbitrary product of the present invention or method and must not necessarily need to reach simultaneously above-described all advantages.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art, apparently, accompanying drawing in the following describes only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The flow chart of a kind of method that coded file is encrypted that Fig. 1 provides for the embodiment of the invention;
The flow chart of the method that the another kind that Fig. 2 provides for the embodiment of the invention is encrypted coded file;
The structural representation of a kind of system that coded file is encrypted that Fig. 3 provides for the embodiment of the invention;
The flow chart of a kind of method that coded file is decrypted that Fig. 4 provides for the embodiment of the invention;
The structural representation of a kind of system that coded file is decrypted that Fig. 5 provides for the embodiment of the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
The embodiment of the invention provides a kind of method and system that coded file is encrypted, and is corresponding, and a kind of method and system that coded file is decrypted also are provided.The below at first describes a kind of method and system that coded file is encrypted.
As shown in Figure 1, a kind of method that coded file is encrypted that the embodiment of the invention provides can comprise:
S100, coded file is resolved, the coding parameter deposit position from described coded file obtains at least a unencryption coding parameter;
Wherein, described coded file is the video file of process coding processing, the audio file through the coding processing, the picture file of processing through encoding or the document files through encoding and processing.
When described coded file during for the video file processed through coding, described coding parameter comprises: at least a in coded system, video code rate, video resolution, the video frame rate.
What need explanation a bit is that coding parameter is the important information of coded file, needs to use coding parameter just can open coded file.The data volume of coding parameter is very little with respect to the data volume of coded file, and is therefore very fast to the ciphering process of coding parameter.
If coded file does not have coding parameter, maybe can't obtain all and correct coding parameter, then can't open coded file.Therefore, the present invention can only be encrypted a kind of coding parameter, as only coded system being encrypted.Certainly, the present invention also can be encrypted multiple or whole coding parameters, with further raising cryptographic security.
In actual applications, the coding parameter deposit position of different coded files may be different, and concrete coding parameter deposit position has multiple, such as file header, end-of-file or file middle part.What need here to specify a bit is, Online Video also is a kind of coded file, it becomes a plurality of little video segments with a large Video segmentation, and each little video segment all consists of a coded file, and has placed coding parameter in the file header of this coded file and end-of-file.
Therefore, in actual applications, S100 can comprise:
Coded file is resolved, obtain at least a unencryption coding parameter from the file header of described coded file and/or the end-of-file of described coded file.
S200, according to default cryptographic algorithm described at least a unencryption coding parameter is encrypted, generates the coding parameter after encrypting;
Step S200 can have two kinds of different executive modes:
Mode one, in other embodiments of the invention, method shown in Figure 1 can be applied in client device or the server, described client device is connected with described server, S200 can comprise:
Obtain the first default cryptographic algorithm corresponding with described client device;
According to the described first default cryptographic algorithm described at least a unencryption coding parameter is encrypted, generates the coding parameter after encrypting.
Mode two, S200 can comprise:
The file identification of the coded file that acquisition will be encrypted;
Obtain the second default cryptographic algorithm corresponding with described file identification;
According to the described second default cryptographic algorithm described at least a coding parameter is encrypted, generates the coding parameter after encrypting.
Can find out, the default cryptographic algorithm of first in the mode one is corresponding with client device, and therefore different client devices can have different cryptographic algorithm, and this is just so that the coded file after encrypting has had device-restrictive.And the default cryptographic algorithm of second in the mode two is corresponding with file identification, and therefore different files can have different cryptographic algorithm, and this is just so that the cipher round results of coded file is higher, and fail safe is better.
Certainly, above dual mode only is the part execution mode in the practical application, and the present invention is not limited in above-mentioned dual mode.
S300, from described coded file, remove described at least a unencryption coding parameter, use coding parameter after the described encryption to generate coded file after encrypting.
In actual applications, step S300 can have two kinds to carry into execution a plan:
Scheme one, S300 can comprise:
From described coding parameter deposit position, remove described at least a unencryption coding parameter;
Coding parameter after encrypting is put into the primary importance of the coded file that will be encrypted, generated the coded file after encrypting, wherein, described primary importance is described coding parameter deposit position or is non-described coding parameter deposit position.
Scheme two, S300 can comprise:
From described coding parameter deposit position, remove described at least a unencryption coding parameter;
Coding parameter after encrypting is put into Parameter File, so that the coded file that will be encrypted becomes the coded file after the encryption.
Can find out, the coding parameter after scheme one will be encrypted has been put back into again in the original encoding file, and is concrete, can be put back into the coding parameter deposit position in the coded file, also can be put into other positions in the coded file, such as end-of-file.Coding parameter after scheme two will be encrypted has been put in another file, so just so that no longer there is this kind coding parameter in the original encoding file.Concrete, the Parameter File in the scheme two can have certain relevance with this coded file, as the two is bundled, forms a new file.
In above two schemes, described from described coding parameter deposit position, remove described at least a unencryption coding parameter after, generate the coded file after encrypting before, the method also comprises:
In described coding parameter deposit position, put into random code.
Be understandable that, behind the removal unencryption coding parameter, the room will occur in the coding parameter deposit position, putting into random code in the room will be so that other equipment can't be learned original coding parameter according to random code, can better play cipher round results.Certainly, in actual applications, also can in the coding parameter deposit position, put into specific numerical value, such as 0, or 1.
A kind of method that coded file is encrypted that the embodiment of the invention provides can be encrypted coding parameter, because the data volume of coding parameter is less, so ciphering process is very fast.Simultaneously, after coding parameter was encrypted, other equipment can't be opened the coded file after the encryption, and cipher round results is good.
As shown in Figure 2, the invention provides the another kind of method that coded file is decrypted, can comprise:
S110, coded file is resolved, obtain at least a unencryption coding parameter from the file header of described coded file and the end-of-file of described coded file.
S210, the acquisition first default cryptographic algorithm corresponding with described client device.
S220, according to the described first default cryptographic algorithm described at least a unencryption coding parameter is encrypted, generates the coding parameter after encrypting.
S311, from described file header and end-of-file, remove described at least a unencryption coding parameter.
S312, put into random code at the deposit position of described file header and end-of-file Central Plains unencryption coding parameter.
S320, the coding parameter after will encrypting are put into the end-of-file of the coded file that will be encrypted, and generate the coded file after encrypting.
In actual applications, the position of the end-of-file that the coding parameter after the encryption is placed can be different with the position of the end-of-file of depositing former unencryption coding parameter, also can be identical.
Above each step all is illustrated in the embodiment shown in fig. 1, repeats no more.
Corresponding with embodiment of the method shown in Figure 1, the present invention also provides a kind of system that coded file is encrypted.
As shown in Figure 3, a kind of system that coded file is encrypted that the embodiment of the invention provides can comprise: coding parameter obtains module 100, parameter encrypting module 200 and file encryption module 300,
Coding parameter obtains module 100, is used for coded file is resolved, and the coding parameter deposit position from described coded file obtains at least a unencryption coding parameter;
Wherein, coded file can be the document files of processing through the video file of coding processing, the audio file of processing through encoding, the picture file of processing through encoding or process coding.
When described coded file during for the video file processed through coding, described coding parameter can comprise: at least a in coded system, video code rate, video resolution, the video frame rate.
Concrete, coding parameter obtains module 100 and can comprise: the first parameter submodule, be used for coded file is resolved, and obtain at least a unencryption coding parameter from the file header of described coded file and/or the end-of-file of described coded file.
Parameter encrypting module 200 is used for according to default cryptographic algorithm described at least a unencryption coding parameter being encrypted, and generates the coding parameter after encrypting;
Parameter encrypting module 200 has two kinds of executive modes:
Mode one, system shown in Figure 3 can be applied in client device or the server, and described client device is connected with described server, and parameter encrypting module 200 can comprise: the first algorithm obtains submodule and the first parameter is encrypted submodule,
The first algorithm obtains submodule, is used for obtaining the first default cryptographic algorithm corresponding with described client device;
The first parameter is encrypted submodule, is used for according to the described first default cryptographic algorithm described at least a unencryption coding parameter being encrypted, and generates the coding parameter after encrypting.
Mode two, parameter encrypting module 200 can comprise: sign obtains submodule, the second algorithm obtains submodule and the second parameter is encrypted submodule,
Sign obtains submodule, for the file identification of the coded file that obtains to be encrypted;
The second algorithm obtains submodule, is used for obtaining the second default cryptographic algorithm corresponding with described file identification;
The second parameter is encrypted submodule, is used for according to the described second default cryptographic algorithm described at least a coding parameter being encrypted, and generates the coding parameter after encrypting.
File encryption module 300 is used for removing described at least a unencryption coding parameter from described coded file, uses coding parameter after the described encryption to generate coded file after encrypting.
In actual applications, file encryption module 300 can have two kinds to carry into execution a plan:
Scheme one, file encryption module 300 can comprise: parameter is removed submodule and the first parameter is put into submodule,
Parameter is removed submodule, is used for removing described at least a unencryption coding parameter from described coding parameter deposit position;
The first parameter is put into submodule, coding parameter after being used for encrypting is put into the primary importance of the coded file that will be encrypted, generate the coded file after encrypting, wherein, described primary importance is described coding parameter deposit position or is non-described coding parameter deposit position.
Scheme two, file encryption module 300 can comprise: parameter is removed submodule and the second parameter is put into submodule,
Parameter is removed submodule, is used for removing described at least a unencryption coding parameter from described coding parameter deposit position;
The second parameter is put into submodule, and the coding parameter after being used for encrypting is put into Parameter File, so that the coded file that will be encrypted becomes the coded file after the encryption.
In the above two schemes, file encryption module 300 can also comprise that random code puts into submodule, be used for described behind the described at least a unencryption coding parameter of described coding parameter deposit position removal, before generating the coded file after encrypting, in described coding parameter deposit position, put into random code.
The concrete implementation of above each module all is illustrated in the embodiment shown in fig. 1, repeats no more.
A kind of system that coded file is encrypted that the embodiment of the invention provides can be encrypted coding parameter, because the data volume of coding parameter is less, so ciphering process is very fast.Simultaneously, after coding parameter was encrypted, other equipment can't be opened the coded file after the encryption, and cipher round results is good.
The below describes a kind of method and system that coded file is decrypted that the embodiment of the invention provides:
As shown in Figure 4, a kind of method that coded file is decrypted that the embodiment of the invention provides can comprise:
S001, the coded file of acquisition after the encryption that method embodiment illustrated in fig. 1 generates;
Concrete, the equipment of carrying out a kind of method that coded file is encrypted among the present invention can be identical with the equipment of carrying out a kind of method that coded file is decrypted, also can difference.
Wherein, described coded file is the video file of process coding processing, the audio file through the coding processing, the picture file of processing through encoding or the document files through encoding and processing.
Coding parameter after S002, acquisition are encrypted;
When described coded file during for the video file processed through coding, described coding parameter comprises: at least a in coded system, video code rate, video resolution, the video frame rate.
Concrete, step S002 can comprise:
Coding parameter after the primary importance of the coded file after the described encryption obtains to encrypt, wherein, described primary importance is the coding parameter deposit position of the coded file after the described encryption or is the coding parameter deposit position of the coded file after the non-described encryption;
Or, the coding parameter after from Parameter File, obtaining to encrypt.
S003, according to the default decipherment algorithm corresponding with the described default cryptographic algorithm in the method embodiment illustrated in fig. 1, the coding parameter after the described encryption is decrypted processing, generate the coding parameter after the deciphering;
S004, the coding parameter after the described deciphering put into the coding parameter deposit position of the coded file after the described encryption, generate the coded file after the deciphering.
Step S004 can comprise:
When having random code in the coding parameter deposit position of the coded file after the described encryption, the random code in the coding parameter deposit position of the coded file after the described encryption is removed;
Coding parameter after the described deciphering is put into described coding parameter deposit position, generate the coded file after deciphering.
Concrete, can at first judge in the coding parameter deposit position of the coded file after the encryption whether have random code, and when existing, carry out above-mentioned processing.
Above each step is corresponding with corresponding steps or concrete executive mode in embodiment illustrated in fig. 1, therefore repeats no more.
Corresponding to method shown in Figure 4, the present invention also provides a kind of system that coded file is decrypted.
A kind of method that coded file is decrypted that the embodiment of the invention provides can be decrypted coding parameter, because the data volume of coding parameter is less, so decrypting process is very fast.
As shown in Figure 5, a kind of system that coded file is decrypted that the embodiment of the invention provides can comprise: file obtains module 001, encryption parameter obtains module 002, parameter deciphering module 003 and file decryption module 004,
File obtains module 001, is used for the coded file of acquisition after the encryption that system embodiment illustrated in fig. 3 generates;
Encryption parameter obtains module 002, the coding parameter after being used for obtaining to encrypt;
Wherein, encryption parameter obtains module 002 and can comprise: the first gain of parameter submodule or the second gain of parameter submodule,
The first gain of parameter submodule, for the coding parameter after the primary importance acquisition encryption of the coded file after described encryption, wherein, described primary importance is the coding parameter deposit position of the coded file after the described encryption or is the coding parameter deposit position of the coded file after the non-described encryption;
The second gain of parameter submodule is for the coding parameter after obtaining to encrypt from Parameter File.
Parameter deciphering module 003 is used for according to the default decipherment algorithm corresponding with the described default cryptographic algorithm of system embodiment illustrated in fig. 3 coding parameter after the described encryption being decrypted processing, generates the coding parameter after the deciphering;
File decryption module 004 is used for the coding parameter after the described deciphering is put into the coding parameter deposit position of the coded file after the described encryption, generates the coded file after the deciphering.
Wherein, file decryption module 004 can comprise: random code is removed submodule and deciphering submodule,
Random code is removed submodule, when having random code in the coding parameter deposit position of the coded file after the described encryption, is used for the random code removal with the coding parameter deposit position of the coded file after the described encryption;
The deciphering submodule is used for the coding parameter after the described deciphering is put into described coding parameter deposit position, generates the coded file after deciphering.
Embodiment illustrated in fig. 5 is the system embodiment corresponding with embodiment of the method shown in Figure 4, sees also part embodiment illustrated in fig. 4, repeats no more.
A kind of system that coded file is decrypted that the embodiment of the invention provides can be decrypted coding parameter, because the data volume of coding parameter is less, so decrypting process is very fast.
Need to prove, in this article, relational terms such as the first and second grades only is used for an entity or operation are separated with another entity or operating space, and not necessarily requires or hint and have the relation of any this reality or sequentially between these entities or the operation.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby not only comprise those key elements so that comprise process, method, article or the equipment of a series of key elements, but also comprise other key elements of clearly not listing, or also be included as the intrinsic key element of this process, method, article or equipment.In the situation that not more restrictions, the key element that is limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
Each embodiment in this specification all adopts relevant mode to describe, and identical similar part is mutually referring to getting final product between each embodiment, and each embodiment stresses is difference with other embodiment.Especially, for system embodiment because its basic simlarity is in embodiment of the method, thus describe fairly simple, relevant part gets final product referring to the part explanation of embodiment of the method.
The above is preferred embodiment of the present invention only, is not for limiting protection scope of the present invention.All any modifications of doing within the spirit and principles in the present invention, be equal to replacement, improvement etc., all be included in protection scope of the present invention.

Claims (24)

1. the method that coded file is encrypted is characterized in that, comprising:
Coded file is resolved, and the coding parameter deposit position from described coded file obtains at least a unencryption coding parameter;
According to default cryptographic algorithm described at least a unencryption coding parameter is encrypted, generates the coding parameter after encrypting;
From described coded file, remove described at least a unencryption coding parameter, use coding parameter after the described encryption to generate coded file after encrypting.
2. method according to claim 1 is characterized in that, described coded file is the video file of process coding processing, the audio file through the coding processing, the picture file of processing through encoding or the document files through encoding and processing.
3. method according to claim 2 is characterized in that, when described coded file during for the video file processed through coding, described coding parameter comprises: at least a in coded system, video code rate, video resolution, the video frame rate.
4. each described method in 3 according to claim 1 is characterized in that, described coded file is resolved, and the coding parameter deposit position from described coded file obtains at least a unencryption coding parameter and comprises:
Coded file is resolved, obtain at least a unencryption coding parameter from the file header of described coded file and/or the end-of-file of described coded file.
5. each described method according to claim 1 is characterized in that, describedly removes described at least a unencryption coding parameter from described coded file, uses coding parameter after encrypting to generate coded file after encrypting, comprising:
From described coding parameter deposit position, remove described at least a unencryption coding parameter;
Coding parameter after encrypting is put into the primary importance of the coded file that will be encrypted, generated the coded file after encrypting, wherein, described primary importance is described coding parameter deposit position or is non-described coding parameter deposit position.
According to claim 1 in each described method, it is characterized in that, describedly from described coded file, remove described at least a unencryption coding parameter, use coding parameter after encrypting to generate coded file after encrypting, comprising:
From described coding parameter deposit position, remove described at least a unencryption coding parameter;
Coding parameter after encrypting is put into Parameter File, so that the coded file that will be encrypted becomes the coded file after the encryption.
7. according to claim 5 or 6 described methods, it is characterized in that, described from described coding parameter deposit position, remove described at least a unencryption coding parameter after, generate the coded file after encrypting before, described method also comprises:
In described coding parameter deposit position, put into random code.
8. each described method in 3 according to claim 1, it is characterized in that, be applied in client device or the server, described client device is connected with described server, describedly according to default cryptographic algorithm described at least a unencryption coding parameter is encrypted, generate the coding parameter after encrypting, comprising:
Obtain the first default cryptographic algorithm corresponding with described client device;
According to the described first default cryptographic algorithm described at least a unencryption coding parameter is encrypted, generates the coding parameter after encrypting.
9. each described method in 3 according to claim 1 is characterized in that, describedly according to default cryptographic algorithm described at least a unencryption coding parameter is encrypted, and generates the coding parameter after encrypting, and comprising:
The file identification of the coded file that acquisition will be encrypted;
Obtain the second default cryptographic algorithm corresponding with described file identification;
According to the described second default cryptographic algorithm described at least a coding parameter is encrypted, generates the coding parameter after encrypting.
10. the method that coded file is decrypted is characterized in that, comprising:
The coded file of acquisition after the encryption that method claimed in claim 1 generates;
Coding parameter after obtaining to encrypt;
Default decipherment algorithm according to corresponding with the default cryptographic algorithm described in the claim 1 is decrypted processing to the coding parameter after the described encryption, generates the coding parameter after deciphering;
Coding parameter after the described deciphering is put into the coding parameter deposit position of the coded file after the described encryption, generated the coded file after the deciphering.
11. method according to claim 10 is characterized in that, the coding parameter after described acquisition is encrypted comprises:
Coding parameter after the primary importance of the coded file after the described encryption obtains to encrypt, wherein, described primary importance is the coding parameter deposit position of the coded file after the described encryption or is the coding parameter deposit position of the coded file after the non-described encryption;
Or, the coding parameter after from Parameter File, obtaining to encrypt.
12. according to claim 10 or 11 described methods, it is characterized in that, the described coding parameter deposit position of coding parameter after the described deciphering being put into the coded file after the described encryption generates the coded file after the deciphering, comprising:
When having random code in the coding parameter deposit position of the coded file after the described encryption, the random code in the coding parameter deposit position of the coded file after the described encryption is removed;
Coding parameter after the described deciphering is put into described coding parameter deposit position, generate the coded file after deciphering.
13. the system that coded file is encrypted is characterized in that, comprising: coding parameter obtains module, parameter encrypting module and file encryption module,
Described coding parameter obtains module, is used for coded file is resolved, and the coding parameter deposit position from described coded file obtains at least a unencryption coding parameter;
Described parameter encrypting module is used for according to default cryptographic algorithm described at least a unencryption coding parameter being encrypted, and generates the coding parameter after encrypting;
Described file encryption module is used for removing described at least a unencryption coding parameter from described coded file, uses coding parameter after the described encryption to generate coded file after encrypting.
14. system according to claim 13 is characterized in that, described coded file is the video file of process coding processing, the audio file through the coding processing, the picture file of processing through encoding or the document files through encoding and processing.
15. system according to claim 14 is characterized in that, when described coded file during for the video file processed through coding, described coding parameter comprises: at least a in coded system, video code rate, video resolution, the video frame rate.
16. each described system in 15 according to claim 13, it is characterized in that, described coding parameter obtains module and comprises: the first parameter submodule, be used for coded file is resolved, obtain at least a unencryption coding parameter from the file header of described coded file and/or the end-of-file of described coded file.
17. each described system is characterized in that according to claim 13, described file encryption module comprises: parameter is removed submodule and the first parameter is put into submodule,
Described parameter is removed submodule, is used for removing described at least a unencryption coding parameter from described coding parameter deposit position;
Described the first parameter is put into submodule, coding parameter after being used for encrypting is put into the primary importance of the coded file that will be encrypted, generate the coded file after encrypting, wherein, described primary importance is described coding parameter deposit position or is non-described coding parameter deposit position.
18. each described system is characterized in that according to claim 13, described file encryption module comprises: parameter is removed submodule and the second parameter is put into submodule,
Described parameter is removed submodule, is used for removing described at least a unencryption coding parameter from described coding parameter deposit position;
Described the second parameter is put into submodule, and the coding parameter after being used for encrypting is put into Parameter File, so that the coded file that will be encrypted becomes the coded file after the encryption.
19. according to claim 17 or 18 described systems, it is characterized in that, described file encryption module comprises that also random code puts into submodule, described random code is put into submodule, be used for described behind the described at least a unencryption coding parameter of described coding parameter deposit position removal, before generating the coded file after encrypting, in described coding parameter deposit position, put into random code.
20. each described system in 15 according to claim 13, it is characterized in that, be applied in client device or the server, described client device is connected with described server, described parameter encrypting module comprises: the first algorithm obtains submodule and the first parameter is encrypted submodule
Described the first algorithm obtains submodule, is used for obtaining the first default cryptographic algorithm corresponding with described client device;
Described the first parameter is encrypted submodule, is used for according to the described first default cryptographic algorithm described at least a unencryption coding parameter being encrypted, and generates the coding parameter after encrypting.
21. each described system in 15 is characterized in that according to claim 13, described parameter encrypting module comprises: sign obtains submodule, the second algorithm obtains submodule and the second parameter is encrypted submodule,
Described sign obtains submodule, for the file identification of the coded file that obtains to be encrypted;
Described the second algorithm obtains submodule, is used for obtaining the second default cryptographic algorithm corresponding with described file identification;
Described the second parameter is encrypted submodule, is used for according to the described second default cryptographic algorithm described at least a coding parameter being encrypted, and generates the coding parameter after encrypting.
22. the system that coded file is decrypted is characterized in that, comprising: file obtains module, encryption parameter obtains module, parameter deciphering module and file decryption module,
Described file obtains module, is used for the coded file of acquisition after the encryption that the described system of claim 13 generates;
Described encryption parameter obtains module, the coding parameter after being used for obtaining to encrypt;
Described parameter deciphering module is used for according to the default decipherment algorithm corresponding with the described default cryptographic algorithm of claim 13, and the coding parameter after the described encryption is decrypted processing, generates the coding parameter after deciphering;
Described file decryption module is used for the coding parameter after the described deciphering is put into the coding parameter deposit position of the coded file after the described encryption, generates the coded file after the deciphering.
23. system according to claim 22 is characterized in that, described encryption parameter obtains module and comprises: the first gain of parameter submodule or the second gain of parameter submodule,
Described the first gain of parameter submodule, for the coding parameter after the primary importance acquisition encryption of the coded file after described encryption, wherein, described primary importance is the coding parameter deposit position of the coded file after the described encryption or is the coding parameter deposit position of the coded file after the non-described encryption;
Described the second gain of parameter submodule is for the coding parameter after obtaining to encrypt from Parameter File.
24. according to claim 22 or 23 described systems, it is characterized in that, described file decryption module comprises: random code is removed submodule and deciphering submodule,
Described random code is removed submodule, when having random code in the coding parameter deposit position of the coded file after the described encryption, is used for the random code removal with the coding parameter deposit position of the coded file after the described encryption;
Described deciphering submodule is used for the coding parameter after the described deciphering is put into described coding parameter deposit position, generates the coded file after deciphering.
CN201310269607.5A 2013-06-28 2013-06-28 Method and system for encrypting and decrypting encoded file Expired - Fee Related CN103313097B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310269607.5A CN103313097B (en) 2013-06-28 2013-06-28 Method and system for encrypting and decrypting encoded file
PCT/CN2014/081290 WO2014206370A1 (en) 2013-06-28 2014-06-30 Method and system for encrypting and decrypting coding file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310269607.5A CN103313097B (en) 2013-06-28 2013-06-28 Method and system for encrypting and decrypting encoded file

Publications (2)

Publication Number Publication Date
CN103313097A true CN103313097A (en) 2013-09-18
CN103313097B CN103313097B (en) 2016-12-07

Family

ID=49137808

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310269607.5A Expired - Fee Related CN103313097B (en) 2013-06-28 2013-06-28 Method and system for encrypting and decrypting encoded file

Country Status (2)

Country Link
CN (1) CN103313097B (en)
WO (1) WO2014206370A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014206370A1 (en) * 2013-06-28 2014-12-31 贝壳网际(北京)安全技术有限公司 Method and system for encrypting and decrypting coding file
CN108390862A (en) * 2018-01-29 2018-08-10 丹露成都网络技术有限公司 A kind of graphic verification method based on image data encrypted indexes
CN111432242A (en) * 2020-03-31 2020-07-17 广州市百果园信息技术有限公司 Encrypted video call method, device, equipment and storage medium
CN116016993A (en) * 2022-11-15 2023-04-25 上海热线信息网络有限公司 Video encryption and decryption method and device based on reversible cellular automaton

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442676A (en) * 2008-12-26 2009-05-27 北京工业大学 Method for enciphering H.264 video based on CAVLC encode
CN101902333A (en) * 2010-07-20 2010-12-01 中兴通讯股份有限公司 Application method of digital rights management and terminal equipment
CN102469344A (en) * 2010-11-16 2012-05-23 腾讯科技(深圳)有限公司 Video stream encryption and decryption method, video stream encryption and decryption device, communication terminal and storage terminal

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100505866C (en) * 2004-10-28 2009-06-24 武汉大学 A video information encrypting-decrypting method
CN201663660U (en) * 2010-04-06 2010-12-01 深圳市爱美得科技有限公司 Data encryption and data decryption system of digital video
CN102724552B (en) * 2012-05-30 2014-12-17 华为技术有限公司 Image coding method, image decoding method and device
CN103313097B (en) * 2013-06-28 2016-12-07 贝壳网际(北京)安全技术有限公司 Method and system for encrypting and decrypting encoded file

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442676A (en) * 2008-12-26 2009-05-27 北京工业大学 Method for enciphering H.264 video based on CAVLC encode
CN101902333A (en) * 2010-07-20 2010-12-01 中兴通讯股份有限公司 Application method of digital rights management and terminal equipment
CN102469344A (en) * 2010-11-16 2012-05-23 腾讯科技(深圳)有限公司 Video stream encryption and decryption method, video stream encryption and decryption device, communication terminal and storage terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014206370A1 (en) * 2013-06-28 2014-12-31 贝壳网际(北京)安全技术有限公司 Method and system for encrypting and decrypting coding file
CN108390862A (en) * 2018-01-29 2018-08-10 丹露成都网络技术有限公司 A kind of graphic verification method based on image data encrypted indexes
CN111432242A (en) * 2020-03-31 2020-07-17 广州市百果园信息技术有限公司 Encrypted video call method, device, equipment and storage medium
CN111432242B (en) * 2020-03-31 2022-05-27 广州市百果园信息技术有限公司 Encrypted video call method, device, equipment and storage medium
CN116016993A (en) * 2022-11-15 2023-04-25 上海热线信息网络有限公司 Video encryption and decryption method and device based on reversible cellular automaton

Also Published As

Publication number Publication date
WO2014206370A1 (en) 2014-12-31
CN103313097B (en) 2016-12-07

Similar Documents

Publication Publication Date Title
KR102432299B1 (en) Systems and methods for encryption and decryption based on quantum key distribution
CN105260668B (en) A kind of file encrypting method and electronic equipment
KR101744748B1 (en) Contents protection, encryption and decryption apparatus using white-box cryptography
CN101882993B (en) Coding device and method
CN105847005B (en) Encryption device and method
US8467526B2 (en) Key evolution method and system of block ciphering
RU2666281C2 (en) Electronic block cipher device suitable for obfuscation
CN103778590A (en) Method and device for utilizing digital image to store and transmit information
CN103377347B (en) File encryption, decryption method and device
US20090327712A1 (en) System and method for variable encryption
CN102546156A (en) Method, system and device for grouping encryption
CN103378971A (en) Data encryption system and method
CN105099653A (en) Distributed data processing method, device and system
CN113987583A (en) Method and system for hiding query
CN103313097A (en) Method and system for encrypting and decrypting encoded file
CN104579680A (en) Method for safe distribution of seed
CN102833077A (en) Encryption and decryption methods of remote card-issuing data transmission of financial IC (Integrated Circuit) card and financial social security IC card
CN100461199C (en) Method and device for encrypting and de-encrypting digital content
US9559840B2 (en) Low-bandwidth time-embargoed content disclosure
KR20150064042A (en) Method and device for digital data blocks encryption and decryption
CN104954362A (en) Serial number encryption-decryption method and device
KR101602803B1 (en) The encryption and decryption Method of using to polarization
CN106454435B (en) Conditional access method and related equipment and system
CN102446140B (en) Data processing method and movable storage device
Zhang et al. A new combined chaotic system for image encryption

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20161207

Termination date: 20180628

CF01 Termination of patent right due to non-payment of annual fee