CN109800545A - A kind of method and system based on national secret algorithm protection computer software - Google Patents
A kind of method and system based on national secret algorithm protection computer software Download PDFInfo
- Publication number
- CN109800545A CN109800545A CN201711139903.8A CN201711139903A CN109800545A CN 109800545 A CN109800545 A CN 109800545A CN 201711139903 A CN201711139903 A CN 201711139903A CN 109800545 A CN109800545 A CN 109800545A
- Authority
- CN
- China
- Prior art keywords
- software
- license
- main program
- file
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Storage Device Security (AREA)
Abstract
The present invention provides a kind of method and system based on national secret algorithm protection computer software, the described method includes: software main program entrance automatically execute inquiry license file instruction, when reply has license file, use SM2 certification authentication license file preset in main program, when replying unlicensed file, computer hardware information and software version number are stitched together as original text, using SM2 certificate preset in software main program to the digital envelope of original text production PKCS#7 format, the digital envelope is saved into file generated license request, and terminate software main program, the license request file is sent to software publishing side;Software publishing side decrypts PKCS#7 format license request file using its SM2 private key and records information therein, uses SM2 private key signature after doing SM3 abstract to computer hardware information and license term, forms license file, then carries out main program verifying.
Description
Technical field
The present invention relates to protecting computer software fields, and more particularly, to a kind of calculating based on national secret algorithm
The method and system of machine software protection.
Background technique
As country increasingly payes attention to intellectual property protection, the entertainments such as present video display, music field copyright is
Legal is realized, but in computer software fields, piracy software is still propagated its belief on a large scale, and is remained incessant after repeated prohibition, and is caused this existing
As the reason of existing technical reason also have social status quo reason.As the publisher of software, the considerations of in terms of commercial interest,
It is bound to increase the dynamics of copyright protection using more advanced technology, prevents unwarranted bootlegging, propagation, operation etc..
There are many kinds of the modes for realizing software copyright protection at present, wherein it is most commonly seen by the way of registration code, still
In view of user experience, registration code generally will not be too long, this results in protection intensity inadequate, reduces the difficulty being cracked
Degree;Carrying out verifying by network on-line joining process authentication server is also a kind of salvo common at present, but is adopted to needs
The software disposed offline is taken just to be not suitable for;Also there is partial software by the way of licensing authority to protect itself, award
Power file may include more effective informations, increase verifying complexity, however due to having used old International Algorithmic, with most
The progress of attack technology in recent years, safety are no longer satisfied requirement.
Summary of the invention
In order to solve existing for background technique to the intensity of the copyright protection of computer software, safety and offline protect nothing
The technical issues of method is preferably taken into account, the present invention provide a kind of method and system based on national secret algorithm protection computer software.Institute
Stating the method based on national secret algorithm protection computer software includes:
Step 1 executes the instruction of inquiry license file in the main program entrance of software automatically, when replying unlicensed text
When part, 2 are gone to step, when reply has license file, goes to step 4;
Computer hardware information and software version number are stitched together as original text by step 2, are demonstrate,proved using preset SM2
The digital envelope is saved into file generated license request, and tie the digital envelope of original text production PKCS#7 format by book
The license request file is sent to software publishing side by beam software main program;
Step 3, software publishing side decrypt PKCS#7 format license request file using its SM2 private key and record therein
Information uses SM2 private key signature after doing SM3 abstract to computer hardware information and license term, forms license file;
Step 4 reads license file, using SM2 certification authentication license file preset in main program, when verifying is logical
It crosses, then continues software main program, when verifying does not pass through, software main program is exited.
Further, by software publishing before the instruction that the main program entrance of software executes inquiry license file automatically
The SM2 certificate of side is preset in the main program code for needing software to be protected.
Further, the computer hardware information in the method include No. CPU, hard disk number and mainboard number.
Further, it includes copy and online network transmission that license request file is sent to software publishing side by user.
Further, license file is read, using SM2 certification authentication license file preset in main program, when testing
Card passes through, then continues software main program, and when verifying does not pass through, software main program, which exits, includes:
License file is read, license term, SM3 abstract and signature value are obtained;
Dynamic collecting computer hardware information in real time, does SM3 abstract to computer hardware information and license term,
And it is compared with the SM3 abstract in license file;
When comparison result is consistent, the signature value in the preset SM2 certification authentication license file of main program, verifying are used
Successful then obtain the machine current time, current time then continues to execute software main program process within the validity period of licensing,
Otherwise verifying license file failure, exits software main program.It is compared by this, preferably ensure that software can only be defined
It is run on specific computer in time.
According to another aspect of the present invention, the present invention provides a kind of system based on national secret algorithm protection computer software,
The system comprises:
Licensing query unit is used for whether having license file in the main program entrance query software of software;
License request unit is used to for the computer hardware information of software users and software version number being stitched together
As original text, using preset SM2 certificate to the digital envelope of original text production PKCS#7 format, by the digital envelope save at
File generated license request, and terminate software main program, license request file is sent to software publishing side;
Licensing forms unit, is used to generate using the SM2 private key decryption license request unit of software publishing side
PKCS#7 format license request file simultaneously records information therein, is SM3 to computer hardware information and license term
SM2 private key signature is used after abstract, forms license file;
License validation unit is used to read licensing and forms the license file that unit is sent, pre- using SM2 certificate
It sets SM2 certification authentication license file preset in unit and then continues software main program when being verified, when verifying does not pass through
When, software main program exits.
Further, the system also includes SM2 certificate preset units, are used for the SM2 certificate of software publishing side is pre-
It sets in the main program code for needing software to be protected.
Further, the computer hardware information in the license request unit include No. CPU, hard disk number and mainboard
Number.
Further, it includes copying that license request file is sent to software publishing side by the user in license request unit
Shellfish and online network transmission.
Further, license validation unit reads license file, is permitted using SM2 certification authentication preset in main program
File can be demonstrate,proved, when being verified, then continues software main program, when verifying does not pass through, software main program, which exits, includes:
License file is read, license term, SM3 abstract and signature value are obtained;
Dynamic collecting computer hardware information in real time, does SM3 abstract to computer hardware information and license term,
And it is compared with the SM3 abstract in license file;
When comparison result is consistent, the signature value in the preset SM2 certification authentication license file of main program, verifying are used
Successful then obtain the machine current time, current time then continues to execute software main program process within the validity period of licensing,
Otherwise verifying license file failure, exits software main program.
Technical solution provided by the present invention needs the soft of copyright protection by the way that the SM2 certificate of software publishing side is preset at
In part main program code, and using State Commercial Cryptography Administration publication national secret algorithm, in a manner of licensing authority to software into
Row copyright protection does not need additional hardware supported, has special relevant knowledge without user, does not need real-time online yet
Network environment supports that technical costs is low, improves protection intensity, has broad application prospects.
Detailed description of the invention
By reference to the following drawings, exemplary embodiments of the present invention can be more fully understood by:
Fig. 1 is the flow chart of the method based on national secret algorithm protection computer software of the specific embodiment of the invention;
Fig. 2 is the protection of the specific embodiment of the invention based on the structure of the system of national secret algorithm protection computer software
Figure.
Specific embodiment
Exemplary embodiments of the present invention are introduced referring now to the drawings, however, the present invention can use many different shapes
Formula is implemented, and is not limited to the embodiment described herein, and to provide these embodiments be at large and fully disclose
The present invention, and the scope of the present invention is sufficiently conveyed to person of ordinary skill in the field.Show for what is be illustrated in the accompanying drawings
Term in example property embodiment is not limitation of the invention.In the accompanying drawings, identical cells/elements use identical attached
Icon note.
Unless otherwise indicated, term (including scientific and technical terminology) used herein has person of ordinary skill in the field
It is common to understand meaning.Further it will be understood that with the term that usually used dictionary limits, should be understood as and its
The context of related fields has consistent meaning, and is not construed as Utopian or too formal meaning.
Fig. 1 is the flow chart of the method based on national secret algorithm protection computer software of the specific embodiment of the invention.Such as
Shown in Fig. 1, the method 100 based on national secret algorithm protection computer software is since step 101.
In step 101, the SM2 certificate of software publishing side is preset in the main program code for needing software to be protected;
In step 102, the instruction of inquiry license file is executed automatically in the main program entrance of software, when reply is without license
When demonstrate,proving file, 103 are gone to step, when reply has license file, goes to step 105;
In step 103, computer hardware information and software version number are stitched together as original text, the main journey of software is used
The digital envelope is saved into file generated the digital envelope of original text production PKCS#7 format by preset SM2 certificate in sequence
License request, and terminate software main program, the license request file is sent to software publishing side;
In step 104, software publishing side decrypts PKCS#7 format license request file using its SM2 private key and records it
In information, computer hardware information and license term are made after SM3 abstract of SM2 private key signature, licensing text is formed
Part;
In step 105, license file is read, using SM2 certification authentication license file preset in main program, when testing
Card passes through, then continues software main program, and when verifying does not pass through, software main program is exited.
Preferably, the computer hardware information in the method include No. CPU, hard disk number and mainboard number.
Preferably, it includes copy and online network transmission that license request file is sent to software publishing side by user.
Preferably, it reads license file and works as verifying using SM2 certification authentication license file preset in main program
Pass through, then continue software main program, when verifying does not pass through, software main program, which exits, includes:
License file is read, license term, SM3 abstract and signature value are obtained;
Dynamic collecting computer hardware information in real time, does SM3 abstract to computer hardware information and license term,
And it is compared with the SM3 abstract in license file;
When comparison result is consistent, the signature value in the preset SM2 certification authentication license file of main program, verifying are used
Successful then obtain the machine current time, current time then continues to execute software main program process within the validity period of licensing,
Otherwise verifying license file failure, exits software main program.
Fig. 2 is the protection of the specific embodiment of the invention based on the structure of the system of national secret algorithm protection computer software
Figure.As shown in Fig. 2, the system 200 based on national secret algorithm protection computer software includes:
SM2 certificate preset unit 201, being used to for the SM2 certificate of software publishing side being preset at needs software to be protected
In main program code;
Licensing query unit 202 is used for whether having license file in the main program entrance query software of software;
License request unit 203 is used to exist the computer hardware information of software users and software version number splicing
The digital envelope is protected using preset SM2 certificate to the digital envelope of original text production PKCS#7 format together as original text
It is saved as file generated license request, and terminates software main program, license request file is sent to software publishing side;
Licensing forms unit 204, is used to generate using the SM2 private key decryption license request unit of software publishing side
PKCS#7 format license request file and record information therein, computer hardware information and license term are done
SM2 private key signature is used after SM3 abstract, forms license file;
License validation unit 205 is used to read licensing and forms the license file that unit is sent, demonstrate,proved using SM2
Preset SM2 certification authentication license file then continues software main program when being verified in book preset unit, when verifying not
By when, software main program exits.
Preferably, the computer hardware information in the license request unit include No. CPU, hard disk number and mainboard number.
Preferably, it includes copy that license request file is sent to software publishing side by the user in license request unit
With online network transmission.
Preferably, license validation unit reads license file, is permitted using SM2 certification authentication preset in main program
It demonstrate,proves file and then continues software main program when being verified, when verifying does not pass through, software main program, which exits, includes:
License file is read, license term, SM3 abstract and signature value are obtained;
Dynamic collecting computer hardware information in real time, does SM3 abstract to computer hardware information and license term,
And it is compared with the SM3 abstract in license file;
When comparison result is consistent, the signature value in the preset SM2 certification authentication license file of main program, verifying are used
Successful then obtain the machine current time, current time then continues to execute software main program process within the validity period of licensing,
Otherwise verifying license file failure, exits software main program.
Normally, all terms used in the claims are all solved according to them in the common meaning of technical field
It releases, unless in addition clearly being defined wherein.All references " one/described/be somebody's turn to do [device, component etc.] " are all opened ground
At least one example being construed in described device, component etc., unless otherwise expressly specified.Any method disclosed herein
Step need not all be run with disclosed accurate sequence, unless explicitly stated otherwise.
Claims (10)
1. a kind of method based on national secret algorithm protection computer software, which is characterized in that the described method includes:
Step 1 executes the instruction of inquiry license file in the main program entrance of software automatically, when replying unlicensed file
When, 2 are gone to step, when reply has license file, goes to step 4;
Computer hardware information and software version number are stitched together as original text by step 2, using preset in software main program
SM2 certificate to the digital envelope of original text production PKCS#7 format, which is saved and is asked at file generated licensing
It asks, and terminates software main program, the license request file is sent to software publishing side;
Step 3, software publishing side decrypt PKCS#7 format license request file using its SM2 private key and record letter therein
Breath uses SM2 private key signature after doing SM3 abstract to computer hardware information and license term, forms license file;
Step 4 reads license file, using SM2 certification authentication license file preset in main program, when being verified,
Then continue software main program, when verifying does not pass through, software main program is exited.
2. the method according to claim 1, wherein the main program entrance in software executes inquiry licensing automatically
The SM2 certificate of software publishing side is preset at before the instruction of file in the main program code for needing software to be protected.
3. the method according to claim 1, wherein the computer hardware information in the method include No. CPU,
Hard disk number and mainboard number.
4. the method according to claim 1, wherein license request file is sent to software publishing side by user
Including copy and online network transmission.
5. using SM2 preset in main program the method according to claim 1, wherein reading license file
Certification authentication license file then continues software main program when being verified, and when verifying does not pass through, software main program is exited
Include:
License file is read, license term, SM3 abstract and signature value are obtained;
Dynamic collecting computer hardware information in real time does SM3 abstract to computer hardware information and license term, and with
SM3 in license file, which makes a summary, to be compared;
When comparison result is consistent, using the signature value in the preset SM2 certification authentication license file of main program, it is proved to be successful
The machine current time is then obtained, current time then continues to execute software main program process, otherwise within the validity period of licensing
License file failure is verified, software main program is exited.
6. a kind of system based on national secret algorithm protection computer software, which is characterized in that the system comprises:
Licensing query unit is used for whether having license file in the main program entrance query software of software;
License request unit is used for conduct that the computer hardware information of software users and software version number are stitched together
Original text is believed the number using SM2 certificate preset in software main program to the digital envelope of original text production PKCS#7 format
Envelope is saved into file generated license request, and terminates software main program, and license request file is sent to software publishing side;
Licensing forms unit, is used for the PKCS# generated using the SM2 private key decryption license request unit of software publishing side
7 format license request files simultaneously record information therein, after doing SM3 abstract to computer hardware information and license term
With SM2 private key signature, license file is formed;
License validation unit is used to read licensing and forms the license file that unit is sent, uses the preset list of SM2 certificate
Preset SM2 certification authentication license file then continues software main program when being verified in member, soft when verifying does not pass through
Part main program exits.
7. system according to claim 6, which is characterized in that the system also includes SM2 certificate preset units, are used for
The SM2 certificate of software publishing side is preset in the main program code for needing software to be protected.
8. system according to claim 6, which is characterized in that the computer hardware information in the license request unit
Including No. CPU, hard disk number and mainboard number.
9. system according to claim 6, which is characterized in that the user in license request unit is license request text
It includes copy and online network transmission that part, which is sent to software publishing side,.
10. system according to claim 6, which is characterized in that license validation unit reads license file, uses master
Preset SM2 certification authentication license file then continues software main program when being verified in program, when verifying does not pass through,
Software main program, which exits, includes:
License file is read, license term, SM3 abstract and signature value are obtained;
Dynamic collecting computer hardware information in real time does SM3 abstract to computer hardware information and license term, and with
SM3 in license file, which makes a summary, to be compared;
When comparison result is consistent, using the signature value in the preset SM2 certification authentication license file of main program, it is proved to be successful
The machine current time is then obtained, current time then continues to execute software main program process, otherwise within the validity period of licensing
License file failure is verified, software main program is exited.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711139903.8A CN109800545A (en) | 2017-11-16 | 2017-11-16 | A kind of method and system based on national secret algorithm protection computer software |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711139903.8A CN109800545A (en) | 2017-11-16 | 2017-11-16 | A kind of method and system based on national secret algorithm protection computer software |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109800545A true CN109800545A (en) | 2019-05-24 |
Family
ID=66555705
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711139903.8A Pending CN109800545A (en) | 2017-11-16 | 2017-11-16 | A kind of method and system based on national secret algorithm protection computer software |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109800545A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101192263A (en) * | 2006-11-28 | 2008-06-04 | 富士施乐株式会社 | Information processing system and method |
CN101694685A (en) * | 2009-10-12 | 2010-04-14 | 南京联创科技集团股份有限公司 | Safety product license management method based on XML encryption and digital certificate |
CN102314572A (en) * | 2011-10-14 | 2012-01-11 | 迈普通信技术股份有限公司 | Registration information file generation method and device, and use authorization method of application software |
CN104580316A (en) * | 2013-10-24 | 2015-04-29 | 深圳市国信互联科技有限公司 | Software authorization management method and software authorization management system |
CN105610570A (en) * | 2015-12-21 | 2016-05-25 | 艾体威尔电子技术(北京)有限公司 | Registration method and system for installation of compiling environment |
CN107332666A (en) * | 2017-08-17 | 2017-11-07 | 创元网络技术股份有限公司 | Terminal document encryption method |
-
2017
- 2017-11-16 CN CN201711139903.8A patent/CN109800545A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101192263A (en) * | 2006-11-28 | 2008-06-04 | 富士施乐株式会社 | Information processing system and method |
CN101694685A (en) * | 2009-10-12 | 2010-04-14 | 南京联创科技集团股份有限公司 | Safety product license management method based on XML encryption and digital certificate |
CN102314572A (en) * | 2011-10-14 | 2012-01-11 | 迈普通信技术股份有限公司 | Registration information file generation method and device, and use authorization method of application software |
CN104580316A (en) * | 2013-10-24 | 2015-04-29 | 深圳市国信互联科技有限公司 | Software authorization management method and software authorization management system |
CN105610570A (en) * | 2015-12-21 | 2016-05-25 | 艾体威尔电子技术(北京)有限公司 | Registration method and system for installation of compiling environment |
CN107332666A (en) * | 2017-08-17 | 2017-11-07 | 创元网络技术股份有限公司 | Terminal document encryption method |
Non-Patent Citations (2)
Title |
---|
中国人民银行科技司: "《移动金融关键技术与标准解读》", 31 March 2016, 中国金融出版社 * |
国家税务总局电子税务管理中心: "《电子税务工作手册 2013版》", 31 December 2015, 中国税务出版社 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10846416B2 (en) | Method for managing document on basis of blockchain by using UTXO-based protocol, and document management server using same | |
CN109067801B (en) | Identity authentication method, identity authentication device and computer readable medium | |
CN109074433B (en) | Method and system for verifying digital asset integrity using a distributed hash table and a peer-to-peer distributed ledger | |
US8635442B2 (en) | System and method for long-term digital signature verification utilizing light weight digital signatures | |
Lei et al. | An efficient and anonymous buyer-seller watermarking protocol | |
JP5989183B2 (en) | Data signature generation method, data signature verification method, and management computer | |
AU716912B2 (en) | Electronic copy protection mechanism | |
WO2019070563A1 (en) | Genuine instance of digital goods | |
US20060174110A1 (en) | Symmetric key optimizations | |
EP3399484B1 (en) | Method and server for authenticating and verifying file | |
JPH11231775A (en) | Device and method for conditional authentication | |
CN105635070B (en) | Anti-counterfeiting method and system for digital file | |
CN110096849A (en) | A kind of License authorization and authentication method, device, equipment and readable storage medium storing program for executing | |
CN110113334B (en) | Contract processing method and device based on block chain and storage medium | |
EP3399485B1 (en) | Method and server for authenticating and verifying file | |
CN111160997A (en) | Advertisement supervision method and device based on block chain and advertisement delivery system | |
GB2404828A (en) | Copyright management where encrypted content and corresponding key are in same file | |
JP2011165221A (en) | Equipment information transmitting method, equipment information transmitting device, equipment information transmitting program | |
CN109756344B (en) | Digital signature of document and verification method and device thereof | |
JP2008035019A (en) | Digital signature device | |
Chen et al. | A Blockchain-based copyright protection scheme with proactive defense | |
CN109800545A (en) | A kind of method and system based on national secret algorithm protection computer software | |
Dawson et al. | eTendering-security and legal issues | |
JP4182814B2 (en) | Cryptographic processing method and apparatus, verification method and apparatus, and proxy operation method | |
JP4187459B2 (en) | Cryptographic processing method and apparatus, verification method and apparatus, and operation proxy method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190524 |
|
RJ01 | Rejection of invention patent application after publication |