A kind of method that software license in the software protecting equipment is backed up
Technical field
The present invention relates to the software license resist technology, particularly a kind of backup of software license and recovery technology.
Background technology
Using software protecting equipment is the main means that realize software security protection and copyright protection.Storing the usage license of software in the device, for example determining whether software can be used, and those modules are used or the like.Software protecting equipment refers in particular to a kind of hardware device that is attached on the computer interface (such as, interfaces such as USB interface, serial ports, parallel port), and operation specific software is on computers carried out software security protection and copyright protection.Modern software protecting equipment, for example the USB encryption lock adopts high strength intelligent card chip and advanced cryptological technique, has certain calculation and storage capacity, is difficult to simultaneously be cracked and copied, and has in the high strength software copyright protection widely and uses.
Software license both can explicitly be present in the software protecting equipment, also can implicit expression be present in the software protecting equipment.So-called explicit existence refers in software protecting equipment, has specific data file or data storage cell, is used for the content of storing software permission, for example the software number of times that can be used, the concurrent running client terminal quantity that software allows etc.; So-called implicit expression exists, and refers in the software protecting equipment not that special region is used to preserve the content of software license, but judge directly whether the needed functional mode of software exists, whether function correct etc.The software license of explicit existence has higher dirigibility, can define very complicated software license type; The software license that implicit expression exists can only determine basically then whether the specific function in software or the software is allowed to carry out.Software license both can explicitly exist, and also can implicit expression exist, and perhaps the mode with the two combination exists.Among the present invention special differentiation is not done in the software license that shows the existence of existence and implicit expression, unification is expressed as software licensing or software license.
Under the prior art condition, software and software protecting equipment are a kind of binding relationships, and promptly as long as legal software protecting equipment exists, software is used according to the mode of software license regulation with regard to allowing.This means simultaneously, has had the use authority that software protecting equipment has just had software.The protection of software copyright is actually by the non-reproduction of software protecting equipment and guarantees that software itself can freely duplicate and back up.But if the situation of the not enough or soft damage of software protecting equipment internal storage space, will directly cause new software can't install or during soft damage software can't use.
So-called soft damage refers to software protecting equipment hardware and does not break down, but soft fault has appearred in inner fixer system or user storage space, for example the confusion that produces in the time of unexpected power down.
For the security requirement to software protection, self can not be replicated existing software protecting equipment, can not be backed up.Under existence conditions, if soft damage appears in the software protecting equipment of software users, solution is that the user applies for a new software protecting equipment again to the software developer.Yet; in most of the cases; software license when software license of being preserved in the software protecting equipment of software users and initial purchase is also inequality, but along with use changes, for example variation of the user data relevant in the software protecting equipment with a certain software.Even more serious situation is, software license that may in store a plurality of softwares in the software protecting equipment, if software protecting equipment is lost, single software developer can not recover whole software licenses for the user.On the other hand; when the software protecting equipment memory space inadequate of software users; some software license in most cases can temporarily not used or seldom use, if therefore apply for a new software protecting equipment, then needs to increase unnecessary cost.
Summary of the invention
In order to address the above problem, the present invention proposes a kind of method that software license is backed up and recovered, can back up software license when wanting by regular or in office what is the need for of software users.Specifically, comprise the backup module of software license in the software protecting equipment and recover module, software license whole or selected in the software protecting equipment can be backuped to external memory, for example hard disc of computer.When soft fault appears in software protecting equipment, just the permission of backup can be returned in the software protecting equipment once more.
For the ease of narration, at first following notion is described:
Software protecting equipment: refer in particular to a kind of especially hardware device on the USB interface of computer interface that is attached to, the function that can utilize equipment to provide is carried out copyright protection to operation software on computers;
Software license: to the permission that the use right of software is stipulated and retrained, the service time of for example stipulating software, whether the simplest permission form can be moved for decision software;
The backup module of described software license and recovery module both can be the software modules in the software protecting equipment, also can be special hardware module.
According to an aspect of the present invention, provide a kind of backup method of software license, it is characterized in that the method comprising the steps of:
The software license that backup module in A, the software protecting equipment will need to back up backups in the memory device of computing machine;
The software license that recovery module in B, the software protecting equipment will back up returns in the original software protecting equipment.
According to an aspect of the present invention, its feature is that also steps A also comprises:
A1, backup module are accepted backup instruction, and acquisition needs the information of the software license of backup, the software license that the location need be backed up;
A2, backup module are handled the software license of needs backup, produce the Backup Data message;
A3, backup module send the Backup Data message to outer computer, are stored into by outer computer in the memory device of appointment.
According to an aspect of the present invention, its feature also is, in steps A 1, the information of software license is accurately to navigate to the identification information that needs the software license backed up in the software protecting equipment.
According to an aspect of the present invention, its feature also is, described identification information comprise software license filename, represent specific clause sign in ID number of software license, software license.
According to an aspect of the present invention, its feature is that also in steps A 2, Bei Fen software license comprises secret information if desired, can carry out encryption.
According to an aspect of the present invention, its feature is that also secret information comprises key or cryptographic algorithm.
According to an aspect of the present invention, its feature is that also cryptographic algorithm is symmetric cryptographic algorithm or asymmetric cryptographic algorithm.
According to an aspect of the present invention, its feature also is, the Backup Data message that produces in the steps A 2 except the particular content that comprises software license, also comprises the authentication information that software protecting equipment is carried out the software protecting equipment of uniqueness identification.
According to an aspect of the present invention, its feature is that also the authentication information of software protecting equipment is used in the time the software license of backup need being returned to software protecting equipment, and whether the recovery module can be differentiated described rejuvenation and be allowed to.
According to an aspect of the present invention, its feature also is, the authentication information of described software protecting equipment comprises the explicit characteristic information and the characteristic information of implicit expression.
According to an aspect of the present invention, its feature is that also explicit characteristic information comprises the unique ID number of software protecting equipment.
According to an aspect of the present invention, its feature is that also the characteristic information of implicit expression comprises a pair of RSA key.
According to an aspect of the present invention, its feature also is, also comprises in steps A 2: backup module increases message Message Authentication Code or digital signature to described Backup Data message, in order to differentiate the integrality of Backup Data message.
According to an aspect of the present invention, its feature also is, the software license recycling module is used to generate the key of Message Authentication Code or digital signature maintains secrecy, and can not read from software protecting equipment.
According to an aspect of the present invention, its feature also is, can optionally comprise a version number in the Backup Data message, is used for different backups is discerned.
According to an aspect of the present invention, its feature also is, preserves up-to-date version number in software protecting equipment, thereby when the recovery module backs up the recovery of permission, only recovers the backup permission of latest edition.
According to an aspect of the present invention, its feature is that also step B also comprises:
B1, recovery module accept to recover instruction, and receive the software license of backup before;
B2, recovery module are carried out the validity discriminating to the software license of backup,
B3, recovery module are written in the memory block of software protecting equipment the software license that comprises in the software license that will back up.
According to an aspect of the present invention, its feature is that also step B2 comprises:
Whether Message Authentication Code or digital signature in the software license of B4, checking backup be effective, if effectively then continue to handle, otherwise carries out fault processing;
Whether the authentication information of the software protecting equipment that is comprised in the software license of B5, checking backup is consistent with the authentication information of current software protecting equipment, if unanimity then continue processing, otherwise would carry out fault processing;
If comprise version number in the software license of B6 backup, judge that then whether version number satisfies the recovery requirement, handles if satisfy then continue, otherwise carries out fault processing.
According to an aspect of the present invention, its feature is that also the order of above-mentioned B4-B6 can be arranged arbitrarily.
According to an aspect of the present invention, its feature also is, in step B3, if the software license of backup is encrypted, then is decrypted processing before being written to the memory block of software protecting equipment.
According to an aspect of the present invention, its feature is that also step B also comprises:
B7, recovery module accept to recover instruction, and receive the software license of backup before;
B8, recovery module are written in the memory block of software protecting equipment the software license that comprises in the software license that will back up;
B9, recovery module are carried out validity to the software license of backup and are differentiated.
According to an aspect of the present invention, its feature also is to have only after the proof procedure among the step B9 all passes through, and is written to that the software license of memory block just is activated in the software protecting equipment; If the proof procedure among the step B9 does not pass through, the software license work that the fault processing among the step B9 forbids writing among the step B8 is maybe with the software license deletion that writes.
According to an aspect of the present invention, its feature is that also step B9 comprises:
Whether Message Authentication Code or digital signature in the software license of B4, checking backup be effective, if effectively then continue to handle, otherwise carries out fault processing;
Whether the authentication information of the software protecting equipment that is comprised in the software license of B5, checking backup is consistent with the authentication information of current software protecting equipment, if unanimity then continue processing, otherwise would carry out fault processing;
If comprise version number in the software license of B6 backup, judge that then whether version number satisfies the recovery requirement, handles if satisfy then continue, otherwise carries out fault processing.
According to an aspect of the present invention, its feature is that also the order of above-mentioned B4-B6 can be arranged arbitrarily.
According to an aspect of the present invention, its feature also is, in step B8, if the software license of backup is encrypted, then is decrypted processing before being written to the memory block of software protecting equipment.
Description of drawings
Fig. 1 is a synoptic diagram of the present invention.
Fig. 2 is the process flow diagram according to the software license backup of one embodiment of the present invention.
Fig. 3 is the software license recovery process flow diagram according to one embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing specific embodiments of the invention are described in detail.
Method of work of the present invention is:
The first step: the backup module work in the software protecting equipment backups to the software license of needs backups in the memory device that computing machine supports;
Second step: the recovery module work in the software protecting equipment returns to the software license of backing up before in the original software protecting equipment;
Wherein, the concrete steps that software license is backed up are:
A. backup module is accepted backup instruction, and acquisition needs the information of the software license of backup, needs the software license of backing up with the location;
B. backup module is handled the software license of needs backup, produces the Backup Data message;
C. backup module sends above-mentioned Backup Data message to outer computer, is stored into by outer computer in the memory device of appointment.
In step a; the information of software license can be the filename that comprises software license, specific clause sign etc. in represent software license ID number, software license, is in a word accurately to navigate to the identification information that needs the software license backed up in the software protecting equipment.
In step b, if need the software license of backup to comprise secret information, for example key or secret algorithm can carry out encryption.The algorithm of encrypting both can be a symmetric cryptographic algorithm, also can be asymmetric cryptographic algorithm.
The data message that is produced among the step b except the particular content that comprises software license, also comprises the authentication information of the software protecting equipment that is backed up, and can carry out uniqueness identification to software protecting equipment.The effect of the authentication information of software protecting equipment is that in the time need returning to the software license of backup in the software protecting equipment, the recovery module can be differentiated described rejuvenation and whether be allowed to.The authentication information of described software protecting equipment both can be explicit characteristic information, and for example Zhuan Zhi unique ID number also can be the pair relationhip of implicit expression, for example a pair of RSA key.
Backup module also needs described data message is increased message Message Authentication Code or digital signature, in order to the integrality of authentication data message, prevents that message is modified and forges.The software license recycling module is used to generate the key of Message Authentication Code or digital signature maintains secrecy, and can not read from software protecting equipment, forges preventing.
Can also optionally comprise a version number in the data message, be used for different backups is discerned.As a kind of optionally security strategy, up-to-date version number can remain in the software protecting equipment, when the recovery module backs up the recovery of permission, can require to recover the backup permission of last version.
The software license that backup is come out returns in original software protecting equipment, and the concrete steps of recovery are:
A. recover module and accept to recover instruction, and receive the software license of previous backup;
B. recover module the validity discriminating carried out in the software license of backup, comprising:
A) whether Message Authentication Code or the digital signature in the software license of checking backup be effective, if effectively then continue process, otherwise carries out fault processing;
B) whether the authentication information of the software protecting equipment that is comprised in the software license of checking backup is consistent with the authentication information of current software protecting equipment, if unanimity then continue, otherwise would carry out fault processing;
C) if comprise version number in the software license of backup, judging then whether version number satisfies recovers requirement, if satisfy then continue process, otherwise carries out fault processing;
The order of three processes that comprised in this step can be arranged arbitrarily.
C. the software license that recovers to comprise in the software license of module with backup is written in the memory block of software protecting equipment; If the software license of backup is encrypted, then before writing, also need to be decrypted processing;
Wherein, step c also can carry out before step b, if like this, had only after the proof procedure among the step b all passes through, and was written to that the software license of memory block just is activated in the software protecting equipment; If the proof procedure among the step b does not pass through, the fault processing among the step b will be forbidden the software license work that writes among the step c, also it can be deleted.
In one embodiment of the invention, comprise the RSA key of a pair of special use in the software protecting equipment, wherein private key Kr is used by backup module, is used for generating the needed digital signature of software license of backup; PKI Kp is resumed module and uses, and is used for the digital signature of software license of backup is differentiated.Simultaneously, PKI Kp is also used by backup module, is used for software license is encrypted; Private key Kr also is resumed module and uses, and is used for the software license of the backup of encrypting is decrypted.RSA key in each software protecting equipment is to all being special and unique, and therefore when software license was backed up, unique id information of preservation software protecting equipment not necessarily.
Supposing the usage license of having preserved 5 softwares in software protecting equipment, is respectively L1, L2, L3, L4 and L5.The user is after use after a while; wish to install new software license L6; but because the storage space of software protecting equipment is not enough; so decision is backed up out with wherein L2 and L4; and from software protecting equipment, delete; when needs used L2 or L4, the permission that backup is come out returned in the software protecting equipment again.
At first, the user begins to carry out the process of backup software permission, with reference to figure 2:
Step 101: user's executive software sends to backup module in the software protecting equipment with the identification information of software license L2 and L4;
Step 102: backup module checks that whether L2 and L4 exist, if there is execution in step 103, otherwise return error message, terminating operation;
Step 103: backup module uses key K p respectively L2 and L4 to be carried out encryption, and uses key K r that encrypted result is carried out digital signature respectively;
Step 104: backup module passes to computing machine with encrypted result in the step 103 and digital signature, is preserved by computing machine;
Step 105: backup module discharges available storage space with L2 and L4 deletion.
Owing to discharged available storage space in the software protecting equipment, the user can install new software license now.
After after a while, the user wishes to reuse the software function of software license L2 correspondence again, therefore to L2 has been carried out recovery operation.With reference to figure 3, its concrete steps are:
Step 201: user's executive software will comprise the encrypted result of software license L2 and digital signature and send to recovery module in the software protecting equipment;
Step 202: recover module and use key K p that digital signature is verified,, otherwise carry out fault processing if be proved to be successful then carry out next step;
Step 203: recover module and use key K r that encrypted result is decrypted processing, the software license after the deciphering is written to the memory block of software protecting equipment.
Through after the above-mentioned steps, L2 is successfully returned in the software protecting equipment.Because Kr and Kp in this software protecting equipment have uniqueness, so other software protecting equipment can not be finished the rejuvenation of not one's own software license backup.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to and replace and improvement etc., all should be included within protection scope of the present invention.