CN101051339A - File protection method and its device - Google Patents

File protection method and its device Download PDF

Info

Publication number
CN101051339A
CN101051339A CNA2007101061271A CN200710106127A CN101051339A CN 101051339 A CN101051339 A CN 101051339A CN A2007101061271 A CNA2007101061271 A CN A2007101061271A CN 200710106127 A CN200710106127 A CN 200710106127A CN 101051339 A CN101051339 A CN 101051339A
Authority
CN
China
Prior art keywords
file
encrypt
document
files
protection
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
CNA2007101061271A
Other languages
Chinese (zh)
Other versions
CN100520798C (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.)
Actions Semiconductor Co Ltd
Original Assignee
Actions Semiconductor 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 Actions Semiconductor Co Ltd filed Critical Actions Semiconductor Co Ltd
Priority to CNB2007101061271A priority Critical patent/CN100520798C/en
Publication of CN101051339A publication Critical patent/CN101051339A/en
Application granted granted Critical
Publication of CN100520798C publication Critical patent/CN100520798C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

A method for protecting file includes enciphering file to be protected, judging whether all enciphered files are in accordance with conditions or not before deciphering is carried out on enciphered file and carrying out deciphering on all enciphered files when all enciphered files are in according to conditions.

Description

Document protection method and device thereof
Technical field
The present invention relates to information security field, particularly relate to a kind of document protection method and device thereof.
Background technology
Along with the fast development of computer technology, the continuous development and perfection of computer software, the application of software is more and more wider, plays an important role in many technical fields.Now, many products all be unable to do without the application of software, many product needed are equipped with sophisticated software system ability operate as normal, and give full play to the various functions of its hardware, mp3 player for example, and portable electronic device (Portable Media Player, PMP), (Personal Digital Assistant PDA) waits product to personal digital assistant.Usually software is made up of a lot of program files that is associated, and product producer is by in the storage medium of product, and the program file that is associated is installed in storage, and the hardware components of the operation product of arranging in pairs or groups is with the various functions of performance product.
For the product of same type, generally, the not very big difference of their hardware configuration, people come they are distinguished by the difference on the product software function.For example: the flash that how tame flash memory (flash) manufacturer produces can be applied in the same product, and not very big difference between the flash that produced of how tame flash manufacturer, but, will cause described product on function, to have bigger difference because their flash driving (driver) file is different.As seen the function of the function of a product and its software is closely related.
Generally, for the needs of production, the software publisher will be to the open software of product producer.Because the common product manufacturer produces different products, so product producer is easy to take the product software of difference in functionality.Product producer can be by comparing the product software of difference in functionality, find out files different between these softwares, after the function to different files compares analysis, to the file in the software increase, replace, revise or delete after used, this means that product producer can upgrade to the software document of other products with the software document of certain product, for example, after adopting the software document upgrading of software document to low-end product of high-end product, just can make low-end product possess the function the same with high-end product.If the software document of software publisher research and development is optionally revised, replaces, is increased or delete by product producer, with the legitimate rights and interests of grievous injury software publisher.
Yet, do not have a kind of clear and definite method or device in the prior art with the protection product software.
Therefore, how to protect product software, the legitimate rights and interests of maintenance software publisher, becoming has problem to be solved.
Summary of the invention
In view of this, technical matters to be solved by this invention provides a kind of document protection method and device thereof, with the protection product software, prevents that effectively product software is modified, replaces, increases or deletes.
The technical scheme of the present invention's proposition is for this reason: a kind of document protection method is provided, comprises step:
The file that encryption needs protection;
Before encrypt file is decrypted, judge whether that all encrypt files are all eligible;
When all encrypt files are all eligible, all encrypt files are decrypted.
Wherein, encrypt the file that needs protection by following step:
The tabulation of the file that foundation needs protection;
Utilization is stabbed at the same time and described listed files is encrypted the file that needs protection.
Wherein, utilize described timestamp and described listed files to generate related information, utilize related information to encrypt the file that needs protection.Wherein generate related information by operation t0+list;
Wherein, t0 is described timestamp, and list is described listed files.
Wherein, the time of described timestamp for from clock, extracting.
Wherein, described clock is a operation system clock.
Wherein, described condition is: the timestamp that extracts from the file header of each encrypt file is all identical, and the listed files that extracts from the file header of each encrypt file is all identical with first listed files.
Wherein, described first listed files tabulation that is described encrypt file.
Wherein, the method for building up of the tabulation of Bao Hu file on demand, the tabulation of setting up described encrypt file.
Wherein, learn the encryption cryptographic algorithm that this document adopted, utilize corresponding decipherment algorithm that this document is decrypted from the file header of each encrypt file.
The present invention also provides a kind of file protection device, comprising:
Ciphering unit is used to encrypt the file that needs protection;
Judging unit is used for before encrypt file is decrypted, and judges whether that all encrypt files are all eligible;
Decryption unit is used for when all encrypt files are all eligible all encrypt files being decrypted.
Wherein, described ciphering unit comprises:
Listed files is set up the unit, is used to set up the tabulation of the file that needs protection;
Encrypt performance element, be used to utilize and stab at the same time and described listed files is encrypted the file that needs protection.
Wherein, described encryption performance element utilizes described timestamp and described listed files to generate related information, utilizes related information to encrypt the file that needs protection.
Wherein, generate related information based on operation t0+list;
Wherein, t0 is described timestamp, and list is described listed files.
Wherein, the time of described timestamp for from clock, extracting.
Wherein, described clock is a operation system clock.
Wherein, described condition is: the timestamp that extracts from the file header of each encrypt file is all identical, and the listed files that extracts from the file header of each encrypt file is all identical with first listed files.
Wherein, described first listed files tabulation that is described encrypt file.
Wherein, described listed files is set up the method for building up of the tabulation of the file of protecting on demand the unit, sets up the tabulation of described encrypt file.
Wherein, described decryption unit is learnt from the file header of each encrypt file and is encrypted the cryptographic algorithm that this document adopted, utilizes corresponding decipherment algorithm that this document is decrypted.
By the technical scheme of the invention described above as can be known, the present invention has following advantage:
1, because the vital document that needs protection in the product software is encrypted; if product producer has been carried out increase, deletion, modification or replacement to the vital document in the product software; so because the file in the product software has had change; before so encrypt file being decrypted; it is all eligible all encrypt files can not occur; so just all encrypt files are not decrypted the deciphering failure.Thereby stop product producer increase, deletion, revise or replace the vital document in the product software, protected the safety of vital document in the product software.
2, by preventing to revise, replace, increase or delete product software, the legitimate rights and interests of maintenance software publisher effectively;
3, by prevent to revise, replace, product software behind increase or the deleted file, make the low side hardware product can't use the software document of high-end hardware product, thereby distinguished the software function and the market price of high and low end product, and can carry out objective effective analysis high and low end produce market.
Description of drawings
Fig. 1 is the process flow diagram of document protection method provided by the invention;
Fig. 2 is the format chart of a kind of filename tabulation of the present invention's file to be encrypted;
Fig. 3 is the format chart of a kind of related information of file to be encrypted of the present invention;
Fig. 4 is the synoptic diagram of file protection device provided by the invention.
Embodiment
For making those skilled in the art understand the present invention better, specify below in conjunction with the method for specific embodiment to protected file provided by the invention.
Basic thought of the present invention is: by the vital document in the product software is encrypted; in case described vital document is modified, deletes or replaces; or the file in the product software is when increasing; the enciphered message that the capital causes being correlated with changes; cause and can't normally decipher, thus the purpose of realization protection product software.
Fig. 1 is the process flow diagram of document protection method provided by the invention, and the step of document protection method is as follows:
Step S101: from time t0 of Clock Extraction.
Wherein, described clock can be the operation system clock, and described time t0 can resolve to hour XX minute XX of XX XX month XX day XX second, and for example, time t0 is: 6: 7: 28 on the 25th March in 2007.
When related vital document, with time t0 as unified time stab.
Wherein, timestamp is the time of expression document creation, modification or visit, and it is real-time value, and for a real-time system, each timestamp all is unique, can't reappear.
Step S102: choose file to be encrypted.
When n file is to be encrypted, can be with these file designations f1, f2 ..., fn.
Step S103: the tabulation list1 that sets up file to be encrypted.
The method of setting up the tabulation list1 of file to be encrypted has a lot, for example, can perhaps by file size file be sorted by the positive and negative rank order of filename letter.
The tabulation list1 of file to be encrypted is a character string that comprises sorted filename, for example, for example under a certain clooating sequence, has comprised sorted filename f1f2f3...fn; The filename listings format is referring to Fig. 2.
Step S104: utilize the tabulation list1 of time t0 and file to be encrypted, generate related information info.
The concrete grammar that generates related information info is info=t0+list1, and the form of the related information info of generation is referring to Fig. 3.
Step S105: utilize described related information info to treat encrypt file and encrypt successively.
Can adopt general cryptographic algorithm to file encryption, and filename is consistent before and after encrypting.Encrypting the form of back file is made up of file header and file content two parts.
Include a cryptographic algorithm sign in file header, with the encryption which kind of algorithm expression adopts file is carried out, for example can represent algorithm a with integer 1, integer 2 is represented algorithm b etc.
In file header, also include the related information sign, so that when encrypt file is decrypted, use.
In file header, also include the ordering sign, so that when encrypt file is decrypted, use.
When needs are decrypted encrypt file, at step S106:, set up the tabulation list2 that treats declassified document according to the filename for the treatment of declassified document.
According to the ordering of the encryption in file header sign, can learn the sort method of listed files when encrypting.The sort method of listed files is set up the tabulation for the treatment of declassified document during according to encryption.
Step S107: extract the listed files Listi that each treats declassified document, i=1,2,3 ... n.
Can in treating the file header of declassified document, obtain to treat the listed files of declassified document.
Step S108: extract the time stamp T i that each treats declassified document, i=1,2,3 ... n.
Can in treating the file header of declassified document, obtain to treat the timestamp of declassified document.
Step S109: judge whether all timestamps for the treatment of declassified document that extracted are all identical, if execution in step S110 if not, then stops.
Step S110: judge whether the listed files that the file header of all encrypt files extracts is all identical with the tabulation list2 that treats declassified document, if execution in step S111 if not, then stops.
Step S111: all encrypt files are decrypted.
Can learn the related information that is adopted when encrypting by the related information sign in the file header of encrypt file.
Can identify the cryptographic algorithm that is adopted by the cryptographic algorithm sign in the file header of encrypt file, thereby know corresponding decipherment algorithm.The related information that is adopted during according to this decipherment algorithm and encryption is decrypted the file of encrypting.
If filename was not carried out modification, the filename before and after encrypting so can not change.
Above document protection method provided by the invention is described.Can judge by above-mentioned document protection method whether the vital document in the product software changes, when the file in the product software changed, the deciphering failure had prevented that like this product software is modified, deletes, increases or replaces.
Based on above-described document protection method, the invention provides a kind of corresponding file protective device, Fig. 4 is this schematic representation of apparatus.File protection device 400 comprises ciphering unit 401, judging unit 402 and decryption unit 403.
Ciphering unit 401 comprises that listed files sets up the unit and encrypt performance element.When n vital document need be encrypted, listed files set up the unit can be with these file designations f1, f2 ..., fn, set up the tabulation list1 of the file that needs protection according to certain sort method; The method of setting up the tabulation list1 of file to be encrypted has a lot, for example, can perhaps by file size file be sorted by the positive and negative rank order of filename letter.
Encrypting performance element stabs as unified time with time t0; utilize unified time stamp t0 and described listed files list1 that the file that needs protection is encrypted; be specially and utilize described timestamp t0 and described listed files list1 to generate related information info; info=t0+list1 utilizes related information info to encrypt the file that needs protection successively.
Wherein, timestamp is the time of expression document creation, modification or visit, and it is real-time value, and for a real-time system, each timestamp all is unique, can't reappear.
The described time t0 that stabs as unified time can extract from clock, and this clock can be a operation system clock.Described time t0 can resolve to hour XX minute XX of XX XX month XX day XX second, and for example, time t0 is: 6: 7: 28 on the 25th March in 2007.
The vital document that described encryption performance element can adopt general cryptographic algorithm that needs are encrypted is encrypted, and encrypt the form of back file and be made up of file header and file content two parts, and the filename of file is consistent before and after encrypting.
Include a cryptographic algorithm sign in the file header of file after encryption, with the encryption which kind of algorithm expression adopts file is carried out, for example can represent algorithm a with integer 1, integer 2 is represented algorithm b etc.
Before encrypt file is decrypted, judge whether that by judging unit 402 all encrypt files are all eligible.
Described condition is: the time stamp T i that extracts from the file header of each encrypt file is identical, i=1,2,3 ... n, and the listed files Listi that extracts from the file header of each encrypt file with treat that decrypted list list2 is identical, i=1,2,3 ... n.Described judging unit 402 can be learnt the sort method of listed files when encrypting according to the encryption that comprises in file header ordering sign, and when encrypting the sort method of listed files, set up the tabulation list2 that treats declassified document.
In treating the file header of declassified document, can learn listed files and the timestamp for the treatment of declassified document.
When the listed files that extracts from the file header of all encrypt files was all identical with the tabulation list2 that treats declassified document, all encrypt files were all eligible, and 402 pairs of decryption unit 403 of judging unit trigger.
When all encrypt files are all eligible, be subjected to the triggering of judging unit 402,403 pairs of all encrypt files of decryption unit are decrypted.
Described decryption unit 403 can identify the cryptographic algorithm that is adopted, thereby learn corresponding decipherment algorithm by the cryptographic algorithm sign in the file header of encrypt file.Described decryption unit 403 can be learnt the related information that is adopted when encrypting by the related information sign in the file header of encrypt file, thereby the related information that is adopted according to this decipherment algorithm with when encrypting is decrypted the file of encrypting.
Owing to be to stab with unified time to treat encrypt file and encrypt when encrypting, if revise the content of encrypt file, can cause the timestamp information in file of the same name and other encrypt file file headers inequality so with file of the same name, fail thereby decipher.In addition; because treating encrypt file with unified listed files when encrypting encrypts; if increase, delete encrypt file or replace encrypt file with file not of the same name; the listed files that is adopted when listed files that the sort method in the time of will occurring according to encryption forms and encryption is not inconsistent; thereby; after file in the product software made amendment, increases, deletes or replace; can cause the deciphering failure; can prevent the product producer modification like this, increase, replace and the deletion product software, protect the safety of vital document in the product software.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (20)

1, a kind of document protection method is characterized in that, comprising:
The file that encryption needs protection;
Before encrypt file is decrypted, judge whether that all encrypt files are all eligible;
When all encrypt files are all eligible, all encrypt files are decrypted.
2, document protection method according to claim 1 is characterized in that, encrypts the file that needs protection by following step:
The tabulation of the file that foundation needs protection;
Utilization is stabbed at the same time and described listed files is encrypted the file that needs protection.
3, document protection method according to claim 2 is characterized in that, utilizes described timestamp and described listed files to generate related information, utilizes related information to encrypt the file that needs protection.
4, document protection method according to claim 3 is characterized in that, t0+list generates related information by operation;
Wherein, t0 is described timestamp, and list is described listed files.
5, document protection method according to claim 2 is characterized in that, described condition is: the timestamp that extracts from the file header of each encrypt file is all identical, and the listed files that extracts from the file header of each encrypt file is all identical with first listed files.
6, document protection method according to claim 5 is characterized in that, described first listed files is the tabulation of described encrypt file.
7, document protection method according to claim 2 is characterized in that, the method for building up of the tabulation of Bao Hu file on demand, the tabulation of setting up described encrypt file.
8, document protection method according to claim 1 is characterized in that, learns from the file header of each encrypt file and encrypts the cryptographic algorithm that this document adopted, and utilizes corresponding decipherment algorithm that this document is decrypted.
9, document protection method according to claim 2 is characterized in that, the time of described timestamp for extracting from clock.
10, document protection method according to claim 9 is characterized in that, described clock is a operation system clock.
11, a kind of file protection device is characterized in that, comprising:
Ciphering unit is used to encrypt the file that needs protection;
Judging unit is used for before encrypt file is decrypted, and judges whether that all encrypt files are all eligible;
Decryption unit is used for when all encrypt files are all eligible all encrypt files being decrypted.
12, file protection device according to claim 11 is characterized in that, described ciphering unit comprises:
Listed files is set up the unit, is used to set up the tabulation of the file that needs protection;
Encrypt performance element, be used to utilize and stab at the same time and described listed files is encrypted the file that needs protection.
13, file protection device according to claim 12 is characterized in that, described encryption performance element utilizes described timestamp and described listed files to generate related information, utilizes related information to encrypt the file that needs protection.
14, file protection device according to claim 13 is characterized in that, t0+list generates related information based on operation;
Wherein, t0 is described timestamp, and list is described listed files.
15, file protection device according to claim 11; it is characterized in that; described condition is: the timestamp that extracts from the file header of each encrypt file is all identical, and the listed files that extracts from the file header of each encrypt file is all identical with first listed files.
16, file protection device according to claim 15 is characterized in that, described first listed files is the tabulation of described encrypt file.
17, file protection device according to claim 12 is characterized in that, described listed files is set up the method for building up of the tabulation of the file of protecting on demand the unit, sets up the tabulation of described encrypt file.
18, file protection device according to claim 11 is characterized in that, described decryption unit is learnt from the file header of each encrypt file and encrypted the cryptographic algorithm that this document adopted, utilizes corresponding decipherment algorithm that this document is decrypted.
19, file protection device according to claim 12 is characterized in that, the time of described timestamp for extracting from clock.
20, file protection device according to claim 19 is characterized in that, described clock is a operation system clock.
CNB2007101061271A 2007-05-24 2007-05-24 File protection method and its device Expired - Fee Related CN100520798C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007101061271A CN100520798C (en) 2007-05-24 2007-05-24 File protection method and its device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007101061271A CN100520798C (en) 2007-05-24 2007-05-24 File protection method and its device

Publications (2)

Publication Number Publication Date
CN101051339A true CN101051339A (en) 2007-10-10
CN100520798C CN100520798C (en) 2009-07-29

Family

ID=38782748

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007101061271A Expired - Fee Related CN100520798C (en) 2007-05-24 2007-05-24 File protection method and its device

Country Status (1)

Country Link
CN (1) CN100520798C (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034815A (en) * 2011-09-30 2013-04-10 北大方正集团有限公司 Detection method and device for portable document format (PDF) file
CN103077334A (en) * 2012-12-28 2013-05-01 中国科学院自动化研究所 Rich media constructing and exhibiting system with function of copyright protection
CN104618338A (en) * 2014-12-31 2015-05-13 北京航天测控技术有限公司 Industrial Ethernet communication data encryption transparent transmission module
CN105404824A (en) * 2015-11-11 2016-03-16 成都比特信安科技有限公司 Asynchronous data slow encryption system and method
CN106529289A (en) * 2016-09-26 2017-03-22 福建天泉教育科技有限公司 Automatic signature method and system
CN107423634A (en) * 2017-06-30 2017-12-01 武汉斗鱼网络科技有限公司 File decryption method, apparatus, computer-readable recording medium and equipment
CN110506240A (en) * 2017-03-28 2019-11-26 横河电机株式会社 Engineering auxiliary system, engineering auxiliary method, server apparatus, storage medium, client device and client-side program

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034815A (en) * 2011-09-30 2013-04-10 北大方正集团有限公司 Detection method and device for portable document format (PDF) file
CN103034815B (en) * 2011-09-30 2015-07-22 北大方正集团有限公司 Detection method and device for portable document format (PDF) file
CN103077334A (en) * 2012-12-28 2013-05-01 中国科学院自动化研究所 Rich media constructing and exhibiting system with function of copyright protection
CN104618338A (en) * 2014-12-31 2015-05-13 北京航天测控技术有限公司 Industrial Ethernet communication data encryption transparent transmission module
CN104618338B (en) * 2014-12-31 2018-10-19 北京航天测控技术有限公司 A kind of Industrial Ethernet encryption of communicated data transparent transmission module
CN105404824A (en) * 2015-11-11 2016-03-16 成都比特信安科技有限公司 Asynchronous data slow encryption system and method
CN105404824B (en) * 2015-11-11 2018-09-25 成都比特信安科技有限公司 Asynchronous data delays encryption system and method
CN106529289A (en) * 2016-09-26 2017-03-22 福建天泉教育科技有限公司 Automatic signature method and system
CN110506240A (en) * 2017-03-28 2019-11-26 横河电机株式会社 Engineering auxiliary system, engineering auxiliary method, server apparatus, storage medium, client device and client-side program
CN107423634A (en) * 2017-06-30 2017-12-01 武汉斗鱼网络科技有限公司 File decryption method, apparatus, computer-readable recording medium and equipment
CN107423634B (en) * 2017-06-30 2018-11-09 武汉斗鱼网络科技有限公司 File decryption method, apparatus, computer readable storage medium and equipment

Also Published As

Publication number Publication date
CN100520798C (en) 2009-07-29

Similar Documents

Publication Publication Date Title
CN101051339A (en) File protection method and its device
CN1602600A (en) Content processing apparatus and content protection program
CN100346255C (en) Software copy right protecting method for extracting partial code to enciphed device from software
CN101075866A (en) Method and system for loading message on Internet
CN1682205A (en) Method for encrypting and decrypting metadata and method for managing metadata and system thereof
CN1677922A (en) System and method for securing executable code
CN1874218A (en) Method, system and equipment for license management
CN1490771A (en) Terminal apparatus of recording medium with copyright protective function
CN1826000A (en) Portable information terminal and data protecting method
CN1716220A (en) Multitask execution system
CN1925048A (en) Information processing apparatus and information processing method
CN1991799A (en) Safety memory device and data management method
CN1767032A (en) Use the multithread equipment and the multithread method of temporary transient storage medium
CN1296790C (en) Memory management unit code verifying device and code decoder
JP2015507258A (en) Method and apparatus for packing / unpacking files
CN1501263A (en) Method of actualizing safety data storage and algorithm storage in virtue of semiconductor memory device
CN1794258A (en) Method of preoenting software non-authorized use by using network card physical address
US20120191983A1 (en) Managing information in a document serialization
CN1702592A (en) Method for establishing credible input-output channels
CN111432287A (en) Slicing encryption method and system and decryption method and system for audio and video files
CN1991870A (en) Preventing method and preventing system for data deletion
CN101036193A (en) Apparatus and method for securely storing data
CN110489978A (en) A kind of file encryption-decryption method
CN1828558A (en) Encrypt device and method for static RAM programmable gate array chip
CN1361481A (en) Copyright protecting method based on network browser card

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
C56 Change in the name or address of the patentee
CP02 Change in the address of a patent holder

Address after: 519085 hi tech Zone, Guangdong, Zhuhai science and Technology Innovation Coast Road, No. four, No. 1

Patentee after: Juli Integrated Circuit Design Co., Ltd.

Address before: 519085 No. 1, unit 15, building 1, 1 Da Ha Road, Tang Wan Town, Guangdong, Zhuhai

Patentee before: Juli Integrated Circuit Design Co., Ltd.

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

Granted publication date: 20090729

Termination date: 20140524